#!/bin/sh # Wayland stuff export XDG_SESSION_TYPE=wayland export XDG_CURRENT_DESKTOP=sway export XDG_SESSION_DESKTOP=sway export QT_QPA_PLATFORM=wayland export QT_WAYLAND_DISABLE_WINDOWDECORATION=1 systemctl --user import-environment XDG_CURRENT_DESKTOP XDG_SESSION_DESKTOP XDG_SESSION_TYPE dbus-update-activation-environment XDG_CURRENT_DESKTOP XDG_SESSION_DESKTOP XDG_SESSION_TYPE # Input methods riverctl keyboard-layout -model pc105awide -options ctrl:nocaps,ctrl:swap_lalt_lctl_lwin,ctrl:swap_rwin_rctl vlom riverctl input pointer-2362-628-PIXA3854:00_093A:0274_Touchpad tap enabled # Basic execution riverctl map normal Super T spawn foot riverctl map normal Super D spawn run riverctl map normal Super P spawn grim_slurp # 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 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 # Ratio changes UPK=E DNK=N 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 BTN_RIGHT 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 '.' 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 # Various media key mapping examples for both normal and locked mode which do # not have a modifier for mode in normal locked do # 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 XF86AudioPlay spawn 'mpc toggle' riverctl map $mode None XF86AudioPrev spawn 'mpc previous' riverctl map $mode None XF86AudioNext spawn 'mpc next' # Control screen backlight brightness with light (https://github.com/haikarainen/light) riverctl map $mode None XF86MonBrightnessUp spawn 'light -A 1' riverctl map $mode None XF86MonBrightnessDown spawn 'light -U 1' done # Set background and border color riverctl background-color 0x002b36 riverctl border-color-focused 0xFF8000 riverctl border-color-unfocused 0x586e75 # Set keyboard repeat rate riverctl set-repeat 50 300 # Make certain views start floating riverctl float-filter-add app-id float riverctl float-filter-add title "popup title with spaces" # Set app-ids and titles of views which should use client side decorations # riverctl csd-filter-add app-id "gedit" # 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 yambar riverctl spawn dunst riverctl spawn 'gammastep -l 52.2:4.5' riverctl spawn 'swaybg -m fill -i /home/tslil/store/pictures/bg0.png'