From 1178bdf0fb8d9c96c2f95afdef7764201c0d816a Mon Sep 17 00:00:00 2001 From: Midgard <2885-Midgard@users.noreply.framagit.org> Date: Tue, 9 Jul 2024 16:54:46 +0200 Subject: [PATCH] [river] Spawn below --- river/init | 74 ++++++++++++++---------------------------------------- 1 file changed, 19 insertions(+), 55 deletions(-) diff --git a/river/init b/river/init index f01a092..e7385f8 100755 --- a/river/init +++ b/river/init @@ -32,7 +32,7 @@ else fi -riverctl default-attach-mode above +riverctl default-attach-mode below riverctl border-width 1 riverctl border-color-focused 0xffffff88 @@ -112,61 +112,8 @@ riverctl map normal $mod T set-view-tags $(((1 << 11) - 1)) riverctl default-layout river-ultitile if $in_sway; then ~/dev/river-ultitile/zig-out/bin/river-ultitile & - - # Mod+U and Mod+I to increase/decrease the main size - riverctl map normal $mod U send-layout-cmd river-ultitile "set integer main-size += 5" - riverctl map normal $mod I send-layout-cmd river-ultitile "set integer main-size -= 5" - - # Mod+Shift+U and Mod+Shift+I to decrease/increase the main count - riverctl map normal $mod+Shift U send-layout-cmd river-ultitile "set integer main-count -= 1" - riverctl map normal $mod+Shift I send-layout-cmd river-ultitile "set integer main-count += 1" - - # Mod+{Up,Right,Down,Left} to change layout - riverctl map normal $mod Up send-layout-cmd river-ultitile "set string layout = vstack" - riverctl map normal $mod Right send-layout-cmd river-ultitile "set string layout = hstack" - riverctl map normal $mod Down send-layout-cmd river-ultitile "set string layout = monocle" - riverctl map normal $mod Left send-layout-cmd river-ultitile "set string layout = main" - else - ~/.local/bin/river-ultitile & - - # Mod+U and Mod+I to increase/decrease the main size - riverctl map normal $mod U send-layout-cmd river-ultitile "edit main-center.main stretch+5" - riverctl map normal $mod I send-layout-cmd river-ultitile "edit main-center.main stretch-5" - - # Mod+Shift+U and Mod+Shift+I to decrease/increase the main count - riverctl map normal $mod+Shift U send-layout-cmd river-ultitile "edit main-center.main max-views-1" - riverctl map normal $mod+Shift I send-layout-cmd river-ultitile "edit main-center.main max-views+1" - - # Mod+{Up,Right,Down,Left} to change layout orientation - riverctl map normal $mod Up send-layout-cmd river-ultitile "default layout vstack" - riverctl map normal $mod Right send-layout-cmd river-ultitile "default layout hstack" - riverctl map normal $mod Down send-layout-cmd river-ultitile "default layout main-center" - riverctl map normal $mod Left send-layout-cmd river-ultitile "default layout main-left" - # And for monocle - riverctl map normal $mod M send-layout-cmd river-ultitile "default layout monocle" - # Cycle through layout - #riverctl map normal $mod W send-layout-cmd river-ultitile "main-location-cycle left,monocle" - - ultitile() { - riverctl send-layout-cmd river-ultitile "$*" - } - ultitile new layout hstack type=hsplit padding=5 margin=5 max-views=unlimited - - ultitile new layout vstack type=vsplit padding=5 margin=5 max-views=unlimited - - ultitile new layout main-left type=hsplit padding=5 margin=5 - ultitile new tile main-left.left type=vsplit stretch=40 order=2 - ultitile new tile main-left.main type=vsplit stretch=60 order=1 max-views=1 - - ultitile new layout main-center type=hsplit padding=5 margin=5 - ultitile new tile main-center.left type=vsplit stretch=25 order=2 suborder=0 - ultitile new tile main-center.main type=vsplit stretch=50 order=1 max-views=1 - ultitile new tile main-center.right type=vsplit stretch=25 order=2 suborder=1 - - ultitile new layout monocle type=overlay max-views=unlimited - - ultitile default layout main-center + river-ultitile & riverctl spawn 'foot sh -c "vi ~/todo2.txt; bash"' riverctl spawn 'foot sh -c "vi ~/todo.txt; bash"' @@ -179,6 +126,23 @@ else riverctl set-view-tags $((1 << (11 - 1))) fi +# Mod+U and Mod+I to increase/decrease the main size +riverctl map normal $mod U send-layout-cmd river-ultitile "set integer main-size += 5" +riverctl map normal $mod I send-layout-cmd river-ultitile "set integer main-size -= 5" + +# Mod+Shift+U and Mod+Shift+I to decrease/increase the main count +riverctl map normal $mod+Shift U send-layout-cmd river-ultitile "set integer main-count -= 1" +riverctl map normal $mod+Shift I send-layout-cmd river-ultitile "set integer main-count += 1" + +# Mod+{Up,Right,Down,Left} to change layout +riverctl map normal $mod Up send-layout-cmd river-ultitile "set string layout = vstack" +riverctl map normal $mod Right send-layout-cmd river-ultitile "set string layout = hstack" +riverctl map normal $mod Down send-layout-cmd river-ultitile "set string layout = monocle" +riverctl map normal $mod Left send-layout-cmd river-ultitile "set string layout = main" + +riverctl map normal $mod z spawn "riverctl send-layout-cmd river-ultitile 'unset-all-local layout'; riverctl send-layout-cmd river-ultitile 'set global string layout @ main hstack vstack'" + + riverctl rule-add -app-id "Firefox" ssd riverctl rule-add -app-id "Tor Browser" ssd riverctl rule-add -app-id gramps ssd