diff options
| -rwxr-xr-x | .config/bspwm/bspwmrc | 24 | ||||
| -rw-r--r-- | .config/sxhkd/sxhkdrc | 100 | ||||
| -rw-r--r-- | .gitignore | 1 | ||||
| -rwxr-xr-x | .local/bin/audio_vis.sh | 31 | ||||
| -rwxr-xr-x | .local/bin/dwmstatus.sh | 11 | ||||
| -rwxr-xr-x | .local/bin/tsarbar_status.sh | 94 | ||||
| -rw-r--r-- | .xinitrc | 5 | ||||
| m--------- | src/dwm | 0 |
8 files changed, 15 insertions, 251 deletions
diff --git a/.config/bspwm/bspwmrc b/.config/bspwm/bspwmrc deleted file mode 100755 index 662202f..0000000 --- a/.config/bspwm/bspwmrc +++ /dev/null @@ -1,24 +0,0 @@ -#! /bin/sh - -pgrep -x sxhkd > /dev/null || sxhkd & -xbanish & -thunderbird & -dunst & -picom --backend glx & # Vsync -tsarbar & -sleep 1 -tsarbar_status.sh & -feh --bg-scale ~/media/img/bbwp10x.png & - -bspc monitor -d www dev 1 2 - -bspc config border_width 1 -bspc config window_gap 0 -bspc config top_padding 20 - -bspc config split_ratio 0.5 -bspc config borderless_monocle true -bspc config gapless_monocle true - -bspc config normal_active_color "#202020" -bspc config focused_border_color "#FFFFFF" diff --git a/.config/sxhkd/sxhkdrc b/.config/sxhkd/sxhkdrc deleted file mode 100644 index abc9895..0000000 --- a/.config/sxhkd/sxhkdrc +++ /dev/null @@ -1,100 +0,0 @@ -# -# wm independent hotkeys -# - -# terminal emulator -super + Return - st - -# program launcher -super + d - dmenu_run - -super + shift + s - screenshot - -XF86Audio{Prev,Next,Play} - playerctl {previous,next,play-pause} - -XF86Audio{Lower,Raise}Volume - pactl set-sink-volume @DEFAULT_SINK@ {-,+}5% - -# 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 + g - bspc desktop -l next - -# swap the current node and the biggest window -super + a - bspc node -s biggest.window - -# set the window state -super + {t,shift + t,s,y} - bspc node -t {tiled,pseudo_tiled,floating,fullscreen} - -# focus/swap the node in the given direction -super + {_,shift + }{h,j,k,l} - bspc node -{f,s} {west,south,north,east} - -# focus the next/previous window in the current desktop -super + {_,shift + }f - bspc node -f {next,prev}.local.!hidden.window - -# 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}' - -super + {x,c,v,b} - bspc desktop -f '^{1,2,3,4}' - -super + shift + {x,c,v,b} - bspc node -d '^{1,2,3,4}' - -# 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 query -N -d | xargs -I id -n 1 bspc node id -p cancel - -# 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} @@ -1 +1,2 @@ *~ +tags diff --git a/.local/bin/audio_vis.sh b/.local/bin/audio_vis.sh deleted file mode 100755 index 62bb76c..0000000 --- a/.local/bin/audio_vis.sh +++ /dev/null @@ -1,31 +0,0 @@ -#! /bin/bash - -# bar='_▁▂▃▄▅▆▇█#' -bar=".'-,~^*&#@" -dict='s/;//g;' - -# creating "dictionary" to replace char with bar -i=0 -while [ $i -lt ${#bar} ] -do - dict="${dict}s/$i/${bar:$i:1}/g;" - i=$((i=i+1)) -done - -# write cava config -config_file="/tmp/polybar_cava_config" -echo " -[general] -bars = 12 - -[output] -method = raw -raw_target = /dev/stdout -data_format = ascii -ascii_max_range = 6 -" > $config_file - -# read stdout from cava -cava -p $config_file | while read -r line; do - echo $line | sed $dict -done diff --git a/.local/bin/dwmstatus.sh b/.local/bin/dwmstatus.sh new file mode 100755 index 0000000..22dd9bd --- /dev/null +++ b/.local/bin/dwmstatus.sh @@ -0,0 +1,11 @@ +#!/bin/bash + +while true; do + ram="ram $(free -m | awk 'NR==2{printf "%.2f%%", $3*100/$2}')" + cpu="load $(top -n1 | awk 'NR==1{printf "%g", $10}')" + clock="$(date +'%a %b %d, %r')" + volume="vol $(pactl get-sink-volume @DEFAULT_SINK@ | awk 'NR==1{printf "%s", $5}')" + + sleep 1 + xsetroot -name " $ram ~ $cpu ~ $volume ~ $clock " +done diff --git a/.local/bin/tsarbar_status.sh b/.local/bin/tsarbar_status.sh deleted file mode 100755 index b1eeb83..0000000 --- a/.local/bin/tsarbar_status.sh +++ /dev/null @@ -1,94 +0,0 @@ -#! /bin/bash - -tsarc config -font "CommitMono:pixelsize=15" -tsarc config -height 20 -tsarc config -bg "#101010" -tsarc config -gap 10 - -tsarc set ~ -text "~" - -tsarc set ~ -fg "#888888" -tsarc set ram -fg "#888888" -tsarc set vol -fg "#888888" -tsarc set player -fg "#888888" - -tsarc set window -bg "#FFFFFF" -tsarc set window -fg "#000000" -tsarc set window -margin 25 - -tsarc set cwkspace -bg "#FFFFFF" -tsarc set cwkspace -fg "#000000" -tsarc set cwkspace -margin 2 - -tsarc layout \ - -left lwkspace cwkspace rwkspace ~ player \ - -center window \ - -right ram ~ vol ~ clock - -trim() { - read -r text - echo "$text" | sed -e 's/^[[:space:]]*//' -e 's/[[:space:]]*$//' -} - -workspace() { - focused_ws=`bspc query -D --names -d focused` - ws=`bspc query -D --names | tr '\n' ' '` - lws=`echo $ws | awk -F$focused_ws '{print $1}'` - rws=`echo $ws | awk -F$focused_ws '{print $2}'` - tsarc set lwkspace -text " $lws" - tsarc set cwkspace -text "$focused_ws" - tsarc set rwkspace -text "$rws" -} - -window_name() { - win_id=$(bspc query -N -n focused) - if [[ -n "$win_id" ]]; then - title=`xtitle $win_id \ - | awk 'length > 64{$0=substr($0,0,64)"..."}1' \ - | tr '[:upper:]' '[:lower:]'` - tsarc set window -text "$title" -fg "#000000" -bg "#FFFFFF" - else - tsarc set window -text "no window focused" -fg "#CCCCCC" -bg "#404040" - fi -} - -bspc subscribe desktop_focus desktop_add desktop_remove \ -| while read -r _; do - workspace -done & - -volume() { - tsarc set vol -text \ - "vol `pactl get-sink-volume @DEFAULT_SINK@ | awk 'NR==1{printf "%s", $5}'`" -} - -volume - -pactl subscribe \ -| while read -r line; do - case "$line" in *"Event 'change' on sink #"*|*"Event 'change' on source #"*) - volume - while read -t 0.01 -r _; do :; done - esac -done & - -playerctl -F metadata -f "{{lc(status)}} {{lc(title)}} - {{lc(artist)}}" \ -| while read -r line; do - status=`echo $line | awk '{ print $1 }'` - case "$status" in - "paused") - tsarc set player -text "no media" - ;; - "playing") - tsarc set player -text \ - "`echo $line | awk 'match($0, $1) {print substr($0, RSTART+RLENGTH)}' | trim`" - ;; - esac -done & - -while true; do - tsarc set ram -text "ram `free -m | awk 'NR==2{printf "%.2f%%", $3*100/$2}'`" - tsarc set clock -text "`date +"%a %b %d, %r" | tr '[:upper:]' '[:lower:]'` " - window_name - sleep 1 -done @@ -5,6 +5,7 @@ eval $(dbus-launch --sh-syntax) export DBUS_SESSION_BUS_ADDRESS pipewire & -sxhkd & devmon --exec-on-drive "notify-send '%p'" & -exec bspwm +dunst & +~/.fehbg & +exec dwm diff --git a/src/dwm b/src/dwm new file mode 160000 +Subproject 44dbc6809d05b8f2addc483f882e670db0b6b8e |
