2021-08-18 18:20:20 +00:00
|
|
|
# vim:ft=swayconfig
|
2019-10-26 17:05:31 +00:00
|
|
|
|
|
|
|
# start terminal
|
|
|
|
bindsym $mod+Return exec $term
|
|
|
|
|
|
|
|
# kill focused window
|
|
|
|
bindsym $mod+w kill
|
|
|
|
|
2020-04-17 07:36:41 +00:00
|
|
|
# Modes for controlling gaps
|
|
|
|
set $mode_gaps Gaps: (o) outer, (i) inner
|
|
|
|
set $mode_gaps_outer Outer Gaps: j|k|0|r|i
|
|
|
|
set $mode_gaps_inner Inner Gaps: j|k|0|r|o
|
|
|
|
bindsym $mod+g mode "$mode_gaps"
|
|
|
|
|
|
|
|
mode "$mode_gaps" {
|
|
|
|
bindsym o mode "$mode_gaps_outer"
|
|
|
|
bindsym i mode "$mode_gaps_inner"
|
|
|
|
bindsym Escape mode "default"
|
|
|
|
}
|
|
|
|
|
|
|
|
mode "$mode_gaps_inner" {
|
|
|
|
bindsym j gaps inner all minus 1
|
|
|
|
bindsym k gaps inner all plus 1
|
|
|
|
bindsym 0 gaps inner all set 0
|
|
|
|
bindsym r gaps inner all set 10
|
2020-04-18 10:41:09 +00:00
|
|
|
bindsym o mode "$mode_gaps_outer"
|
2020-04-17 07:36:41 +00:00
|
|
|
bindsym Escape mode "default"
|
|
|
|
}
|
|
|
|
mode "$mode_gaps_outer" {
|
|
|
|
bindsym j gaps outer all minus 1
|
|
|
|
bindsym k gaps outer all plus 1
|
|
|
|
bindsym 0 gaps outer all set 0
|
|
|
|
bindsym r gaps outer all set 10
|
2020-04-18 10:41:09 +00:00
|
|
|
bindsym i mode "$mode_gaps_inner"
|
2020-04-17 07:36:41 +00:00
|
|
|
bindsym Escape mode "default"
|
|
|
|
}
|
2019-10-26 17:05:31 +00:00
|
|
|
|
|
|
|
# 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
|
|
|
|
|
|
|
|
# reload the configuration file
|
|
|
|
bindsym $mod+Shift+r reload
|
|
|
|
|
|
|
|
# open link from clipboard in default application
|
2020-04-13 10:23:39 +00:00
|
|
|
bindsym $mod+Shift+o exec mimeo $(wl-paste)
|
2019-10-26 17:05:31 +00:00
|
|
|
|
|
|
|
# turn on and off internal screen
|
2020-03-03 11:29:23 +00:00
|
|
|
bindsym --locked XF86Search output eDP-1 toggle
|
2019-10-26 17:05:31 +00:00
|
|
|
|
|
|
|
# exit menu
|
2020-12-16 16:06:56 +00:00
|
|
|
bindsym $mod+Shift+e exec $term --app-id fzf-launcher --login-shell /bin/sh -c "$scripts/exit.sh"
|
2020-12-06 09:39:02 +00:00
|
|
|
|
2019-10-26 17:05:31 +00:00
|
|
|
# launch a program
|
2022-09-08 17:24:32 +00:00
|
|
|
bindsym $mod+d exec rofi -show drun
|
|
|
|
bindsym $mod+Shift+d exec rofi -show run
|
2020-12-06 09:39:02 +00:00
|
|
|
|
|
|
|
# manage clipboard
|
|
|
|
bindsym $mod+c exec clipman pick -t wofi
|
2019-10-26 17:05:31 +00:00
|
|
|
|
|
|
|
# manage notifications
|
|
|
|
bindsym $mod+Backspace exec makoctl invoke
|
|
|
|
bindsym Control+Escape exec makoctl dismiss
|
|
|
|
|
|
|
|
# activate lockscreen
|
2020-01-11 16:51:29 +00:00
|
|
|
bindsym Control+Shift+Backspace exec loginctl lock-session $(loginctl show-user $USER -p Sessions | cut -d'=' -f2)
|
2019-10-26 17:05:31 +00:00
|
|
|
|
|
|
|
# Move your focus around
|
|
|
|
bindsym $mod+h focus left
|
|
|
|
bindsym $mod+j focus down
|
|
|
|
bindsym $mod+k focus up
|
|
|
|
bindsym $mod+l focus right
|
|
|
|
bindsym $mod+Left focus left
|
|
|
|
bindsym $mod+Down focus down
|
|
|
|
bindsym $mod+Up focus up
|
|
|
|
bindsym $mod+Right focus right
|
|
|
|
|
2020-01-08 18:52:13 +00:00
|
|
|
# Move focused window
|
2019-10-26 17:05:31 +00:00
|
|
|
bindsym $mod+Shift+h move left
|
|
|
|
bindsym $mod+Shift+j move down
|
|
|
|
bindsym $mod+Shift+k move up
|
|
|
|
bindsym $mod+Shift+l 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
|
|
|
|
|
|
|
|
# Split direction
|
|
|
|
bindsym $mod+y splith
|
|
|
|
bindsym $mod+x splitv
|
|
|
|
|
|
|
|
# Switch the current container between different layout styles
|
|
|
|
bindsym $mod+s layout stacking
|
|
|
|
bindsym $mod+e layout tabbed
|
|
|
|
bindsym $mod+t layout toggle split
|
|
|
|
|
|
|
|
# Make the current focus fullscreen
|
|
|
|
bindsym $mod+f fullscreen
|
|
|
|
|
|
|
|
# Toggle the current focus between tiling and floating mode
|
|
|
|
bindsym $mod+Shift+space floating toggle
|
|
|
|
|
|
|
|
# Swap focus between the tiling area and the floating area
|
|
|
|
bindsym $mod+space focus mode_toggle
|
|
|
|
|
|
|
|
# move focus to the parent container
|
|
|
|
bindsym $mod+a focus parent
|
|
|
|
|
|
|
|
# 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
|
|
|
|
|
|
|
|
mode "resize" {
|
|
|
|
# left will shrink the containers width
|
|
|
|
# right will grow the containers width
|
|
|
|
# up will shrink the containers height
|
|
|
|
# down will grow the containers height
|
|
|
|
bindsym h resize grow width 10px
|
|
|
|
bindsym j resize shrink height 10px
|
|
|
|
bindsym k resize grow height 10px
|
|
|
|
bindsym l resize shrink width 10px
|
|
|
|
|
|
|
|
# ditto, with arrow keys
|
|
|
|
bindsym Left resize grow width 10px
|
|
|
|
bindsym Down resize shrink height 10px
|
|
|
|
bindsym Up resize grow height 10px
|
|
|
|
bindsym Right resize shrink width 10px
|
|
|
|
|
|
|
|
# return to default mode
|
|
|
|
bindsym Return mode "default"
|
|
|
|
bindsym Escape mode "default"
|
|
|
|
}
|
|
|
|
bindsym $mod+r mode "resize"
|
|
|
|
|
|
|
|
# start browser
|
2022-03-05 06:38:19 +00:00
|
|
|
bindsym $mod+b exec $browser
|
2019-10-26 17:05:31 +00:00
|
|
|
|
|
|
|
# media keys
|
2020-03-10 09:48:16 +00:00
|
|
|
bindsym --locked XF86AudioRaiseVolume exec pamixer -ui 1 && pamixer --get-volume > $SWAYSOCK.wob
|
|
|
|
bindsym --locked XF86AudioLowerVolume exec pamixer -ud 1 && pamixer --get-volume > $SWAYSOCK.wob
|
|
|
|
bindsym --locked XF86AudioMute exec pamixer --toggle-mute && ( pamixer --get-mute && echo 0 > $SWAYSOCK.wob ) || pamixer --get-volume > $SWAYSOCK.wob
|
2019-10-26 17:05:31 +00:00
|
|
|
bindsym --locked XF86AudioNext exec playerctl next
|
|
|
|
bindsym --locked XF86AudioPrev exec playerctl previous
|
|
|
|
bindsym --locked XF86AudioPlay exec playerctl play-pause
|
|
|
|
bindsym --locked XF86AudioStop exec playerctl stop
|
|
|
|
bindsym --locked Ctrl+Alt+s exec playerctl stop
|
|
|
|
|
|
|
|
# rotate screen
|
2020-03-12 16:45:02 +00:00
|
|
|
bindsym $mod+Control+Right output eDP-1 transform 90
|
|
|
|
bindsym $mod+Control+Up output eDP-1 transform 0
|
|
|
|
bindsym $mod+Control+Down output eDP-1 transform 180
|
|
|
|
bindsym $mod+Control+Left output eDP-1 transform 270
|
|
|
|
bindsym $mod+Control+h output eDP-1 transform 270
|
|
|
|
bindsym $mod+Control+j output eDP-1 transform 180
|
|
|
|
bindsym $mod+Control+l output eDP-1 transform 90
|
|
|
|
bindsym $mod+Control+k output eDP-1 transform 0
|
2019-10-26 17:05:31 +00:00
|
|
|
|
|
|
|
# display brightness
|
2020-05-21 13:30:34 +00:00
|
|
|
bindsym --locked XF86MonBrightnessUp exec light -A 5 && light -G | cut -d'.' -f1 > $SWAYSOCK.wob
|
|
|
|
bindsym --locked XF86MonBrightnessDown exec light -U 5 && light -G | cut -d'.' -f1 > $SWAYSOCK.wob
|
2019-10-26 17:05:31 +00:00
|
|
|
|
2020-04-04 08:38:39 +00:00
|
|
|
# Some built-in keyboard keys
|
|
|
|
bindsym XF86Mail workspace 4
|
|
|
|
bindsym XF86Messenger workspace 3
|
|
|
|
bindsym XF86Calculator exec alacritty -e calc
|
|
|
|
|
2020-01-08 18:52:13 +00:00
|
|
|
# Switch to urgent workspace
|
2019-10-26 17:05:31 +00:00
|
|
|
bindsym $mod+u [urgent=latest] focus
|
|
|
|
|
|
|
|
# Switch to workspace
|
|
|
|
bindsym $mod+1 workspace 1
|
|
|
|
bindsym $mod+2 workspace 2
|
|
|
|
bindsym $mod+3 workspace 3
|
|
|
|
bindsym $mod+4 workspace 4
|
|
|
|
bindsym $mod+5 workspace 5
|
|
|
|
bindsym $mod+6 workspace 6
|
|
|
|
bindsym $mod+7 workspace 7
|
|
|
|
bindsym $mod+8 workspace 8
|
|
|
|
bindsym $mod+9 workspace 9
|
|
|
|
bindsym $mod+0 workspace 10
|
|
|
|
|
|
|
|
# Move container to workspace
|
|
|
|
bindsym $mod+Shift+1 move container to workspace 1
|
|
|
|
bindsym $mod+Shift+2 move container to workspace 2
|
|
|
|
bindsym $mod+Shift+3 move container to workspace 3
|
|
|
|
bindsym $mod+Shift+4 move container to workspace 4
|
|
|
|
bindsym $mod+Shift+5 move container to workspace 5
|
|
|
|
bindsym $mod+Shift+6 move container to workspace 6
|
|
|
|
bindsym $mod+Shift+7 move container to workspace 7
|
|
|
|
bindsym $mod+Shift+8 move container to workspace 8
|
|
|
|
bindsym $mod+Shift+9 move container to workspace 9
|
|
|
|
bindsym $mod+Shift+0 move container to workspace 10
|
|
|
|
|
2020-01-08 18:52:13 +00:00
|
|
|
# Move workspace to monitor in direction
|
|
|
|
bindsym Control+Shift+h move workspace to output left
|
|
|
|
bindsym Control+Shift+j move workspace to output down
|
|
|
|
bindsym Control+Shift+k move workspace to output up
|
|
|
|
bindsym Control+Shift+l move workspace to output right
|
|
|
|
bindsym Control+Shift+Left move workspace to output left
|
|
|
|
bindsym Control+Shift+Down move workspace to output down
|
|
|
|
bindsym Control+Shift+Up move workspace to output up
|
|
|
|
bindsym Control+Shift+Right move workspace to output right
|
|
|
|
|
2019-10-26 17:05:31 +00:00
|
|
|
# Take a screenshot to clipboard
|
|
|
|
bindsym Print exec grim -g "$(slurp -d)" - | wl-copy -t image/png
|
|
|
|
|
|
|
|
# Copy qr code to clipboard
|
|
|
|
bindsym Shift+Print exec grim -g "$(slurp -d)" - | zbarimg -q --raw PNG:- | wl-copy
|
2019-11-06 08:44:42 +00:00
|
|
|
|
|
|
|
|
|
|
|
# make Alt+hjkl emulate arrow keys
|
|
|
|
bindsym Alt+h exec ydotool key left
|
|
|
|
bindsym Alt+j exec ydotool key down
|
|
|
|
bindsym Alt+k exec ydotool key up
|
|
|
|
bindsym Alt+l exec ydotool key right
|
2020-09-18 20:28:06 +00:00
|
|
|
|
|
|
|
# Mumble push to talk
|
|
|
|
bindsym --no-repeat F12 exec gdbus call -e -d net.sourceforge.mumble.mumble -o / -m net.sourceforge.mumble.Mumble.startTalk
|
|
|
|
bindsym --release F12 exec gdbus call -e -d net.sourceforge.mumble.mumble -o / -m net.sourceforge.mumble.Mumble.stopTalk
|