nixos/home/hyprland/ironbar/reference/scripts/pop
Evie Litherland-Smith be1d5fa798 Switch to minimal ironbar implementation
Save reference for later
Enable upower daemon and add simple bar with the essentials for now,
TODO more later
2023-10-11 08:28:27 +01:00

90 lines
1.5 KiB
Bash
Executable file

#!/bin/sh
calendar() {
LOCK_FILE="$HOME/.cache/eww-calendar.lock"
EWW_BIN="/usr/bin/eww"
run() {
${EWW_BIN} open calendar
}
# Open widgets
if [[ ! -f "$LOCK_FILE" ]]; then
${EWW_BIN} close system music_win audio_ctl
touch "$LOCK_FILE"
run && echo "ok good!"
else
${EWW_BIN} close calendar
rm "$LOCK_FILE" && echo "closed"
fi
}
system() {
LOCK_FILE_MEM="$HOME/.cache/eww-system.lock"
EWW_BIN="/usr/bin/eww"
run() {
${EWW_BIN} open system
}
# Open widgets
if [[ ! -f "$LOCK_FILE_MEM" ]]; then
${EWW_BIN} close calendar music_win audio_ctl
touch "$LOCK_FILE_MEM"
run && echo "ok good!"
else
${EWW_BIN} close system
rm "$LOCK_FILE_MEM" && echo "closed"
fi
}
music() {
LOCK_FILE_SONG="$HOME/.cache/eww-song.lock"
EWW_BIN="/usr/bin/eww"
run() {
${EWW_BIN} open music_win
}
# Open widgets
if [[ ! -f "$LOCK_FILE_SONG" ]]; then
${EWW_BIN} close system calendar
touch "$LOCK_FILE_SONG"
run && echo "ok good!"
else
${EWW_BIN} close music_win
rm "$LOCK_FILE_SONG" && echo "closed"
fi
}
audio() {
LOCK_FILE_AUDIO="$HOME/.cache/eww-audio.lock"
EWW_BIN="/usr/bin/eww"
run() {
${EWW_BIN} open audio_ctl
}
# Open widgets
if [[ ! -f "$LOCK_FILE_AUDIO" ]]; then
${EWW_BIN} close system calendar music
touch "$LOCK_FILE_AUDIO"
run && echo "ok good!"
else
${EWW_BIN} close audio_ctl
rm "$LOCK_FILE_AUDIO" && echo "closed"
fi
}
case $1 in
calendar) calendar;;
system) system;;
music) music;;
audio) audio;;
esac