#! /bin/sh # # wm independent hotkeys # # terminal emulator riverctl map normal Super Return spawn alacritty # program launcher riverctl map normal Super A spawn "wofi -S run" # lock screen riverctl map normal Super L spawn waylock # kill session completely riverctl map normal Super+Alt O spawn "pkill -u ${USER}" # kill session completely (force) riverctl map normal Super+Alt+Shift O spawn "pkill -9 -u ${USER}" # screenshot riverctl map normal Super Print spawn 'grim -g "$(slurp)" - | tee "/tmp/screenshot_$(date +%Y-%m-%d_%H_%M_%S).png" | wl-copy' # firefox riverctl map normal Super+Shift F spawn firefox # thunderbird riverctl map normal Super+Shift L spawn thunderbird # zathura riverctl map normal Super+Shift Z spawn zathura # aerc riverctl map normal Super+Shift A spawn "alacritty -e ~/bin/start-aerc" # signal riverctl map normal Super+Shift S spawn signal-desktop # element riverctl map normal Super+Shift M spawn "LIBGL_ALWAYS_INDIRECT=1 element-desktop" # # river hotkeys # # quit river riverctl map normal Super+Alt Q exit # close focused window riverctl map normal Super Q close # # state/flags # # toggle floating riverctl map normal Super S toggle-float # toggle fullscreen riverctl map normal Super F toggle-fullscreen # # focus/swap # # focus next window riverctl map normal Super J focus-view next # focus previous window riverctl map normal Super K focus-view previous # focus next output riverctl map normal Super Period focus-output next # focus previous output riverctl map normal Super Comma focus-output previous # swap with next window riverctl map normal Super+Shift J swap next # swap with previous window riverctl map normal Super+Shift K swap previous # send to next output riverctl map normal Super+Shift Period send-to-output next # send to previous output riverctl map normal Super+Shift Comma send-to-output previous # # move/resize # # expand floating window horizontally riverctl map normal Super+Alt+Shift H resize horizontal -20 # expand floating window vertically riverctl map normal Super+Alt+Shift J resize vertical 20 # contract floating window vertically riverctl map normal Super+Alt+Shift K resize vertical -20 # contract floating window horizontally riverctl map normal Super+Alt+Shift L resize horizontal 20 # move floating window left riverctl map normal Super+Alt H move left 20 # move floating window down riverctl map normal Super+Alt J move down 20 # move floating window up riverctl map normal Super+Alt K move up 20 # move floating window right riverctl map normal Super+Alt L move right 20 # # tags # ALL_TAGS=$(((1 << 32) - 1)) for i in $(seq 1 9); do TAGS=$((1 << ($i - 1))) # focus tag riverctl map normal Super $i set-focused-tags ${TAGS} # tag focused window (toggle) riverctl map normal Super+Shift $i toggle-view-tags ${TAGS} # toggle tag focus riverctl map normal Super+Control $i toggle-focused-tags ${TAGS} done # focus all tags riverctl map normal Super 0 set-focused-tags ${ALL_TAGS} # tag focused window (all) riverctl map normal Super+Shift 0 set-view-tags ${ALL_TAGS} # # init # dbus-update-activation-environment DISPLAY WAYLAND_DISPLAY XDG_CURRENT_DESKTOP=river riverctl spawn "swayidle timeout 600 waylock timeout 900 \"wlopm --off '*'\" resume \"wlopm --on '*'\"" riverctl keyboard-layout $(cat ~/.kblayout) riverctl border-width 0 riverctl spawn "river-bsp-layout -i 2 -o 5" riverctl default-layout bsp-layout riverctl spawn "swaybg -i ~/.wallpaper" riverctl spawn waybar killall -qw pipewire riverctl spawn pipewire while [ -z "$(pgrep -x pipewire)" ]; do false; done killall -qw pipewire-pulse riverctl spawn pipewire-pulse while [ -z "$(pgrep -x pipewire-pulse)" ]; do false; done killall -qw wireplumber riverctl spawn wireplumber while [ -z "$(pgrep -x wireplumber)" ]; do false; done riverctl spawn wired