river-options: rework, bump to v2
Options are now all global but may be overridden per-output. If an output local value is requested but none has been set, the global value is provided instead. This makes for much better ergonomics when configuring layout related options in particular.
This commit is contained in:
40
example/init
40
example/init
@ -1,11 +1,12 @@
|
||||
#!/bin/sh
|
||||
|
||||
# This is the example configuration file for river(1).
|
||||
# This is the example configuration file for river.
|
||||
#
|
||||
# If you wish to edit this, you will probably want to copy it to
|
||||
# $XDG_CONFIG_HOME/river/init or $HOME/.config/river/init first.
|
||||
#
|
||||
# See the riverctl(1) man page for complete documentation
|
||||
# See the river(1), riverctl(1), and river(1) man pages for complete
|
||||
# documentation.
|
||||
|
||||
# Use the "logo" key as the primary modifier
|
||||
mod="Mod4"
|
||||
@ -39,6 +40,16 @@ 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 option by 0.05
|
||||
# rivertile(1) uses this option to determine the width of the main stack.
|
||||
riverctl map normal $mod H spawn riverctl mod-option -focused-output main_factor -0.05
|
||||
riverctl map normal $mod L spawn riverctl mod-option -focused-output main_factor +0.05
|
||||
|
||||
# Mod+Shift+H and Mod+Shift+L to increment/decrement the main_count option.
|
||||
# rivertile(1) uses this option to determine the number of "main" views in the layout.
|
||||
riverctl map normal $mod+Shift H spawn riverctl mod-option -focused-output main_count +1
|
||||
riverctl map normal $mod+Shift L spawn riverctl mod-option -focused-output 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
|
||||
@ -93,10 +104,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 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
|
||||
riverctl map normal $mod Up spawn riverctl set-option -focused-output main_location top
|
||||
riverctl map normal $mod Right spawn riverctl set-option -focused-output main_location right
|
||||
riverctl map normal $mod Down spawn riverctl set-option -focused-output main_location bottom
|
||||
riverctl map normal $mod Left spawn riverctl set-option -focused-output main_location 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
|
||||
@ -134,18 +145,6 @@ done
|
||||
# Set repeat rate
|
||||
riverctl set-repeat 50 300
|
||||
|
||||
# Set the layout on startup
|
||||
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"
|
||||
riverctl float-filter-add "popup"
|
||||
@ -155,3 +154,8 @@ riverctl csd-filter-add "gedit"
|
||||
|
||||
# Set opacity and fade effect
|
||||
# riverctl opacity 1.0 0.75 0.0 0.1 20
|
||||
|
||||
# Exec into the default layout generator, rivertile.
|
||||
# River will send the process group of the init executable SIGTERM on exit.
|
||||
riverctl set-option layout rivertile
|
||||
exec rivertile
|
||||
|
Reference in New Issue
Block a user