#!/usr/bin/env bash # Set the background and border colours riverctl background-color 0x15161e riverctl border-color-focused 0xbb9af7 # Magenta riverctl border-color-unfocused 0x444444 # Grey # Super+Shift+T to spawn an instance of foot riverctl map normal Super+Shift T spawn foot # Super+Shift+B to spawn an instance of firefox riverctl map normal Super+Shift B spawn firefox # Super+Shift+Q to exit river riverctl map normal Super+Shift Q exit # Super+C to close the focused view riverctl map normal Super+Shift C close # Super+H to shift the focus to the previous view in the layout stack # Super+L to shift the focus to the next view in the layout stack riverctl map normal Super H focus-view previous riverctl map normal Super L focus-view next # Super+Shift+H to swap the focused view with the previous view in the layout stack # Super+Shift+L to swap the focused view with the next view in the layout stack riverctl map normal Super+Shift H swap previous riverctl map normal Super+Shift L swap next # Super+Period to focus the next output # Super+Comma to focus the previous output riverctl map normal Super Period focus-output next riverctl map normal Super Comma focus-output previous # Super+Shift+Period to send the focused view to the next output # Super+Shift+Comma to send the focused view to the previous output riverctl map normal Super+Shift Period send-to-output next riverctl map normal Super+Shift Comma send-to-output previous # Super+Return to bump the focused view to the top of the layout stack riverctl map normal Super Return zoom # Super+J to increase the main ratio of rivertile(1) # Super+K to decrease the main ratio of rivertile(1) riverctl map normal Super J send-layout-cmd rivertile "main-ratio +0.05" riverctl map normal Super K send-layout-cmd rivertile "main-ratio -0.05" # Super+Shift+J to increment the main count of rivertile(1) # Super+Shift+K to decrement the main count of rivertile(1) riverctl map normal Super+Shift J send-layout-cmd rivertile "main-count +1" riverctl map normal Super+Shift K send-layout-cmd rivertile "main-count -1" # Super+Alt+{H,J,K,L} to move views riverctl map normal Super+Alt H move left 100 riverctl map normal Super+Alt J move down 100 riverctl map normal Super+Alt K move up 100 riverctl map normal Super+Alt L move right 100 # Super+Alt+Control+{H,J,K,L} to snap views to screen edges riverctl map normal Super+Alt+Control H snap left riverctl map normal Super+Alt+Control J snap down riverctl map normal Super+Alt+Control K snap up riverctl map normal Super+Alt+Control L snap right # Super+Alt+Shift+{H,J,K,L} to resize views riverctl map normal Super+Alt+Shift H resize horizontal -100 riverctl map normal Super+Alt+Shift J resize vertical 100 riverctl map normal Super+Alt+Shift K resize vertical -100 riverctl map normal Super+Alt+Shift L resize horizontal 100 # Super+Space to toggle float riverctl map normal Super Space toggle-float # Super+Shift+F to togglefullscreen riverctl map normal Super+Shift F toggle-fullscreen # Tags for i in $(seq 1 4) do tags=$((1 << (i - 1))) # Super+[1-4] to focus tag [0-3] riverctl map normal Super "${i}" set-focused-tags "${tags}" # Super+Shift+[1-4] to tag focused view with tag [0-3] riverctl map normal Super+Shift "${i}" set-view-tags "${tags}" # Super+Control+[1-4] to toggle focus of tag [0-3] riverctl map normal Super+Control "${i}" toggle-focused-tags "${tags}" # Super+Shift+Control+[1-4] to toggle tag [0-3] of focused view riverctl map normal Super+Shift+Control "${i}" toggle-view-tags "${tags}" done # Super+0 to focus all tags # Super+Shift+0 to tag focused view with all tags 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}" # Configure the keyboard layout riverctl keyboard-layout gb # Set the default layout generator to be rivertile and start it. # River will send the process group of the init executable SIGTERM on exit. riverctl default-layout rivertile rivertile -view-padding 3 -outer-padding 6 -main-location right -main-ratio 0.5 &