diff --git a/etc/skel/.config/river/init b/etc/skel/.config/river/init index 93dafb8..34dec9c 100755 --- a/etc/skel/.config/river/init +++ b/etc/skel/.config/river/init @@ -1,15 +1,35 @@ #!/usr/bin/env bash +# Set keyboard layout. See man riverctl +# riverctl keyboard-layout -options "grp:caps_toggle" "us,ru" + # Binding to reload the configuration (good for edits on bindings or adding new stuff riverctl map normal "Mod4" R spawn $HOME/.config/river/init +# Polkit agent +riverctl spawn "/usr/bin/mate-polkit" + +# Wallpaper +riverctl spawn $HOME/.azotebg + +# Waybar +riverctl spawn $HOME/.config/river/waybar.sh + # Include keybindings riverctl spawn $HOME/.config/river/keybindings.sh +# Clipboard daemon +pkill wl-paste +wl-paste --watch cliphist store & disown + +# Lock screen daemon +riverctl spawn $HOME/.config/river/screenlock.sh + # Set background and border color riverctl background-color 0x002b36 -riverctl border-color-focused 0x93a1a1 -riverctl border-color-unfocused 0x586e75 +riverctl border-color-focused 0x8aadf4 +riverctl border-color-unfocused 0xa5adcb +riverctl border-width 2 # Import environment variables to D-Bus and systemd VARIABLES="DISPLAY WAYLAND_DISPLAY XDG_CURRENT_DESKTOP XDG_SESSION_TYPE" diff --git a/etc/skel/.config/river/screenlock.sh b/etc/skel/.config/river/screenlock.sh new file mode 100755 index 0000000..6de6516 --- /dev/null +++ b/etc/skel/.config/river/screenlock.sh @@ -0,0 +1,13 @@ +#!/bin/bash + +lock="~/.config/swaylock/lock.sh" + +pkill swayidle +sleep 1s + +exec swayidle -w \ + timeout 240 'light -G > /tmp/brightness && light -S 10' resume 'light -S $([ -f /tmp/brightness ] && cat /tmp/brightness || echo 100%)' \ + timeout 300 $lock \ + before-sleep 'playerctl pause' \ + before-sleep $lock \ + lock $lock & disown diff --git a/etc/skel/.config/river/waybar.sh b/etc/skel/.config/river/waybar.sh new file mode 100755 index 0000000..b598e78 --- /dev/null +++ b/etc/skel/.config/river/waybar.sh @@ -0,0 +1,6 @@ +#!/bin/bash + +killall -q waybar +while pgrep -x waybar >/dev/null; do sleep 2s; done +exec waybar & disown +exit