Compare commits

..

2 commits

2 changed files with 16 additions and 1 deletions

View file

@ -4,6 +4,7 @@ listopts() {
echo "⏼ Shut down" echo "⏼ Shut down"
echo "⟲ Reboot" echo "⟲ Reboot"
echo "🚪 Log out" echo "🚪 Log out"
echo "💤 Hibernate"
} }
option=$(listopts | fuzzel --dmenu) option=$(listopts | fuzzel --dmenu)
@ -15,4 +16,6 @@ case "${option}" in
systemctl reboot;; systemctl reboot;;
"🚪 Log out") "🚪 Log out")
swaymsg exit;; swaymsg exit;;
"💤 Hibernate")
systemctl hibernate;;
esac esac

View file

@ -7,6 +7,18 @@ else
recs="📽${recordings}" recs="📽${recordings}"
fi fi
if [ "$(cat /sys/class/leds/input0::capslock/brightness)" = "1" ]; then
capslock="𝗔"
else
capslock="𝗮"
fi
if [ "$(cat /sys/class/leds/input0::numlock/brightness)" = "1" ]; then
numlock="🔢"
else
numlock="⮔"
fi
touchpad=$(swaymsg -t get_inputs | jq -r '[.[] | select(.type == "touchpad")][0] | .libinput.send_events') touchpad=$(swaymsg -t get_inputs | jq -r '[.[] | select(.type == "touchpad")][0] | .libinput.send_events')
if [ "${touchpad}" = "enabled" ]; then if [ "${touchpad}" = "enabled" ]; then
touchpad_active="✅" touchpad_active="✅"
@ -97,4 +109,4 @@ case "${battery_state}" in
;; ;;
esac esac
echo "${recs} 🕹️${touchpad_active} 📆${today} ${clock_face}${now} ${mike_symbol}${mike_volume}% ${audio_symbol}${audio_volume}% ${battery_symbol}${battery}%" echo "${numlock}${capslock} ${recs} 🕹️${touchpad_active} 📆${today} ${clock_face}${now} ${mike_symbol}${mike_volume}% ${audio_symbol}${audio_volume}% ${battery_symbol}${battery}%"