aboutsummaryrefslogtreecommitdiffstats
path: root/bspwm
diff options
context:
space:
mode:
authorPeter Son Struschka <me@peter-struschka.com>2020-02-02 12:50:32 +0800
committerPeter Son Struschka <me@peter-struschka.com>2020-02-02 12:50:32 +0800
commitf2b18aab5a84d04a36f4194473680ad70bdb5578 (patch)
treee9db24237556f25832811d224bcb7898f22d5d1a /bspwm
parent2bb9010d2e613206ce3d476dbea81eb9a56f3c66 (diff)
downloaddotfiles-f2b18aab5a84d04a36f4194473680ad70bdb5578.tar.gz
dotfiles-f2b18aab5a84d04a36f4194473680ad70bdb5578.tar.bz2
dotfiles-f2b18aab5a84d04a36f4194473680ad70bdb5578.tar.lz
dotfiles-f2b18aab5a84d04a36f4194473680ad70bdb5578.tar.xz
dotfiles-f2b18aab5a84d04a36f4194473680ad70bdb5578.tar.zst
dotfiles-f2b18aab5a84d04a36f4194473680ad70bdb5578.zip
script to find and edit config files
Diffstat (limited to 'bspwm')
-rwxr-xr-xbspwm/.config/bspwm/bspwmrc31
-rw-r--r--bspwm/.config/polybar/config637
-rwxr-xr-xbspwm/.config/polybar/launch.sh19
-rwxr-xr-xbspwm/.config/polybar/task_polybar.sh7
-rw-r--r--bspwm/.config/sxhkd/sxhkdrc146
-rwxr-xr-xbspwm/.local/bin/rofi_goto_workspace4
-rwxr-xr-xbspwm/.local/bin/rofi_moveto_workspace4
-rwxr-xr-xbspwm/.local/bin/rofi_workspace_prompt3
-rwxr-xr-xbspwm/.local/bin/scratch3
-rwxr-xr-xbspwm/.local/bin/spotifycl207
l---------bspwm/.local/share/config-files/bspwm1
l---------bspwm/.local/share/config-files/polybar1
l---------bspwm/.local/share/config-files/sxhkd1
-rw-r--r--bspwm/.local/share/images/wallpaper.jpgbin0 -> 651668 bytes
-rw-r--r--bspwm/.local/share/lock/lock.pngbin0 -> 3959 bytes
-rw-r--r--bspwm/.local/share/lock/rick_lock.pngbin0 -> 113100 bytes
-rwxr-xr-xbspwm/.local/share/scripts/lock.sh15
17 files changed, 1079 insertions, 0 deletions
diff --git a/bspwm/.config/bspwm/bspwmrc b/bspwm/.config/bspwm/bspwmrc
new file mode 100755
index 0000000..b514a7a
--- /dev/null
+++ b/bspwm/.config/bspwm/bspwmrc
@@ -0,0 +1,31 @@
+#! /bin/sh
+
+# reset polybar
+$HOME/.config/polybar/launch.sh &
+
+# Autostart
+[[ ! $(pidof -x sxhkd) ]] && sxhkd &
+[[ ! $(pidof -x compton) ]] && compton &
+[[ ! $(pidof -x nm-applet) ]] && nm-applet &
+[[ ! $(pidof -x feh ) ]] && feh --bg-scale "$HOME/.local/share/images/wallpaper.jpg" &
+
+# locker
+[[ ! $(pidof -x xautolock) ]] && xautolock -locker "$HOME/.local/share/scripts/lock.sh" -time 60 -detectsleep -notify 10 &
+
+bspc monitor -d I II III IV V VI VII VIII IX X
+
+bspc config border_width 2
+bspc config window_gap 12
+
+bspc config split_ratio 0.52
+bspc config borderless_monocle true
+bspc config gapless_monocle true
+
+bspc rule -a Gimp desktop='^8' state=floating follow=on
+bspc rule -a Chromium desktop='^2'
+bspc rule -a mplayer2 state=floating
+bspc rule -a Kupfer.py focus=on
+bspc rule -a Screenkey manage=off
+
+bspc rule -a scratchpad sticky=on state=floating hidden=on
+alacritty --class scratchpad,scratchpad -e ~/code/dotfiles/bspwm/.bin/scratch &
diff --git a/bspwm/.config/polybar/config b/bspwm/.config/polybar/config
new file mode 100644
index 0000000..05d6334
--- /dev/null
+++ b/bspwm/.config/polybar/config
@@ -0,0 +1,637 @@
+;==========================================================
+;
+;
+; ██████╗ ██████╗ ██╗ ██╗ ██╗██████╗ █████╗ ██████╗
+; ██╔══██╗██╔═══██╗██║ ╚██╗ ██╔╝██╔══██╗██╔══██╗██╔══██╗
+; ██████╔╝██║ ██║██║ ╚████╔╝ ██████╔╝███████║██████╔╝
+; ██╔═══╝ ██║ ██║██║ ╚██╔╝ ██╔══██╗██╔══██║██╔══██╗
+; ██║ ╚██████╔╝███████╗██║ ██████╔╝██║ ██║██║ ██║
+; ╚═╝ ╚═════╝ ╚══════╝╚═╝ ╚═════╝ ╚═╝ ╚═╝╚═╝ ╚═╝
+;
+;
+; To learn more about how to configure Polybar
+; go to https://github.com/jaagr/polybar
+;
+; The README contains alot of information
+;
+;==========================================================
+
+[colors]
+;background = ${xrdb:color0:#222}
+background = #222
+background-alt = #444
+;foreground = ${xrdb:color7:#222}
+foreground = #dfdfdf
+foreground-alt = #555
+primary = #ffb52a
+secondary = #e60053
+alert = #bd2c40
+
+[bar/topbar]
+monitor = ${env:MONITOR:eDP-1}
+width = 100%
+height = 40
+dpi = 96
+;offset-x = 1%
+;offset-y = 1%
+radius = 6.0
+fixed-center = false
+
+background = ${colors.background}
+foreground = ${colors.foreground}
+
+line-size = 3
+line-color = #f00
+
+border-size = 10
+border-bottom-size = 0
+border-color = #00000000
+
+padding-left = 2
+padding-right = 2
+
+font-0 = fixed:pixelsize=10;1
+font-1 = unifont:fontformat=truetype:size=8:antialias=false;0
+font-2 = siji:pixelsize=10;1
+font-3 = "Font Awesome 5 Brands:style=Regular:pixelsize=8;1"
+font-4 = "Font Awesome 5 Free:style=Regular:pixelsize=8;1"
+font-5 = "Font Awesome 5 Free:style=Solid:pixelsize=8;1"
+
+tray-position = right
+tray-padding = 2
+;tray-transparent = true
+;tray-background = #0063ff
+tray-scale = 1
+tray-detached = false
+
+wm-restack = bspwm
+override-redirect = false
+
+scroll-up = bspwm-desknext
+scroll-down = bspwm-deskprev
+cursor-click = pointer
+cursor-scroll = ns-resize
+
+module-margin-left = 2
+module-margin-right = 2
+modules-left = hostname xwindow
+modules-center =
+modules-right = filesystem backlight pulseaudio xkeyboard memory cpu wlan eth ethvpn battery temperature
+
+[bar/topbar-second]
+monitor = ${env:MONITOR:eDP-1}
+width = 100%
+height = 40
+dpi = 96
+;offset-x = 1%
+offset-y = 50
+radius = 6.0
+fixed-center = true
+
+background = ${colors.background}
+foreground = ${colors.foreground}
+
+line-size = 3
+line-color = #f00
+
+border-size = 10
+border-top-size = 0
+border-bottom-size = 0
+border-color = #00000000
+
+padding-left = 2
+padding-right = 2
+
+font-0 = fixed:pixelsize=10;1
+font-1 = unifont:fontformat=truetype:size=8:antialias=false;0
+font-2 = siji:pixelsize=10;1
+font-3 = "Font Awesome 5 Brands:style=Regular:pixelsize=8;1"
+font-4 = "Font Awesome 5 Free:style=Regular:pixelsize=8;1"
+font-5 = "Font Awesome 5 Free:style=Solid:pixelsize=8;1"
+
+wm-restack = bspwm
+override-redirect = false
+
+scroll-up = bspwm-desknext
+scroll-down = bspwm-deskprev
+cursor-click = pointer
+cursor-scroll = ns-resize
+
+module-margin-left = 2
+module-margin-right = 2
+modules-left = bspwm
+modules-center = spotify
+modules-right = taskwarrior date
+
+[module/hostname]
+type = custom/script
+interval = 256
+format = "<label> "
+"format-prefix = "  "
+format-prefix = " ƸӜƷ "
+format-prefix-foreground = ${colors.secondary}
+format-padding = 0
+exec = echo "$(uname -n)"
+
+[module/spotify]
+type = custom/script
+exec = spotifycl status
+tail = true
+format = <label>
+format-foreground = ${colors.foreground-alt}
+format-underline = ${colors.primary}
+click-right = playerctl play-pause
+click-left = playerctl play-pause
+click-middle = playerctl next
+scroll-up = playerctl next
+scroll-down = playerctl previous
+label-maxlen = 120
+label-ellipsis = true
+
+[module/xwindow]
+type = internal/xwindow
+label = %title:0:40:...%
+
+[module/xkeyboard]
+type = internal/xkeyboard
+blacklist-0 = num lock
+
+format = <label-layout>
+format-prefix = " "
+format-prefix-foreground = ${colors.foreground}
+format-prefix-underline = ${colors.secondary}
+
+label-layout = %name%
+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
+
+pin-workspaces = true
+inline-mode = false
+enable-click = true
+enable-scroll = false
+reverse-scroll = false
+fuzzy-matching = true
+
+; Available tags:
+; <label-monitor>
+; <label-state> - gets replaced with <label-(focused|urgent|occupied|empty)>
+; <label-mode> - gets replaced with
+; <label-(monocle|tiled|fullscreen|floating|locked|sticky|private)>
+; Default: <label-state>
+format = <label-state> <label-mode>
+
+; Available tokens:
+; %name%
+; Default: %name%
+label-monitor = %name%
+
+; If any values for label-dimmed-N are defined, the workspace/mode
+; colors will get overridden with those values if the monitor is out of focus
+; To only override workspaces in a specific state, use:
+; label-dimmed-focused
+; label-dimmed-occupied
+; label-dimmed-urgent
+; label-dimmed-empty
+label-dimmed-foreground = #555
+label-dimmed-underline = ${colors.background}
+label-dimmed-focused-background = #f00
+
+; Available tokens:
+; %name%
+; %icon%
+; %index%
+; Default: %icon% %name%
+label-focused = %icon% %name%
+label-focused-background = ${colors.background-alt}
+label-focused-underline= ${colors.primary}
+label-focused-padding = 2
+
+; Available tokens:
+; %name%
+; %icon%
+; %index%
+; Default: %icon% %name%
+label-occupied = %icon% %name%
+label-occupied-padding = 2
+
+; Available tokens:
+; %name%
+; %icon%
+; %index%
+; Default: %icon% %name%
+label-urgent = %icon% %name%!
+label-urgent-background = ${colors.alert}
+label-urgent-padding = 2
+
+; Available tokens:
+; %name%
+; %icon%
+; %index%
+; Default: %icon% %name%
+label-empty = %icon% %name%
+label-empty-foreground = ${colors.foreground-alt}
+label-empty-padding = 0
+
+; The following labels will be used to indicate the layout/mode
+; for the focused workspace. Requires <label-mode>
+;
+; Available tokens:
+; None
+;label-monocle = 
+;label-tiled = 
+;label-fullscreen = 
+;label-floating = 
+;label-pseudotiled = P
+;label-locked = 
+;label-locked-foreground = #bd2c40
+;label-sticky = 
+;label-sticky-foreground = #fba922
+;label-private = 
+;label-private-foreground = #bd2c40
+;label-marked = M
+
+; Separator in between workspaces
+label-separator =
+label-separator-padding = 0
+label-separator-foreground = #ffb52a
+
+[module/i3]
+type = internal/i3
+; Only show workspaces on the same output as the bar
+pin-workspaces = true
+strip-wsnumbers = true
+format = <label-state> <label-mode>
+index-sort = true
+wrapping-scroll = false
+
+label-mode = %mode%
+label-mode-padding = 2
+label-mode-foreground = #000
+label-mode-background = ${colors.primary}
+
+; focused = Active workspace on focused monitor
+label-focused = %name%
+label-focused-background = ${module/bspwm.label-focused-background}
+label-focused-underline = ${module/bspwm.label-focused-underline}
+label-focused-padding = ${module/bspwm.label-focused-padding}
+
+; unfocused = Inactive workspace on any monitor
+label-unfocused = %name%
+label-unfocused-padding = ${module/bspwm.label-occupied-padding}
+
+; visible = Active workspace on unfocused monitor
+label-visible = %name%
+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 = %name%
+label-urgent-background = ${module/bspwm.label-urgent-background}
+label-urgent-padding = ${module/bspwm.label-urgent-padding}
+
+; Separator in between workspaces
+; label-separator = |
+
+
+[module/taskwarrior]
+interval = 30
+type = custom/script
+exec = $HOME/.config/polybar/task_polybar.sh
+format = <label>
+format-foreground = #FFF
+format-prefix = "§ "
+click-left = task "$((`cat /tmp/tw_polybar_id`))" done
+
+[module/line-l]
+type = custom/text
+content = "____[ "
+content-foreground = ${colors.primary}
+
+[module/line-r]
+type = custom/text
+content = " ]____"
+content-foreground = ${colors.primary}
+
+[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/backlight]
+type = internal/backlight
+card = intel_backlight
+format = <label> <ramp>
+label = ""
+
+ramp-0 = 🌕
+ramp-1 = 🌔
+ramp-2 = 🌓
+ramp-3 = 🌒
+ramp-4 = 🌑
+
+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/xbacklight]
+type = internal/xbacklight
+
+format = <label> <bar>
+label = 
+
+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}
+format-underline = #f90000
+label = %percentage:2%%
+
+[module/memory]
+type = internal/memory
+interval = 2
+format-prefix = " "
+format-prefix-foreground = ${colors.foreground}
+format-underline = #4bffdc
+label = %percentage_used%%
+
+[module/wlan]
+type = internal/network
+interface = wlp3s0
+interval = 3.0
+accumulate-stats = true
+
+format-connected-prefix = " "
+format-connected = <label-connected>
+format-connected-underline = #9f78e1
+label-connected = %essid% %local_ip% ↓%downspeed% ↑%upspeed% (%signal%)
+
+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-foreground = ${colors.foreground-alt}
+
+[module/eth]
+type = internal/network
+interface = eno1
+interval = 3.0
+accumulate-stats = true
+
+format-connected-underline = #55aa55
+format-connected-prefix = " "
+format-connected-prefix-foreground = ${colors.foreground}
+label-connected = %local_ip% ↓%downspeed% ↑%upspeed% ↕%linkspeed%
+
+format-disconnected =
+;format-disconnected = <label-disconnected>
+;format-disconnected-underline = ${self.format-connected-underline}
+;label-disconnected = %ifname% disconnected
+;label-disconnected-foreground = ${colors.foreground-alt}
+
+[module/ethvpn]
+type = internal/network
+interface = tun0
+interval = 3.0
+accumulate-stats = true
+
+format-connected-underline = #55aa55
+format-connected-prefix = ""
+format-connected-prefix-foreground = ${colors.foreground}
+label-connected = %local_ip% %local_ip6%
+
+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 = 1
+
+date =
+date-alt = " %Y-%m-%d"
+
+time = %H:%M:%S
+time-alt = %H:%M:%S
+
+format-prefix = 
+format-prefix-foreground = ${colors.foreground}
+format-underline = #0a6cf5
+
+label = %date% %time%
+
+[module/pulseaudio]
+type = internal/pulseaudio
+
+format-volume = <label-volume> <bar-volume>
+label-volume = %percentage%%
+label-volume-foreground = ${root.foreground}
+
+label-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}
+
+ramp-volume-0 = 
+ramp-volume-1 = 
+
+[module/alsa]
+type = internal/alsa
+
+format-volume = <label-volume> <bar-volume>
+label-volume = VOL
+label-volume-foreground = ${root.foreground}
+
+format-muted-foreground = ${colors.foreground-alt}
+label-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
+time-format = %H:%M
+battery = BAT0
+adapter = AC
+full-at = 89
+
+format-charging = <animation-charging> <label-charging>
+format-charging-underline = #ffb52a
+label-charging = %percentage%% | %time%
+
+format-discharging = <animation-discharging> <label-discharging>
+format-discharging-underline = ${self.format-charging-underline}
+label-discharging = %percentage%% | %time%
+
+format-full = 
+format-full-foreground = ${colors.foreground}
+format-full-underline = ${self.format-charging-underline}
+
+ramp-capacity-0 = 
+ramp-capacity-1 = 
+ramp-capacity-2 = 
+ramp-capacity-3 = 
+ramp-capacity-4 = 
+ramp-capacity-foreground = ${colors.foreground-alt}
+
+animation-charging-0 = 
+animation-charging-1 = 
+animation-charging-2 = 
+animation-charging-3 = 
+animation-charging-4 = 
+animation-charging-foreground = ${colors.foreground}
+animation-charging-framerate = 750
+
+animation-discharging-0 = 
+animation-discharging-1 = 
+animation-discharging-2 = 
+animation-discharging-3 = 
+animation-discharging-4 = 
+animation-discharging-foreground = ${colors.foreground}
+animation-discharging-framerate = 1000
+
+[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}
+
+[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-0-2 = sleep
+menu-0-2-exec = systemctl suspend
+
+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
+
+[global/wm]
+margin-top = 5
+margin-bottom = 5
+
+; vim:ft=dosini
diff --git a/bspwm/.config/polybar/launch.sh b/bspwm/.config/polybar/launch.sh
new file mode 100755
index 0000000..c45e085
--- /dev/null
+++ b/bspwm/.config/polybar/launch.sh
@@ -0,0 +1,19 @@
+#!/usr/bin/env sh
+
+# 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 bar1 and bar2
+MONITOR=$(polybar -m|tail -n1|sed -e 's/:.*$//g') polybar topbar &
+sleep 1
+MONITORS=$(polybar -m|sed -e 's/:.*$//g')
+while read -r monitor; do
+ MONITOR=$monitor polybar topbar-second &
+ sleep 1
+done <<< $MONITORS
+
+echo "Bars launched..."
diff --git a/bspwm/.config/polybar/task_polybar.sh b/bspwm/.config/polybar/task_polybar.sh
new file mode 100755
index 0000000..555ff1b
--- /dev/null
+++ b/bspwm/.config/polybar/task_polybar.sh
@@ -0,0 +1,7 @@
+#!/bin/bash
+
+most_urgent_desc=`task rc.verbose: rc.report.next.columns:description rc.report.next.labels:1 limit:1 next`
+most_urgent_id=`task rc.verbose: rc.report.next.columns:id rc.report.next.labels:1 limit:1 next`
+most_urgent_due=`task rc.verbose: rc.report.next.columns:due.relative rc.report.next.labels:1 limit:1 next`
+echo "$most_urgent_id" > /tmp/tw_polybar_id
+echo "$most_urgent_desc ·  $most_urgent_due"
diff --git a/bspwm/.config/sxhkd/sxhkdrc b/bspwm/.config/sxhkd/sxhkdrc
new file mode 100644
index 0000000..48f764d
--- /dev/null
+++ b/bspwm/.config/sxhkd/sxhkdrc
@@ -0,0 +1,146 @@
+#
+# wm independent hotkeys
+#
+
+# terminal emulator
+super + Return
+ alacritty
+
+# program launcher
+super + {space, x}
+ rofi -show {drun, run}
+
+# make sxhkd reload its configuration files:
+super + Escape
+ pkill -USR1 -x sxhkd
+
+#
+# bspwm hotkeys
+#
+
+# quit/restart bspwm
+super + alt + {q,r}
+ bspc {quit,wm -r}
+
+# close and kill
+super + {_,shift + }w
+ bspc node -{c,k}
+
+# alternate between the tiled and monocle layout
+super + m
+ bspc desktop -l next
+
+# send the newest marked node to the newest preselected node
+super + y
+ bspc node newest.marked.local -n newest.!automatic.local
+
+super + p
+ bspc node -n 'last.!automatic'
+
+# swap the current node and the biggest node
+super + g
+ bspc node -s biggest.local
+
+super + {_,shift + }r
+ bspc node @/ --rotate {90,-90}
+
+super + o
+ bspc node -s @parent/
+
+# state/flags
+#
+
+# set the window state
+super + {t,shift + t,s,f}
+ bspc node -t {tiled,pseudo_tiled,floating,fullscreen}
+
+# set the node flags
+super + ctrl + {m,x,y,z}
+ bspc node -g {marked,locked,sticky,private}
+
+#
+# focus/swap
+#
+
+# focus the node in the given direction
+super + {_,shift + }{h,j,k,l}
+ bspc node -{f,s} {west,south,north,east}
+
+# focus the node for the given path jump
+super + {p,b,comma,period}
+ bspc node -f @{parent,brother,first,second}
+
+# focus the next/previous node in the current desktop
+super + {_,shift + }c
+ bspc node -f {next,prev}.local
+
+# focus the next/previous desktop in the current monitor
+super + bracket{left,right}
+ bspc desktop -f {prev,next}.local
+
+# focus the last node/desktop
+super + {grave,Tab}
+ bspc {node,desktop} -f last
+
+# focus the older or newer node in the focus history
+super + {o,i}
+ bspc wm -h off; \
+ bspc node {older,newer} -f; \
+ bspc wm -h on
+
+# focus or send to the given desktop
+super + {_,shift + }{1-9,0}
+ bspc {desktop -f,node -d} '^{1-9,10}'
+
+#
+# preselect
+#
+
+# preselect the direction
+super + ctrl + {h,j,k,l}
+ bspc node -p {west,south,north,east}
+
+# preselect the ratio
+super + ctrl + {1-9}
+ bspc node -o 0.{1-9}
+
+# cancel the preselection for the focused node
+super + ctrl + space
+ bspc node -p cancel
+
+# cancel the preselection for the focused desktop
+super + ctrl + shift + space
+ bspc query -N -d | xargs -I id -n 1 bspc node id -p cancel
+
+#
+# move/resize
+#
+
+# expand a window by moving one of its side outward
+super + alt + {h,j,k,l}
+ bspc node -z {left -20 0,bottom 0 20,top 0 -20,right 20 0}
+
+# contract a window by moving one of its side inward
+super + alt + shift + {h,j,k,l}
+ bspc node -z {right -20 0,top 0 20,bottom 0 -20,left 20 0}
+
+# move a floating window
+super + {Left,Down,Up,Right}
+ bspc node -v {-20 0,0 20,0 -20,20 0}
+
+
+# Media keys
+
+XF86Audio{Lower,Raise}Volume
+ pactl set-sink-mute 0 false && pactl set-sink-volume 0 {-,+}5%
+XF86AudioMute
+ pactl set-sink-mute 0 toggle
+
+XF86MonBrightness{Down,Up}
+ brightnessctl s {5%-,+5%}
+
+XF86Audio{Play,Pause,Next,Prev}
+ playerctl {play-pause,pause,next,previous}
+
+super + shift + Delete
+ xautolock -locknow
diff --git a/bspwm/.local/bin/rofi_goto_workspace b/bspwm/.local/bin/rofi_goto_workspace
new file mode 100755
index 0000000..35e8762
--- /dev/null
+++ b/bspwm/.local/bin/rofi_goto_workspace
@@ -0,0 +1,4 @@
+#!/usr/bin/env bash
+
+NAME=`rofi_workspace_prompt`
+i3-msg workspace $NAME
diff --git a/bspwm/.local/bin/rofi_moveto_workspace b/bspwm/.local/bin/rofi_moveto_workspace
new file mode 100755
index 0000000..9cc0b9d
--- /dev/null
+++ b/bspwm/.local/bin/rofi_moveto_workspace
@@ -0,0 +1,4 @@
+#!/usr/bin/env bash
+
+NAME=`rofi_workspace_prompt`
+i3-msg move container to workspace $NAME
diff --git a/bspwm/.local/bin/rofi_workspace_prompt b/bspwm/.local/bin/rofi_workspace_prompt
new file mode 100755
index 0000000..f59d1fa
--- /dev/null
+++ b/bspwm/.local/bin/rofi_workspace_prompt
@@ -0,0 +1,3 @@
+#!/usr/bin/env bash
+
+echo `i3-msg -t get_workspaces | jq '.[].name' | sed 's/\"//g' | rofi -dmenu`
diff --git a/bspwm/.local/bin/scratch b/bspwm/.local/bin/scratch
new file mode 100755
index 0000000..9fd5901
--- /dev/null
+++ b/bspwm/.local/bin/scratch
@@ -0,0 +1,3 @@
+#!/usr/bin/sh
+bspc query -N -n .floating > /tmp/scratchid
+$SHELL
diff --git a/bspwm/.local/bin/spotifycl b/bspwm/.local/bin/spotifycl
new file mode 100755
index 0000000..ffee9f0
--- /dev/null
+++ b/bspwm/.local/bin/spotifycl
@@ -0,0 +1,207 @@
+#!/usr/bin/env python
+
+# MIT License
+#
+# Copyright (c) 2018 Andreas Backx
+#
+# Permission is hereby granted, free of charge, to any person obtaining a copy
+# of this software and associated documentation files (the "Software"), to deal
+# in the Software without restriction, including without limitation the rights
+# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+# copies of the Software, and to permit persons to whom the Software is
+# furnished to do so, subject to the following conditions:
+#
+# The above copyright notice and this permission notice shall be included in all
+# copies or substantial portions of the Software.
+#
+# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+# SOFTWARE.
+
+
+import os
+import socket
+import sys
+import time
+import traceback
+from concurrent.futures import ThreadPoolExecutor
+
+import click
+import dbus
+import dbus.mainloop.glib
+import spotipy
+import spotipy.util as util
+from dbus.mainloop.glib import DBusGMainLoop
+from gi.repository import GLib
+from spotipy import SpotifyException
+from spotipy.oauth2 import SpotifyClientCredentials
+
+inactive_color = '%{F#6E6E6E}'
+active_color = '%{F#CECECE}'
+default_color = '%{F-}'
+
+server_address = '/tmp/spotifycl-socket'
+
+
+class Spotify:
+
+ SPOTIFY_BUS = 'org.mpris.MediaPlayer2.spotify'
+ SPOTIFYD_BUS = 'org.mpris.MediaPlayer2.spotifyd'
+ SPOTIFY_OBJECT_PATH = '/org/mpris/MediaPlayer2'
+
+ PLAYER_INTERFACE = 'org.mpris.MediaPlayer2.Player'
+ PROPERTIES_INTERFACE = 'org.freedesktop.DBus.Properties'
+
+ SAVE_REMOVE = b'save'
+
+ def __init__(self):
+ DBusGMainLoop(set_as_default=True)
+ self.session_bus = dbus.SessionBus()
+ self.last_output = ''
+ self.empty_output = True
+
+ # Last shown metadata
+ self.last_title = None
+ # Whether the current song is added to the library
+ self.saved_track = False
+ # Whether to ignore the update
+ self.ignore = False
+
+ def monitor(self):
+ self.setup_properties_changed()
+ self.freedesktop = self.session_bus.get_object(
+ "org.freedesktop.DBus",
+ "/org/freedesktop/DBus"
+ )
+ self.freedesktop.connect_to_signal(
+ "NameOwnerChanged",
+ self.on_name_owner_changed,
+ arg0=self.SPOTIFYD_BUS
+ )
+
+ executor = ThreadPoolExecutor(max_workers=2)
+ executor.submit(self._start_glib_loop)
+ executor.submit(self._start_server)
+
+ def _start_glib_loop(self):
+ loop = GLib.MainLoop()
+ loop.run()
+
+ def _start_server(self):
+ try:
+ os.unlink(server_address)
+ except OSError:
+ if os.path.exists(server_address):
+ raise
+ sock = socket.socket(socket.AF_UNIX, socket.SOCK_STREAM)
+ sock.bind(server_address)
+ sock.listen(5)
+
+ @property
+ def metadata_status(self):
+ spotify_properties = dbus.Interface(
+ self.spotify,
+ dbus_interface=Spotify.PROPERTIES_INTERFACE
+ )
+ metadata = spotify_properties.Get(
+ Spotify.PLAYER_INTERFACE,
+ 'Metadata'
+ )
+ playback_status = spotify_properties.Get(
+ Spotify.PLAYER_INTERFACE,
+ 'PlaybackStatus'
+ )
+ return metadata, playback_status
+
+ def output(self, line):
+ if not line:
+ self.empty_output = True
+ if line != self.last_output:
+ print(line, flush=True)
+ self.last_output = line
+
+ def setup_spotify(self):
+ try:
+ self.spotify = self.session_bus.get_object(
+ Spotify.SPOTIFY_BUS,
+ Spotify.SPOTIFY_OBJECT_PATH
+ )
+ except dbus.DBusException:
+ self.spotify = self.session_bus.get_object(Spotify.SPOTIFYD_BUS, Spotify.SPOTIFY_OBJECT_PATH)
+
+ def setup_properties_changed(self):
+ try:
+ self.setup_spotify()
+ self.spotify.connect_to_signal(
+ 'PropertiesChanged',
+ self.on_properties_changed
+ )
+
+ if self.empty_output:
+ metadata, playback_status = self.metadata_status
+ self.output_playback_status(
+ data={
+ 'Metadata': metadata,
+ 'PlaybackStatus': playback_status,
+ }
+ )
+
+ except dbus.DBusException:
+ self.output('')
+
+ def output_playback_status(self, data, retry=False):
+ if self.ignore:
+ return
+
+ metadata = data['Metadata']
+ artists = metadata['xesam:artist']
+ artist = artists[0] if artists else None
+
+ if not artist:
+ self.output('')
+ return
+
+ title = metadata['xesam:title']
+ playback_status = data['PlaybackStatus']
+ same_song = title == self.last_title
+
+ color = active_color if playback_status == 'Playing' else inactive_color
+ # divider = '+' if same_song and self.saved_track else '-'
+ self.output(f'{color}{artist} - {title}{default_color}')
+
+ if not same_song:
+ self.last_title = title
+
+ def on_properties_changed(self, interface, data, *args, **kwargs):
+ self.output_playback_status(data)
+
+ def on_name_owner_changed(self, name, old_owner, new_owner):
+ if name == self.SPOTIFY_BUS:
+ if new_owner:
+ # Spotify was opened.
+ self.setup_properties_changed()
+ else:
+ # Spotify was closed.
+ self.spotify = None
+ self.output('')
+
+
+@click.group()
+def cli():
+ """Script for listening to Spotify over dbus and adding tracks to your library."""
+ pass
+
+
+@cli.command()
+def status():
+ """Follow the status of the currently playing song on Spotify."""
+ spotify = Spotify()
+ spotify.monitor()
+
+
+if __name__ == '__main__':
+ cli()
diff --git a/bspwm/.local/share/config-files/bspwm b/bspwm/.local/share/config-files/bspwm
new file mode 120000
index 0000000..37a4903
--- /dev/null
+++ b/bspwm/.local/share/config-files/bspwm
@@ -0,0 +1 @@
+../../../.config/bspwm/bspwmrc \ No newline at end of file
diff --git a/bspwm/.local/share/config-files/polybar b/bspwm/.local/share/config-files/polybar
new file mode 120000
index 0000000..87fad9e
--- /dev/null
+++ b/bspwm/.local/share/config-files/polybar
@@ -0,0 +1 @@
+../../../.config/polybar/config \ No newline at end of file
diff --git a/bspwm/.local/share/config-files/sxhkd b/bspwm/.local/share/config-files/sxhkd
new file mode 120000
index 0000000..6b3d56f
--- /dev/null
+++ b/bspwm/.local/share/config-files/sxhkd
@@ -0,0 +1 @@
+../../../.config/sxhkd/sxhkdrc \ No newline at end of file
diff --git a/bspwm/.local/share/images/wallpaper.jpg b/bspwm/.local/share/images/wallpaper.jpg
new file mode 100644
index 0000000..cc1ff0e
--- /dev/null
+++ b/bspwm/.local/share/images/wallpaper.jpg
Binary files differ
diff --git a/bspwm/.local/share/lock/lock.png b/bspwm/.local/share/lock/lock.png
new file mode 100644
index 0000000..7759b82
--- /dev/null
+++ b/bspwm/.local/share/lock/lock.png
Binary files differ
diff --git a/bspwm/.local/share/lock/rick_lock.png b/bspwm/.local/share/lock/rick_lock.png
new file mode 100644
index 0000000..4037c32
--- /dev/null
+++ b/bspwm/.local/share/lock/rick_lock.png
Binary files differ
diff --git a/bspwm/.local/share/scripts/lock.sh b/bspwm/.local/share/scripts/lock.sh
new file mode 100755
index 0000000..7a3dd42
--- /dev/null
+++ b/bspwm/.local/share/scripts/lock.sh
@@ -0,0 +1,15 @@
+#!/bin/bash
+revert() {
+ rm /tmp/*screen*.png
+ xset dpms 0 0 0
+}
+trap revert HUP INT TERM
+xset +dpms dpms 0 0 5
+
+ffmpeg -loglevel quiet -y -f x11grab -video_size `xdpyinfo | grep 'dimensions' | awk '{print $2}'` -i $DISPLAY -i ~/.local/share/lock/rick_lock.png -filter_complex "boxblur=5:1,overlay=(main_w-overlay_w-400):(main_h-overlay_h-5)" -vframes 1 /tmp/screen.png
+
+#scrot -d 1 /tmp/locking_screen.png
+#convert -blur 0x8 /tmp/locking_screen.png /tmp/screen_blur.png
+#convert -composite /tmp/screen_blur.png ~/.rick_lock.png -gravity South -geometry -20x1200 /tmp/screen.png
+i3lock -eui /tmp/screen.png
+revert