From a1d6fc2f3e6ab041cc51cb085ac59a646a126d25 Mon Sep 17 00:00:00 2001 From: Peter Son Struschka Date: Wed, 29 Jul 2020 16:40:02 +0800 Subject: basics+bspwm+herbstluftwm+i3wm+meta+polybar+xmonad: wm configs overhaul Created polybar as its own config instead of duplicated in bspwm and i3's directories allowing them both to be installed. Created herbstluftwm, xmonad window manager configs. Added scripts for a status bar, and fixed scripts. --- bspwm/.config/bspwm/bspwmrc | 34 +- bspwm/.config/polybar/config | 637 ---------------------------------- bspwm/.config/polybar/launch.sh | 19 - bspwm/.config/polybar/task_polybar.sh | 7 - bspwm/.config/sxhkd/sxhkdrc | 5 + 5 files changed, 30 insertions(+), 672 deletions(-) delete mode 100644 bspwm/.config/polybar/config delete mode 100755 bspwm/.config/polybar/launch.sh delete mode 100755 bspwm/.config/polybar/task_polybar.sh (limited to 'bspwm/.config') diff --git a/bspwm/.config/bspwm/bspwmrc b/bspwm/.config/bspwm/bspwmrc index b514a7a..beef1f7 100755 --- a/bspwm/.config/bspwm/bspwmrc +++ b/bspwm/.config/bspwm/bspwmrc @@ -1,18 +1,34 @@ #! /bin/sh # reset polybar -$HOME/.config/polybar/launch.sh & +$HOME/.config/polybar/launch.sh bspwm # 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" & +[ ! "$(pidof -x sxhkd)" ] && sxhkd & +[ ! "$(pidof -x picom)" ] && picom & +[ ! "$(pidof -x nm-applet)" ] && nm-applet & # 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 +# [ ! "$(pidof -x xautolock)" ] && xautolock -locker "$HOME/.local/share/scripts/lock.sh" -time 60 -detectsleep -notify 10 & +xset s 300 5 +xss-lock -n /usr/bin/xsecurelock/dimmer -l -- xsecurelock + +# setup monitor +monitors=$(xrandr -q | grep " connected " | cut -d " " -f1) +monitor_list=$(printf "%s" "$monitors" | tr '\n' ' ') +num_monitors=$(echo "$monitors" | wc -w) +case $num_monitors in + 1) + bspc monitor -d I II III IV V VI VII VIII IX X ;; + 2) + primary=$(echo "$monitor_list" | cut -d ' ' -f1) + secondary=$(echo "$monitor_list" | cut -d ' ' -f2) + echo "prim: $primary second: $secondary" + bspc monitor "$primary" -d I II III IV V + bspc monitor "$secondary" -d VI VII VII IX X + bspc wm -O "$primary" "$secondary" ;; + *) +esac bspc config border_width 2 bspc config window_gap 12 @@ -28,4 +44,4 @@ 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 & +alacritty --class scratchpad,scratchpad -e ~/.local/bin/scratch & diff --git a/bspwm/.config/polybar/config b/bspwm/.config/polybar/config deleted file mode 100644 index 05d6334..0000000 --- a/bspwm/.config/polybar/config +++ /dev/null @@ -1,637 +0,0 @@ -;========================================================== -; -; -; ██████╗ ██████╗ ██╗ ██╗ ██╗██████╗ █████╗ ██████╗ -; ██╔══██╗██╔═══██╗██║ ╚██╗ ██╔╝██╔══██╗██╔══██╗██╔══██╗ -; ██████╔╝██║ ██║██║ ╚████╔╝ ██████╔╝███████║██████╔╝ -; ██╔═══╝ ██║ ██║██║ ╚██╔╝ ██╔══██╗██╔══██║██╔══██╗ -; ██║ ╚██████╔╝███████╗██║ ██████╔╝██║ ██║██║ ██║ -; ╚═╝ ╚═════╝ ╚══════╝╚═╝ ╚═════╝ ╚═╝ ╚═╝╚═╝ ╚═╝ -; -; -; 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 = "