aboutsummaryrefslogtreecommitdiff
path: root/contrib/config.sh
diff options
context:
space:
mode:
authorLeon Henrik Plickat <leonhenrik.plickat@stud.uni-goettingen.de>2020-10-22 20:55:48 +0200
committerIsaac Freund <ifreund@ifreund.xyz>2020-10-22 21:10:12 +0200
commitdd92b05af06996ca72b29b056b93258d7999dfe9 (patch)
tree75b56a757cb9541fd884bd3358cecd441ab40c19 /contrib/config.sh
parente4a3698d86a4a32cc581b657ee9f1db57976ef9b (diff)
downloadriver-dd92b05af06996ca72b29b056b93258d7999dfe9.tar.gz
river-dd92b05af06996ca72b29b056b93258d7999dfe9.tar.xz
Add mediakey maps for locked and normal mode to example config
The example config now additionally demonstrates how to use a shell loop to create a mapping in multiple modes, how mediakeys can be mapped and how to use the "None" modifier.
Diffstat (limited to 'contrib/config.sh')
-rwxr-xr-xcontrib/config.sh15
1 files changed, 15 insertions, 0 deletions
diff --git a/contrib/config.sh b/contrib/config.sh
index 1e1bdc1..256567c 100755
--- a/contrib/config.sh
+++ b/contrib/config.sh
@@ -108,6 +108,21 @@ riverctl map normal $mod F11 enter-mode passthrough
# Mod+F11 to return to normal mode
riverctl map passthrough $mod F11 enter-mode normal
+# Various media key mapping for both normal and locked mode
+for mode in normal locked
+do
+ riverctl map "${mode}" None XF86Eject spawn eject -T
+ riverctl map "${mode}" None XF86AudioRaiseVolume spawn pamixer -i 5
+ riverctl map "${mode}" None XF86AudioLowerVolume spawn pamixer -d 5
+ riverctl map "${mode}" None XF86AudioMute spawn pamixer --set-volume 0
+ riverctl map "${mode}" None XF86AudioMedia spawn playerctl play-pause
+ riverctl map "${mode}" None XF86AudioPlay spawn playerctl play-pause
+ riverctl map "${mode}" None XF86AudioPrev spawn playerctl previous
+ riverctl map "${mode}" None XF86AudioNext spawn playerctl next
+ riverctl map "${mode}" None XF86MonBrightnessUp spawn light -A 5
+ riverctl map "${mode}" None XF86MonBrightnessDown spawn light -U 5
+done
+
# Set the layout on startup
riverctl layout rivertile left