Skip to content

Instantly share code, notes, and snippets.

@angrykoala
Last active September 6, 2023 10:53
Show Gist options
  • Save angrykoala/66c0d66681e2781b29a44cb75b11d783 to your computer and use it in GitHub Desktop.
Save angrykoala/66c0d66681e2781b29a44cb75b11d783 to your computer and use it in GitHub Desktop.
My i3 Config
## Move to i3 folder
## Note: sudo apt autoremove regolith-wm-navigation
###############################################################################
# Window and Workspace Navigation
###############################################################################
## Navigate // Relative Parent // <> a ##/
set_from_resource $i3-wm.binding.focus_parent i3-wm.binding.focus_parent a
bindsym $mod+$i3-wm.binding.focus_parent focus parent
## Navigate // Relative Child // <> z ##/
set_from_resource $i3-wm.binding.focus_child i3-wm.binding.focus_child z
bindsym $mod+$i3-wm.binding.focus_child focus child
## Navigate // Relative Window // <> ↑ ↓ ← → ##
bindsym $mod+Left focus left
bindsym $mod+Down focus down
bindsym $mod+Up focus up
bindsym $mod+Right focus right
## Navigate // Workspaces 1-10 // <> 0..9 ##
bindsym $mod+$ws1_key workspace number $ws1
bindsym $mod+$ws2_key workspace number $ws2
bindsym $mod+$ws3_key workspace number $ws3
bindsym $mod+$ws4_key workspace number $ws4
bindsym $mod+$ws5_key workspace number $ws5
bindsym $mod+$ws6_key workspace number $ws6
bindsym $mod+$ws7_key workspace number $ws7
bindsym $mod+$ws8_key workspace number $ws8
bindsym $mod+$ws9_key workspace number $ws9
bindsym $mod+$ws10_key workspace number $ws10
## Navigate // Workspace 11 - 19 // <><Ctrl> 1..9 ##
bindsym $mod+Ctrl+$ws1_key workspace number $ws11
bindsym $mod+Ctrl+$ws2_key workspace number $ws12
bindsym $mod+Ctrl+$ws3_key workspace number $ws13
bindsym $mod+Ctrl+$ws4_key workspace number $ws14
bindsym $mod+Ctrl+$ws5_key workspace number $ws15
bindsym $mod+Ctrl+$ws6_key workspace number $ws16
bindsym $mod+Ctrl+$ws7_key workspace number $ws17
bindsym $mod+Ctrl+$ws8_key workspace number $ws18
bindsym $mod+Ctrl+$ws9_key workspace number $ws19
## Navigate // Next Workspace // <> Tab ##
set_from_resource $i3-wm.binding.ws_next i3-wm.binding.ws_next Tab
bindsym $mod+$i3-wm.binding.ws_next workspace next
## Navigate // Next Workspace // <><Alt> → ##
set_from_resource $i3-wm.binding.ws_next2 i3-wm.binding.ws_next2 Right
bindsym $mod+$alt+$i3-wm.binding.ws_next2 workspace next
## Navigate // Next Workspace on Output // <><Ctrl> Tab ##
set_from_resource $i3-wm.binding.ws_next_on_output i3-wm.binding.ws_next_on_output Ctrl+Tab
bindsym $mod+$i3-wm.binding.ws_next_on_output workspace next_on_output
## Navigate // Next Workspace on Output // <><Ctrl> l ##
set_from_resource $i3-wm.binding.ws_next_on_output2 i3-wm.binding.ws_next_on_output2 Ctrl+l
bindsym $mod+$i3-wm.binding.ws_next_on_output2 workspace next_on_output
## Navigate // Previous Workspace // <><Shift> Tab ##
set_from_resource $i3-wm.binding.ws_prev i3-wm.binding.ws_prev Shift+Tab
bindsym $mod+$i3-wm.binding.ws_prev workspace prev
## Navigate // Previous Workspace // <><Alt> ← ##
set_from_resource $i3-wm.binding.ws_prev2 i3-wm.binding.ws_prev2 Left
bindsym $mod+$alt+$i3-wm.binding.ws_prev2 workspace prev
## Navigate // Previous Workspace on Output // <><Ctrl><Shift> Tab ##
set_from_resource $i3-wm.binding.ws_prev_on_output i3-wm.binding.ws_prev_on_output Ctrl+Shift+Tab
bindsym $mod+$i3-wm.binding.ws_prev_on_output workspace prev_on_output
## Navigate // Scratchpad // <><Ctrl> a ##
set_from_resource $i3-wm.binding.scratchpad i3-wm.binding.scratchpad Ctrl+a
bindsym $mod+$i3-wm.binding.scratchpad scratchpad show
## Move to i3 folder
## NOTE: sudo apt autoremove regolith-wm-workspace-config
###############################################################################
# Window and Workspace Configuration
###############################################################################
## Modify // Window Position // <><Shift> ↑ ↓ ← → ##
bindsym $mod+Shift+Left move left
bindsym $mod+Shift+Down move down
bindsym $mod+Shift+Up move up
bindsym $mod+Shift+Right move right
## Modify // Containing Workspace // <><Ctrl><Shift> ↑ ↓ ← → ##
set_from_resource $i3-wm.binding.move_workspace_output_left i3-wm.binding.move_workspace_output_left Ctrl+Shift+Left
set_from_resource $i3-wm.binding.move_workspace_output_right i3-wm.binding.move_workspace_output_right Ctrl+Shift+Right
set_from_resource $i3-wm.binding.move_workspace_output_up i3-wm.binding.move_workspace_output_up Ctrl+Shift+Up
set_from_resource $i3-wm.binding.move_workspace_output_down i3-wm.binding.move_workspace_output_down Ctrl+Shift+Down
bindsym $mod+$i3-wm.binding.move_workspace_output_left move workspace to output left
bindsym $mod+$i3-wm.binding.move_workspace_output_right move workspace to output right
bindsym $mod+$i3-wm.binding.move_workspace_output_up move workspace to output up
bindsym $mod+$i3-wm.binding.move_workspace_output_down move workspace to output down
## Modify // Vertical Window Orientation // <> v ##
set_from_resource $i3-wm.binding.split_v i3-wm.binding.split_v v
bindsym $mod+$i3-wm.binding.split_v split vertical
## Modify // Horizontal Window Orientation // <> g ##
set_from_resource $i3-wm.binding.split_h i3-wm.binding.split_h g
bindsym $mod+$i3-wm.binding.split_h split horizontal
## Modify // Toggle Window Orientation // <> Backspace ##
set_from_resource $i3-wm.binding.orientation_toggle i3-wm.binding.orientation_toggle BackSpace
bindsym $mod+$i3-wm.binding.orientation_toggle split toggle
## Modify // Window Floating Toggle // <><Shift> f ##
#set_from_resource $i3-wm.binding.float_toggle i3-wm.binding.float_toggle Shift+f
#bindsym $mod+Shift+$i3-wm.binding.float_toggle floating toggle
## Modify // Move to Scratchpad // <><Ctrl> m ##
#set_from_resource $i3-wm.binding.move_scratchpad i3-wm.binding.move_scratchpad Ctrl+m
#bindsym $mod+$i3-wm.binding.move_scratchpad move to scratchpad
## Modify // Tile/Float Focus Toggle // <><Shift> t ##
set_from_resource $i3-wm.binding.focus_toggle i3-wm.binding.focus_toggle Shift+t
bindsym $mod+$i3-wm.binding.focus_toggle focus mode_toggle
## Modify // Window Layout Mode // <> t ##
set_from_resource $i3-wm.binding.layout_mode i3-wm.binding.layout_mode t
bindsym $mod+$i3-wm.binding.layout_mode layout toggle tabbed splith splitv
## Modify // Move Window to Workspace 1 - 10 // <><Shift> 0..9 ##
bindsym $mod+Shift+$ws1_key move container to workspace number $ws1
bindsym $mod+Shift+$ws2_key move container to workspace number $ws2
bindsym $mod+Shift+$ws3_key move container to workspace number $ws3
bindsym $mod+Shift+$ws4_key move container to workspace number $ws4
bindsym $mod+Shift+$ws5_key move container to workspace number $ws5
bindsym $mod+Shift+$ws6_key move container to workspace number $ws6
bindsym $mod+Shift+$ws7_key move container to workspace number $ws7
bindsym $mod+Shift+$ws8_key move container to workspace number $ws8
bindsym $mod+Shift+$ws9_key move container to workspace number $ws9
bindsym $mod+Shift+$ws10_key move container to workspace number $ws10
## Modify // Move Window to Workspace 11 - 19// <><Ctrl><Shift> 1..9 ##
bindsym $mod+Shift+Ctrl+$ws1_key move container to workspace number $ws11
bindsym $mod+Shift+Ctrl+$ws2_key move container to workspace number $ws12
bindsym $mod+Shift+Ctrl+$ws3_key move container to workspace number $ws13
bindsym $mod+Shift+Ctrl+$ws4_key move container to workspace number $ws14
bindsym $mod+Shift+Ctrl+$ws5_key move container to workspace number $ws15
bindsym $mod+Shift+Ctrl+$ws6_key move container to workspace number $ws16
bindsym $mod+Shift+Ctrl+$ws7_key move container to workspace number $ws17
bindsym $mod+Shift+Ctrl+$ws8_key move container to workspace number $ws18
bindsym $mod+Shift+Ctrl+$ws9_key move container to workspace number $ws19
# move focused container to workspace, move to workspace
## Modify // Carry Window to Workspace 1 - 10// <><Alt> 0..9 ##
bindsym $mod+$alt+$ws1_key move container to workspace number $ws1; workspace number $ws1
bindsym $mod+$alt+$ws2_key move container to workspace number $ws2; workspace number $ws2
bindsym $mod+$alt+$ws3_key move container to workspace number $ws3; workspace number $ws3
bindsym $mod+$alt+$ws4_key move container to workspace number $ws4; workspace number $ws4
bindsym $mod+$alt+$ws5_key move container to workspace number $ws5; workspace number $ws5
bindsym $mod+$alt+$ws6_key move container to workspace number $ws6; workspace number $ws6
bindsym $mod+$alt+$ws7_key move container to workspace number $ws7; workspace number $ws7
bindsym $mod+$alt+$ws8_key move container to workspace number $ws8; workspace number $ws8
bindsym $mod+$alt+$ws9_key move container to workspace number $ws9; workspace number $ws9
bindsym $mod+$alt+$ws10_key move container to workspace number $ws10; workspace number $ws10
## Modify // Carry Window to Workspace 11 - 19 // <><Alt><Ctrl> 1..9 ##
bindsym $mod+$alt+Ctrl+$ws1_key move container to workspace number $ws11; workspace number $ws11
bindsym $mod+$alt+Ctrl+$ws2_key move container to workspace number $ws12; workspace number $ws12
bindsym $mod+$alt+Ctrl+$ws3_key move container to workspace number $ws13; workspace number $ws13
bindsym $mod+$alt+Ctrl+$ws4_key move container to workspace number $ws14; workspace number $ws14
bindsym $mod+$alt+Ctrl+$ws5_key move container to workspace number $ws15; workspace number $ws15
bindsym $mod+$alt+Ctrl+$ws6_key move container to workspace number $ws16; workspace number $ws16
bindsym $mod+$alt+Ctrl+$ws7_key move container to workspace number $ws17; workspace number $ws17
bindsym $mod+$alt+Ctrl+$ws8_key move container to workspace number $ws18; workspace number $ws18
bindsym $mod+$alt+Ctrl+$ws9_key move container to workspace number $ws19; workspace number $ws19
set_from_resource $i3-wm.workspace.auto_back_and_forth i3-wm.workspace.auto_back_and_forth no
workspace_auto_back_and_forth $i3-wm.workspace.auto_back_and_forth
# Use Mouse+$mod to drag floating windows to their wanted position
floating_modifier $mod
# Custom bindings for i3_config
# @angrykoala
# Add to ~/.config/regolith/i3/config
# TODO: Copy original i3 config file and remove colliding bindings
## My Custom Bindings
### Open filesystem keybinding
bindsym $mod+f exec nautilus --new-window
### Move workspaces from screen
bindsym $mod+Ctrl+Up move workspace to output up
bindsym $mod+Ctrl+Down move workspace to output down
bindsym $mod+Ctrl+Left move workspace to output left
bindsym $mod+Ctrl+Right move workspace to output right
### Scratchpad
bindsym $mod+h move scratchpad
bindsym $mod+Shift+h scratchpad show floating disable
## Handle wallpaper externally
regolith.wallpaper.color.primary:
regolith.lockscreen.wallpaper.color.primary:
## Handle fonts externally
gtk.font_name:
gtk.monospace_font_name:
gtk.document_font_name:
## Handle themes externally
gtk.theme_name:
gtk.icon_theme_name:
## i3 bar
wm.bar.position: top
wm.bar.workspace.urgent.background.color: #915217
wm.bar.workspace.urgent.border.color: #915217
## My classic workspaces
wm.workspace.01.name: 1: 1 <span foreground='#19B6EE'></span> Main
wm.workspace.02.name: 2: 2 <span foreground='#007aa6'></span> Browser
wm.workspace.03.name: 3: 3 <span foreground='#0e8420'></span> Dev
wm.workspace.04.name: 4: 4 <span foreground='#f99b11'></span> Notes
wm.workspace.05.name: 5: 5 <span foreground='#E95420'></span>
wm.workspace.06.name: 6: 6 <span foreground='#c7162b'></span>
wm.workspace.07.name: 7: 7 <span foreground='#335280'></span>
wm.workspace.08.name: 8: 8 <span foreground='#762572'></span>
wm.workspace.09.name: 9: 9 <span foreground='#F7F7F7'></span>
wm.workspace.10.name: 10: 10 <span foreground='#19B6EE'></span>
wm.workspace.11.name: 11: 11 <span foreground='#007aa6'></span>
wm.workspace.12.name: 12: 12 <span foreground='#0e8420'></span>
wm.workspace.13.name: 13: 13 <span foreground='#f99b11'></span>
wm.workspace.14.name: 14: 14 <span foreground='#E95420'></span>
wm.workspace.15.name: 15: 15 <span foreground='#c7162b'></span>
wm.workspace.16.name: 16: 16 <span foreground='#335280'></span>
wm.workspace.17.name: 17: 17 <span foreground='#762572'></span>
wm.workspace.18.name: 18: 18 <span foreground='#F7F7F7'></span>
wm.workspace.19.name: 19: 19 <span foreground='#19B6EE'></span>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment