i3: use dynamic layouts with i3-layouts
This commit is contained in:
parent
5377574b86
commit
5b0960b26b
129
i3/i3/config
129
i3/i3/config
@ -13,17 +13,13 @@ set $mod Mod4
|
|||||||
set $scripts ~/.config/i3/scripts
|
set $scripts ~/.config/i3/scripts
|
||||||
set $lock "i3lock --ignore-empty-password --color=000000"
|
set $lock "i3lock --ignore-empty-password --color=000000"
|
||||||
|
|
||||||
# Font for window titles. Will also be used by the bar unless a different font
|
# Font for window titles
|
||||||
# is used in the bar {} block below.
|
font pango:FuraCode Nerd Font 12
|
||||||
font pango:monospace 12
|
|
||||||
|
|
||||||
# This font is widely installed, provides lots of unicode glyphs, right-to-left
|
# This font is widely installed, provides lots of unicode glyphs, right-to-left
|
||||||
# text rendering and scalability on retina/hidpi displays (thanks to pango).
|
# text rendering and scalability on retina/hidpi displays (thanks to pango).
|
||||||
#font pango:DejaVu Sans Mono 12
|
#font pango:DejaVu Sans Mono 12
|
||||||
|
|
||||||
# The combination of xss-lock, nm-applet and pactl is a popular choice, so
|
|
||||||
# they are included here as an example. Modify as you see fit.
|
|
||||||
|
|
||||||
# xss-lock grabs a logind suspend inhibit lock and will use $lock to lock the
|
# xss-lock grabs a logind suspend inhibit lock and will use $lock to lock the
|
||||||
# screen before suspend. Use loginctl lock-session to lock your screen.
|
# screen before suspend. Use loginctl lock-session to lock your screen.
|
||||||
exec --no-startup-id xss-lock --transfer-sleep-lock -- $lock --nofork
|
exec --no-startup-id xss-lock --transfer-sleep-lock -- $lock --nofork
|
||||||
@ -76,30 +72,28 @@ bindsym $mod+Up focus up
|
|||||||
bindsym $mod+Right focus right
|
bindsym $mod+Right focus right
|
||||||
|
|
||||||
# move focused window
|
# move focused window
|
||||||
bindsym $mod+Shift+h move left
|
bindsym $mod+Shift+h exec i3l move left
|
||||||
bindsym $mod+Shift+j move down
|
bindsym $mod+Shift+j exec i3l move down
|
||||||
bindsym $mod+Shift+k move up
|
bindsym $mod+Shift+k exec i3l move up
|
||||||
bindsym $mod+Shift+l move right
|
bindsym $mod+Shift+l exec i3l move right
|
||||||
|
|
||||||
# alternatively, you can use the cursor keys:
|
# alternatively, you can use the cursor keys:
|
||||||
bindsym $mod+Shift+Left move left
|
bindsym $mod+Shift+Left exec i3l move left
|
||||||
bindsym $mod+Shift+Down move down
|
bindsym $mod+Shift+Down exec i3l move down
|
||||||
bindsym $mod+Shift+Up move up
|
bindsym $mod+Shift+Up exec i3l move up
|
||||||
bindsym $mod+Shift+Right move right
|
bindsym $mod+Shift+Right exec i3l move right
|
||||||
|
|
||||||
# split in horizontal orientation
|
# split in horizontal / vertical orientation
|
||||||
bindsym $mod+Shift+v split h
|
# bindsym $mod+Shift+v split h
|
||||||
|
# bindsym $mod+v split v
|
||||||
# split in vertical orientation
|
|
||||||
bindsym $mod+v split v
|
|
||||||
|
|
||||||
# enter fullscreen mode for the focused container
|
# enter fullscreen mode for the focused container
|
||||||
bindsym $mod+f fullscreen toggle
|
bindsym $mod+f fullscreen toggle
|
||||||
|
|
||||||
# change container layout (stacked, tabbed, toggle split)
|
# change container layout (stacked, tabbed, toggle split)
|
||||||
bindsym $mod+Shift+w layout stacking
|
# bindsym $mod+Shift+w layout stacking
|
||||||
bindsym $mod+w layout tabbed
|
# bindsym $mod+w layout tabbed
|
||||||
bindsym $mod+e layout toggle split
|
# bindsym $mod+e layout toggle split
|
||||||
|
|
||||||
# toggle tiling / floating
|
# toggle tiling / floating
|
||||||
bindsym $mod+Shift+space floating toggle
|
bindsym $mod+Shift+space floating toggle
|
||||||
@ -108,11 +102,14 @@ bindsym $mod+Shift+space floating toggle
|
|||||||
bindsym $mod+space focus mode_toggle
|
bindsym $mod+space focus mode_toggle
|
||||||
|
|
||||||
# focus the parent container
|
# focus the parent container
|
||||||
bindsym $mod+a focus parent
|
# bindsym $mod+a focus parent
|
||||||
|
|
||||||
# focus the child container
|
# focus the child container
|
||||||
#bindsym $mod+d focus child
|
#bindsym $mod+d focus child
|
||||||
|
|
||||||
|
# The middle button over a titlebar kills the window
|
||||||
|
bindsym --release button2 kill
|
||||||
|
|
||||||
# Define names for default workspaces for which we configure key bindings later on.
|
# Define names for default workspaces for which we configure key bindings later on.
|
||||||
# We use variables to avoid repeating the names in multiple places.
|
# We use variables to avoid repeating the names in multiple places.
|
||||||
set $ws1 "1"
|
set $ws1 "1"
|
||||||
@ -126,6 +123,17 @@ set $ws8 "8"
|
|||||||
set $ws9 "9"
|
set $ws9 "9"
|
||||||
set $ws10 "10"
|
set $ws10 "10"
|
||||||
|
|
||||||
|
set $i3l vstack to workspace $ws1
|
||||||
|
set $i3l vstack to workspace $ws2
|
||||||
|
set $i3l vstack to workspace $ws3
|
||||||
|
set $i3l vstack to workspace $ws4
|
||||||
|
set $i3l vstack to workspace $ws5
|
||||||
|
set $i3l vstack to workspace $ws6
|
||||||
|
set $i3l vstack to workspace $ws7
|
||||||
|
set $i3l vstack to workspace $ws8
|
||||||
|
set $i3l vstack to workspace $ws9
|
||||||
|
set $i3l vstack to workspace $ws10
|
||||||
|
|
||||||
# switch to workspace
|
# switch to workspace
|
||||||
bindsym $mod+1 workspace number $ws1
|
bindsym $mod+1 workspace number $ws1
|
||||||
bindsym $mod+2 workspace number $ws2
|
bindsym $mod+2 workspace number $ws2
|
||||||
@ -198,12 +206,12 @@ bindsym $mod+r mode "resize"
|
|||||||
|
|
||||||
# Start i3bar to display a workspace bar (plus the system information i3status
|
# Start i3bar to display a workspace bar (plus the system information i3status
|
||||||
# finds out, if available)
|
# finds out, if available)
|
||||||
bar {
|
#bar {
|
||||||
status_command i3blocks
|
# status_command i3blocks
|
||||||
position bottom
|
# position bottom
|
||||||
i3bar_command i3bar --transparency
|
# i3bar_command i3bar --transparency
|
||||||
bindsym button3 exec --no-startup-id jgmenu_run
|
# bindsym button3 exec --no-startup-id jgmenu_run
|
||||||
}
|
#}
|
||||||
|
|
||||||
|
|
||||||
set $mode_system System (l) lock, (e) logout, (r) reboot, (s) shutdown
|
set $mode_system System (l) lock, (e) logout, (r) reboot, (s) shutdown
|
||||||
@ -243,30 +251,65 @@ mode "$mode_screenshot_clipboard" {
|
|||||||
}
|
}
|
||||||
bindsym $mod+Print mode "$mode_screenshot_clipboard"
|
bindsym $mod+Print mode "$mode_screenshot_clipboard"
|
||||||
|
|
||||||
bindsym $mod+Ctrl+Right move workspace to output right
|
set $mode_choose_layout Layout (h) vstack-left, (l) vstack-right, (k) hstack-top, (j) hstack-bottom, (c) 2columns
|
||||||
bindsym $mod+Ctrl+Left move workspace to output right
|
mode "$mode_choose_layout" {
|
||||||
|
bindsym h exec i3l vstack 0.5 right, mode "default"
|
||||||
|
bindsym l exec i3l vstack 0.5 left, mode "default"
|
||||||
|
bindsym j exec i3l hstack 0.5 up, mode "default"
|
||||||
|
bindsym k exec i3l hstack 0.5 down, mode "default"
|
||||||
|
bindsym c exec i3l 2columns left, mode "default"
|
||||||
|
|
||||||
|
# back to normal: Escape
|
||||||
|
bindsym Escape mode "default"
|
||||||
|
}
|
||||||
|
bindsym $mod+G mode "$mode_choose_layout"
|
||||||
|
|
||||||
|
bindsym $mod+Ctrl+h exec i3l vstack 0.5 right, mode "default"
|
||||||
|
bindsym $mod+Ctrl+l exec i3l vstack 0.5 left, mode "default"
|
||||||
|
bindsym $mod+Ctrl+j exec i3l hstack 0.5 up, mode "default"
|
||||||
|
bindsym $mod+Ctrl+k exec i3l hstack 0.5 down, mode "default"
|
||||||
|
|
||||||
|
bindsym $mod+Ctrl+Left exec i3l vstack 0.5 right, mode "default"
|
||||||
|
bindsym $mod+Ctrl+Right exec i3l vstack 0.5 left, mode "default"
|
||||||
|
bindsym $mod+Ctrl+Down exec i3l hstack 0.5 up, mode "default"
|
||||||
|
bindsym $mod+Ctrl+Up exec i3l hstack 0.5 down, mode "default"
|
||||||
|
|
||||||
|
#bindsym $mod+Ctrl+Right move workspace to output right
|
||||||
|
#bindsym $mod+Ctrl+Left move workspace to output right
|
||||||
|
|
||||||
#bindsym $mod+c exec xfce4-terminal --role floating --hide-scrollbar --title Calculator -e qalc
|
#bindsym $mod+c exec xfce4-terminal --role floating --hide-scrollbar --title Calculator -e qalc
|
||||||
bindsym $mod+c exec qalculate-gtk
|
bindsym $mod+c exec qalculate-gtk
|
||||||
bindsym $mod+p exec xwacomcalibrate
|
# bindsym $mod+p exec xwacomcalibrate
|
||||||
bindsym $mod+t exec thunar
|
# bindsym $mod+t exec thunar
|
||||||
|
bindsym $mod+t exec krusader
|
||||||
#bindsym $mod+m exec xfce4-terminal -x mc
|
#bindsym $mod+m exec xfce4-terminal -x mc
|
||||||
bindsym $mod+Shift+c exec $scripts/jupyter-calculator
|
bindsym $mod+Shift+c exec $scripts/jupyter-calculator
|
||||||
bindsym $mod+b exec firefox
|
bindsym $mod+b exec firefox
|
||||||
bindsym $mod+s exec pavucontrol
|
#bindsym $mod+s exec pavucontrol
|
||||||
bindsym $mod+u exec pamac-manager
|
bindsym $mod+u exec pamac-manager
|
||||||
|
|
||||||
|
bindsym $mod+p [con_mark="i3l::previous"] focus
|
||||||
|
bindsym $mod+m [con_mark="i3l:[^:]+:main" workspace="__focused__"] focus
|
||||||
|
# bindsym $mod+Shift+m [con_mark="i3l:[^:]+:main" workspace="__focused__"] focus; exec i3l swap container with mark "i3l::previous"
|
||||||
|
#exec $scripts/i3l-swap-master
|
||||||
|
# bindsym $mod+Shift+m exec i3l [con_mark="i3l:[^:]+:main" workspace="__focused__"] swap container with mark "i3l::current"
|
||||||
|
# bindsym $mod+Shift+m exec i3l swap container with mark "__focused__:main"
|
||||||
|
|
||||||
# read 1 character and mark the current window with this character
|
# read 1 character and mark the current window with this character
|
||||||
bindsym $mod+m exec i3-input -F 'mark %s' -l 1 -P 'Mark: '
|
# bindsym $mod+m exec i3-input -F 'mark %s' -l 1 -P 'Mark: '
|
||||||
# read 1 character and go to the window with the character
|
# read 1 character and go to the window with the character
|
||||||
bindsym $mod+Shift+m exec i3-input -F '[con_mark="%s"] focus' -l 1 -P 'Goto: '
|
# bindsym $mod+Shift+m exec i3-input -F '[con_mark="%s"] focus' -l 1 -P 'Goto: '
|
||||||
|
|
||||||
workspace_auto_back_and_forth yes
|
workspace_auto_back_and_forth yes
|
||||||
|
|
||||||
default_border pixel
|
# default_border pixel
|
||||||
|
default_border normal
|
||||||
default_floating_border normal
|
default_floating_border normal
|
||||||
|
hide_edge_borders smart
|
||||||
|
|
||||||
focus_on_window_activation focus
|
show_marks no
|
||||||
|
|
||||||
|
focus_on_window_activation smart
|
||||||
|
|
||||||
assign [class="firefox" title="Mozilla Firefox$"] workspace $ws1
|
assign [class="firefox" title="Mozilla Firefox$"] workspace $ws1
|
||||||
assign [class="TelegramDesktop"] workspace $ws9
|
assign [class="TelegramDesktop"] workspace $ws9
|
||||||
@ -276,7 +319,7 @@ assign [class="Element"] workspace $ws9
|
|||||||
assign [class="Thunderbird"] workspace $ws10
|
assign [class="Thunderbird"] workspace $ws10
|
||||||
assign [class="zoom"] workspace $ws5
|
assign [class="zoom"] workspace $ws5
|
||||||
|
|
||||||
for_window [class="firefox"] focus
|
for_window [class="firefox" urgent="latest"] focus
|
||||||
#for_window [class="Thunderbird"] focus
|
#for_window [class="Thunderbird"] focus
|
||||||
#for_window [class="TelegramDesktop"] no_focus
|
#for_window [class="TelegramDesktop"] no_focus
|
||||||
#for_window [class="Rocket.Chat"] no_focus
|
#for_window [class="Rocket.Chat"] no_focus
|
||||||
@ -307,7 +350,9 @@ exec_always ~/.screenlayout/one-screen.sh
|
|||||||
#exec element-desktop no_focus
|
#exec element-desktop no_focus
|
||||||
#exec telegram-desktop no_focus
|
#exec telegram-desktop no_focus
|
||||||
|
|
||||||
|
exec_always --no-startup-id i3-layouts
|
||||||
# Rightclick menu
|
# Rightclick menu
|
||||||
|
exec_always --no-startup-id ~/.config/polybar/startup.sh
|
||||||
exec --no-startup-id jgmenu --at-pointer --hide-on-startup
|
exec --no-startup-id jgmenu --at-pointer --hide-on-startup
|
||||||
exec --no-startup-id nm-applet
|
exec --no-startup-id nm-applet
|
||||||
exec --no-startup-id blueman-applet
|
exec --no-startup-id blueman-applet
|
||||||
@ -332,3 +377,9 @@ exec --no-startup-id /usr/lib/xfce4/notifyd/xfce4-notifyd
|
|||||||
#exec --no-startup-id i3-msg workspace $ws1
|
#exec --no-startup-id i3-msg workspace $ws1
|
||||||
#exec --no-startup-id i3-msg workspace $ws10
|
#exec --no-startup-id i3-msg workspace $ws10
|
||||||
|
|
||||||
|
#bindsym $mod+Ctrl+q exec i3l 'vstack right' && notify-send 'Layout vstack right'
|
||||||
|
#bindsym $mod+Ctrl+w exec i3l 'vstack left' && notify-send 'Layout vstack left'
|
||||||
|
#bindsym $mod+Ctrl+e exec 'i3l hstack down' && notify-send 'Layout hstack down'
|
||||||
|
#bindsym $mod+Ctrl+r exec 'i3l hstack up' && notify-send 'Layout hstack up'
|
||||||
|
#bindsym $mod+Ctrl+t exec i3l 3columns right && notify-send 'Layout 3columns'
|
||||||
|
#bindsym $mod+Ctrl+z exec i3l 2columns left && notify-send 'Layout 2columns'
|
||||||
|
Loading…
x
Reference in New Issue
Block a user