misc changes

This commit is contained in:
randomuser 2023-01-03 23:28:57 -06:00
parent 71ebc5f170
commit 4fb280225e
2 changed files with 4 additions and 0 deletions

1
.gitignore vendored
View File

@ -1,6 +1,7 @@
*.swp *.swp
*.tmp *.tmp
c/scream c/scream
c/xgetnewwindow
c/timer c/timer
c/boid c/boid
c/a.out c/a.out

View File

@ -7,6 +7,7 @@ power_prefix="/sys/class/power_supply/"
[ "$(pgrep -c pulseaudio)" -eq 1 ] && ss="pulse" || ss="alsa" [ "$(pgrep -c pulseaudio)" -eq 1 ] && ss="pulse" || ss="alsa"
mod_bspwm () { mod_bspwm () {
set -x
used_desk=$(bspc query -D -d .occupied --names | tr '\n' ' ') used_desk=$(bspc query -D -d .occupied --names | tr '\n' ' ')
current_desk=$(bspc query -D -d .focused --names) current_desk=$(bspc query -D -d .focused --names)
final_string="" final_string=""
@ -23,6 +24,7 @@ mod_bspwm () {
final_string=${final_string}"*$current_desk " final_string=${final_string}"*$current_desk "
printf "%s" "$final_string" printf "%s" "$final_string"
set +x
} }
mod_period () { mod_period () {
@ -36,6 +38,7 @@ mod_sensors () {
mod_power () { mod_power () {
[ -z "$bat" ] || [ -z "$bat" ] ||
tr -d '\n' < /sys/class/power_supply/$bat/capacity tr -d '\n' < /sys/class/power_supply/$bat/capacity
sed 's/Charging/↑/g;s/Discharging/↓/g;s/Full/-/g' < /sys/class/power_supply/$bat/status
} }
mod_vol () { mod_vol () {