dotfiles/.config/river/init
2025-05-26 01:04:13 -06:00

97 lines
3.3 KiB
Bash
Executable file

#!/bin/sh
source $HOME/.cache/hellwal/colors-river
# Set background and border color
riverctl background-color "0x$background"
riverctl border-color-focused "0x$color1"
riverctl border-color-unfocused "0x$color2"
riverctl spawn "slstatus | dam"
riverctl spawn "wbg "$wallpaper""
riverctl spawn "foot --server"
riverctl spawn "swayidle"
riverctl spawn "mako"
riverctl focus-follows-cursor always
riverctl xcursor-theme macOS 28
riverctl keyboard-layout latam
riverctl input pointer-1739-0-Synaptics_TM3276-022 events disabled
# Define ModKey
mod="Super"
riverctl map normal $mod+Shift Return spawn footclient
riverctl map normal $mod E spawn "footclient --title lf lf"
riverctl map normal $mod S spawn "footclient --title Spotify spotify_player"
riverctl map normal $mod R spawn fuzzel
riverctl map normal $mod+Shift spawn librewolf
riverctl map normal $mod V spawn "footclient --title ncpamixer ncpamixer"
riverctl map normal $mod+Shift C spawn camera
riverctl map normal $mod L spawn swaylock
riverctl map normal $mod+Shift S spawn "aws -r"
riverctl map normal None Print spawn "aws -f"
riverctl map normal None+Shift Print spawn "art"
# Super+Q to close the focused view
riverctl map normal $mod Q close
riverctl map normal $mod+Shift Q spawn "sysutils"
riverctl map normal Super Return zoom
riverctl map-pointer normal $mod BTN_LEFT move-view
riverctl map-pointer normal $mod BTN_RIGHT resize-view
riverctl map-pointer normal $mod BTN_MIDDLE toggle-float
# River
riverctl default-attach-mode top
# Rivercarro
riverctl map normal $mod N send-layout-cmd rivercarro "main-location-cycle left,monocle"
for i in $(seq 1 9)
do
tags=$((1 << ($i - 1)))
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
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
# Super+Space to toggle float
riverctl map normal Super Space toggle-float
# Super+F to toggle fullscreen
riverctl map normal Super F toggle-fullscreen
for mode in normal locked
do
riverctl map normal None XF86AudioRaiseVolume spawn "wpctl set-volume -l 1.0 @DEFAULT_SINK@ 5%+ && pkill -RTMIN+2 slstatus"
riverctl map normal None XF86AudioLowerVolume spawn "wpctl set-volume -l 1.0 @DEFAULT_SINK@ 5%- && pkill -RTMIN+2 slstatus"
riverctl map normal None XF86AudioMute spawn "wpctl set-mute @DEFAULT_SINK@ toggle && pkill -RTMIN+2 slstatus"
riverctl map normal None XF86MonBrightnessUp spawn "brillo -a -u 125000 -q -A 5"
riverctl map normal None XF86MonBrightnessDown spawn "brillo -a -u 125000 -q -U 5"
done
# Set keyboard repeat rate
riverctl set-repeat 25 600
# Make all views with an app-id that starts with "float" and title "foo" start floating.
riverctl rule-add -app-id "mpv" -title "webcam" float
# Make all views with app-id "bar" and any title use client-side decorations
riverctl rule-add -app-id "librewolf" ssd
riverctl rule-add -app-id "firefox" ssd
riverctl rule-add -app-id "org.pwmt.zathura" ssd
# River will send the process group of the init executable SIGTERM on exit.
riverctl default-layout rivercarro
rivercarro -outer-gaps 4 -inner-gaps 4 -per-tag -no-smart-gaps &