new river scripts

This commit is contained in:
William Ball 2026-03-05 19:41:33 -05:00
parent 9144c31f2c
commit c2764148c9
Signed by: wball
SSH key fingerprint: SHA256:3K3IvjUp1U5HwsIRYy/vosnG8l/A84LPUSAKQ6oCGKI
3 changed files with 30 additions and 6 deletions

View file

@ -10,6 +10,7 @@ emacs="emacsclient --create-frame --alternate-editor='emacs'"
mod=Super mod=Super
books="$HOME/.local/bin/books.sh" books="$HOME/.local/bin/books.sh"
papers="$HOME/.local/bin/papers.sh" papers="$HOME/.local/bin/papers.sh"
config="$HOME/.config/river"
wobsock=$XDG_RUNTIME_DIR/wob.sock wobsock=$XDG_RUNTIME_DIR/wob.sock
rm -f $wobsock && mkfifo $wobsock && tail -f $wobsock | wob & rm -f $wobsock && mkfifo $wobsock && tail -f $wobsock | wob &
@ -19,7 +20,8 @@ riverctl map normal $mod Return spawn $term_client
riverctl map normal $mod+Shift Return spawn $term riverctl map normal $mod+Shift Return spawn $term
riverctl map normal $mod R span "bemenu-run -p launch" riverctl map normal $mod R span "bemenu-run -p launch"
riverctl map normal $mod Semicolon spawn "bemenu-run -p launch" riverctl map normal $mod Semicolon spawn "bemenu-run -p launch"
riverctl map normal $mod+Shift P spawn "passmenu -p password" riverctl map normal $mod+Shift P spawn "$config/power_mode.sh"
# riverctl map normal $mod+Shift P spawn "passmenu -p password"
riverctl map normal $mod BracketRight spawn "$browser" riverctl map normal $mod BracketRight spawn "$browser"
riverctl map normal $mod T spawn "$email" riverctl map normal $mod T spawn "$email"
riverctl map normal $mod Z spawn "$books" riverctl map normal $mod Z spawn "$books"
@ -28,6 +30,8 @@ riverctl map normal $mod E spawn "$emacs"
riverctl map normal $mod+Control O spawn "swaylock" riverctl map normal $mod+Control O spawn "swaylock"
riverctl map normal $mod B spawn "bluetoothctl connect 88:C9:E8:D7:60:85" riverctl map normal $mod B spawn "bluetoothctl connect 88:C9:E8:D7:60:85"
riverctl map normal $mod+Shift B spawn "bluetoothctl disconnect 88:C9:E8:D7:60:85" riverctl map normal $mod+Shift B spawn "bluetoothctl disconnect 88:C9:E8:D7:60:85"
riverctl map normal $mod+Control S spawn "$config/screenshot.sh clip"
riverctl map normal $mod+Shift E spawn "$config/screenshot.sh menu"
# Close windows & exit wm # Close windows & exit wm
riverctl map normal $mod+Shift C close riverctl map normal $mod+Shift C close
@ -181,14 +185,14 @@ riverctl rule-add -app-id org.gnome.Boxes ssd
riverctl rule-add -app-id com.github.xournalpp.xournalpp ssd riverctl rule-add -app-id com.github.xournalpp.xournalpp ssd
# spawn stuff # spawn stuff
pgrep wbg || wbg ~/.config/river/wallpaper.jpg & pgrep swaybg || swaybg -i ~/.config/river/wallpaper.jpg &
wlr-randr --output eDP-1 --scale 1.25 & wlr-randr --output eDP-1 --scale 1.25 &
pgrep waybar || waybar & pgrep waybar || waybar &
# mako stuff # dunst stuff
pgrep mako || mako & pgrep dunst || dunst &
riverctl map normal $mod D spawn 'makoctl dismiss' riverctl map normal $mod D spawn 'dunstctl close'
riverctl map normal $mod+Shift D spawn 'makoctl dismiss --all' riverctl map normal $mod+Shift D spawn 'dunstctl close-all'
# bluetooth # bluetooth
blueman-applet & blueman-applet &

View file

@ -0,0 +1,3 @@
#!/bin/sh
echo -e "performance\nbalanced\npower-saver" | bemenu --center --list 3 -p "Power Mode" --border 2 --bdr "#f6c2e7" -W 0.5 | xargs tlpctl

View file

@ -0,0 +1,17 @@
#!/bin/sh
if [ $1 = "clip" ]; then
if grim -g "$(slurp)" - | wl-copy; then
notify-send "screenshot" "Saved to clipboard"
else
notify-send "screenshot" "Canceled"
fi
else
filename="$HOME/Downloads/$(echo '' | bemenu --ifne -p "Enter filename:")"
filename_ext="${filename%.png}.png"
if grim -g "$(slurp)" "$filename_ext"; then
notify-send "screenshot" "Saved as $filename_ext"
else
notify-send "screenshot" "Canceled"
fi
fi