From 05cdcd39e71e2dc70a0eadbafb758889a37cc044 Mon Sep 17 00:00:00 2001 From: Dan Anglin Date: Mon, 16 Sep 2024 09:28:13 +0100 Subject: [PATCH] fix(river): update configuration - Use Super+Shift C to close the focused view. - Set up mappings for tags 0-4. - Update rivertile configuration. --- files/river/init | 34 ++++++++++++++++++++++++++++++++-- 1 file changed, 32 insertions(+), 2 deletions(-) diff --git a/files/river/init b/files/river/init index d1c9fba..9b6f565 100755 --- a/files/river/init +++ b/files/river/init @@ -15,7 +15,7 @@ riverctl map normal Super+Shift B spawn firefox riverctl map normal Super+Shift Q exit # Super+C to close the focused view -riverctl map normal Super C close +riverctl map normal Super+Shift C close # Super+H to shift the focus to the previous view in the layout stack # Super+L to shift the focus to the next view in the layout stack @@ -68,10 +68,40 @@ riverctl map normal Super+Alt+Shift J resize vertical 100 riverctl map normal Super+Alt+Shift K resize vertical -100 riverctl map normal Super+Alt+Shift L resize horizontal 100 +# Super+Space to toggle float +riverctl map normal Super Space toggle-float + +# Super+Shift+F to togglefullscreen +riverctl map normal Super+Shift F toggle-fullscreen + +# Tags +for i in $(seq 1 4) +do + tags=$((1 << (i - 1))) + + # Super+[1-4] to focus tag [0-3] + riverctl map normal Super "${i}" set-focused-tags "${tags}" + + # Super+Shift+[1-4] to tag focused view with tag [0-3] + riverctl map normal Super+Shift "${i}" set-view-tags "${tags}" + + # Super+Control+[1-4] to toggle focus of tag [0-3] + riverctl map normal Super+Control "${i}" toggle-focused-tags "${tags}" + + # Super+Shift+Control+[1-4] to toggle tag [0-3] of focused view + riverctl map normal Super+Shift+Control "${i}" toggle-view-tags "${tags}" +done + +# Super+0 to focus all tags +# Super+Shift+0 to tag focused view with all tags +all_tags=$(((1 << 32) - 1)) +riverctl map normal Super 0 set-focused-tags "${all_tags}" +riverctl map normal Super+Shift 0 set-view-tags "${all_tags}" + # Configure the keyboard layout riverctl keyboard-layout gb # Set the default layout generator to be rivertile and start it. # River will send the process group of the init executable SIGTERM on exit. riverctl default-layout rivertile -rivertile -view-padding 6 -outer-padding 6 & +rivertile -view-padding 3 -outer-padding 6 -main-location right -main-ratio 0.5 &