82 lines
2.3 KiB
Text
82 lines
2.3 KiB
Text
# {{@@ header() @@}}
|
|
# _____ ____ _ _ _
|
|
# / __\ \ /\ / / _` | | | |
|
|
# \__ \\ V V / (_| | |_| |
|
|
# |___/ \_/\_/ \__,_|\__, |
|
|
# |___/
|
|
|
|
bindsym --to-code {
|
|
|
|
###############################################################
|
|
# Moving around
|
|
###############################################################
|
|
|
|
{%@@ for dir in "Left,Up,Right,Down".split(',') @@%}
|
|
{%@@ set resize_cmd = "{} {} 20px".format(
|
|
('shrink' if (loop.index0 < 2) else 'grow'),
|
|
('height' if (loop.index0 % 2) else 'width'),
|
|
) @@%}
|
|
# Move focus
|
|
$mod+${{@@ dir @@}} focus {{@@ dir @@}}
|
|
$mod+{{@@ dir @@}} focus {{@@ dir @@}}
|
|
# Move window
|
|
$mod+Shift+${{@@ dir @@}} move {{@@ dir @@}}
|
|
$mod+Shift+{{@@ dir @@}} move {{@@ dir @@}}
|
|
# Resize window
|
|
$mod+Control+${{@@ dir @@}} resize {{@@ resize_cmd @@}}
|
|
$mod+Control+{{@@ dir @@}} resize {{@@ resize_cmd @@}}
|
|
{%@@ endfor @@%}
|
|
|
|
|
|
###############################################################
|
|
# Workspaces
|
|
###############################################################
|
|
|
|
# Switch to workspace
|
|
# Move focused container to workspace
|
|
{%@@ for i in range(1,11) @@%}
|
|
$mod+{{@@ i%10 @@}} workspace {{@@ i @@}}
|
|
$mod+Shift+{{@@ i%10 @@}} move container workspace {{@@ i @@}}
|
|
{%@@ endfor @@%}
|
|
|
|
# go/move to Workspaces
|
|
# button8,9 = Mouse next/prev button
|
|
# Prior,Next = PageUp/Down
|
|
{%@@ for targ, buttons in {
|
|
"prev_on_output": [ key.tabL, "bracketleft", "Prior", "button9", ],
|
|
"next_on_output": [ key.tabR, "bracketright", "Next", "button8", ],
|
|
}.items() @@%}
|
|
{%@@ for button in buttons @@%}
|
|
{%@@ set pref = ("--whole-window " if "button" in button) @@%}
|
|
{{@@ pref @@}}$mod+{{@@ button @@}} workspace {{@@ targ @@}}
|
|
{{@@ pref @@}}$mod+Shift+{{@@ button @@}} move workspace {{@@ targ @@}}
|
|
{%@@ endfor @@%}
|
|
{%@@ endfor @@%}
|
|
|
|
|
|
###############################################################
|
|
# Layout
|
|
###############################################################
|
|
|
|
# Splits
|
|
$mod+v splitv
|
|
# No splith since we can just mod+r
|
|
|
|
# Layout styles
|
|
$mod+t layout tabbed
|
|
$mod+r layout toggle split
|
|
|
|
# Make the current focus fullscreen
|
|
$mod+f fullscreen
|
|
|
|
# Floating
|
|
$mod+Shift+space floating toggle
|
|
$mod+space focus mode_toggle
|
|
|
|
# Move focus to the parent container
|
|
$mod+a focus parent
|
|
$mod+z focus child
|
|
|
|
}
|
|
|
|
# vim: ft=i3
|