[river] Spawn below

This commit is contained in:
Midgard 2024-07-09 16:54:46 +02:00
parent 98e65dbf0a
commit 1178bdf0fb
Signed by untrusted user who does not match committer: midgard
GPG key ID: 511C112F1331BBB4

View file

@ -32,7 +32,7 @@ else
fi fi
riverctl default-attach-mode above riverctl default-attach-mode below
riverctl border-width 1 riverctl border-width 1
riverctl border-color-focused 0xffffff88 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 riverctl default-layout river-ultitile
if $in_sway; then if $in_sway; then
~/dev/river-ultitile/zig-out/bin/river-ultitile & ~/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 else
~/.local/bin/river-ultitile & 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
riverctl spawn 'foot sh -c "vi ~/todo2.txt; bash"' riverctl spawn 'foot sh -c "vi ~/todo2.txt; bash"'
riverctl spawn 'foot sh -c "vi ~/todo.txt; bash"' riverctl spawn 'foot sh -c "vi ~/todo.txt; bash"'
@ -179,6 +126,23 @@ else
riverctl set-view-tags $((1 << (11 - 1))) riverctl set-view-tags $((1 << (11 - 1)))
fi 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 "Firefox" ssd
riverctl rule-add -app-id "Tor Browser" ssd riverctl rule-add -app-id "Tor Browser" ssd
riverctl rule-add -app-id gramps ssd riverctl rule-add -app-id gramps ssd