[sway] Add ignore mode

This commit is contained in:
Tibo De Peuter 2024-09-05 17:11:52 +02:00
parent f9b9424b29
commit 40f4ac6e12
Signed by: tdpeuter
GPG key ID: 38297DE43F75FFE2
2 changed files with 40 additions and 28 deletions

View file

@ -1,7 +1,8 @@
set $notify ~/projects/sisyphus/scripts/notify.sh set $notify ~/projects/sisyphus/scripts/notify.sh
# Focus
bindsym { bindsym {
# Focus
$flag+$up focus up $flag+$up focus up
$flag+$right focus right $flag+$right focus right
$flag+$down focus down $flag+$down focus down
@ -14,10 +15,8 @@ bindsym {
$flag+p focus parent $flag+p focus parent
$flag+space focus mode_toggle $flag+space focus mode_toggle
}
# Move windows # Move windows
bindsym {
$flag+Shift+$up move up $flag+Shift+$up move up
$flag+Shift+$right move right $flag+Shift+$right move right
$flag+Shift+$down move down $flag+Shift+$down move down
@ -32,10 +31,8 @@ bindsym {
$flag+KP_Next move scratchpad $flag+KP_Next move scratchpad
$flag+Prior scratchpad show $flag+Prior scratchpad show
$flag+KP_Prior scratchpad show $flag+KP_Prior scratchpad show
}
# Layouts # Layouts
bindsym {
$flag+z layout toggle split $flag+z layout toggle split
$flag+x layout tabbed $flag+x layout tabbed
$flag+c split h $flag+c split h
@ -224,8 +221,6 @@ bindsym {
# File explorer # File explorer
$flag+e exec $term -e vifm $flag+e exec $term -e vifm
# Internet browser
$flag+i exec firefox
} }
bindgesture { bindgesture {

View file

@ -5,9 +5,9 @@
set $default "default" set $default "default"
# Resizing # Resizing
set $resize "Resize" set $mode_resize "Resize"
bindsym $flag+r mode $resize bindsym $flag+r mode $mode_resize
mode $resize bindsym { mode $mode_resize bindsym {
$right resize grow width 10 px or 10 ppt $right resize grow width 10 px or 10 ppt
$up resize grow height 10 px or 10 ppt $up resize grow height 10 px or 10 ppt
$left resize shrink width 10 px or 10 ppt $left resize shrink width 10 px or 10 ppt
@ -38,9 +38,9 @@ mode $resize bindsym {
$flag+Left move left $flag+Left move left
$flag+Down move down $flag+Down move down
Return mode $default
Escape mode $default
$flag+r mode $default $flag+r mode $default
Escape mode $default
Return mode $default
} }
# System actions # System actions
@ -53,9 +53,23 @@ mode $mode_system bindsym {
r mode $default, exec systemctl reboot r mode $default, exec systemctl reboot
Shift+s mode $default, exec systemctl poweroff -i Shift+s mode $default, exec systemctl poweroff -i
Return mode $default
Escape mode $default
Control+$alt+Delete mode $default Control+$alt+Delete mode $default
Escape mode $default
Return mode $default
}
set $mode_preferences "Toggle (d)ark mode, (s)unset, (n)otification"
bindsym $alt+end mode $mode_preferences
bindsym $alt+KP_End mode $mode_preferences
mode $mode_preferences bindsym {
d exec "${SCRIPT_DIR}/toggle-light-dark.sh", mode $default
s exec "${SCRIPT_DIR}/sunset.sh", mode $default
n exec "${SCRIPT_DIR}/do-not-disturb.sh", mode $default
$alt+end mode $default
$alt+KP_End mode $default
Escape mode $default
Return mode $default
} }
# Screenshots # Screenshots
@ -72,20 +86,23 @@ mode $mode_screenshot bindsym {
Shift+s exec grimshot --notify save screen $save_format, mode $default Shift+s exec grimshot --notify save screen $save_format, mode $default
Print exec grimshot --notify save screen $save_format, mode $default Print exec grimshot --notify save screen $save_format, mode $default
Return mode $default
Escape mode $default Escape mode $default
Return mode $default
} }
set $mode_preferences "Toggle (d)ark mode, (s)unset, (n)otification" # Launcher
bindsym $alt+end mode $mode_preferences set $mode_launcher "Launch (f)irefox, (s)potify or (t)hunderbird."
bindsym $alt+KP_End mode $mode_preferences bindsym $flag+o mode $mode_launcher
mode $mode_preferences bindsym { mode $mode_launcher bindsym {
d exec "${SCRIPT_DIR}/toggle-light-dark.sh", mode $default f exec firefox
s exec "${SCRIPT_DIR}/sunset.sh", mode $default t exec thunderbird
n exec "${SCRIPT_DIR}/do-not-disturb.sh", mode $default
Return mode $default $flag+o mode $default
Escape mode $default Escape mode $default
$alt+end mode $default Return mode $default
$alt+KP_End mode $default
} }
# Ignore (all) keybinds. Useful when working with Virtual Machines.
set $mode_ignore "Ignore keybinds - Press Control+Alt+Insert to escape."
bindsym Control+$alt+Insert mode $mode_ignore
mode $mode_ignore bindsym Control+$alt+Insert mode $default