sway: update config, change win to alt

This commit is contained in:
Konstantin Koslowski 2025-08-30 14:54:57 +02:00
parent f6e268e674
commit 67a7a6091d
3 changed files with 128 additions and 96 deletions

193
config
View file

@ -6,8 +6,8 @@
### Variables ### Variables
# #
# Logo key. Use Mod1 for Alt. set $alt Mod1
set $mod Mod4 set $cmd Mod4
# Home row direction keys, like vim # Home row direction keys, like vim
set $left h set $left h
set $down j set $down j
@ -78,119 +78,119 @@ input type:keyboard {
# Basics: # Basics:
# #
# Start a terminal # Start a terminal
bindsym $mod+Return exec $term bindsym $alt+Return exec $term
bindsym $mod+Shift+Return exec $term_cmd bindsym $alt+Shift+Return exec $term_cmd
# Kill focused window # Kill focused window
bindsym $mod+Shift+q kill bindsym $alt+Shift+q kill
bindsym --release button3 kill bindsym --release button3 kill
# Start your launcher # Start your launcher
bindsym $mod+r exec $menu bindsym $alt+r exec $menu
bindsym $mod+Shift+r exec $search_cmd bindsym $alt+Shift+r exec $search_cmd
bindsym $mod+Backspace exec $exit_cmd bindsym $alt+Backspace exec $exit_cmd
# Drag floating windows by holding down $mod and left mouse button. # Drag floating windows by holding down $alt and left mouse button.
# Resize them with right mouse button + $mod. # Resize them with right mouse button + $alt.
# Despite the name, also works for non-floating windows. # Despite the name, also works for non-floating windows.
# Change normal to inverse to use left mouse button for resizing and right # Change normal to inverse to use left mouse button for resizing and right
# mouse button for dragging. # mouse button for dragging.
floating_modifier $mod normal floating_modifier $alt normal
# Moving around: # Moving around:
# #
# Move your focus around # Move your focus around
bindsym $mod+$left focus left bindsym $alt+$left focus left
bindsym $mod+$down focus down bindsym $alt+$down focus down
bindsym $mod+$up focus up bindsym $alt+$up focus up
bindsym $mod+$right focus right bindsym $alt+$right focus right
# Move the focused window with the same, but add Shift # Move the focused window with the same, but add Shift
bindsym $mod+Shift+$left move left bindsym $alt+Shift+$left move left
bindsym $mod+Shift+$down move down bindsym $alt+Shift+$down move down
bindsym $mod+Shift+$up move up bindsym $alt+Shift+$up move up
bindsym $mod+Shift+$right move right bindsym $alt+Shift+$right move right
# #
# Resize # Resize
# #
bindsym $mod+Ctrl+$left resize shrink width 50px bindsym $alt+Ctrl+$left resize shrink width 50px
bindsym $mod+Ctrl+$down resize grow height 50px bindsym $alt+Ctrl+$down resize grow height 50px
bindsym $mod+Ctrl+$up resize shrink height 50px bindsym $alt+Ctrl+$up resize shrink height 50px
bindsym $mod+Ctrl+$right resize grow width 50px bindsym $alt+Ctrl+$right resize grow width 50px
# #
# Workspaces: # Workspaces:
# #
# Switch to workspace # Switch to workspace
bindsym --no-repeat $mod+1 workspace number 1; exec "echo 1 > /tmp/sovpipe" bindsym --no-repeat $alt+1 workspace number 1; exec "echo 1 > /tmp/sovpipe"
bindsym --no-repeat $mod+2 workspace number 2; exec "echo 1 > /tmp/sovpipe" bindsym --no-repeat $alt+2 workspace number 2; exec "echo 1 > /tmp/sovpipe"
bindsym --no-repeat $mod+3 workspace number 3; exec "echo 1 > /tmp/sovpipe" bindsym --no-repeat $alt+3 workspace number 3; exec "echo 1 > /tmp/sovpipe"
bindsym --no-repeat $mod+4 workspace number 4; exec "echo 1 > /tmp/sovpipe" bindsym --no-repeat $alt+4 workspace number 4; exec "echo 1 > /tmp/sovpipe"
bindsym --no-repeat $mod+5 workspace number 5; exec "echo 1 > /tmp/sovpipe" bindsym --no-repeat $alt+5 workspace number 5; exec "echo 1 > /tmp/sovpipe"
bindsym --no-repeat $mod+6 workspace number 6; exec "echo 1 > /tmp/sovpipe" bindsym --no-repeat $alt+6 workspace number 6; exec "echo 1 > /tmp/sovpipe"
bindsym --no-repeat $mod+7 workspace number 7; exec "echo 1 > /tmp/sovpipe" bindsym --no-repeat $alt+7 workspace number 7; exec "echo 1 > /tmp/sovpipe"
bindsym --no-repeat $mod+8 workspace number 8; exec "echo 1 > /tmp/sovpipe" bindsym --no-repeat $alt+8 workspace number 8; exec "echo 1 > /tmp/sovpipe"
bindsym --no-repeat $mod+9 workspace number 9; exec "echo 1 > /tmp/sovpipe" bindsym --no-repeat $alt+9 workspace number 9; exec "echo 1 > /tmp/sovpipe"
bindsym --no-repeat $mod+0 workspace number 10; exec "echo 1 > /tmp/sovpipe" bindsym --no-repeat $alt+0 workspace number 10; exec "echo 1 > /tmp/sovpipe"
# hide sov # hide sov
bindsym --release $mod+1 exec "echo 0 > /tmp/sovpipe" bindsym --release $alt+1 exec "echo 0 > /tmp/sovpipe"
bindsym --release $mod+2 exec "echo 0 > /tmp/sovpipe" bindsym --release $alt+2 exec "echo 0 > /tmp/sovpipe"
bindsym --release $mod+3 exec "echo 0 > /tmp/sovpipe" bindsym --release $alt+3 exec "echo 0 > /tmp/sovpipe"
bindsym --release $mod+4 exec "echo 0 > /tmp/sovpipe" bindsym --release $alt+4 exec "echo 0 > /tmp/sovpipe"
bindsym --release $mod+5 exec "echo 0 > /tmp/sovpipe" bindsym --release $alt+5 exec "echo 0 > /tmp/sovpipe"
bindsym --release $mod+6 exec "echo 0 > /tmp/sovpipe" bindsym --release $alt+6 exec "echo 0 > /tmp/sovpipe"
bindsym --release $mod+7 exec "echo 0 > /tmp/sovpipe" bindsym --release $alt+7 exec "echo 0 > /tmp/sovpipe"
bindsym --release $mod+8 exec "echo 0 > /tmp/sovpipe" bindsym --release $alt+8 exec "echo 0 > /tmp/sovpipe"
bindsym --release $mod+9 exec "echo 0 > /tmp/sovpipe" bindsym --release $alt+9 exec "echo 0 > /tmp/sovpipe"
bindsym --release $mod+0 exec "echo 0 > /tmp/sovpipe" bindsym --release $alt+0 exec "echo 0 > /tmp/sovpipe"
# back and forth # back and forth
bindsym $mod+Escape workspace back_and_forth bindsym $alt+Escape workspace back_and_forth
bindsym $mod+Tab workspace next bindsym $alt+Tab workspace next
# Move focused container to workspace # Move focused container to workspace
bindsym $mod+Shift+1 move container to workspace number 1 bindsym $alt+Shift+1 move container to workspace number 1
bindsym $mod+Shift+2 move container to workspace number 2 bindsym $alt+Shift+2 move container to workspace number 2
bindsym $mod+Shift+3 move container to workspace number 3 bindsym $alt+Shift+3 move container to workspace number 3
bindsym $mod+Shift+4 move container to workspace number 4 bindsym $alt+Shift+4 move container to workspace number 4
bindsym $mod+Shift+5 move container to workspace number 5 bindsym $alt+Shift+5 move container to workspace number 5
bindsym $mod+Shift+6 move container to workspace number 6 bindsym $alt+Shift+6 move container to workspace number 6
bindsym $mod+Shift+7 move container to workspace number 7 bindsym $alt+Shift+7 move container to workspace number 7
bindsym $mod+Shift+8 move container to workspace number 8 bindsym $alt+Shift+8 move container to workspace number 8
bindsym $mod+Shift+9 move container to workspace number 9 bindsym $alt+Shift+9 move container to workspace number 9
bindsym $mod+Shift+0 move container to workspace number 10 bindsym $alt+Shift+0 move container to workspace number 10
# Note: workspaces can have any name you want, not just numbers. # Note: workspaces can have any name you want, not just numbers.
# We just use 1-10 as the default. # We just use 1-10 as the default.
# #
# Urgent # Urgent
# #
bindsym $mod+u [urgent=latest] focus bindsym $alt+u [urgent=latest] focus
# #
# Layout stuff: # Layout stuff:
# #
# You can "split" the current object of your focus with # You can "split" the current object of your focus with
# $mod+b or $mod+v, for horizontal and vertical splits # $alt+b or $alt+v, for horizontal and vertical splits
# respectively. # respectively.
bindsym $mod+b splith bindsym $alt+b splith
bindsym $mod+v splitv bindsym $alt+v splitv
# Switch the current container between different layout styles # Switch the current container between different layout styles
bindsym $mod+q layout stacking bindsym $alt+q layout stacking
bindsym $mod+w layout tabbed bindsym $alt+w layout tabbed
bindsym $mod+e layout toggle split bindsym $alt+e layout toggle split
# Make the current focus fullscreen # Make the current focus fullscreen
bindsym $mod+f fullscreen bindsym $alt+f fullscreen
# Toggle the current focus between tiling and floating mode # Toggle the current focus between tiling and floating mode
bindsym $mod+Shift+space floating toggle bindsym $alt+Shift+space floating toggle
# Toggle border/titlebar # Toggle border/titlebar
bindsym $mod+Control+b border toggle bindsym $alt+Control+b border toggle
# Swap focus between the tiling area and the floating area # Swap focus between the tiling area and the floating area
bindsym $mod+space focus mode_toggle bindsym $alt+space focus mode_toggle
# Move focus to the parent container # Move focus to the parent container
bindsym $mod+i focus parent bindsym $alt+i focus parent
# Move focus to the child # Move focus to the child
bindsym $mod+Shift+i focus child bindsym $alt+Shift+i focus child
# #
## Volume ## Volume
@ -217,17 +217,17 @@ bindsym Print exec grim -g "$(slurp)" - | wl-copy
# copy selection to swappy # copy selection to swappy
bindsym Shift+Print exec grim -g "$(slurp)" - | swappy -f - bindsym Shift+Print exec grim -g "$(slurp)" - | swappy -f -
# save selection # save selection
bindsym $mod+Print exec grim -g "$(slurp)" \ bindsym $alt+Print exec grim -g "$(slurp)" \
$(xdg-user-dir PICTURES)/screenshot_$(date +'%Y%m%d_%H%M%S').png $(xdg-user-dir PICTURES)/screenshot_$(date +'%Y%m%d_%H%M%S').png
# #
## Output ## Output
# #
bindsym $mod+p exec "$term_cmd $output_cmd" bindsym $alt+p exec "$term_cmd $output_cmd"
# #
## Lock ## Lock
# #
bindsym $mod+Delete exec $lock_cmd # bindsym $alt+Delete exec $lock_cmd
# #
# Gaps # Gaps
@ -241,31 +241,31 @@ gaps right 0
# Scratchpad: # Scratchpad:
# #
# Move the currently focused window to the scratchpad # Move the currently focused window to the scratchpad
bindsym $mod+Shift+s move scratchpad bindsym $alt+Shift+s move scratchpad
# Show all scratchpads # Show all scratchpads
bindsym $mod+Ctrl+s scratchpad show bindsym $alt+Ctrl+s scratchpad show
# Show specific scratchpads # Show specific scratchpads
bindsym $mod+a [con_mark="a" tiling=True] focus; [con_mark="a" floating=True] focus output $$main; \ bindsym $alt+a [con_mark="a" tiling=True] focus; [con_mark="a" floating=True] focus output $$main; \
[con_mark="a" floating=True] scratchpad show; [con_mark="a" floating=True] scratchpad show;
bindsym $mod+s [con_mark="s" tiling=True] focus; [con_mark="s" floating=True] focus output $$main; \ bindsym $alt+s [con_mark="s" tiling=True] focus; [con_mark="s" floating=True] focus output $$main; \
[con_mark="s" floating=True] scratchpad show; [con_mark="s" floating=True] scratchpad show;
bindsym $mod+d [con_mark="d" tiling=True] focus; [con_mark="d" floating=True] focus output $$main; \ bindsym $alt+d [con_mark="d" tiling=True] focus; [con_mark="d" floating=True] focus output $$main; \
[con_mark="d" floating=True] scratchpad show; [con_mark="d" floating=True] scratchpad show;
bindsym $mod+z [con_mark="z" tiling=True] focus; [con_mark="z" floating=True] focus output $$main; \ bindsym $alt+z [con_mark="z" tiling=True] focus; [con_mark="z" floating=True] focus output $$main; \
[con_mark="z" floating=True] scratchpad show; [con_mark="z" floating=True] scratchpad show;
bindsym $mod+x [con_mark="x" tiling=True] focus; [con_mark="x" floating=True] focus output $$main; \ bindsym $alt+x [con_mark="x" tiling=True] focus; [con_mark="x" floating=True] focus output $$main; \
[con_mark="x" floating=True] scratchpad show; [con_mark="x" floating=True] scratchpad show;
bindsym $mod+c [con_mark="c" tiling=True] focus; [con_mark="c" floating=True] focus output $$main; \ bindsym $alt+c [con_mark="c" tiling=True] focus; [con_mark="c" floating=True] focus output $$main; \
[con_mark="c" floating=True] scratchpad show; [con_mark="c" floating=True] scratchpad show;
bindsym $mod+Shift+u exec notify-send $$main bindsym $alt+Shift+u exec notify-send $$main
# #
# Notifications # Notifications
# #
bindsym $mod+comma exec dunstctl close bindsym $alt+comma exec dunstctl close
bindsym $mod+Shift+comma exec dunstctl close-all bindsym $alt+Shift+comma exec dunstctl close-all
bindsym $mod+period exec dunstctl history-pop bindsym $alt+period exec dunstctl history-pop
bindsym $mod+Shift+period exec dunstctl set-paused toggle bindsym $alt+Shift+period exec dunstctl set-paused toggle
# #
# Modes # Modes
@ -307,10 +307,10 @@ mode "move" {
bindsym 4 exec $resize_cmd 60 bindsym 4 exec $resize_cmd 60
bindsym 5 exec $resize_cmd 80 bindsym 5 exec $resize_cmd 80
# focus # focus
bindsym $mod+h focus left bindsym $alt+h focus left
bindsym $mod+j focus down bindsym $alt+j focus down
bindsym $mod+k focus up bindsym $alt+k focus up
bindsym $mod+l focus right bindsym $alt+l focus right
# Return to default mode # Return to default mode
bindsym Return exec $notify_cmd "mode: default"; mode "default" bindsym Return exec $notify_cmd "mode: default"; mode "default"
bindsym Escape exec $notify_cmd "mode: default"; mode "default" bindsym Escape exec $notify_cmd "mode: default"; mode "default"
@ -331,16 +331,16 @@ mode "move-workspace" {
bindsym j move workspace to output down bindsym j move workspace to output down
bindsym k move workspace to output up bindsym k move workspace to output up
bindsym l move workspace to output right bindsym l move workspace to output right
bindsym $mod+h focus left bindsym $alt+h focus left
bindsym $mod+j focus down bindsym $alt+j focus down
bindsym $mod+k focus up bindsym $alt+k focus up
bindsym $mod+l focus right bindsym $alt+l focus right
bindsym Return exec $notify_cmd "mode: default"; mode "default" bindsym Return exec $notify_cmd "mode: default"; mode "default"
bindsym Escape exec $notify_cmd "mode: default"; mode "default" bindsym Escape exec $notify_cmd "mode: default"; mode "default"
} }
bindsym $mod+m exec $notify_cmd "mode: move"; mode "move" bindsym $alt+m exec $notify_cmd "mode: move"; mode "move"
bindsym $mod+Shift+a exec $notify_cmd "mode: mark"; mode "mark" bindsym $alt+Shift+a exec $notify_cmd "mode: mark"; mode "mark"
bindsym $mod+o exec $notify_cmd "mode: move-workspace"; mode "move-workspace" bindsym $alt+o exec $notify_cmd "mode: move-workspace"; mode "move-workspace"
# #
# Window Rules: # Window Rules:
@ -361,8 +361,11 @@ for_window [app_id="firefox" title="Firefox - Sharing Indicator"] floating enabl
for_window [app_id="firefox" title="Picture-in-Picture"] floating enable for_window [app_id="firefox" title="Picture-in-Picture"] floating enable
# mark rules # mark rules
for_window [class="Plexamp" window_type="normal"] mark s for_window [class="Plexamp" window_type="normal"] mark s
for_window [app_id="Plexamp"] mark s
for_window [class="Ferdium" window_type="normal" window_role="browser-window"] mark z for_window [class="Ferdium" window_type="normal" window_role="browser-window"] mark z
for_window [app_id="ferdium"] mark z
for_window [class="Signal" window_type="normal" window_role="browser-window"] mark x for_window [class="Signal" window_type="normal" window_role="browser-window"] mark x
for_window [app_id="signal"] mark x
# #
# Autostart # Autostart

View file

@ -1,9 +1,38 @@
# vim: ft=i3 # vim: ft=i3
### annoyance specific settings ### annoyance specific settings
set $extern "ASUSTek COMPUTER INC PG49WCD R9LMAS003894" set $extern "ASUSTek COMPUTER INC PG49WCD R9LMAS003894"
set $extern2 "Lenovo Group Limited L29w-30 UPV08NFA"
set $main $extern set $main $extern
# set $main $extern # set $main $extern
set $main DP-3 set $main DP-3
### Output configuration ### Output configuration
output $extern mode 5120x1440 output $extern mode 5120x1440
output $extern2 mode 2560x1080 transform 270
### Window Rules
for_window [title="ContentDialogOverlayWindow"] floating enable
input "1452:613:Apple_Inc._Magic_Trackpad" {
accel_profile adaptive
pointer_accel 0.5
click_method clickfinger
dwt enabled # disable while typing
middle_emulation enabled
natural_scroll enabled
scroll_method two_finger
tap enabled
tap_button_map lrm
}
input "1452:804:Apple_Inc._Magic_Trackpad" {
accel_profile adaptive
pointer_accel 0.5
click_method clickfinger
dwt enabled # disable while typing
middle_emulation enabled
natural_scroll enabled
scroll_method two_finger
tap enabled
tap_button_map lrm
}

View file

@ -65,7 +65,7 @@
"default": "♪ " "default": "♪ "
}, },
"escape": true, "escape": true,
"exec": "$HOME/.config/sway/bin/waybar_mediaplayer.py 2> /dev/null" "exec": "$HOME/.config/sway/bin/waybar_mediaplayer.py"
}, },
"clock": { "clock": {
"format": "<span foreground='#ebdbb2'> </span>{:%H:%M, %b %d }", "format": "<span foreground='#ebdbb2'> </span>{:%H:%M, %b %d }",