diff options
| author | Mitchell Riedstra <mitch@riedstra.dev> | 2025-11-27 01:08:37 -0500 |
|---|---|---|
| committer | Mitchell Riedstra <mitch@riedstra.dev> | 2025-11-27 01:08:37 -0500 |
| commit | 488dec64b403ae4aba65cad0e46b4d2767f0b2dd (patch) | |
| tree | a12d6319d4706fdfb25b5938fe76d1c2a9711482 /river/init | |
| parent | a9f6e9b1f1c0e4f0a628954e3427bf5020d486c0 (diff) | |
| download | rivercfg-488dec64b403ae4aba65cad0e46b4d2767f0b2dd.tar.gz rivercfg-488dec64b403ae4aba65cad0e46b4d2767f0b2dd.tar.xz | |
Automatic light/dark mode switching. What a pain.
Diffstat (limited to 'river/init')
| -rwxr-xr-x | river/init | 38 |
1 files changed, 27 insertions, 11 deletions
@@ -1,5 +1,6 @@ #!/bin/sh +XDG_CONFIG_HOME="${XDG_CONFIG_HOME:-$HOME/.config}" # This is the example configuration file for river. # # If you wish to edit this, you will probably want to copy it to @@ -13,8 +14,12 @@ # Super+Shift+Return to start an instance of foot (https://codeberg.org/dnkl/foot) # riverctl map normal Super+Shift Return spawn foot # riverctl map normal Super Return spawn alacritty -riverctl map normal Super Return spawn foot -riverctl map normal Super+Shift Return spawn 'foot -c "$HOME/.config/foot/light.ini"' +# riverctl map normal Super Return spawn foot + +foot --server & +riverctl map normal Super Return spawn footclient +riverctl map normal Super M spawn "${XDG_CONFIG_HOME}"/river/theme_helper +riverctl map normal Super+Shift b spawn footclient btop # Super+Q to close the focused view riverctl map normal Super+Shift Q close @@ -172,11 +177,11 @@ riverctl rule-add -app-id "bar" csd riverctl default-layout rivertile rivertile -view-padding 10 -outer-padding 0 & -riverctl map normal Super Equal spawn "$HOME/.config/river/padding_helper 0 25" -riverctl map normal Super Minus spawn "$HOME/.config/river/padding_helper 0 -25" +riverctl map normal Super Equal spawn "${XDG_CONFIG_HOME}/river/padding_helper 0 25" +riverctl map normal Super Minus spawn "${XDG_CONFIG_HOME}/river/padding_helper 0 -25" -riverctl map normal Super+Shift Equal spawn "$HOME/.config/river/padding_helper 10 0" -riverctl map normal Super+Shift Minus spawn "$HOME/.config/river/padding_helper -10 0" +riverctl map normal Super+Shift Equal spawn "${XDG_CONFIG_HOME}/river/padding_helper 10 0" +riverctl map normal Super+Shift Minus spawn "${XDG_CONFIG_HOME}/river/padding_helper -10 0" riverctl map normal Super+Control L spawn swaylock riverctl map normal Super D spawn bemenu-run @@ -203,15 +208,23 @@ if ! pgrep waybar >/dev/null 2>&1 ; then waybar & fi -"$HOME"/.config/river/pointer +"${XDG_CONFIG_HOME}"/river/pointer if ! pgrep swaybg >/dev/null 2>&1 ; then - swaybg -i .wallpaper.jpg & + echo "" + # swaybg -i .wallpaper.jpg & fi # If Chromium dialogs aren't working these are suspect dbus-update-activation-environment --systemd WAYLAND_DISPLAY "XDG_CURRENT_DESKTOP=$XDG_CURRENT_DESKTOP" systemctl --user restart xdg-desktop-portal +# I hate calling this directly but the systemd unit is bugged on arch at +# least, running it by hand appears to work just fine +_gtk_portal=/usr/lib/xdg-desktop-portal-gtk +if [ -x "$_gtk_portal" ] ; then + "$_gtk_portal" & +fi + riverctl rule-add -title '*Firefox*' ssd riverctl rule-add -app-id '*chromium*' ssd riverctl rule-add -title '*paypal*' float @@ -224,6 +237,9 @@ riverctl rule-add -app-id "*evolution*" tags $((1 << (8 - 1))) riverctl rule-add -app-id "*pavu*" ssd riverctl rule-add -app-id "*blueman*" ssd -. ~/.kshrc -checkSSHAgent -k -checkSSHAgent +if [ -e ~/.kshrc ] ; then + . ~/.kshrc + checkSSHAgent -k + checkSSHAgent +fi + |
