[waybar] small improvements
This commit is contained in:
parent
c955622ef6
commit
664390cc83
30
apps/hyprland/hypridle.sh
Executable file
30
apps/hyprland/hypridle.sh
Executable file
@ -0,0 +1,30 @@
|
||||
#!/usr/bin/env zsh
|
||||
|
||||
|
||||
# function to toggle hypridle
|
||||
function toggle () {
|
||||
if pgrep "hypridle" > /dev/null
|
||||
then
|
||||
pkill hypridle
|
||||
notify-send -u normal -t 4500 "🙈 Hypridle Inactive"
|
||||
else
|
||||
hypridle &
|
||||
notify-send -u normal -t 4500 "🙊 Hypridle Active"
|
||||
fi
|
||||
}
|
||||
|
||||
# main function
|
||||
case $1 in
|
||||
toggle)
|
||||
toggle
|
||||
;;
|
||||
*)
|
||||
if pgrep "hypridle" > /dev/null
|
||||
then
|
||||
icon="🙊"
|
||||
else
|
||||
icon="🙈"
|
||||
fi
|
||||
printf "%s" "$icon"
|
||||
;;
|
||||
esac
|
@ -26,6 +26,7 @@ tooltip {
|
||||
#network,
|
||||
#pulseaudio,
|
||||
#workspaces,
|
||||
#custom-hypridle,
|
||||
#custom-wireguard,
|
||||
#tray,
|
||||
#window {
|
||||
@ -54,6 +55,10 @@ tooltip {
|
||||
color: #a6e3a1;
|
||||
}
|
||||
|
||||
#custom-hypridle {
|
||||
color: #89b4fa;
|
||||
}
|
||||
|
||||
#custom-wireguard {
|
||||
color: #89b4fa;
|
||||
}
|
||||
|
@ -22,8 +22,9 @@
|
||||
"modules-right": [
|
||||
"custom/spotify",
|
||||
"tray",
|
||||
"network",
|
||||
"custom/hypridle",
|
||||
"custom/wireguard",
|
||||
"network",
|
||||
"battery",
|
||||
"backlight",
|
||||
"pulseaudio",
|
||||
@ -69,6 +70,13 @@
|
||||
"tooltip-format": "<tt><small>{calendar}</small></tt>"
|
||||
},
|
||||
|
||||
"custom/hypridle": {
|
||||
"interval": 2,
|
||||
"format": "{}",
|
||||
"exec": "$HOME/.dotfiles/apps/hyprland/hypridle.sh",
|
||||
"on-click": "$HOME/.dotfiles/apps/hyprland/hypridle.sh toggle"
|
||||
},
|
||||
|
||||
"custom/wireguard": {
|
||||
"interval": 2,
|
||||
"format": "{}",
|
||||
|
@ -13,14 +13,14 @@ status_vpn () {
|
||||
if echo "$tailscale_status" | grep "$hostname_short" &> /dev/null; then
|
||||
vpn_status+='🔒 '
|
||||
else
|
||||
vpn_status+='🛡️ '
|
||||
vpn_status+='🔓 '
|
||||
fi
|
||||
|
||||
# check for direct connectivity
|
||||
if "$tailscale_bin" status | grep allegro | grep direct &> /dev/null; then
|
||||
vpn_status+='✅'
|
||||
else
|
||||
vpn_status+='❌'
|
||||
vpn_status+='⚠️'
|
||||
fi
|
||||
|
||||
echo "$vpn_status"
|
||||
|
Reference in New Issue
Block a user