From 384babec22004b8a2cdd5cf6c6d4aafa05594813 Mon Sep 17 00:00:00 2001 From: Robert Günzler Date: Mon, 30 Aug 2021 18:33:01 +0200 Subject: sway: update config --- .config/sway/auto.conf | 3 +- .config/sway/binds.conf | 86 +++++++++++++++++++++++++++---------------------- .config/sway/env | 2 +- .config/sway/input.conf | 2 ++ 4 files changed, 52 insertions(+), 41 deletions(-) diff --git a/.config/sway/auto.conf b/.config/sway/auto.conf index df65c74..4d0eeec 100644 --- a/.config/sway/auto.conf +++ b/.config/sway/auto.conf @@ -23,7 +23,7 @@ for_window [app_id="launcher"] floating enable for_window [class="balena-etcher-electron"] floating enable; border normal for_window [app_id="firefox.*" title="Picture-in-Picture"] floating enable, sticky enable, border none -for_window [app_id="firefox.*" title="^Developer Tools"] floating enable +# for_window [app_id="firefox.*" title="^Developer Tools"] floating enable for_window [app_id="firefox.*" title="Sharing Indicator$"] floating enable, border none, sticky enable; exec centercon 1 tr; focus mode_toggle for_window [app_id="firefox.*" title="^Close tabs?"] floating enable for_window [app_id="firefox.*" title="^File Upload$"] floating enable @@ -34,6 +34,7 @@ for_window [app_id="firefox.*" title="^Open Firefox in Troubleshoot Mode?$"] flo for_window [app_id="multimc" title="Folder$"] floating enable for_window [app_id="telegramdesktop" title="^Choose Files$"] floating enable; exec centercon -w .6 +for_window [app_id="Telegram" title="^Choose Files$"] floating enable; exec centercon -w .6 for_window [app_id="telegramdesktop" title="^Media viewer$"] floating enable for_window [app_id="Telegram" floating] exec centercon -w .6 for_window [app_id="telegramdesktop" floating] exec centercon -w .6 diff --git a/.config/sway/binds.conf b/.config/sway/binds.conf index 6679e57..008a201 100644 --- a/.config/sway/binds.conf +++ b/.config/sway/binds.conf @@ -56,24 +56,6 @@ mode "screengrab" { } # }}} -bindsym $mod+m mode "menu" -# {{{ -mode "menu" { - bindsym a exec soundswitch; mode "default" - bindsym m exec mnts; mode "default" - bindsym n exec notifmenu; mode "default" - bindsym o exec fs; mode "default" - bindsym p exec passmenu; mode "default" - bindsym r exec rcmenu; mode "default" - bindsym x exec menu -drun; mode "default" - - bindsym Return mode "default" - bindsym Escape mode "default" - bindsym q mode "default" -} -# }}} - -# Moving around {{{ # Move your focus around bindsym $mod+$left focus left bindsym $mod+$down focus down @@ -91,7 +73,6 @@ bindsym $mod+Next focus child bindsym $mod+Prior focus parent bindsym $mod+Delete [urgent="latest"] focus -# }}} # Workspaces {{{ # Note: workspaces can have any name you want, not just numbers. @@ -132,24 +113,44 @@ bindsym $mod+Ctrl+$left move workspace to output left bindsym $mod+Ctrl+$down move workspace to output down bindsym $mod+Ctrl+$up move workspace to output up bindsym $mod+Ctrl+$right move workspace to output right + +bindsym $mod+g mode "go" +mode "go" { + bindsym 1 workspace $ws1; mode "default" + bindsym 2 workspace $ws2; mode "default" + bindsym 3 workspace $ws3; mode "default" + bindsym 4 workspace $ws4; mode "default" + bindsym 5 workspace $ws5; mode "default" + bindsym 6 workspace $ws6; mode "default" + bindsym 7 workspace $ws7; mode "default" + bindsym 8 workspace $ws8; mode "default" + bindsym 9 workspace $ws9; mode "default" + bindsym 0 workspace $ws0; mode "default" + + bindsym m workspace $wsMusic; mode "default" + bindsym g workspace $wsGame; mode "default" + bindsym v workspace $wsVideo; mode "default" + + # return to default mode + bindsym Return mode "default" + bindsym Escape mode "default" +} + # }}} -# Layout stuff {{{ bindsym $mod+Minus splitv bindsym $mod+Equal splith -bindsym $mod+g layout toggle split +bindsym $mod+Shift+y layout toggle split -# Make the current focus fullscreen bindsym $mod+f fullscreen bindsym $mod+Shift+f fullscreen global -# Hide the topbar (also gets you more space) bindsym $mod+Shift+t bar mode toggle topbar; default_border pixel -# Swap focus between the tiling area and the floating area bindsym $mod+space focus mode_toggle -# Toggle the current focus between tiling and floating mode bindsym $mod+Ctrl+space floating toggle +bindsym $mod+y mode "layout" +# {{{ mode "layout" { # Switch the current container between different layout styles bindsym s layout stacking; mode "default" @@ -176,22 +177,13 @@ mode "layout" { bindsym Return mode "default" bindsym Escape mode "default" } -bindsym $mod+y mode "layout" # }}} -# Scratchpad {{{ -# Sway has a "scratchpad", which is a bag of holding for windows. -# You can send windows there and get them back later. - -# Move the currently focused window to the scratchpad bindsym $mod+Ctrl+backspace move scratchpad - -# Show the next scratchpad window or hide the focused scratchpad window. -# If there are multiple scratchpad windows, this command cycles through them. bindsym $mod+backspace scratchpad show -# }}} -# Resizing containers {{{ +bindsym $mod+r mode "resize" +# {{{ mode "resize" { set $rate 25 bindsym $left resize shrink width $rate @@ -206,10 +198,10 @@ mode "resize" { bindsym Return mode "default" bindsym Escape mode "default" } -bindsym $mod+r mode "resize" # }}} -# Gaps {{{ +bindsym $mod+Shift+g mode "gaps" +# {{{ mode "gaps" { bindsym r gaps outer all set 0; gaps inner all set 0 @@ -221,7 +213,23 @@ mode "gaps" { bindsym Return mode "default" bindsym Escape mode "default" } -bindsym $mod+Shift+g mode "gaps" +# }}} + +bindsym $mod+m mode "menu" +# {{{ +mode "menu" { + bindsym a exec soundswitch; mode "default" + bindsym m exec mnts; mode "default" + bindsym n exec notifmenu; mode "default" + bindsym o exec fs; mode "default" + bindsym p exec passmenu; mode "default" + bindsym r exec rcmenu; mode "default" + bindsym x exec menu -drun; mode "default" + + bindsym Return mode "default" + bindsym Escape mode "default" + bindsym q mode "default" +} # }}} # Misc {{{ diff --git a/.config/sway/env b/.config/sway/env index 503373c..79d03c1 100644 --- a/.config/sway/env +++ b/.config/sway/env @@ -29,4 +29,4 @@ export XDG_CURRENT_DESKTOP=sway export BEMENU_BACKEND=wayland # export WLR_DRM_DEVICES="/dev/dri/card1:/dev/dri/card0" -export WLR_DRM_DEVICES="/dev/dri/card0" +# export WLR_DRM_DEVICES="/dev/dri/card0" diff --git a/.config/sway/input.conf b/.config/sway/input.conf index 10ac7d4..2f5028a 100644 --- a/.config/sway/input.conf +++ b/.config/sway/input.conf @@ -19,6 +19,8 @@ input type:touchpad { accel_profile adaptive tap enabled natural_scroll enabled + + events disabled } #input type:tablet_tool { # accel_profile flat -- cgit 1.4.1