set { $mod Mod4 $left h $down j $up k $right l $term footclient $menu anyrun # $menu dmenu_path | dmenu | xargs swaymsg exec -- # $menu rofi -show drun -theme catppuccin-macchiato # $menu tofi-run | xargs swaymsg exec -- } ### Key bindings bindsym { $mod+Return exec $term $mod+c kill $mod+d exec $menu $mod+w exec rofi -show window -theme catppuccin-macchiato $mod+Shift+s exec grim -g "$(slurp)" - | wl-copy $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 $mod+Shift+r reload # Exit sway (logs you out of your Wayland session) # $mod+q exec rofi -show power-menu -modi power-menu:rofi-power-menu $mod+q exec wlogout -p layer-shell $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. # Resize them with right mouse button + $mod. # Despite the name, also works for non-floating windows. # Change normal to inverse to use left mouse button for resizing and right # mouse button for dragging. floating_modifier $mod normal bindsym { $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 $mod+Shift+$left move left $mod+Shift+$down move down $mod+Shift+$up move up $mod+Shift+$right move right $mod+Shift+Left move left $mod+Shift+Down move down $mod+Shift+Up move up $mod+Shift+Right move right } set { $ws1 1 $ws2 2 $ws3 3 $ws4 4 $ws5 5 $ws6 6 $ws7 7 $ws8 8 $ws9 9 $ws10 10 } # Switch to workspace # bindsym { # $mod+1 workspace number $ws1 # $mod+2 workspace number $ws2 # $mod+3 workspace number $ws3 # $mod+4 workspace number $ws4 # $mod+5 workspace number $ws5 # $mod+6 workspace number $ws6 # $mod+7 workspace number $ws7 # $mod+8 workspace number $ws8 # $mod+9 workspace number $ws9 # $mod+0 workspace number $ws10 # } bindsym --no-repeat { $mod+1 workspace number $ws1; exec "echo 1 > /tmp/sovpipe" $mod+2 workspace number $ws2; exec "echo 1 > /tmp/sovpipe" $mod+3 workspace number $ws3; exec "echo 1 > /tmp/sovpipe" $mod+4 workspace number $ws4; exec "echo 1 > /tmp/sovpipe" $mod+5 workspace number $ws5; exec "echo 1 > /tmp/sovpipe" $mod+6 workspace number $ws6; exec "echo 1 > /tmp/sovpipe" $mod+7 workspace number $ws7; exec "echo 1 > /tmp/sovpipe" $mod+8 workspace number $ws8; 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" $mod+2 exec "echo 0 > /tmp/sovpipe" $mod+3 exec "echo 0 > /tmp/sovpipe" $mod+4 exec "echo 0 > /tmp/sovpipe" $mod+5 exec "echo 0 > /tmp/sovpipe" $mod+6 exec "echo 0 > /tmp/sovpipe" $mod+7 exec "echo 0 > /tmp/sovpipe" $mod+8 exec "echo 0 > /tmp/sovpipe" $mod+9 exec "echo 0 > /tmp/sovpipe" $mod+0 exec "echo 0 > /tmp/sovpipe" } bindsym { # Move focused container to workspace $mod+Shift+1 move container to workspace $ws1 $mod+Shift+2 move container to workspace $ws2 $mod+Shift+3 move container to workspace $ws3 $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 $mod+Tab focus output right $mod+Shift+Tab move workspace to output right $mod+Control+Shift+Right move workspace 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 ############## bindsym { # $mod+b splith # $mod+v splitv # $mod+s layout stacking $mod+t layout tabbed $mod+s layout toggle split $mod+f fullscreen $mod+space floating toggle $mod+Shift+space focus mode_toggle $mod+a focus parent $mod+Escape focus next ############ # Scratchpad ############ $mod+Shift+minus move scratchpad $mod+minus scratchpad show ############## # Applications ############## $mod+Shift+e exec xdg-open $HOME $mod+e exec footclient -a fm-term yazi $mod+v exec cliphist list | rofi -dmenu | cliphist decode | wl-copy ######## # Volume ######## XF86AudioRaiseVolume exec swayosd-client --output-volume raise XF86AudioLowerVolume exec swayosd-client --output-volume lower XF86AudioMute exec swayosd-client --output-volume mute-toggle ##################### # 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" { # bindsym $left resize shrink width 10px # bindsym $down resize grow height 10px # bindsym $up resize shrink height 10px # bindsym $right resize grow width 10px # bindsym Left resize shrink width 10px # bindsym Down resize grow height 10px # bindsym Up resize shrink height 10px # bindsym Right resize grow width 10px # # # Return to default mode # bindsym Return mode "default" # bindsym Escape mode "default" # }