From 58d9bfc7661504f705c6215ae7da5dc1398ff993 Mon Sep 17 00:00:00 2001 From: Leon Henrik Plickat Date: Sun, 13 Dec 2020 01:06:30 +0100 Subject: [PATCH] contrib: Unify style Unify indentation and variables and add link to non-standard programs called. --- contrib/config.sh | 33 +++++++++++++++++++++------------ 1 file changed, 21 insertions(+), 12 deletions(-) diff --git a/contrib/config.sh b/contrib/config.sh index 193b710..5169409 100755 --- a/contrib/config.sh +++ b/contrib/config.sh @@ -66,7 +66,8 @@ riverctl map-pointer normal $mod BTN_LEFT move-view # Mod + Right Mouse Button to resize views riverctl map-pointer normal $mod BTN_RIGHT resize-view -for i in $(seq 1 9); do +for i in $(seq 1 9) +do tagmask=$((1 << ($i - 1))) # Mod+[1-9] to focus tag [0-8] @@ -113,19 +114,27 @@ 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 +# Various media key mapping examples for both normal and locked mode which do +# not have a modifier 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 --toggle-mute - 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 + # Eject the optical drive + riverctl map $mode None XF86Eject spawn eject -T + + # Control pulse audio volume with pamixer (https://github.com/cdemoulins/pamixer) + 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 --toggle-mute + + # Control MPRIS aware media players with playerctl (https://github.com/altdesktop/playerctl) + 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 + + # Control screen backlight brighness with light (https://github.com/haikarainen/light) + riverctl map $mode None XF86MonBrightnessUp spawn light -A 5 + riverctl map $mode None XF86MonBrightnessDown spawn light -U 5 done # Set repeat rate