just merge it darn it
This commit is contained in:
randomuser 2022-07-13 00:09:38 -05:00
commit e5e391af8c
3 changed files with 14 additions and 0 deletions

View File

@ -33,6 +33,7 @@ sh:
cp -f sh/tmenu_run $(DESTDIR)$(PREFIX)/bin cp -f sh/tmenu_run $(DESTDIR)$(PREFIX)/bin
cp -f sh/ss $(DESTDIR)$(PREFIX)/bin cp -f sh/ss $(DESTDIR)$(PREFIX)/bin
cp -f sh/net $(DESTDIR)$(PREFIX)/bin cp -f sh/net $(DESTDIR)$(PREFIX)/bin
cp -f sh/bspwm-toggle-gaps $(DESTDIR)$(PREFIX)/bin
check: check:
shellcheck sh/* shellcheck sh/*

11
sh/bspwm-toggle-gaps Executable file
View File

@ -0,0 +1,11 @@
#!/bin/sh
gaps="$(bspc config top_padding)"
if [ "$gaps" -eq 20 ]; then
bspc config window_gap 0
bspc config top_padding 18
else
bspc config window_gap 3
bspc config top_padding 20
fi

View File

@ -2,6 +2,7 @@
power_prefix="/sys/class/power_supply/" power_prefix="/sys/class/power_supply/"
[ -d "${power_prefix}sbs-20-000b" ] && bat="sbs-20-000b" [ -d "${power_prefix}sbs-20-000b" ] && bat="sbs-20-000b"
[ -d "${power_prefix}BAT0" ] && bat="BAT0"
[ "$(ps aux | grep pulseaudio | wc -l)" -eq 2 ] && ss="pulse" || ss="alsa" [ "$(ps aux | grep pulseaudio | wc -l)" -eq 2 ] && ss="pulse" || ss="alsa"
@ -25,6 +26,7 @@ mod_bspwm () {
} }
mod_power () { mod_power () {
[ -z "$bat" ] ||
tr -d '\n' < /sys/class/power_supply/$bat/capacity tr -d '\n' < /sys/class/power_supply/$bat/capacity
} }