summary refs log tree commit diff
path: root/.config/river/mklayout.sh
diff options
context:
space:
mode:
authorRobert Günzler <r@gnzler.io>2025-04-30 13:22:06 +0200
committerRobert Günzler <r@gnzler.io>2025-04-30 13:22:06 +0200
commit27ca3598a5de58591fc80c516f75b7f204954c5b (patch)
tree306b2483e8474b188ddd7895037e7d41ade1044c /.config/river/mklayout.sh
parenta04bebc3c33cc969eba03e74a91ddea6b4746553 (diff)
update river config
Signed-off-by: Robert Günzler <r@gnzler.io>
Diffstat (limited to '.config/river/mklayout.sh')
-rwxr-xr-x.config/river/mklayout.sh29
1 files changed, 29 insertions, 0 deletions
diff --git a/.config/river/mklayout.sh b/.config/river/mklayout.sh
new file mode 100755
index 0000000..a6151cd
--- /dev/null
+++ b/.config/river/mklayout.sh
@@ -0,0 +1,29 @@
+#!/bin/sh
+set -eu
+
+case "${1:-}" in
+reset)
+	riverctl send-layout-cmd rivertile "main-ratio 0.66"
+	riverctl send-layout-cmd rivertile "main-count 1"
+	riverctl send-layout-cmd rivertile "main-location left"
+	;;
+dev)
+	workspace=$(
+		zoxide query -l |
+			xargs zenity \
+				--title 'river-mklayout' \
+				--text 'Select a workspace to enter into' \
+				--list \
+				--column 1
+	)
+	# spawn 3 terminals in the workspace
+	riverctl spawn "foot -D $workspace"
+	riverctl spawn "foot -D $workspace"
+	riverctl spawn "foot -D $workspace"
+	# terminate the terminal that ran mklayout (if any)
+	test -t 0 && riverctl close
+	;;
+*)
+	exit 1
+	;;
+esac