mirror of
https://codeberg.org/andyscott/dotfiles.git
synced 2024-12-22 18:03:11 -05:00
217 lines
7.4 KiB
Bash
217 lines
7.4 KiB
Bash
#!/bin/sh
|
|
|
|
# Start kitty
|
|
riverctl map normal Super Return spawn kitty
|
|
|
|
# Start fuzzel
|
|
riverctl map normal Super Space spawn fuzzel
|
|
|
|
# Logout
|
|
riverctl map normal Super End spawn "wleave -p layer-shell"
|
|
|
|
# Close the focused view
|
|
riverctl map normal Super Q close
|
|
|
|
# Exit river
|
|
riverctl map normal Super+Shift E exit
|
|
|
|
# Focus the next/previous view in the layout stack
|
|
riverctl map normal Super J focus-view next
|
|
riverctl map normal Super K focus-view previous
|
|
|
|
# Swap the focused view with the next/previous view in the layout stack
|
|
riverctl map normal Super+Shift J swap next
|
|
riverctl map normal Super+Shift K swap previous
|
|
|
|
# Focus the next/previous output
|
|
riverctl map normal Super L focus-output next
|
|
riverctl map normal Super H focus-output previous
|
|
|
|
# Send the focused view to the next/previous output
|
|
riverctl map normal Super+Shift Grave send-to-output next
|
|
riverctl map normal Super Grave send-to-output previous
|
|
|
|
# Bump the focused view to the top of the layout stack
|
|
riverctl map normal Super+Shift Return zoom
|
|
|
|
# Increase/decrease the main ratio of rivertile(1)
|
|
riverctl map normal Super+Alt+Shift L send-layout-cmd rivertile "main-ratio -0.05"
|
|
riverctl map normal Super+Alt+Shift H send-layout-cmd rivertile "main-ratio +0.05"
|
|
|
|
# Increment/decrement the main count of rivertile(1)
|
|
riverctl map normal Super+Alt+Shift J send-layout-cmd rivertile "main-count +1"
|
|
riverctl map normal Super+Alt+Shift K send-layout-cmd rivertile "main-count -1"
|
|
|
|
# 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
|
|
|
|
# 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
|
|
|
|
# Resize views
|
|
riverctl map normal Super Right resize horizontal -100
|
|
riverctl map normal Super Up resize vertical 100
|
|
riverctl map normal Super Down resize vertical -100
|
|
riverctl map normal Super Left resize horizontal 100
|
|
|
|
# Move views with mouse
|
|
riverctl map-pointer normal Super BTN_LEFT move-view
|
|
|
|
# Resize views with mouse
|
|
riverctl map-pointer normal Super BTN_RIGHT resize-view
|
|
|
|
# Toggle float with mouse
|
|
riverctl map-pointer normal Super BTN_MIDDLE toggle-float
|
|
|
|
for i in $(seq 1 9)
|
|
do
|
|
tags=$((1 << ($i - 1)))
|
|
|
|
# Super+[1-9] to focus tag [0-8]
|
|
riverctl map normal Super $i set-focused-tags $tags
|
|
|
|
# Super+Shift+[1-9] to tag focused view with tag [0-8]
|
|
riverctl map normal Super+Shift $i set-view-tags $tags
|
|
|
|
# Super+Control+[1-9] to toggle focus of tag [0-8]
|
|
riverctl map normal Super+Control $i toggle-focused-tags $tags
|
|
|
|
# Super+Shift+Control+[1-9] to toggle tag [0-8] 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
|
|
|
|
# Toggle float
|
|
riverctl map normal Super S toggle-float
|
|
|
|
# Toggle fullscreen
|
|
riverctl map normal Super F toggle-fullscreen
|
|
|
|
# Change layout
|
|
riverctl map normal Super+Shift K send-layout-cmd rivertile "main-location top"
|
|
riverctl map normal Super+Shift L send-layout-cmd rivertile "main-location right"
|
|
riverctl map normal Super+Shift J send-layout-cmd rivertile "main-location bottom"
|
|
riverctl map normal Super+Shift H send-layout-cmd rivertile "main-location left"
|
|
|
|
# Declare a passthrough mode. This mode has only a single mapping to return to
|
|
# normal mode. This makes it useful for testing a nested wayland compositor
|
|
riverctl declare-mode passthrough
|
|
|
|
# Enter passthrough mode
|
|
riverctl map normal Super F11 enter-mode passthrough
|
|
|
|
# Return to normal mode
|
|
riverctl map passthrough Super F11 enter-mode normal
|
|
|
|
{{ if (or (eq .chezmoi.hostname "helix") (eq .chezmoi.hostname "triangulum")) -}}
|
|
|
|
# Function/Media keys
|
|
for mode in normal locked
|
|
do
|
|
|
|
# Volume
|
|
|
|
riverctl map $mode None XF86AudioMute spawn 'pactl set-sink-mute @DEFAULT_SINK@ toggle'
|
|
riverctl map $mode None XF86AudioLowerVolume spawn 'pactl set-sink-volume @DEFAULT_SINK@ -5%'
|
|
riverctl map $mode None XF86AudioRaiseVolume spawn 'pactl set-sink-volume @DEFAULT_SINK@ +5%'
|
|
riverctl map $mode None XF86AudioMicMute spawn 'pactl set-source-mute @DEFAULT_SOURCE@ toggle'
|
|
|
|
# Backlight
|
|
riverctl map $mode None XF86MonBrightnessDown spawn 'light -U 5'
|
|
riverctl map $mode None XF86MonBrightnessUp spawn 'light -A 5'
|
|
|
|
# Display
|
|
#riverctl map $mode None XF86Display spawn ''
|
|
|
|
# WiFi
|
|
riverctl map $mode None XF86WLAN spawn 'toggle-wifi'
|
|
|
|
# Notifications
|
|
#riverctl map $mode None XF86NotificationCenter spawn ''
|
|
|
|
# Phone
|
|
#riverctl map $mode None XF86PickupPhone spawn ''
|
|
#riverctl map $mode None XF86HangupPhone spawn ''
|
|
|
|
# Favorites
|
|
#riverctl map $mode None XF86Favorites spawn ''
|
|
|
|
done
|
|
{{- end }}
|
|
|
|
# Set background and border
|
|
riverctl background-color 0x323d43
|
|
riverctl border-color-focused 0xd8caac
|
|
riverctl border-color-unfocused 0x525c62
|
|
riverctl border-color-urgent 0xe68183
|
|
riverctl border-width 1
|
|
|
|
# Keyboard repeat rate
|
|
riverctl set-repeat 50 300
|
|
{{- if eq .chezmoi.hostname "helix" }}
|
|
|
|
# Touchpad
|
|
riverctl input pointer-2-7-SynPS/2_Synaptics_TouchPad accel-profile adaptive
|
|
riverctl input pointer-2-7-SynPS/2_Synaptics_TouchPad pointer-accel .5
|
|
riverctl input pointer-2-7-SynPS/2_Synaptics_TouchPad drag enabled
|
|
riverctl input pointer-2-7-SynPS/2_Synaptics_TouchPad disable-while-typing enabled
|
|
riverctl input pointer-2-7-SynPS/2_Synaptics_TouchPad middle-emulation enabled
|
|
riverctl input pointer-2-7-SynPS/2_Synaptics_TouchPad tap enabled
|
|
riverctl input pointer-2-7-SynPS/2_Synaptics_TouchPad tap-button-map left-right-middle
|
|
riverctl input pointer-2-7-SynPS/2_Synaptics_TouchPad scroll-method two-finger
|
|
|
|
# Lid switch
|
|
riverctl map-switch normal lid close 'waylock-launcher'
|
|
{{- end }}
|
|
|
|
### "rule-add" not implemented yet???
|
|
# Make all views with an app-id that starts with "float" and title "foo" start floating.
|
|
# riverctl rule-add float -app-id 'Bitwarden'
|
|
# riverctl rule-add float -app-id 'Blueman-manager'
|
|
# riverctl rule-add float -app-id 'Galculator' -title 'galculator'
|
|
# riverctl rule-add float -app-id 'KeePassXC'
|
|
# riverctl rule-add float -app-id 'Lutris'
|
|
# riverctl rule-add float -app-id 'Mousepad'
|
|
# riverctl rule-add float -app-id 'Steam'
|
|
# riverctl rule-add float -app-id 'vlc'
|
|
|
|
# Make all views with app-id "bar" and any title use client-side decorations
|
|
# riverctl rule-add csd -app-id "bar"
|
|
|
|
# Default layout generator - rivertile(1)
|
|
riverctl default-layout rivertile
|
|
rivertile -view-padding 4 -outer-padding 4 -main-ratio .5 &
|
|
|
|
# Autostart
|
|
/usr/lib/at-spi-bus-launcher --launch-immediately &
|
|
/usr/lib/polkit-gnome/polkit-gnome-authentication-agent-1 &
|
|
gnome-keyring-daemon --start --components=pkcs11 &
|
|
gnome-keyring-daemon --start --components=secrets &
|
|
gnome-keyring-daemon --start --components=ssh &
|
|
kanshi &
|
|
pipewire-launcher &
|
|
swayidle-launcher &
|
|
waybar-launcher &
|
|
dunst &
|
|
gammastep -r &
|
|
river-tag-overlay &
|
|
{{- if eq .chezmoi.hostname "hydrus" }}
|
|
swaybg -m fill -i ${HOME}/Pictures/Wallpapers/dark-forest-path.jpg &
|
|
{{- else if eq .chezmoi.hostname "helix" }}
|
|
swaybg -m center -i "${HOME}/Pictures/Wallpapers/Mountain Retreat.jpg" &
|
|
{{- end }}
|
|
blueman-applet &
|
|
evolution &
|
|
mattermost-desktop &
|
|
sleep 5 && nextcloud --background &
|