From 199f194147197d0307d32a4f97662e1b51d570aa Mon Sep 17 00:00:00 2001 From: Ivan Reshetnikov Date: Tue, 14 May 2024 23:12:31 +0500 Subject: [PATCH] chore(sway): make keybindings work with Russian layout --- roles/sway/files/sway.d/keybindings.conf | 38 ++++++++++++------------ roles/sway/files/sway.d/lock.conf | 2 +- roles/sway/files/sway.d/resize.conf | 2 +- 3 files changed, 21 insertions(+), 21 deletions(-) diff --git a/roles/sway/files/sway.d/keybindings.conf b/roles/sway/files/sway.d/keybindings.conf index 4ab7036..2422ecc 100644 --- a/roles/sway/files/sway.d/keybindings.conf +++ b/roles/sway/files/sway.d/keybindings.conf @@ -6,10 +6,10 @@ bindsym $mod+Return exec $term # Kill focused window - bindsym $mod+Shift+q kill + bindsym --to-code $mod+Shift+q kill # Start your launcher - bindsym $mod+d exec $menu + bindsym --to-code $mod+d exec $menu # Drag floating windows by holding down $mod and left mouse button. # Resize them with right mouse button + $mod. @@ -19,18 +19,18 @@ floating_modifier $mod normal # Reload the configuration file - bindsym $mod+Shift+c reload + bindsym --to-code $mod+Shift+c reload # Exit sway (logs you out of your Wayland session) - bindsym $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' + bindsym --to-code $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' # # Moving around: # # Move your focus around - bindsym $mod+$left focus left - bindsym $mod+$down focus down - bindsym $mod+$up focus up - bindsym $mod+$right focus right + bindsym --to-code $mod+$left focus left + bindsym --to-code $mod+$down focus down + bindsym --to-code $mod+$up focus up + bindsym --to-code $mod+$right focus right # Or use $mod+[up|down|left|right] bindsym $mod+Left focus left bindsym $mod+Down focus down @@ -38,10 +38,10 @@ bindsym $mod+Right focus right # Move the focused window with the same, but add Shift - 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 --to-code $mod+Shift+$left move left + bindsym --to-code $mod+Shift+$down move down + bindsym --to-code $mod+Shift+$up move up + bindsym --to-code $mod+Shift+$right move right # Ditto, with arrow keys bindsym $mod+Shift+Left move left bindsym $mod+Shift+Down move down @@ -80,16 +80,16 @@ # You can "split" the current object of your focus with # $mod+b or $mod+v, for horizontal and vertical splits # respectively. - bindsym $mod+b splith - bindsym $mod+v splitv + bindsym --to-code $mod+b splith + bindsym --to-code $mod+v splitv # Switch the current container between different layout styles - bindsym $mod+s layout stacking - bindsym $mod+w layout tabbed - bindsym $mod+e layout toggle split + bindsym --to-code $mod+s layout stacking + bindsym --to-code $mod+w layout tabbed + bindsym --to-code $mod+e layout toggle split # Make the current focus fullscreen - bindsym $mod+f fullscreen + bindsym --to-code $mod+f fullscreen # Toggle the current focus between tiling and floating mode bindsym $mod+Shift+space floating toggle @@ -98,7 +98,7 @@ bindsym $mod+space focus mode_toggle # Move focus to the parent container - bindsym $mod+a focus parent + bindsym --to-code $mod+a focus parent # # Scratchpad: # diff --git a/roles/sway/files/sway.d/lock.conf b/roles/sway/files/sway.d/lock.conf index aa57d3f..855ea9f 100644 --- a/roles/sway/files/sway.d/lock.conf +++ b/roles/sway/files/sway.d/lock.conf @@ -1,2 +1,2 @@ exec swayidle -w timeout 1200 'swaylock' -bindsym $mod+Ctrl+l exec swaylock +bindsym --to-code $mod+Ctrl+l exec swaylock diff --git a/roles/sway/files/sway.d/resize.conf b/roles/sway/files/sway.d/resize.conf index c54972c..67df9f7 100644 --- a/roles/sway/files/sway.d/resize.conf +++ b/roles/sway/files/sway.d/resize.conf @@ -22,4 +22,4 @@ mode "resize" { bindsym Escape mode "default" } -bindsym $mod+r mode "resize" +bindsym --to-code $mod+r mode "resize"