#!/usr/bin/env fish riverctl background-color 0xfaf4ed riverctl spawn swaylock # fix some environment issues dbus-update-activation-environment --systemd XCURSOR_THEME XCURSOR_SIZE DISPLAY WAYLAND_DISPLAY XDG_CURRENT_DESKTOP riverctl map normal None Print spawn 'grim -l 0 -g "$(slurp)" - | wl-copy --type image/png' riverctl map normal Super R spawn fuzzel riverctl map normal Super+Shift Return spawn foot riverctl map normal Super Q close riverctl map normal Control+Shift Escape spawn "systemctl suspend && swaylock" riverctl map normal Control+Alt Escape exit riverctl map normal Super J focus-view next riverctl map normal Super K focus-view previous riverctl map normal Super+Shift J swap next riverctl map normal Super+Shift K swap previous 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 riverctl map normal Super Return zoom riverctl map normal Super H send-layout-cmd wideriver "--ratio -0.05" riverctl map normal Super L send-layout-cmd wideriver "--ratio +0.05" riverctl map normal Super+Shift L send-layout-cmd wideriver "--count +1" riverctl map normal Super+Shift H send-layout-cmd wideriver "--count -1" 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 for i in (seq 1 10) set -l tags (echo "print(1 << ($i - 1))" | lua) echo $tags set -l name $i if test $i -eq 10 set name "S" end # Super+[1-9] -> focus tag [0-8] riverctl map normal Super $name spawn "riverctl set-focused-tags $tags & ~/.config/scripts/set-background.fish $i" # Super+Shift+[1-9] -> tag focused view with tag [0-8] riverctl map normal Super+Shift $name set-view-tags $tags # Super+Control+[1-9] -> toggle focus of tag [0-8] riverctl map normal Super+Control $name toggle-focused-tags $tags # Super+Shift+Control+[1-9] -> toggle tag [0-8] of focused view riverctl map normal Super+Shift+Control $name toggle-view-tags $tags end # Super+0 -> focus all tags # Super+Shift+0 -> tag focused view with all tags # (1 << 32) - 1 set -l all_tags 4294967295 riverctl map normal Super 0 set-focused-tags $all_tags riverctl map normal Super+Shift 0 set-view-tags $all_tags riverctl map normal Super Space toggle-float riverctl map normal Super F toggle-fullscreen riverctl map normal Super Up send-layout-cmd rivertile "main-location top" riverctl map normal Super Right send-layout-cmd rivertile "main-location right" riverctl map normal Super Down send-layout-cmd rivertile "main-location bottom" riverctl map normal Super Left send-layout-cmd rivertile "main-location left" for mode in normal locked # volume control riverctl map $mode None XF86AudioRaiseVolume spawn "wpctl set-volume @DEFAULT_SINK@ 5%+" riverctl map $mode None XF86AudioLowerVolume spawn "wpctl set-volume @DEFAULT_SINK@ 5%-" riverctl map $mode None XF86AudioMute spawn "wpctl set-mute @DEFAULT_SINK@ toggle" # playerctl riverctl map $mode None XF86AudioMedia spawn "playerctl play-pause" riverctl map $mode None XF86AudioPlay spawn "playerctl play-pause" riverctl map $mode None XF86AudioPrev spawn "playerctl previous" riverctl map $mode None XF86AudioNext spawn "playerctl next" riverctl map-pointer $mode Super BTN_SIDE spawn "playerctld shift" riverctl map-pointer $mode Super BTN_EXTRA spawn "playerctld unshift" end riverctl focus-follows-cursor always riverctl set-cursor-warp on-focus-change riverctl set-repeat 50 300 riverctl rule-add ssd # wideriver layout generator riverctl default-layout wideriver # kill old processes pkill awww-daemon pkill fnott pkill playerctld pkill yambar pkill kanshi pkill mpd-mpris pkill wideriver # spawn new ones riverctl spawn "awww-daemon --format xrgb" riverctl spawn fnott riverctl spawn "playerctld daemon" riverctl spawn kanshi riverctl spawn mpd-mpris riverctl spawn "wideriver \ --layout left \ --stack dwindle \ --count 1 \ --ratio 0.55 \ --inner-gaps 14 \ --border-width 0 \ --outer-gaps 14" # set initial bg ~/.config/scripts/set-background.fish 1