From b36f53637177d2698d291155c2d8a22ac85dc714 Mon Sep 17 00:00:00 2001 From: Andrew Scott Date: Mon, 11 Dec 2023 21:29:50 -0500 Subject: [PATCH] Add vim-like binds in addition to Emacs --- dot_config/river/executable_init.tmpl | 62 ++++++++++++++++++++++++--- 1 file changed, 55 insertions(+), 7 deletions(-) diff --git a/dot_config/river/executable_init.tmpl b/dot_config/river/executable_init.tmpl index f9da2ee..4dc42ac 100644 --- a/dot_config/river/executable_init.tmpl +++ b/dot_config/river/executable_init.tmpl @@ -36,6 +36,8 @@ riverctl map normal Super Q close # Exit river riverctl map normal Super+Shift E exit +# Emacs-like keybinds for layouts/views + # Focus the next/previous view in the layout stack riverctl map normal Super N focus-view next riverctl map normal Super P focus-view previous @@ -87,6 +89,56 @@ riverctl map normal Super+Shift F send-layout-cmd rivertile "main-location right riverctl map normal Super+Shift P send-layout-cmd rivertile "main-location top" riverctl map normal Super+Shift N send-layout-cmd rivertile "main-location bottom" +# Vim-like keybinds for layouts/views + +# Focus the next/previous view in the layout stack +riverctl map normal Super J focus-view next +riverctl map normal Super K focus-view previous + +# Swap the focused view with the next/previous view in the layout stack +riverctl map normal Super+Alt J swap next +riverctl map normal Super+Alt K swap previous + +# Focus the next/previous output +riverctl map normal Super Period focus-output next +riverctl map normal Super Comma focus-output previous + +# Send the focused view to the next/previous output +riverctl map normal Super+Shift Period send-to-output next +riverctl map normal Super+Shift Comma send-to-output previous + +# Increase/decrease the main ratio of rivertile(1) +riverctl map normal Super H send-layout-cmd rivertile "main-ratio -0.05" +riverctl map normal Super L send-layout-cmd rivertile "main-ratio +0.05" + +# Increment/decrement the main count of rivertile(1) +riverctl map normal Super+Alt L send-layout-cmd rivertile "main-count +1" +riverctl map normal Super+Alt H send-layout-cmd rivertile "main-count -1" + +# Snap views to screen edges +riverctl map normal Super+Alt+Control H snap left +riverctl map normal Super+Alt+Control L snap right +riverctl map normal Super+Alt+Control K snap up +riverctl map normal Super+Alt+Control J snap down + +# Resize views +riverctl map normal Super+Alt+Shift H resize horizontal -100 +riverctl map normal Super+Alt+Shift J resize horizontal 100 +riverctl map normal Super+Alt+Shift K resize vertical -100 +riverctl map normal Super+Alt+Shift L resize vertical 100 + +# Move views +riverctl map normal Super+Alt+Control+Shift H move left 100 +riverctl map normal Super+Alt+Control+Shift L move right 100 +riverctl map normal Super+Alt+Control+Shift K move up 100 +riverctl map normal Super+Alt+Control+Shift J move down 100 + +# Change layout +riverctl map normal Super+Shift H send-layout-cmd rivertile "main-location left" +riverctl map normal Super+Shift L send-layout-cmd rivertile "main-location right" +riverctl map normal Super+Shift K send-layout-cmd rivertile "main-location top" +riverctl map normal Super+Shift J send-layout-cmd rivertile "main-location bottom" + # Move views with mouse riverctl map-pointer normal Super BTN_LEFT move-view @@ -201,13 +253,11 @@ riverctl focus-output DP-1 # -app-id and title -"foo" start floating riverctl rule-add -app-id 'Bitwarden' float -riverctl rule-add -app-id 'Blueman-manager' float -riverctl rule-add -add-id 'connman-gtk' float +riverctl rule-add -app-id 'connman-gtk' float riverctl rule-add -app-id 'galculator' float -riverctl rule-add -app-id '*KeePassXC' float -riverctl rule-add -app-id 'Lutris' float +riverctl rule-add -app-id 'org.keepassxc.KeePassXC' float riverctl rule-add -app-id 'mousepad' float -riverctl rule-add -app-id 'Steam' float +riverctl rule-add -app-id 'com.nextcloud.dextopclient.Nextcloud' float riverctl rule-add -app-id 'vlc' float # -app-id "bar" and any title use client-side decorations @@ -220,8 +270,6 @@ rivertile -view-padding 4 -outer-padding 4 -main-ratio .55 & # Autostart dbus-update-activation-environment WAYLAND_DISPLAY XDG_CURRENT_DESKTOP=river & /usr/lib/polkit-gnome/polkit-gnome-authentication-agent-1 & -#/usr/lib/at-spi-bus-launcher --launch-immediately & -#gnome-keyring-daemon --start --components=pkcs11,secrets,ssh & kanshi & pipewire-launcher & swayidle-launcher &