aboutsummaryrefslogtreecommitdiff
path: root/example/init
diff options
context:
space:
mode:
authorLeon Henrik Plickat <leonhenrik.plickat@stud.uni-goettingen.de>2020-10-02 15:53:08 +0200
committerIsaac Freund <ifreund@ifreund.xyz>2021-04-20 18:27:03 +0200
commitf72656b72e5822481a4bc15b75d19b61b1bb7bc8 (patch)
tree525e40d5fa1e4279810f7f7537830f2bf89b1608 /example/init
parentdf3e9930137c0ec4871208b09832e59d537453b7 (diff)
downloadriver-f72656b72e5822481a4bc15b75d19b61b1bb7bc8.tar.gz
river-f72656b72e5822481a4bc15b75d19b61b1bb7bc8.tar.xz
river-layout: create and implement protocol
Replace the current layout mechanism based on passing args to a child process and parsing it's stdout with a new wayland protocol. This much more robust and allows for more featureful layout generators. Co-authored-by: Isaac Freund <ifreund@ifreund.xyz>
Diffstat (limited to 'example/init')
-rwxr-xr-xexample/init32
1 files changed, 14 insertions, 18 deletions
diff --git a/example/init b/example/init
index 84c0e05..4cfca78 100755
--- a/example/init
+++ b/example/init
@@ -39,16 +39,6 @@ riverctl map normal $mod+Shift Comma send-to-output previous
# Mod+Return to bump the focused view to the top of the layout stack
riverctl map normal $mod Return zoom
-# Mod+H and Mod+L to decrease/increase the main factor by 5%
-# If using rivertile(1) this determines the width of the main stack.
-riverctl map normal $mod H mod-main-factor -0.05
-riverctl map normal $mod L mod-main-factor +0.05
-
-# Mod+Shift+H and Mod+Shift+L to increment/decrement the number of
-# main views in the layout
-riverctl map normal $mod+Shift H mod-main-count +1
-riverctl map normal $mod+Shift L mod-main-count -1
-
# Mod+Alt+{H,J,K,L} to move views
riverctl map normal $mod+Mod1 H move left 100
riverctl map normal $mod+Mod1 J move down 100
@@ -103,13 +93,10 @@ riverctl map normal $mod Space toggle-float
riverctl map normal $mod F toggle-fullscreen
# Mod+{Up,Right,Down,Left} to change layout orientation
-riverctl map normal $mod Up layout rivertile top
-riverctl map normal $mod Right layout rivertile right
-riverctl map normal $mod Down layout rivertile bottom
-riverctl map normal $mod Left layout rivertile left
-
-# Mod+S to change to Full layout
-riverctl map normal $mod S layout full
+riverctl map normal $mod Up spawn riverctl set-option -focused-output layout tile-up
+riverctl map normal $mod Right spawn riverctl set-option -focused-output layout tile-right
+riverctl map normal $mod Down spawn riverctl set-option -focused-output layout tile-down
+riverctl map normal $mod Left spawn riverctl set-option -focused-output layout tile-left
# Declare a passthrough mode. This mode has only a single mapping to return to
# normal mode. This makes it useful for testing a nested wayland compositor
@@ -148,7 +135,16 @@ done
riverctl set-repeat 50 300
# Set the layout on startup
-riverctl layout rivertile left
+riverctl spawn rivertile
+riverctl set-option -focused-output layout tile-left
+
+# Mod+Alt+{1..9} to set main amount
+# Mod+Alt+Ctrl+{1..9} to set main factor
+#for i in $(seq 1 9)
+#do
+# riverctl map normal $mod+mod1 spawn riverctl set-option -focused-output main_amount "${i}"
+# riverctl map normal $mod+Control+mod1 spawn riverctl set-option -focused-output main_factor "0.${i}"
+#done
# Set app-ids of views which should float
riverctl float-filter-add "float"