move keybindings to 1 bindsym block

also, add --to-code option, so they will work with russian layout too
This commit is contained in:
2022-06-12 10:22:02 +03:00
parent 04f0983f5e
commit 681b83d04a

View File

@@ -145,112 +145,115 @@ exec_always --no-startup-id $HOME/dotfiles/bin/set-wallpaper --restore
# |_|\_\_____| |_| |____/___|_| \_|____/___|_| \_|\____|____/ # |_|\_\_____| |_| |____/___|_| \_|____/___|_| \_|\____|____/
# #
# Bind media keys on a keyboard to control volume and playback bindsym --to-code {
bindsym XF86AudioRaiseVolume exec --no-startup-id pamixer --allow-boost -i 5 && $HOME/dotfiles/bin/notify-on-volume # Bind media keys on a keyboard to control volume and playback
bindsym XF86AudioLowerVolume exec --no-startup-id pamixer --allow-boost -d 5 && $HOME/dotfiles/bin/notify-on-volume XF86AudioRaiseVolume exec --no-startup-id pamixer --allow-boost -i 5 && $HOME/dotfiles/bin/notify-on-volume
bindsym XF86AudioMute exec --no-startup-id pamixer -t XF86AudioLowerVolume exec --no-startup-id pamixer --allow-boost -d 5 && $HOME/dotfiles/bin/notify-on-volume
bindsym XF86AudioPlay exec playerctl play-pause XF86AudioMute exec --no-startup-id pamixer -t
bindsym XF86AudioNext exec playerctl next XF86AudioPlay exec playerctl play-pause
bindsym XF86AudioPrev exec playerctl previous XF86AudioNext exec playerctl next
bindsym XF86AudioMicMute exec $HOME/dotfiles/bin/toggle-mic-mute.sh XF86AudioPrev exec playerctl previous
XF86AudioMicMute exec $HOME/dotfiles/bin/toggle-mic-mute.sh
# brightness # brightness
bindsym XF86MonBrightnessDown exec brightnessctl set 5%- XF86MonBrightnessDown exec brightnessctl set 5%-
bindsym XF86MonBrightnessUp exec brightnessctl set 5%+ XF86MonBrightnessUp exec brightnessctl set 5%+
bindsym $mod+equal exec swaymsg 'gaps inner current plus 10' $mod+equal exec swaymsg 'gaps inner current plus 10'
bindsym $mod+minus exec swaymsg 'gaps inner current minus 10' $mod+minus exec swaymsg 'gaps inner current minus 10'
# Call swappy # screenshots
bindsym $mod+Shift+s exec grim -g "$(slurp)" - | swappy -f - $mod+Shift+s exec grim -g "$(slurp)" - | swappy -f -
# Start a terminal # terminal
bindsym $mod+Return exec $term $mod+Return exec $term
# Kill focused window # Kill focused window
bindsym $mod+Shift+q kill $mod+Shift+q kill
# Run wlogout to quit # Run wlogout to quit
bindsym $mod+Shift+e exec --no-startup-id wlogout -b 4 -m 450 -c 30 $mod+Shift+e exec --no-startup-id wlogout -b 4 -m 450 -c 30
# Start your launcher # Start your launcher
bindsym $mod+d exec $menu $mod+d exec $menu
# Reload the configuration file # Reload the configuration file
bindsym $mod+Shift+r reload $mod+Shift+r reload
# Move focus between tiling and floating areas # Move focus between tiling and floating areas
bindsym $mod+m focus mode_toggle $mod+m focus mode_toggle
# Move focus # Move focus
bindsym $mod+$left focus left $mod+$left focus left
bindsym $mod+$down focus down $mod+$down focus down
bindsym $mod+$up focus up $mod+$up focus up
bindsym $mod+$right focus right $mod+$right focus right
# Move focused windows # Move focused windows
bindsym $mod+Shift+$left move left $mod+Shift+$left move left
bindsym $mod+Shift+$down move down $mod+Shift+$down move down
bindsym $mod+Shift+$up move up $mod+Shift+$up move up
bindsym $mod+Shift+$right move right $mod+Shift+$right move right
# Cycle through workspaces # Cycle through workspaces
bindsym $mod+Tab workspace next $mod+Tab workspace next
bindsym $mod+Shift+Tab workspace prev $mod+Shift+Tab workspace prev
# Switch to workspace # Switch to workspace
bindsym $mod+1 workspace number $ws1 $mod+1 workspace number $ws1
bindsym $mod+2 workspace number $ws2 $mod+2 workspace number $ws2
bindsym $mod+3 workspace number $ws3 $mod+3 workspace number $ws3
bindsym $mod+4 workspace number $ws4 $mod+4 workspace number $ws4
bindsym $mod+5 workspace number $ws5 $mod+5 workspace number $ws5
bindsym $mod+6 workspace number $ws6 $mod+6 workspace number $ws6
bindsym $mod+7 workspace number $ws7 $mod+7 workspace number $ws7
bindsym $mod+8 workspace number $ws8 $mod+8 workspace number $ws8
bindsym $mod+9 workspace number $ws9 $mod+9 workspace number $ws9
bindsym $mod+0 workspace number $ws10 $mod+0 workspace number $ws10
# Move focused container to workspace # Move focused container to workspace
bindsym $mod+Shift+1 move container to workspace number $ws1 $mod+Shift+1 move container to workspace number $ws1
bindsym $mod+Shift+2 move container to workspace number $ws2 $mod+Shift+2 move container to workspace number $ws2
bindsym $mod+Shift+3 move container to workspace number $ws3 $mod+Shift+3 move container to workspace number $ws3
bindsym $mod+Shift+4 move container to workspace number $ws4 $mod+Shift+4 move container to workspace number $ws4
bindsym $mod+Shift+5 move container to workspace number $ws5 $mod+Shift+5 move container to workspace number $ws5
bindsym $mod+Shift+6 move container to workspace number $ws6 $mod+Shift+6 move container to workspace number $ws6
bindsym $mod+Shift+7 move container to workspace number $ws7 $mod+Shift+7 move container to workspace number $ws7
bindsym $mod+Shift+8 move container to workspace number $ws8 $mod+Shift+8 move container to workspace number $ws8
bindsym $mod+Shift+9 move container to workspace number $ws9 $mod+Shift+9 move container to workspace number $ws9
bindsym $mod+Shift+0 move container to workspace number $ws10 $mod+Shift+0 move container to workspace number $ws10
# Change split mode # Change split mode
bindsym $mod+g splith $mod+g splith
bindsym $mod+v splitv $mod+v splitv
# Switch the current container between different layout styles # Switch the current container between different layout styles
bindsym $mod+s layout stacking $mod+s layout stacking
bindsym $mod+w layout tabbed $mod+w layout tabbed
bindsym $mod+e layout toggle split $mod+e layout toggle split
# Toggle between layout modes # Toggle between layout modes
bindsym $mod+x layout toggle $mod+x layout toggle
# Make the current focus fullscreen # Make the current focus fullscreen
bindsym $mod+f fullscreen $mod+f fullscreen
# Toggle the current focus between tiling and floating mode # Toggle the current focus between tiling and floating mode
bindsym $mod+z floating toggle $mod+z floating toggle
$mod+r mode "resize"
}
### Resize mode ### Resize mode
mode "resize" { mode "resize" {
bindsym $left resize shrink width 100px bindsym $left resize shrink width 100px
bindsym $down resize shrink height 100px bindsym $down resize shrink height 100px
bindsym $up resize grow height 100px bindsym $up resize grow height 100px
bindsym $right resize grow width 100px bindsym $right resize grow width 100px
# Return to default mode # Return to default mode
bindsym Return mode "default" bindsym Return mode "default"
bindsym Escape mode "default" bindsym Escape mode "default"
} }
bindsym $mod+r mode "resize"
include /etc/sway/config.d/* include /etc/sway/config.d/*