Update sway config

This commit is contained in:
Hydroxycarbamide 2025-02-06 23:01:48 +01:00
parent 8ccbe63f06
commit 5cf999714b
Signed by: Siklos
GPG key ID: C06D07D96997549A

View file

@ -14,19 +14,24 @@ set {
### Key bindings ### Key bindings
bindsym $mod+Return exec $term bindsym {
$mod+Return exec $term
$mod+c kill
$mod+d exec $menu
$mod+w exec rofi -show window -theme catppuccin-macchiato
# Kill focused window $mod+Shift+s exec grim -g "$(slurp)" - | wl-copy
bindsym $mod+c kill $mod+Control+Shift+s exec grim -g "$(slurp)" /tmp/grim.png && tesseract -l eng+jpn /tmp/grim.png - | wl-copy && wl-paste | xargs -I{} notify-send "Tesseract" "Copied '{}'"
$mod+P exec grim -g "$(slurp -o)" - | wl-copy
$mod+Shift+P exec grim - | wl-copy
# Start your launcher $mod+Shift+r reload
bindsym $mod+d exec $menu
bindsym $mod+w exec rofi -show window -theme catppuccin-macchiato
bindsym $mod+Shift+s exec grim -g "$(slurp)" - | wl-copy # Exit sway (logs you out of your Wayland session)
bindsym $mod+Control+Shift+s exec grim -g "$(slurp)" /tmp/grim.png && tesseract -l eng+jpn /tmp/grim.png - | wl-copy && wl-paste | xargs -I{} notify-send "Tesseract" "Copied '{}'" # $mod+q exec rofi -show power-menu -modi power-menu:rofi-power-menu
bindsym $mod+P exec grim -g "$(slurp -o)" - | wl-copy $mod+q exec wlogout -p layer-shell
bindsym $mod+Shift+P exec grim - | wl-copy $mod+Shift+q exec swaynag -t warning -m 'You pressed the exit shortcut. Do you really want to exit sway? This will end your Wayland session.' -B 'Yes, exit sway' 'swaymsg exit'
}
# Drag floating windows by holding down $mod and left mouse button. # Drag floating windows by holding down $mod and left mouse button.
# Resize them with right mouse button + $mod. # Resize them with right mouse button + $mod.
@ -35,31 +40,25 @@ bindsym $mod+Shift+P exec grim - | wl-copy
# mouse button for dragging. # mouse button for dragging.
floating_modifier $mod normal floating_modifier $mod normal
# Reload the configuration file bindsym {
bindsym $mod+Shift+r reload $mod+$left focus left
$mod+$down focus down
$mod+$up focus up
$mod+$right focus right
$mod+Left focus left
$mod+Down focus down
$mod+Up focus up
$mod+Right focus right
# Exit sway (logs you out of your Wayland session) $mod+Shift+$left move left
# bindsym $mod+q exec rofi -show power-menu -modi power-menu:rofi-power-menu $mod+Shift+$down move down
bindsym $mod+q exec wlogout -p layer-shell $mod+Shift+$up move up
bindsym $mod+Shift+q exec swaynag -t warning -m 'You pressed the exit shortcut. Do you really want to exit sway? This will end your Wayland session.' -B 'Yes, exit sway' 'swaymsg exit' $mod+Shift+$right move right
$mod+Shift+Left move left
bindsym $mod+$left focus left $mod+Shift+Down move down
bindsym $mod+$down focus down $mod+Shift+Up move up
bindsym $mod+$up focus up $mod+Shift+Right move right
bindsym $mod+$right focus right }
bindsym $mod+Left focus left
bindsym $mod+Down focus down
bindsym $mod+Up focus up
bindsym $mod+Right focus right
bindsym $mod+Shift+$left move left
bindsym $mod+Shift+$down move down
bindsym $mod+Shift+$up move up
bindsym $mod+Shift+$right move right
bindsym $mod+Shift+Left move left
bindsym $mod+Shift+Down move down
bindsym $mod+Shift+Up move up
bindsym $mod+Shift+Right move right
set { set {
$ws1 1 $ws1 1
@ -75,125 +74,129 @@ set {
} }
# Switch to workspace # Switch to workspace
# bindsym $mod+1 workspace number $ws1 # bindsym {
# bindsym $mod+2 workspace number $ws2 # $mod+1 workspace number $ws1
# bindsym $mod+3 workspace number $ws3 # $mod+2 workspace number $ws2
# bindsym $mod+4 workspace number $ws4 # $mod+3 workspace number $ws3
# bindsym $mod+5 workspace number $ws5 # $mod+4 workspace number $ws4
# bindsym $mod+6 workspace number $ws6 # $mod+5 workspace number $ws5
# bindsym $mod+7 workspace number $ws7 # $mod+6 workspace number $ws6
# bindsym $mod+8 workspace number $ws8 # $mod+7 workspace number $ws7
# bindsym $mod+9 workspace number $ws9 # $mod+8 workspace number $ws8
# bindsym $mod+0 workspace number $ws10 # $mod+9 workspace number $ws9
# $mod+0 workspace number $ws10
# }
bindsym --no-repeat $mod+1 workspace number $ws1; exec "echo 1 > /tmp/sovpipe" bindsym --no-repeat {
bindsym --no-repeat $mod+2 workspace number $ws2; exec "echo 1 > /tmp/sovpipe" $mod+1 workspace number $ws1; exec "echo 1 > /tmp/sovpipe"
bindsym --no-repeat $mod+3 workspace number $ws3; exec "echo 1 > /tmp/sovpipe" $mod+2 workspace number $ws2; exec "echo 1 > /tmp/sovpipe"
bindsym --no-repeat $mod+4 workspace number $ws4; exec "echo 1 > /tmp/sovpipe" $mod+3 workspace number $ws3; exec "echo 1 > /tmp/sovpipe"
bindsym --no-repeat $mod+5 workspace number $ws5; exec "echo 1 > /tmp/sovpipe" $mod+4 workspace number $ws4; exec "echo 1 > /tmp/sovpipe"
bindsym --no-repeat $mod+6 workspace number $ws6; exec "echo 1 > /tmp/sovpipe" $mod+5 workspace number $ws5; exec "echo 1 > /tmp/sovpipe"
bindsym --no-repeat $mod+7 workspace number $ws7; exec "echo 1 > /tmp/sovpipe" $mod+6 workspace number $ws6; exec "echo 1 > /tmp/sovpipe"
bindsym --no-repeat $mod+8 workspace number $ws8; exec "echo 1 > /tmp/sovpipe" $mod+7 workspace number $ws7; exec "echo 1 > /tmp/sovpipe"
bindsym --no-repeat $mod+9 workspace number $ws9; exec "echo 1 > /tmp/sovpipe" $mod+8 workspace number $ws8; exec "echo 1 > /tmp/sovpipe"
bindsym --no-repeat $mod+0 workspace number $ws10; exec "echo 1 > /tmp/sovpipe" $mod+9 workspace number $ws9; exec "echo 1 > /tmp/sovpipe"
$mod+0 workspace number $ws10; exec "echo 1 > /tmp/sovpipe"
}
bindsym --release $mod+1 exec "echo 0 > /tmp/sovpipe" bindsym --release {
bindsym --release $mod+2 exec "echo 0 > /tmp/sovpipe" $mod+1 exec "echo 0 > /tmp/sovpipe"
bindsym --release $mod+3 exec "echo 0 > /tmp/sovpipe" $mod+2 exec "echo 0 > /tmp/sovpipe"
bindsym --release $mod+4 exec "echo 0 > /tmp/sovpipe" $mod+3 exec "echo 0 > /tmp/sovpipe"
bindsym --release $mod+5 exec "echo 0 > /tmp/sovpipe" $mod+4 exec "echo 0 > /tmp/sovpipe"
bindsym --release $mod+6 exec "echo 0 > /tmp/sovpipe" $mod+5 exec "echo 0 > /tmp/sovpipe"
bindsym --release $mod+7 exec "echo 0 > /tmp/sovpipe" $mod+6 exec "echo 0 > /tmp/sovpipe"
bindsym --release $mod+8 exec "echo 0 > /tmp/sovpipe" $mod+7 exec "echo 0 > /tmp/sovpipe"
bindsym --release $mod+9 exec "echo 0 > /tmp/sovpipe" $mod+8 exec "echo 0 > /tmp/sovpipe"
bindsym --release $mod+0 exec "echo 0 > /tmp/sovpipe" $mod+9 exec "echo 0 > /tmp/sovpipe"
$mod+0 exec "echo 0 > /tmp/sovpipe"
}
# Move focused container to workspace
bindsym $mod+Shift+1 move container to workspace $ws1
bindsym $mod+Shift+2 move container to workspace $ws2
bindsym $mod+Shift+3 move container to workspace $ws3
bindsym $mod+Shift+4 move container to workspace $ws4
bindsym $mod+Shift+5 move container to workspace $ws5
bindsym $mod+Shift+6 move container to workspace $ws6
bindsym $mod+Shift+7 move container to workspace $ws7
bindsym $mod+Shift+8 move container to workspace $ws8
bindsym $mod+Shift+9 move container to workspace $ws9
bindsym $mod+Shift+0 move container to workspace $ws10
bindsym $mod+Tab focus output right bindsym {
bindsym $mod+Shift+Tab move workspace to output right # Move focused container to workspace
bindsym $mod+Control+Shift+Right move workspace to output right $mod+Shift+1 move container to workspace $ws1
bindsym $mod+Control+Shift+Left move workspace to output left $mod+Shift+2 move container to workspace $ws2
bindsym $mod+Control+Shift+Down move workspace to output down $mod+Shift+3 move container to workspace $ws3
bindsym $mod+Control+Shift+Up move workspace to output up $mod+Shift+4 move container to workspace $ws4
$mod+Shift+5 move container to workspace $ws5
$mod+Shift+6 move container to workspace $ws6
$mod+Shift+7 move container to workspace $ws7
$mod+Shift+8 move container to workspace $ws8
$mod+Shift+9 move container to workspace $ws9
$mod+Shift+0 move container to workspace $ws10
bindsym $mod+comma focus output left $mod+Tab focus output right
bindsym $mod+period focus output right $mod+Shift+Tab move workspace to output right
bindsym $mod+Shift+comma move container to output left $mod+Control+Shift+Right move workspace to output right
bindsym $mod+Shift+period move container to output right $mod+Control+Shift+Left move workspace to output left
$mod+Control+Shift+Down move workspace to output down
$mod+Control+Shift+Up move workspace to output up
$mod+comma focus output left
$mod+period focus output right
$mod+Shift+comma move container to output left
$mod+Shift+period move container to output right
}
############## ##############
# Layout stuff # Layout stuff
############## ##############
# You can "split" the current object of your focus with bindsym {
# $mod+b or $mod+v, for horizontal and vertical splits # $mod+b splith
# respectively. # $mod+v splitv
# bindsym $mod+b splith
# bindsym $mod+v splitv
# Switch the current container between different layout styles # $mod+s layout stacking
# bindsym $mod+s layout stacking $mod+t layout tabbed
bindsym $mod+t layout tabbed $mod+s layout toggle split
bindsym $mod+s layout toggle split
# Make the current focus fullscreen $mod+f fullscreen
bindsym $mod+f fullscreen $mod+space floating toggle
# Toggle the current focus between tiling and floating mode $mod+Shift+space focus mode_toggle
bindsym $mod+space floating toggle $mod+a focus parent
$mod+Escape focus next
# Swap focus between the tiling area and the floating area ############
bindsym $mod+Shift+space focus mode_toggle # Scratchpad
############
# Move focus to the parent container $mod+Shift+minus move scratchpad
bindsym $mod+a focus parent $mod+minus scratchpad show
bindsym $mod+Escape focus next
# focus_wrapping workspace
############
# Scratchpad
############
# Move the currently focused window to the scratchpad
bindsym $mod+Shift+minus move scratchpad
# Show the next scratchpad window or hide the focused scratchpad window.
# If there are multiple scratchpad windows, this command cycles through them.
bindsym $mod+minus scratchpad show
############## ##############
# Applications # Applications
############## ##############
bindsym $mod+Shift+e exec xdg-open $HOME $mod+Shift+e exec xdg-open $HOME
bindsym $mod+e exec footclient -a fm-term yazi $mod+e exec footclient -a fm-term yazi
bindsym $mod+v exec cliphist list | rofi -dmenu | cliphist decode | wl-copy $mod+v exec cliphist list | rofi -dmenu | cliphist decode | wl-copy
######## ########
# Volume # Volume
######## ########
bindsym XF86AudioRaiseVolume exec swayosd-client --output-volume raise XF86AudioRaiseVolume exec swayosd-client --output-volume raise
bindsym XF86AudioLowerVolume exec swayosd-client --output-volume lower XF86AudioLowerVolume exec swayosd-client --output-volume lower
bindsym XF86AudioMute exec swayosd-client --output-volume mute-toggle XF86AudioMute exec swayosd-client --output-volume mute-toggle
##################### #####################
# Resizing containers # Resizing containers
##################### #####################
# $mod+r mode "resize"
$mod+Control+$left resize shrink width 10px
$mod+Control+$down resize grow height 10px
$mod+Control+$up resize shrink height 10px
$mod+Control+$right resize grow width 10px
$mod+Control+Left resize shrink width 10px
$mod+Control+Down resize grow height 10px
$mod+Control+Up resize shrink height 10px
$mod+Control+Right resize grow width 10px
}
# mode "resize" { # mode "resize" {
# bindsym $left resize shrink width 10px # bindsym $left resize shrink width 10px
# bindsym $down resize grow height 10px # bindsym $down resize grow height 10px
@ -208,13 +211,3 @@ bindsym XF86AudioMute exec swayosd-client --output-volume mute-toggle
# bindsym Return mode "default" # bindsym Return mode "default"
# bindsym Escape mode "default" # bindsym Escape mode "default"
# } # }
# bindsym $mod+r mode "resize"
bindsym $mod+Control+$left resize shrink width 10px
bindsym $mod+Control+$down resize grow height 10px
bindsym $mod+Control+$up resize shrink height 10px
bindsym $mod+Control+$right resize grow width 10px
bindsym $mod+Control+Left resize shrink width 10px
bindsym $mod+Control+Down resize grow height 10px
bindsym $mod+Control+Up resize shrink height 10px
bindsym $mod+Control+Right resize grow width 10px