Last active
May 22, 2022 13:03
-
-
Save kLabz/23d793d517f18b15c8d77b51b232e6ce to your computer and use it in GitHub Desktop.
i3: Mode focus
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Mode: Focus | |
# --------------------------- | |
set $mode_focus Focus: (Shift+1~5) Mark ⋅ (1~5) Focus ⋅ (Alt+1~5) Clear ⋅ (a) Create custom ⋅ (g) Focus custom ⋅ (c) Clear custom | |
mode "$mode_focus" { | |
# Keybindings for custom marks | |
bindsym a exec i3-input -F 'mark %s' -P 'Mark name: ' | |
bindsym g exec i3-input -F '[con_mark=%s] focus' -P 'Go to mark: ' | |
bindsym c exec i3-input -F 'unmark %s' -P 'Clear mark: ' | |
# Assign marks to keys 1-5 | |
bindsym Shift+1 mark mark1 | |
bindsym Shift+2 mark mark2 | |
bindsym Shift+3 mark mark3 | |
bindsym Shift+4 mark mark4 | |
bindsym Shift+5 mark mark5 | |
# Jump to clients marked 1-5 | |
bindsym 1 [con_mark="mark1"] focus | |
bindsym 2 [con_mark="mark2"] focus | |
bindsym 3 [con_mark="mark3"] focus | |
bindsym 4 [con_mark="mark4"] focus | |
bindsym 5 [con_mark="mark5"] focus | |
# Clear marks 1-5 | |
bindsym $alt+1 unmark mark1 | |
bindsym $alt+2 unmark mark2 | |
bindsym $alt+3 unmark mark3 | |
bindsym $alt+4 unmark mark4 | |
bindsym $alt+5 unmark mark5 | |
# Exit to the default mode | |
bindsym Return mode "default" | |
bindsym Escape mode "default" | |
bindsym $mod+n mode "default" | |
} | |
bindsym $mod+n mode "$mode_focus" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment