summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndrew <saintruler@gmail.com>2020-06-05 17:02:06 +0400
committerAndrew <saintruler@gmail.com>2020-06-05 17:02:06 +0400
commitea8ff6d7638cdd1f36cc978f1734759158b969b0 (patch)
tree18893c91594a2d58bb6757f592a076c5496e300e
Initial commit
-rw-r--r--.config/dunst/dunstrc222
-rw-r--r--.config/nvim/init.vim6
-rw-r--r--.config/polybar/config427
-rwxr-xr-x.config/polybar/launch.sh12
-rw-r--r--.config/rofi/slate.rasi43
-rw-r--r--.config/wget/wgetrc1
-rw-r--r--.config/zsh/.zshrc41
-rwxr-xr-x.local/bin/scripts/shellprompt3
-rwxr-xr-x.local/bin/statusbar/clock3
-rwxr-xr-x.local/bin/statusbar/disk11
-rwxr-xr-x.local/bin/statusbar/pacpackages10
-rwxr-xr-x.local/bin/statusbar/popupgrade14
-rwxr-xr-x.local/bin/statusbar/volume90
-rw-r--r--.profile59
-rw-r--r--.xprofile11
15 files changed, 953 insertions, 0 deletions
diff --git a/.config/dunst/dunstrc b/.config/dunst/dunstrc
new file mode 100644
index 0000000..108dc9e
--- /dev/null
+++ b/.config/dunst/dunstrc
@@ -0,0 +1,222 @@
+[global]
+ font = Monospace 8
+
+ # allow a small subset of html markup:
+ # <b>bold</b>
+ # <i>italic</i>
+ # <s>strikethrough<s/>
+ # <u>underline</u>
+ #
+ # for a complete reference see http://developer.gnome.org/pango/stable/PangoMarkupFormat.html
+ # If markup is not allowed, those tags will be stripped out of the message.
+ allow_markup = yes
+
+ # The format of the message. Possible variables are:
+ # %a appname
+ # %s summary
+ # %b body
+ # %i iconname (including its path)
+ # %I iconname (without its path)
+ # %p progress value if set ([ 0%] to [100%]) or nothing
+ # Markup is allowed
+ format = "<b>%a:</b> %s\n%b"
+
+ # Sort messages by urgency
+ sort = yes
+
+ # Show how many messages are currently hidden (because of geometry)
+ indicate_hidden = yes
+
+ # alignment of message text.
+ # Possible values are "left", "center" and "right"
+ alignment = left
+
+ # The frequency with wich text that is longer than the notification
+ # window allows bounces back and forth.
+ # This option conflicts with 'word_wrap'.
+ # Set to 0 to disable
+ bounce_freq = 0
+
+ # show age of message if message is older than show_age_threshold seconds.
+ # set to -1 to disable
+ show_age_threshold = 60
+
+ # split notifications into multiple lines if they don't fit into geometry
+ word_wrap = yes
+
+ # ignore newlines '\n' in notifications
+ ignore_newline = no
+
+
+ # the geometry of the window
+ # geometry [{width}]x{height}][+/-{x}+/-{y}]
+ # The geometry of the message window.
+ # The height is measured in number of notifications everything else in pixels. If the width
+ # is omitted but the height is given ("-geometry x2"), the message window
+ # expands over the whole screen (dmenu-like). If width is 0,
+ # the window expands to the longest message displayed.
+ # A positive x is measured from the left, a negative from the
+ # right side of the screen. Y is measured from the top and down respectevly.
+ # The width can be negative. In this case the actual width is the
+ # screen width minus the width defined in within the geometry option.
+ geometry = "300x5-30+20"
+
+ # The transparency of the window. range: [0; 100]
+ # This option will only work if a compositing windowmanager is present (e.g. xcompmgr, compiz, etc..)
+ transparency = 0
+
+ # Don't remove messages, if the user is idle (no mouse or keyboard input)
+ # for longer than idle_threshold seconds.
+ # Set to 0 to disable.
+ idle_threshold = 120
+
+ # Which monitor should the notifications be displayed on.
+ monitor = 0
+
+ # Display notification on focused monitor. Possible modes are:
+ # mouse: follow mouse pointer
+ # keyboard: follow window with keyboard focus
+ # none: don't follow anything
+ #
+ # "keyboard" needs a windowmanager that exports the _NET_ACTIVE_WINDOW property.
+ # This should be the case for almost all modern windowmanagers.
+ #
+ # If this option is set to mouse or keyboard, the monitor option will be
+ # ignored.
+ follow = keyboard
+
+ # should a notification popped up from history be sticky or
+ # timeout as if it would normally do.
+ sticky_history = yes
+
+ # The height of a single line. If the height is smaller than the font height,
+ # it will get raised to the font height.
+ # This adds empty space above and under the text.
+ line_height = 0
+
+ # Draw a line of 'separatpr_height' pixel height between two notifications.
+ # Set to 0 to disable
+ separator_height = 2
+
+ # padding between text and separator
+ padding = 8
+
+ # horizontal padding
+ horizontal_padding = 8
+
+ # Define a color for the separator.
+ # possible values are:
+ # * auto: dunst tries to find a color fitting to the background
+ # * foreground: use the same color as the foreground
+ # * frame: use the same color as the frame.
+ # * anything else will be interpreted as a X color
+ separator_color = frame
+
+ # print a notification on startup
+ # This is mainly for error detection, since dbus (re-)starts dunst
+ # automatically after a crash.
+ startup_notification = true
+
+ # dmenu path
+ dmenu = /usr/bin/dmenu -p dunst:
+
+ # browser for opening urls in context menu
+ browser = /usr/bin/firefox -new-tab
+
+[frame]
+ width = 0
+ color = "#000000"
+
+[shortcuts]
+ # shortcuts are specified as [modifier+][modifier+]...key
+ # available modifiers are 'ctrl', 'mod1' (the alt-key), 'mod2', 'mod3'
+ # and 'mod4' (windows-key)
+ # xev might be helpful to find names for keys
+
+ # close notification
+ close = mod4+m
+
+ # close all notifications
+ close_all = mod4+shift+m
+
+ # redisplay last message(s)
+ history = mod4+n
+
+ # context menu
+ context = mod4+shift+i
+
+[urgency_low]
+ # IMPORTANT: colors have to be defined in quotation marks.
+ # Otherwise the '#' and following would be interpreted as a comment.
+ background = "#222222"
+ foreground = "#888888"
+ timeout = 10
+
+[urgency_normal]
+ background = "#285577"
+ foreground = "#ffffff"
+ timeout = 10
+
+[urgency_critical]
+ background = "#900000"
+ foreground = "#ffffff"
+ timeout = 0
+
+
+# Every section that isn't one of the above is interpreted as a rules
+# to override settings for certain messages.
+# Messages can be matched by 'appname', 'summary', 'body' or 'icon'
+# and you can override the 'timeout', 'urgency', 'foreground', 'background'
+# and 'format'.
+# Shell-like globbing will get expanded.
+#
+# SCRIPTING
+# you can specify a script that gets run when the rule matches by setting
+# the 'script' option.
+# The script will be called as follows:
+# script appname summary body icon urgency
+# where urgency can be "LOW", "NORMAL" or "CRITICAL".
+#
+# NOTE: if you don't want a notification to be displayed, set the format to ""
+# NOTE: It might be helpful to run dunst -print in a terminal in order to find
+# fitting options for rules.
+
+#[espeak]
+# summary = "*"
+# script = dunst_espeak.sh
+
+#[script-test]
+# summary = "*script*"
+# script = dunst_test.sh
+
+#[ignore]
+## This notification will not be displayed
+# summary = "foobar"
+# format = ""
+
+[signed_on]
+ appname = Pidgin
+ summary = "*signed on*"
+ urgency = low
+
+[signed_off]
+ appname = Pidgin
+ summary = *signed off*
+ urgency = low
+
+[says]
+ appname = Pidgin
+ summary = *says*
+ urgency = critical
+ format = "%s "%b""
+
+[music]
+ appname = Amarok
+ summary = "Now playing"
+ urgency = low
+
+#[twitter]
+# appname = Pidgin
+# summary = *twitter.com*
+# urgency = normal
+#
diff --git a/.config/nvim/init.vim b/.config/nvim/init.vim
new file mode 100644
index 0000000..9b1d1f5
--- /dev/null
+++ b/.config/nvim/init.vim
@@ -0,0 +1,6 @@
+filetype plugin indent on
+set tabstop=4
+set softtabstop=4
+set shiftwidth=4
+set expandtab
+syntax on
diff --git a/.config/polybar/config b/.config/polybar/config
new file mode 100644
index 0000000..ae3df1b
--- /dev/null
+++ b/.config/polybar/config
@@ -0,0 +1,427 @@
+;==========================================================
+;
+;
+; ██████╗ ██████╗ ██╗ ██╗ ██╗██████╗ █████╗ ██████╗
+; ██╔══██╗██╔═══██╗██║ ╚██╗ ██╔╝██╔══██╗██╔══██╗██╔══██╗
+; ██████╔╝██║ ██║██║ ╚████╔╝ ██████╔╝███████║██████╔╝
+; ██╔═══╝ ██║ ██║██║ ╚██╔╝ ██╔══██╗██╔══██║██╔══██╗
+; ██║ ╚██████╔╝███████╗██║ ██████╔╝██║ ██║██║ ██║
+; ╚═╝ ╚═════╝ ╚══════╝╚═╝ ╚═════╝ ╚═╝ ╚═╝╚═╝ ╚═╝
+;
+;
+; To learn more about how to configure Polybar
+; go to https://github.com/polybar/polybar
+;
+; The README contains a lot of information
+;
+;==========================================================
+
+[colors]
+;background = ${xrdb:color0:#222}
+;background = #222
+background = #32302f
+background-alt = #444
+
+;foreground = ${xrdb:color7:#222}
+;foreground = #dfdfdf
+foreground = #ebdbb2
+foreground-alt = #555
+
+primary = #ffb52a
+secondary = #e60053
+alert = #bd2c40
+
+[bar/example]
+;monitor = ${env:MONITOR:HDMI-1}
+width = 100%
+height = 33
+;offset-x = 1%
+;offset-y = 1%
+radius = 0.0
+fixed-center = true
+
+background = ${colors.background}
+foreground = ${colors.foreground}
+
+line-size = 2
+line-color = #f00
+
+border-size = 0
+border-color = #00000000
+
+padding-left = 0
+padding-right = 2
+
+module-margin-left = 1
+module-margin-right = 2
+
+font-0 = fixed:pixelsize=10;1
+font-1 = unifont:fontformat=truetype:size=8:antialias=false;0
+font-2 = siji:pixelsize=10;1
+
+modules-left = bspwm i3
+modules-center = date
+modules-right = xbacklight pulseaudio xkeyboard memory cpu wlan eth battery temperature
+
+tray-position = right
+tray-padding = 2
+;tray-background = #0063ff
+
+;wm-restack = bspwm
+;wm-restack = i3
+
+;override-redirect = true
+
+;scroll-up = bspwm-desknext
+;scroll-down = bspwm-deskprev
+
+;scroll-up = i3wm-wsnext
+;scroll-down = i3wm-wsprev
+
+cursor-click = pointer
+cursor-scroll = ns-resize
+
+[module/xwindow]
+type = internal/xwindow
+label = %title:0:30:...%
+
+[module/xkeyboard]
+type = internal/xkeyboard
+blacklist-0 = num lock
+
+format-prefix = " "
+format-prefix-foreground = ${colors.foreground-alt}
+format-prefix-underline = ${colors.secondary}
+
+label-layout = %layout%
+label-layout-underline = ${colors.secondary}
+
+label-indicator-padding = 2
+label-indicator-margin = 1
+label-indicator-background = ${colors.secondary}
+label-indicator-underline = ${colors.secondary}
+
+[module/filesystem]
+type = internal/fs
+interval = 25
+
+mount-0 = /
+
+label-mounted = %{F#0a81f5}%mountpoint%%{F-}: %percentage_used%%
+label-unmounted = %mountpoint% not mounted
+label-unmounted-foreground = ${colors.foreground-alt}
+
+[module/bspwm]
+type = internal/bspwm
+
+label-focused = %index%
+label-focused-background = ${colors.background-alt}
+label-focused-underline= ${colors.primary}
+label-focused-padding = 2
+
+label-occupied = %index%
+label-occupied-padding = 2
+
+label-urgent = %index%!
+label-urgent-background = ${colors.alert}
+label-urgent-padding = 2
+
+label-empty = %index%
+label-empty-foreground = ${colors.foreground-alt}
+label-empty-padding = 2
+
+; Separator in between workspaces
+; label-separator = |
+
+[module/i3]
+type = internal/i3
+format = <label-state> <label-mode>
+index-sort = true
+wrapping-scroll = false
+
+; Only show workspaces on the same output as the bar
+;pin-workspaces = true
+
+label-mode-padding = 2
+label-mode-foreground = #000
+label-mode-background = ${colors.primary}
+
+; focused = Active workspace on focused monitor
+label-focused = %index%
+label-focused-background = ${colors.background-alt}
+label-focused-underline= ${colors.primary}
+label-focused-padding = 2
+
+; unfocused = Inactive workspace on any monitor
+label-unfocused = %index%
+label-unfocused-padding = 2
+
+; visible = Active workspace on unfocused monitor
+label-visible = %index%
+label-visible-background = ${self.label-focused-background}
+label-visible-underline = ${self.label-focused-underline}
+label-visible-padding = ${self.label-focused-padding}
+
+; urgent = Workspace with urgency hint set
+label-urgent = %index%
+label-urgent-background = ${colors.alert}
+label-urgent-padding = 2
+
+; Separator in between workspaces
+; label-separator = |
+
+
+[module/mpd]
+type = internal/mpd
+format-online = <label-song> <icon-prev> <icon-stop> <toggle> <icon-next>
+
+icon-prev = 
+icon-stop = 
+icon-play = 
+icon-pause = 
+icon-next = 
+
+label-song-maxlen = 25
+label-song-ellipsis = true
+
+[module/xbacklight]
+type = internal/xbacklight
+
+format = <label> <bar>
+label = BL
+
+bar-width = 10
+bar-indicator = |
+bar-indicator-foreground = #fff
+bar-indicator-font = 2
+bar-fill = ─
+bar-fill-font = 2
+bar-fill-foreground = #9f78e1
+bar-empty = ─
+bar-empty-font = 2
+bar-empty-foreground = ${colors.foreground-alt}
+
+[module/backlight-acpi]
+inherit = module/xbacklight
+type = internal/backlight
+card = intel_backlight
+
+[module/cpu]
+type = internal/cpu
+interval = 2
+format-prefix = " "
+format-prefix-foreground = ${colors.foreground-alt}
+format-underline = #f90000
+label = %percentage:2%%
+
+[module/memory]
+type = internal/memory
+interval = 2
+format-prefix = " "
+format-prefix-foreground = ${colors.foreground-alt}
+format-underline = #4bffdc
+label = %percentage_used%%
+
+[module/wlan]
+type = internal/network
+interface = net1
+interval = 3.0
+
+format-connected = <ramp-signal> <label-connected>
+format-connected-underline = #9f78e1
+label-connected = %essid%
+
+format-disconnected =
+;format-disconnected = <label-disconnected>
+;format-disconnected-underline = ${self.format-connected-underline}
+;label-disconnected = %ifname% disconnected
+;label-disconnected-foreground = ${colors.foreground-alt}
+
+ramp-signal-0 = 
+ramp-signal-1 = 
+ramp-signal-2 = 
+ramp-signal-3 = 
+ramp-signal-4 = 
+ramp-signal-foreground = ${colors.foreground-alt}
+
+[module/eth]
+type = internal/network
+interface = enp5s0
+interval = 3.0
+
+format-connected-underline = #55aa55
+format-connected-prefix = " "
+format-connected-prefix-foreground = ${colors.foreground-alt}
+label-connected = %local_ip%
+
+format-disconnected =
+;format-disconnected = <label-disconnected>
+;format-disconnected-underline = ${self.format-connected-underline}
+;label-disconnected = %ifname% disconnected
+;label-disconnected-foreground = ${colors.foreground-alt}
+
+[module/date]
+type = internal/date
+interval = 5
+
+date =
+date-alt = " %Y-%m-%d"
+
+time = %H:%M
+time-alt = %H:%M:%S
+
+format-prefix = 
+format-prefix-foreground = ${colors.foreground-alt}
+format-underline = #0a6cf5
+
+label = %date% %time%
+
+[module/pulseaudio]
+type = internal/pulseaudio
+
+format-volume = <label-volume> <bar-volume>
+label-volume = VOL %percentage%%
+label-volume-foreground = ${root.foreground}
+
+label-muted = 🔇 muted
+label-muted-foreground = #666
+
+bar-volume-width = 10
+bar-volume-foreground-0 = #55aa55
+bar-volume-foreground-1 = #55aa55
+bar-volume-foreground-2 = #55aa55
+bar-volume-foreground-3 = #55aa55
+bar-volume-foreground-4 = #55aa55
+bar-volume-foreground-5 = #f5a70a
+bar-volume-foreground-6 = #ff5555
+bar-volume-gradient = false
+bar-volume-indicator = |
+bar-volume-indicator-font = 2
+bar-volume-fill = ─
+bar-volume-fill-font = 2
+bar-volume-empty = ─
+bar-volume-empty-font = 2
+bar-volume-empty-foreground = ${colors.foreground-alt}
+
+[module/alsa]
+type = internal/alsa
+
+format-volume = <label-volume> <bar-volume>
+label-volume = VOL
+label-volume-foreground = ${root.foreground}
+
+format-muted-prefix = " "
+format-muted-foreground = ${colors.foreground-alt}
+label-muted = sound muted
+
+bar-volume-width = 10
+bar-volume-foreground-0 = #55aa55
+bar-volume-foreground-1 = #55aa55
+bar-volume-foreground-2 = #55aa55
+bar-volume-foreground-3 = #55aa55
+bar-volume-foreground-4 = #55aa55
+bar-volume-foreground-5 = #f5a70a
+bar-volume-foreground-6 = #ff5555
+bar-volume-gradient = false
+bar-volume-indicator = |
+bar-volume-indicator-font = 2
+bar-volume-fill = ─
+bar-volume-fill-font = 2
+bar-volume-empty = ─
+bar-volume-empty-font = 2
+bar-volume-empty-foreground = ${colors.foreground-alt}
+
+[module/battery]
+type = internal/battery
+battery = BAT0
+adapter = ADP1
+full-at = 98
+
+format-charging = <animation-charging> <label-charging>
+format-charging-underline = #ffb52a
+
+format-discharging = <animation-discharging> <label-discharging>
+format-discharging-underline = ${self.format-charging-underline}
+
+format-full-prefix = " "
+format-full-prefix-foreground = ${colors.foreground-alt}
+format-full-underline = ${self.format-charging-underline}
+
+ramp-capacity-0 = 
+ramp-capacity-1 = 
+ramp-capacity-2 = 
+ramp-capacity-foreground = ${colors.foreground-alt}
+
+animation-charging-0 = 
+animation-charging-1 = 
+animation-charging-2 = 
+animation-charging-foreground = ${colors.foreground-alt}
+animation-charging-framerate = 750
+
+animation-discharging-0 = 
+animation-discharging-1 = 
+animation-discharging-2 = 
+animation-discharging-foreground = ${colors.foreground-alt}
+animation-discharging-framerate = 750
+
+[module/temperature]
+type = internal/temperature
+thermal-zone = 0
+warn-temperature = 60
+
+format = <ramp> <label>
+format-underline = #f50a4d
+format-warn = <ramp> <label-warn>
+format-warn-underline = ${self.format-underline}
+
+label = %temperature-c%
+label-warn = %temperature-c%
+label-warn-foreground = ${colors.secondary}
+
+ramp-0 = 
+ramp-1 = 
+ramp-2 = 
+ramp-foreground = ${colors.foreground-alt}
+
+[module/powermenu]
+type = custom/menu
+
+expand-right = true
+
+format-spacing = 1
+
+label-open = 
+label-open-foreground = ${colors.secondary}
+label-close =  cancel
+label-close-foreground = ${colors.secondary}
+label-separator = |
+label-separator-foreground = ${colors.foreground-alt}
+
+menu-0-0 = reboot
+menu-0-0-exec = menu-open-1
+menu-0-1 = power off
+menu-0-1-exec = menu-open-2
+
+menu-1-0 = cancel
+menu-1-0-exec = menu-open-0
+menu-1-1 = reboot
+menu-1-1-exec = sudo reboot
+
+menu-2-0 = power off
+menu-2-0-exec = sudo poweroff
+menu-2-1 = cancel
+menu-2-1-exec = menu-open-0
+
+[settings]
+screenchange-reload = true
+;compositing-background = xor
+;compositing-background = screen
+;compositing-foreground = source
+;compositing-border = over
+;pseudo-transparency = false
+
+[global/wm]
+margin-top = 0
+margin-bottom = 0
+
+; vim:ft=dosini
diff --git a/.config/polybar/launch.sh b/.config/polybar/launch.sh
new file mode 100755
index 0000000..a7cd217
--- /dev/null
+++ b/.config/polybar/launch.sh
@@ -0,0 +1,12 @@
+#!/bin/bash
+
+# Terminate already running bar instances
+killall -q polybar
+
+# Wait until the processes have been shut down
+while pgrep -u $UID -x polybar >/dev/null; do sleep 1; done
+
+# Launch Polybar, using default config location ~/.config/polybar/config
+polybar example &
+
+echo "Polybar launched..."
diff --git a/.config/rofi/slate.rasi b/.config/rofi/slate.rasi
new file mode 100644
index 0000000..762c1b0
--- /dev/null
+++ b/.config/rofi/slate.rasi
@@ -0,0 +1,43 @@
+* {
+ background-color: #32302f;
+ border-color: #32302f;
+ text-color: #ebdbb2;
+ spacing: 0;
+ width: 512px;
+}
+
+inputbar {
+ border: 0 0 1px 0;
+ children: [prompt,entry];
+}
+
+prompt {
+ padding: 16px;
+ border: 0 1px 0 0;
+}
+
+textbox {
+ background-color: #2e343f;
+ border: 0 0 1px 0;
+ border-color: #282C33;
+ padding: 8px 16px;
+}
+
+entry {
+ padding: 16px;
+}
+
+listview {
+ cycle: false;
+ margin: 0 0 -1px 0;
+ scrollbar: false;
+}
+
+element {
+ border: 0 0 1px 0;
+ padding: 10px;
+}
+
+element selected {
+ background-color: #504945;
+}
diff --git a/.config/wget/wgetrc b/.config/wget/wgetrc
new file mode 100644
index 0000000..4fd7999
--- /dev/null
+++ b/.config/wget/wgetrc
@@ -0,0 +1 @@
+hsts-file=~/.cache/wget-hsts
diff --git a/.config/zsh/.zshrc b/.config/zsh/.zshrc
new file mode 100644
index 0000000..e30dc7b
--- /dev/null
+++ b/.config/zsh/.zshrc
@@ -0,0 +1,41 @@
+# Lines configured by zsh-newuser-install
+HISTFILE=~/.cache/zsh/histfile
+HISTSIZE=1000
+SAVEHIST=1000
+setopt extendedglob nomatch
+unsetopt autocd beep
+bindkey -e
+# End of lines configured by zsh-newuser-install
+# The following lines were added by compinstall
+zstyle :compinstall filename '/home/andrew/.zshrc'
+
+autoload -Uz compinit
+#compinit
+compinit -d $XDG_CACHE_HOME/zsh/zcompdump
+# End of lines added by compinstall
+
+# Turn on clint prompt
+autoload -Uz promptinit
+promptinit
+prompt clint
+
+# enable color support of ls and also add handy aliases
+if [ -x /usr/bin/dircolors ]; then
+ test -r ~/.dircolors && eval "$(dircolors -b ~/.dircolors)" || eval "$(dircolors -b)"
+ alias ls='ls --color=auto'
+ #alias dir='dir --color=auto'
+ #alias vdir='vdir --color=auto'
+
+ alias grep='grep --color=auto'
+ alias fgrep='fgrep --color=auto'
+ alias egrep='egrep --color=auto'
+fi
+
+# Aliases
+alias la='ls -lhFA'
+alias ll='ls -lhF'
+alias l='ls -CF'
+alias dotfiles="/usr/bin/git --git-dir='$HOME/.dotfiles' --work-tree='$HOME'"
+alias dotstat="/usr/bin/git --git-dir='$HOME/.dotfiles' --work-tree='$HOME' status"
+alias dotadd="/usr/bin/git --git-dir='$HOME/.dotfiles' --work-tree='$HOME' add -f"
+
diff --git a/.local/bin/scripts/shellprompt b/.local/bin/scripts/shellprompt
new file mode 100755
index 0000000..80b045f
--- /dev/null
+++ b/.local/bin/scripts/shellprompt
@@ -0,0 +1,3 @@
+#!/bin/sh
+read -p "$1 [yN] " ans
+([[ "$ans" == "Y" || "$ans" == "y" ]] && exit 0) || exit 1
diff --git a/.local/bin/statusbar/clock b/.local/bin/statusbar/clock
new file mode 100755
index 0000000..102929e
--- /dev/null
+++ b/.local/bin/statusbar/clock
@@ -0,0 +1,3 @@
+#!/bin/sh
+
+date "+%d %b (%a) %k:%M"
diff --git a/.local/bin/statusbar/disk b/.local/bin/statusbar/disk
new file mode 100755
index 0000000..7d6b84d
--- /dev/null
+++ b/.local/bin/statusbar/disk
@@ -0,0 +1,11 @@
+#!/bin/sh
+
+getDiskSpace () {
+ echo $(df -h | grep "$1$" | awk '{ print $4 }')
+}
+
+case $BLOCK_BUTTON in
+ 1) setsid -f "$TERMINAL" -e ncdu '/home/andrew' ;;
+esac
+
+echo "💽$(getDiskSpace "/home")"
diff --git a/.local/bin/statusbar/pacpackages b/.local/bin/statusbar/pacpackages
new file mode 100755
index 0000000..2fafe61
--- /dev/null
+++ b/.local/bin/statusbar/pacpackages
@@ -0,0 +1,10 @@
+#!/bin/sh
+
+case $BLOCK_BUTTON in
+ 1) setsid -f "$TERMINAL" -e popupgrade ;;
+esac
+
+pacmancnt=$(pacman -Qu | grep -Fcv "[ignored]")
+aurcnt=$(yay -Qau | grep -Fcv "[ignored]")
+echo "$pacmancnt/$aurcnt" | sed "s/^/📦/g"
+
diff --git a/.local/bin/statusbar/popupgrade b/.local/bin/statusbar/popupgrade
new file mode 100755
index 0000000..9d62b31
--- /dev/null
+++ b/.local/bin/statusbar/popupgrade
@@ -0,0 +1,14 @@
+#!/bin/sh
+
+printf "Packages to upgrade:\\n"
+pacman -Qu
+sudo pacman -Syu
+pkill -RTMIN+3 "${STATUSBAR:-dwmblocks}"
+
+printf "\\nAUR packages to upgrade:\\n"
+yay -Qau
+shellprompt "Upgrade AUR packages?" && yay -Sau
+pkill -RTMIN+3 "${STATUSBAR:-dwmblocks}"
+
+printf "\\nUpgrade complete.\\nPress <Enter> to exit window.\\n\\n"
+read -r
diff --git a/.local/bin/statusbar/volume b/.local/bin/statusbar/volume
new file mode 100755
index 0000000..673e591
--- /dev/null
+++ b/.local/bin/statusbar/volume
@@ -0,0 +1,90 @@
+#!/sbin/python3
+import subprocess
+import re
+import os
+
+
+block = os.getenv("BLOCK_BUTTON")
+if block is not None:
+ if block == '1':
+ subprocess.call(["pamixer", "-t", ";", "pkill", "-RTMIN+9", "dwmblocks"])
+ elif block == '3':
+ subprocess.Popen([os.getenv("TERMINAL"), "-e", "pulsemixer"])
+
+ quit(0)
+
+
+a = subprocess.check_output(["pactl", "list", "sinks"]).decode()
+
+SINK, PARAMS, PARAM = 0, 1, 2
+parsing = SINK
+
+re_param_str = re.compile("(.+?): (.*)")
+re_param_list = re.compile("(.+?):")
+
+current_sink = None
+current_param = None
+
+sinks = {}
+for line in a.split("\n"):
+ indent = line.count("\t")
+ line = line.strip()
+
+ if parsing == SINK:
+ if line.startswith("Sink"):
+ n = line.split()[1]
+ sinks[n] = {}
+ current_sink = sinks[n]
+
+ parsing = PARAMS
+
+ elif parsing == PARAMS:
+ if line == '':
+ parsing = SINK
+ continue
+
+ match = re_param_str.match(line)
+ if indent == 1 and match is not None:
+ name, value = match.groups()
+ current_param = name
+ current_sink[name] = value
+ continue
+
+ match = re_param_list.match(line)
+ if indent == 1 and match is not None:
+ name = match.group(1)
+ current_param = name
+ current_sink[name] = []
+ continue
+
+ value = current_sink[name]
+ if isinstance(value, str):
+ current_sink[name] = [value]
+
+ current_sink[name].append(line)
+
+percent = re.compile("(\d+)%")
+vol = None
+mute = False
+for sink in sinks.values():
+ if 'JBL' in sink['Description']:
+ vol = int(percent.findall(sink['Volume'][0])[0])
+ mute = sink["Mute"] == "yes"
+ break
+ elif 'Built-in' in sink['Description'] and vol is None:
+ vol = int(percent.findall(sink['Volume'][0])[0])
+ mute = sink["Mute"] == "yes"
+
+
+
+if vol is None or mute:
+ print("🔇")
+
+if vol > 70:
+ icon = "🔊"
+elif vol < 30:
+ icon = "🔈"
+else:
+ icon = "🔉"
+
+print(f"{icon}{vol}%")
diff --git a/.profile b/.profile
new file mode 100644
index 0000000..c2f7d0b
--- /dev/null
+++ b/.profile
@@ -0,0 +1,59 @@
+# ~/.profile: executed by the command interpreter for login shells.
+# This file is not read by bash(1), if ~/.bash_profile or ~/.bash_login
+# exists.
+# see /usr/share/doc/bash/examples/startup-files for examples.
+# the files are located in the bash-doc package.
+
+# the default umask is set in /etc/profile; for setting the umask
+# for ssh logins, install and configure the libpam-umask package.
+#umask 022
+
+# if running bash
+if [ -n "$BASH_VERSION" ]; then
+ # include .bashrc if it exists
+ if [ -f "$HOME/.bashrc" ]; then
+ . "$HOME/.bashrc"
+ fi
+fi
+
+# set PATH so it includes user's private bin if it exists
+if [ -d "$HOME/bin" ] ; then
+ PATH="$HOME/bin:$PATH"
+fi
+
+# set PATH so it includes user's private bin if it exists
+if [ -d "$HOME/.local/bin" ] ; then
+ PATH="$PATH:$(du "$HOME/.local/bin/" | cut -f2 | paste -sd ':')"
+fi
+
+export SHELL="/bin/zsh"
+export TERMINAL="st"
+export EDITOR="nvim"
+export BROWSER="firefox"
+export VIMINIT="source $MYVIMRC"
+
+# XDG Paths config
+export XDG_CONFIG_HOME="$HOME/.config"
+export XDG_CACHE_HOME="$HOME/.cache"
+export XDG_DATA_HOME="$HOME/.local/share"
+# export XDG_RUNTIME_DIR=""
+
+# XDG Specific configs
+export MYVIMRC="$XDG_CONFIG_HOME/nvim/init.vim"
+export VIMINIT="source $MYVIMRC"
+
+export CARGO_HOME="$XDG_DATA_HOME/cargo"
+export DOCKER_CONFIG="$XDG_CONFIG_HOME/docker"
+export WINEPREFIX="$XDG_DATA_HOME/wineprefixes/default"
+export IPYTHONDIR="$XDG_CONFIG_HOME/ipython"
+export JUPYTER_CONFIG_DIR="$XDG_CONFIG_HOME/ipython"
+export KODI_DATA="$XDG_DATA_HOME/kodi"
+export NPM_CONFIG_USERCONFIG="$XDG_CONFIG_HOME/npm/npmrc"
+export PYLINTHOME="$XDG_CACHE_HOME/pylint"
+export CUDA_CACHE_PATH="$XDG_CACHE_HOME/nv"
+export ZDOTDIR="$XDG_CONFIG_HOME/zsh"
+export NODE_REPL_HISTORY="$XDG_DATA_HOME/node_repl_history"
+export LESSKEY="$XDG_CONFIG_HOME/less/lesskey"
+export LESSHISTFILE=-
+export GTK2_RC_FILES="$XDG_CONFIG_HOME/gtk-2.0/gtkrc"
+export GNUPGHOME="$XDG_DATA_HOME/gnupg"
diff --git a/.xprofile b/.xprofile
new file mode 100644
index 0000000..093c162
--- /dev/null
+++ b/.xprofile
@@ -0,0 +1,11 @@
+xcompmgr -c -o 0 &
+setxkbmap -layout us,ru -option "grp:alt_shift_toggle"
+dunst &
+dwmblocks &
+
+# Setup wallpaper
+WP_DIR="$HOME/Pictures/Wallpapers/"
+if [ -d "$WP_DIR" ]; then
+ WP=$( ls -l "$WP_DIR" | tail -n +2 | awk '{ print $9 }' | shuf | tail -n -1 )
+ xwallpaper --zoom "$WP_DIR/$WP"
+fi