added dnd mode and window swallowing

This commit is contained in:
Rouven Seifert 2023-01-23 12:02:36 +01:00
parent fd46423f0f
commit 9346f157b7
Signed by: rouven.seifert
GPG key ID: B95E8FE6B11C4D09
2 changed files with 22 additions and 2 deletions

View file

@ -7,6 +7,8 @@
};
home.packages = with pkgs; [
pulseaudio # installed to have pactl
jq
notify-desktop
wofi
wl-clipboard
grim
@ -78,6 +80,16 @@
save_dir = ~/Pictures/Screenshots/
early_exit = true
'';
"mako/do-not-disturb.sh".text = ''
if [[ $(makoctl mode) = 'default' ]];then
notify-desktop 'Enabled Do Not Disturb mode'
sleep 5
makoctl mode -s do-not-disturb
else
makoctl mode -s default
notify-desktop 'Disabled Do Not Disturb mode'
fi
'';
};
programs.mako = {
@ -91,6 +103,8 @@
[urgency=high]
background-color=#${config.colorScheme.colors.base08}
default-timeout=0
[mode=do-not-disturb]
invisible=1
'';
};
}

View file

@ -80,6 +80,12 @@ gestures {
workspace_swipe = off # doesn't really work
}
misc {
enable_swallow = true
swallow_regex = ^Alacritty$
}
# Example windowrule v1
# windowrule = float, ^(kitty)$
# Example windowrule v2
@ -152,9 +158,9 @@ bind = ,XF86AudioRaiseVolume, exec, pactl set-sink-volume @DEFAULT_SINK@ +5%
bind = ,XF86AudioLowerVolume, exec, pactl set-sink-volume @DEFAULT_SINK@ -5%
# even more fancy stuff (aka abusing XF86 keys)
bind = ,XF86WLAN, exec, wpa_gui
bind = ,XF86Messenger, exec, makoctl dismiss
bind = SHIFT ,XF86Messenger, exec, makoctl restore
bind = ,XF86Go, exec, makoctl invoke
bind = ,Cancel, exec, sh ~/.config/mako/do-not-disturb.sh
bind = ,XF86Display, exec, hyprpaper
bind = ,Cancel, exec, swaylock
bind = ,XF86Favorites, exec, swaylock