170 lines
4.6 KiB
Plaintext
170 lines
4.6 KiB
Plaintext
set $mod Mod4
|
|
set $left h
|
|
set $down j
|
|
set $up k
|
|
set $right l
|
|
|
|
set $term alacritty msg create-window || alacritty
|
|
set $launcher tofi-drun | xargs swaymsg exec --
|
|
set $lock swaylock
|
|
|
|
set $screenshots $HOME/Pictures/Screenshots
|
|
|
|
floating_modifier $mod normal
|
|
|
|
bindsym {
|
|
# Start a terminal
|
|
$mod+Return exec $term
|
|
|
|
# Kill focused window
|
|
$mod+Shift+q kill
|
|
$mod+w kill
|
|
|
|
# Application launcher
|
|
$mod+d exec $launcher
|
|
|
|
# Reload the configuration file
|
|
$mod+Shift+c reload
|
|
|
|
# Exit sway / log out
|
|
$mod+Shift+e 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' \
|
|
--dismiss-button 'Cancel'
|
|
|
|
# Move focus
|
|
$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
|
|
|
|
# Move the focused window
|
|
$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
|
|
|
|
--to-code {
|
|
# Switch to workspace
|
|
$mod+ampersand workspace number 1
|
|
$mod+eacute workspace number 2
|
|
$mod+quotedbl workspace number 3
|
|
$mod+apostrophe workspace number 4
|
|
$mod+parenleft workspace number 5
|
|
$mod+minus workspace number 6
|
|
$mod+egrave workspace number 7
|
|
$mod+underscore workspace number 8
|
|
$mod+ccedilla workspace number 9
|
|
$mod+agrave workspace number 10
|
|
}
|
|
|
|
# Move focused container to workspace
|
|
$mod+1 move container to workspace number 1
|
|
$mod+2 move container to workspace number 2
|
|
$mod+3 move container to workspace number 3
|
|
$mod+4 move container to workspace number 4
|
|
$mod+5 move container to workspace number 5
|
|
$mod+6 move container to workspace number 6
|
|
$mod+7 move container to workspace number 7
|
|
$mod+8 move container to workspace number 8
|
|
$mod+9 move container to workspace number 9
|
|
$mod+0 move container to workspace number 10
|
|
|
|
|
|
$mod+Shift+1 move container to workspace number 1
|
|
$mod+Shift+2 move container to workspace number 2
|
|
$mod+Shift+3 move container to workspace number 3
|
|
$mod+Shift+4 move container to workspace number 4
|
|
$mod+Shift+5 move container to workspace number 5
|
|
$mod+Shift+6 move container to workspace number 6
|
|
$mod+Shift+7 move container to workspace number 7
|
|
$mod+Shift+8 move container to workspace number 8
|
|
$mod+Shift+9 move container to workspace number 9
|
|
$mod+Shift+0 move container to workspace number 10
|
|
|
|
# Split
|
|
$mod+b splith
|
|
$mod+v splitv
|
|
|
|
# Switch the current container between different layout styles
|
|
$mod+s layout stacking
|
|
$mod+t layout tabbed
|
|
$mod+m layout toggle split
|
|
|
|
# Toggle fullscreen on the current focus
|
|
$mod+f fullscreen
|
|
|
|
# Toggle floating mode for current container
|
|
$mod+Shift+f floating toggle
|
|
|
|
# Move focus to the parent container
|
|
$mod+a focus parent
|
|
|
|
# Move the focused window to the scratchpad
|
|
$mod+Shift+equal move scratchpad
|
|
|
|
# Cycle through scratchpad windows
|
|
$mod+equal scratchpad show
|
|
|
|
# Volume
|
|
XF86AudioRaiseVolume exec wpctl set-volume @DEFAULT_AUDIO_SINK@ 5%+ -l 1.0
|
|
XF86AudioLowerVolume exec wpctl set-volume @DEFAULT_AUDIO_SINK@ 5%- -l 1.0
|
|
XF86AudioMute exec wpctl set-mute @DEFAULT_AUDIO_SINK@ toggle
|
|
XF86AudioMicMute exec wpctl set-mute @DEFAULT_AUDIO_SOURCE@ toggle
|
|
|
|
# Media
|
|
XF86AudioPlay exec playerctl play-pause
|
|
XF86AudioNext exec playerctl next
|
|
XF86AudioPrev exec playerctl previous
|
|
XF86Search exec $launcher
|
|
|
|
# Brightness
|
|
--locked {
|
|
XF86MonBrightnessDown exec brightnessctl set 5%-
|
|
XF86MonBrightnessUp exec brightnessctl set +5%
|
|
}
|
|
|
|
# Lock
|
|
Ctrl+Mod4+L exec $lock
|
|
|
|
# Screenshot
|
|
## Full screen capture
|
|
Print exec grim "$screenshots/$(date +\"Screenshot from %Y-%m-%d %H-%M-%S.png\")"
|
|
|
|
## Select a zone and save
|
|
$mod+Shift+s exec grim -g "$(slurp -d)" "$screenshots/$(date +\"Screenshot from %Y-%m-%d %H-%M-%S.png\")"
|
|
|
|
## Select a zone and copy to clipboard
|
|
$mod+Shift+Ctrl+s exec grim -g "$(slurp -d)" - | wl-copy
|
|
}
|
|
|
|
mode "resize" bindsym {
|
|
# Shrink or grow the container
|
|
$left resize shrink width 10px
|
|
$down resize grow height 10px
|
|
$up resize shrink height 10px
|
|
$right resize grow width 10px
|
|
|
|
# Same with arrow keys
|
|
Left resize shrink width 10px
|
|
Down resize grow height 10px
|
|
Up resize shrink height 10px
|
|
Right resize grow width 10px
|
|
|
|
# Return to default mode
|
|
Return mode "default"
|
|
Escape mode "default"
|
|
}
|
|
bindsym $mod+r mode "resize"
|