diff options
| author | Robert Günzler <r@gnzler.io> | 2026-04-08 13:11:48 +0900 |
|---|---|---|
| committer | Robert Günzler <r@gnzler.io> | 2026-04-08 13:11:48 +0900 |
| commit | d4620f3ac119263fee90bd819eadaf84fc8d50b7 (patch) | |
| tree | f5268e72a1c0037d29acac699e5d3f4c37be0e6b /.config/river/init | |
| parent | 8afe3fa8d88ae56e96f65897935ef508581ac5f7 (diff) | |
*
Automated-commit-by: dots Signed-off-by: Robert Günzler <r@gnzler.io>
Diffstat (limited to '.config/river/init')
| -rwxr-xr-x | .config/river/init | 143 |
1 files changed, 143 insertions, 0 deletions
diff --git a/.config/river/init b/.config/river/init new file mode 100755 index 0000000..ae976d7 --- /dev/null +++ b/.config/river/init @@ -0,0 +1,143 @@ +#!/bin/sh + +# start desktop runlevel +riverctl spawn 'openrc -U desktop' + +# ::start style +riverctl background-color 0x080808ff +riverctl border-color-focused 0x70649aff +riverctl border-color-unfocused 0x080808af +riverctl border-color-urgent 0xcb1b45ff +riverctl border-width 3 +# ::end style + +# rules +riverctl rule-add -app-id '*' ssd +riverctl rule-add -app-id 'librewolf' -title 'Picture-in-Picture' float +riverctl rule-add -app-id 'workfox' ssd +riverctl rule-add -app-id 'foot-float' float +riverctl rule-add -app-id 'mpv' float +riverctl rule-add -app-id 'nm-connection-editor' float + +# keymaps: wm +riverctl map normal Super+Shift E spawn 'openrc -U default && riverctl exit' +riverctl map normal Super+Shift Q close +riverctl map normal Super+Shift Return zoom +riverctl map normal Super F toggle-fullscreen +riverctl map normal Super+Shift Space toggle-float + +riverctl map normal Super J focus-view next +riverctl map normal Super K focus-view previous +riverctl map normal Super L focus-view right +riverctl map normal Super H focus-view left +riverctl map normal Super+Shift J swap next +riverctl map normal Super+Shift K swap previous +riverctl map normal Super+Shift L swap right +riverctl map normal Super+Shift H swap left +riverctl map normal Super Backspace focus-previous-tags +riverctl map normal Super+Shift Backspace move-previous-tags +riverctl map normal Super Period focus-output next +riverctl map normal Super Comma focus-output previous +riverctl map normal Super+Shift Period send-to-output next +riverctl map normal Super+Shift Comma send-to-output previous +all_tags=$(((1 << 32) - 1)) +riverctl map normal Super 0 set-focused-tags $all_tags +riverctl map normal Super+Shift 0 set-view-tags $all_tags +for i in $(seq 1 9); do + tags=$((1 << (i - 1))) + # tag management + riverctl map normal Super "$i" set-focused-tags "$tags" + riverctl map normal Super+Shift "$i" set-view-tags "$tags" + riverctl map normal Super+Control "$i" toggle-focused-tags "$tags" + riverctl map normal Super+Shift+Control "$i" toggle-view-tags "$tags" +done +riverctl map-pointer normal Super BTN_LEFT move-view +riverctl map-pointer normal Super BTN_RIGHT resize-view + +# keymaps: apps +riverctl map normal Super Return spawn 'footclient' +riverctl map normal Super+Control Return spawn 'foot -a foot-float -W 120x40' +riverctl map normal Super D spawn 'fuzzel' +riverctl map normal Super Z spawn 'footclient -- sleep .4 && zk e' +riverctl map normal Super+Shift S spawn '~/bin/grimshot' + +# keymaps: cmd mode +riverctl declare-mode cmd +riverctl map normal Super Space enter-mode cmd +riverctl map cmd None Escape enter-mode normal +riverctl map cmd None Space spawn "riverctl enter-mode normal; menm" +riverctl map cmd None Backspace spawn "riverctl enter-mode normal; susm" +riverctl map cmd None A spawn "riverctl enter-mode normal; audm" +riverctl map cmd None B spawn "riverctl enter-mode normal; blum" +riverctl map cmd None C spawn "riverctl enter-mode normal; netm" +riverctl map cmd None D spawn "riverctl enter-mode normal; dskm" +riverctl map cmd None F spawn "riverctl enter-mode normal; fm" +riverctl map cmd None K spawn "riverctl enter-mode normal; keym" +riverctl map cmd None N spawn "riverctl enter-mode normal; ntfm" +riverctl map cmd None P spawn "riverctl enter-mode normal; pasm" +riverctl map cmd None R spawn "riverctl enter-mode normal; svcm" +riverctl map cmd None S spawn "riverctl enter-mode normal; snim" +riverctl map cmd None T spawn "riverctl enter-mode normal; flatpak run com.odnoyko.valot --compact" +riverctl map cmd None V spawn "riverctl enter-mode normal; vpnm" +riverctl map cmd None X spawn "riverctl enter-mode normal; fuzzel --list-executables-in-path" +riverctl map cmd Shift C spawn "riverctl enter-mode normal; calm" + +# keymaps: misc +# riverctl map-switch normal lid close spawn 'waylock -init-color 0x005469 & playerctl pause' +riverctl map-switch normal lid close spawn 'fyi todo lock' + +riverctl map normal Super B spawn 'pkill -USR1 waybar' +riverctl map normal Super+Alt K spawn 'mpv ~/pictures/fwkeyboard.jpg' + +riverctl map normal Super C spawn 'fyi todo xf86copy' +riverctl map normal Super X spawn 'fyi todo xf86cut' +riverctl map normal Super V spawn 'fyi todo xf86paste' + +# keymaps: fn/media keys +riverctl map normal None XF86AudioRaiseVolume spawn 'wpctl set-volume --limit=1.0 @DEFAULT_AUDIO_SINK@ 5%+' +riverctl map normal None XF86AudioLowerVolume spawn 'wpctl set-volume --limit=1.0 @DEFAULT_AUDIO_SINK@ 5%-' +riverctl map normal None XF86AudioMute spawn 'wpctl set-mute @DEFAULT_AUDIO_SINK@ toggle' +riverctl map normal None XF86AudioMicMute spawn 'wpctl set-mute @DEFAULT_AUDIO_SOURCE@ toggle' +riverctl map normal None XF86AudioPlay spawn 'playerctl -p playerctld play-pause' +riverctl map normal None XF86AudioPrev spawn 'playerctl -p playerctld previous' +riverctl map normal None XF86AudioNext spawn 'playerctl -p playerctld next' +riverctl map normal None XF86MonBrightnessUp spawn 'brightnessctl set +5%' +riverctl map normal None XF86MonBrightnessDown spawn 'brightnessctl set 5%-' + +# input +riverctl keyboard-layout -options caps:super,eurosign:5 -variant mac us +riverctl set-repeat 70 200 +riverctl set-cursor-warp on-output-change +riverctl focus-follows-cursor normal +riverctl hide-cursor timeout 0 +riverctl hide-cursor when-typing disabled +riverctl xcursor-theme Adwaita 16 + +riverctl input 'pointer-*' natural-scroll enabled +riverctl input 'pointer-*' pointer-accel 0 +riverctl input 'pointer-*' tap enabled +riverctl input 'pointer-*' accel-profile adaptive +riverctl input 'pointer-*' disable-while-typing enabled +riverctl input '*Kensington_Slimblade_Trackball' natural-scroll disabled +riverctl input '*Kensington_Slimblade_Trackball' pointer-accel 1 + +# spawn a terminal +riverctl spawn foot + +# wm +riverctl default-layout rivercarro + +riverctl map normal Super Equal send-layout-cmd rivercarro 'main-ratio +0.02' +riverctl map normal Super Minus send-layout-cmd rivercarro 'main-ratio -0.02' +riverctl map normal Super+Alt H send-layout-cmd rivercarro 'main-location left' +riverctl map normal Super+Alt K send-layout-cmd rivercarro 'main-location top' +riverctl map normal Super+Alt J send-layout-cmd rivercarro 'main-location bottom' +riverctl map normal Super+Alt L send-layout-cmd rivercarro 'main-location right' +riverctl map normal Super+Alt Space send-layout-cmd rivercarro 'main-location monocle' + +exec /usr/bin/rivercarro \ + -inner-gaps 3 \ + -outer-gaps 3 \ + -main-location left \ + -main-ratio 0.6 \ + -main-count 1 |