From 13547308fba1eacb8996ebfb9db56f2127a2e70f Mon Sep 17 00:00:00 2001 From: sommerfeld Date: Thu, 14 May 2026 10:58:38 +0100 Subject: feat(sway): bspwm-style workspace back-and-forth toggle workspace_auto_back_and_forth yes makes `workspace number N` jump back to the previously focused workspace when N is already current. Applies to both $mod+N keybinds and waybar workspace clicks. --- KEYBINDS.md | 1 + dot_config/sway/config | 4 ++++ 2 files changed, 5 insertions(+) diff --git a/KEYBINDS.md b/KEYBINDS.md index d7f8143..9b0a863 100644 --- a/KEYBINDS.md +++ b/KEYBINDS.md @@ -348,6 +348,7 @@ Mod key: `Super` (Mod4). Only personal additions beyond sway defaults listed. | `Super+period` | Emoji picker (bemoji → wofi; types + copies) | | `Super+Tab` | Next workspace | | `Super+Shift+Tab` | Previous workspace | +| `Super+1`…`Super+0` | Switch to workspace N; re-press jumps back to previous one | | `Super+]` | Focus next window in container (monocle cycling) | | `Super+[` | Focus prev window in container (monocle cycling) | | `XF86Display` | Toggle display mode (laptop-off/side-by-side) | diff --git a/dot_config/sway/config b/dot_config/sway/config index 86a75e1..742e8ab 100644 --- a/dot_config/sway/config +++ b/dot_config/sway/config @@ -79,6 +79,10 @@ bindsym $mod+Shift+k move up bindsym $mod+Shift+l move right # Workspaces +# Re-pressing $mod+N (or clicking the active workspace in waybar) jumps back +# to the previously focused workspace — bspwm-style toggle. +workspace_auto_back_and_forth yes + bindsym $mod+1 workspace number 1 bindsym $mod+2 workspace number 2 bindsym $mod+3 workspace number 3 -- cgit v1.3.1