#!/bin/sh # Wayland stuff export XDG_SESSION_TYPE=wayland export XDG_CURRENT_DESKTOP=sway export XDG_SESSION_DESKTOP=sway export SDL_VIDEODRIVER=wayland export QT_QPA_PLATFORM=wayland export QT_WAYLAND_DISABLE_WINDOWDECORATION=1 export VDPAU_DRIVER=radeonsi export LIBVA_DRIVER_NAME=radeonsi systemctl --user import-environment DISPLAY WAYLAND_DISPLAY XDG_CURRENT_DESKTOP XDG_SESSION_DESKTOP XDG_SESSION_TYPE hash dbus-update-activation-environment 2>/dev/null && \ dbus-update-activation-environment --systemd DISPLAY WAYLAND_DISPLAY XDG_CURRENT_DESKTOP XDG_SESSION_DESKTOP XDG_SESSION_TYPE # Input methods riverctl keyboard-layout -options ctrl:swap_lalt_lctl,ctrl:swap_rwin_rctl vlomwide riverctl input pointer-2362-628-PIXA3854:00_093A:0274_Touchpad tap enabled riverctl xcursor-theme Adwaita 64 gsettings set org.gnome.desktop.interface cursor-theme Adwaita gsettings set org.gnome.desktop.interface cursor-size 64 riverctl map normal Super Escape spawn 'riverctl keyboard-layout -options ctrl:swap_lalt_lctl,ctrl:swap_rwin_rctl vlomwide' riverctl map normal Super+Shift Escape spawn 'riverctl keyboard-layout -options "" us' # Basic execution riverctl map normal Super T spawn foot riverctl map normal Super D spawn run riverctl map normal Super P spawn grim_slurp riverctl map normal Super+Shift X spawn lock riverctl map normal Super+Shift space spawn albumbler.py # Close and Quit riverctl map normal Super+Shift K close riverctl map normal Super+Shift+Control Q exit # Layouts riverctl map normal Super S send-layout-cmd rivercarro "main-location right" riverctl map normal Super R send-layout-cmd rivercarro "main-location top" riverctl map normal Super A send-layout-cmd rivercarro "main-location monocle" # Movement and focus NEXT=I PREV=C riverctl map normal Super $NEXT focus-view next riverctl map normal Super $PREV focus-view previous riverctl map normal Super+Shift $NEXT swap next riverctl map normal Super+Shift $PREV swap previous riverctl map normal Super Return zoom riverctl map normal Super Space toggle-float riverctl map normal Super G toggle-fullscreen # Outpus riverctl map normal Super B focus-output next riverctl map normal Super Comma focus-output previous riverctl map normal Super+Shift B send-to-output next riverctl map normal Super+Shift Comma send-to-output previous # Ratio changes LEFT=C UPK=E DNK=N RIGHT=I riverctl map normal Super $UPK send-layout-cmd rivercarro "main-ratio -0.05" riverctl map normal Super $DNK send-layout-cmd rivercarro "main-ratio +0.05" riverctl map normal Super+Shift $UPK send-layout-cmd rivercarro "main-count +1" riverctl map normal Super+Shift $DNK send-layout-cmd rivercarro "main-count -1" # Super+Alt+{H,J,K,L} to move views riverctl map normal Super+Alt $LEFT move left 100 riverctl map normal Super+Alt $DNK move down 100 riverctl map normal Super+Alt $UPK move up 100 riverctl map normal Super+Alt $RIGHT move right 100 # Floating management i don't use # riverctl map normal Super+Alt+Control $LEFT snap left # riverctl map normal Super+Alt+Control $DNK snap down # riverctl map normal Super+Alt+Control $UPK snap up # riverctl map normal Super+Alt+Control $RIGHT snap right # riverctl map normal Super+Alt+Shift $LEFT resize horizontal -100 # riverctl map normal Super+Alt+Shift $DNK resize vertical 100 # riverctl map normal Super+Alt+Shift $UPK resize vertical -100 # riverctl map normal Super+Alt+Shift $RIGHT resize horizontal 100 # Mouse floating management riverctl map-pointer normal Super BTN_LEFT move-view riverctl map-pointer normal Super+Shift BTN_LEFT resize-view # riverctl map-pointer normal Super BTN_MIDDLE toggle-float riverctl map normal Super Tab focus-previous-tags count=0 for i in F U H period V L O M; do tags=$((1 << count)) 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 count=$(( 1 + count )) done # Passthrough mode riverctl declare-mode passthrough riverctl map normal Super F11 enter-mode passthrough riverctl map passthrough Super F11 enter-mode normal # Control keys for mode in normal locked do riverctl map $mode None XF86AudioRaiseVolume spawn "pactl set-sink-volume 0 +2%" riverctl map $mode None XF86AudioLowerVolume spawn "pactl set-sink-volume 0 -2%" riverctl map $mode None XF86AudioMute spawn "pactl set-sink-mute 0 toggle" riverctl map $mode None XF86AudioPlay spawn "mpc toggle" riverctl map $mode None XF86AudioPrev spawn "mpc previous" riverctl map $mode None XF86AudioNext spawn "mpc next" riverctl map $mode None XF86MonBrightnessUp spawn "light -A 1" riverctl map $mode None XF86MonBrightnessDown spawn "light -U 1" done # Set background and border color BG_COLOUR=002B36 AC_COLOUR=FF8C00 IN_COLOUR=586E75 riverctl background-color 0x"$BG_COLOUR" riverctl border-color-focused 0x"$AC_COLOUR" riverctl border-color-unfocused 0x"$IN_COLOUR" # Set keyboard repeat rate riverctl set-repeat 50 300 # Cursor follows focus riverctl set-cursor-warp on-focus-change # Set the default layout generator to be rivercarro and start it. # River will send the process group of the init executable SIGTERM on exit. riverctl default-layout rivercarro rivercarro -main-location monocle & # startup stuff riverctl spawn bar riverctl spawn "gammastep -l 52.2:4.5"