Mako DND: I RTFM'd

This commit is contained in:
Viyurz 2023-11-13 13:29:58 +01:00
parent 8c579317ca
commit 789145f208
No known key found for this signature in database
4 changed files with 28 additions and 1 deletions

View file

@ -22,7 +22,6 @@ exec-once = nm-applet
exec-once = /usr/lib/polkit-gnome/polkit-gnome-authentication-agent-1 exec-once = /usr/lib/polkit-gnome/polkit-gnome-authentication-agent-1
exec-once = $HOME/.scripts/swayidle.sh exec-once = $HOME/.scripts/swayidle.sh
exec-once = swayosd-server exec-once = swayosd-server
exec-once = mako
# XWayland # XWayland

View file

@ -6,3 +6,6 @@ border-radius=4
border-size=2 border-size=2
font='JetBrainsMono Nerd Font' 11 font='JetBrainsMono Nerd Font' 11
outer-margin=30,30,0,0 outer-margin=30,30,0,0
[mode=dnd]
invisible=1

View file

@ -325,6 +325,9 @@ else
if pgrep -u "$USER" mako > /dev/null; then if pgrep -u "$USER" mako > /dev/null; then
echo "Reloading Mako." echo "Reloading Mako."
makoctl reload & makoctl reload &
else
echo "Starting mako."
hyprctl dispatch exec mako > /dev/null &
fi fi
fi fi

22
.scripts/waybar-dnd-toggle.sh Executable file
View file

@ -0,0 +1,22 @@
#!/bin/sh
if [[ "$1" != "--no-toggle" ]]; then
if makoctl mode | grep -q dnd; then
makoctl mode -r dnd
else
makoctl mode -a dnd
fi
fi
if makoctl mode | grep -q dnd; then
class="dnd-enabled"
else
class="dnd-disabled"
fi
cat << EOF
{"text": "", "alt": "$class", "class": "$class", "percentage": ""}
EOF