qtile gives me more than dwm. I will try to live with it's quirks.
This commit is contained in:
parent
35ccb08948
commit
75517d5ad3
35 changed files with 9 additions and 9 deletions
18
_desktop/_scripts/sb-battery
Executable file
18
_desktop/_scripts/sb-battery
Executable file
|
@ -0,0 +1,18 @@
|
|||
#!/bin/bash
|
||||
|
||||
icon='\uf241 '
|
||||
for battery in /sys/class/power_supply/BAT?*; do
|
||||
# If non-first battery, print a space separator.
|
||||
[ -n "${capacity+x}" ] && printf " "
|
||||
# Sets up the status and capacity
|
||||
case "$(cat "$battery/status")" in
|
||||
"Full") status="\uf102" ;;
|
||||
"Discharging") status="\uf078" ;;
|
||||
"Charging") status="\uf077" ;;
|
||||
"Not charging") status="\uf444" ;;
|
||||
"Unknown") status="\uf128" ;;
|
||||
esac
|
||||
capacity=$(cat "$battery/capacity")
|
||||
# Will make a warn variable if discharging and low
|
||||
[ "$capacity" -le 20 ] && printf "$icon <span foreground='#ffffff' background='#770000'>${status} ${capacity}%%</span>" || printf "$icon ${status} ${capacity}%%"
|
||||
done && exit 0
|
4
_desktop/_scripts/sb-emerge
Executable file
4
_desktop/_scripts/sb-emerge
Executable file
|
@ -0,0 +1,4 @@
|
|||
#!/bin/bash
|
||||
|
||||
icon='\ue20f '
|
||||
[ $(pgrep -x emerge) ] && printf "$icon <span foreground='#ffffff'background='#9a37ff'>emerge</span>" || printf ""
|
10
_desktop/_scripts/sb-network
Executable file
10
_desktop/_scripts/sb-network
Executable file
|
@ -0,0 +1,10 @@
|
|||
#!/bin/bash
|
||||
|
||||
icon='\uf1eb '
|
||||
case "$(cat /sys/class/net/w*/operstate 2>/dev/null)" in
|
||||
down) printf "$icon <span background='#770000'>no wifi</span>" ;;
|
||||
up)
|
||||
[ -n "$(ip address show dev wlan0 | grep 'inet ')" ] \
|
||||
&& printf "$icon $(iw dev wlan0 info | grep 'ssid ' | cut -d' ' -f2-)" \
|
||||
|| printf "$icon <span background='#770000'>no ip</span>"
|
||||
esac
|
7
_desktop/_scripts/sb-volume
Executable file
7
_desktop/_scripts/sb-volume
Executable file
|
@ -0,0 +1,7 @@
|
|||
#!/bin/bash
|
||||
|
||||
icon='\uf028 '
|
||||
mic=$(pactl get-source-volume @DEFAULT_SOURCE@ | awk -F' / ' '{print $2}' | tr -d '%')
|
||||
[ $(pactl get-source-mute @DEFAULT_SOURCE@ | awk -F': ' '{print $2}') = yes ] || [ "$mic" -eq 0 ] && micmute="<span foreground='#ffffff' background='#770000'> \uf131 </span> " || micmute=""
|
||||
vol=$(pactl get-sink-volume @DEFAULT_SINK@ | awk -F' / ' '{print $2}' | tr -d '%')
|
||||
[ $(pactl get-sink-mute @DEFAULT_SINK@ | awk -F': ' '{print $2}') = yes ] || [ "$vol" -eq 0 ] && printf "${micmute}$icon <span foreground='#ffffff' background='#770000'>mute</span>" || printf "$micmute$icon ${vol}%%"
|
Loading…
Add table
Add a link
Reference in a new issue