files: river: Store log of autostart programs, set up some keybinds

impermanence
Luis Guilherme Coelho 2024-04-20 13:35:13 -03:00
parent ed4142b7a8
commit e473fefb06
No known key found for this signature in database
GPG Key ID: 1F2E76ACE3F531C8
1 changed files with 72 additions and 43 deletions

View File

@ -3,11 +3,17 @@
# Please, no cursor ___________________________________________________________ # Please, no cursor ___________________________________________________________
riverctl hide-cursor when-typing enabled riverctl hide-cursor when-typing enabled
# Hibernate when lid is closed ________________________________________________
riverctl declare-mode wlrctl
for mode in locked normal wlrctl; do
riverctl map-switch $mode lid close "doas zzz"
done
# Decorations _________________________________________________________________ # Decorations _________________________________________________________________
# wallpaper # wallpaper
setsid -f swww-daemon & setsid -f swww-daemon &
swww img ~/media/pictures/wallpapers/wall.png -t none swww img ~/media/pictures/wallpapers/wall.png -t none &
# Set background and border color # Set background and border color
riverctl border-color-focused 0x8581e0 riverctl border-color-focused 0x8581e0
@ -44,7 +50,7 @@ riverctl set-repeat 50 300
riverctl map normal Super+Shift Q exit riverctl map normal Super+Shift Q exit
## cycle layout ## cycle layout
riverctl Super Space send-layout-cmd "riverguile cycle-layout" #riverctl Super Space send-layout-cmd "riverguile cycle-layout"
# toggle monocle layout # toggle monocle layout
riverctl map normal Super M send-layout-cmd rivercarro "main-location monocle" riverctl map normal Super M send-layout-cmd rivercarro "main-location monocle"
@ -54,19 +60,39 @@ riverctl map normal Super T send-layout-cmd rivercarro "main-location left"
riverctl map normal Super H send-layout-cmd rivercarro "main-ratio -0.05" riverctl map normal Super H send-layout-cmd rivercarro "main-ratio -0.05"
riverctl map normal Super L send-layout-cmd rivercarro "main-ratio +0.05" riverctl map normal Super L send-layout-cmd rivercarro "main-ratio +0.05"
# Super+Shift+H and Super+Shift+L to (re)move views from rivercarro(1) main # Super+Shift+H and Super+Alt+L to (re)move views from rivercarro(1) main
riverctl map normal Super+Shift H send-layout-cmd rivercarro "main-count +1" riverctl map normal Super+Alt+Control H send-layout-cmd rivercarro "main-count +1"
riverctl map normal Super+Shift L send-layout-cmd rivercarro "main-count -1" riverctl map normal Super+Alt+Control L send-layout-cmd rivercarro "main-count -1"
# Super+J and Super+K to focus the next/previous view in the layout stack # Super+J and Super+K to focus the next/previous view in the layout stack
riverctl map normal Super Tab focus-view next riverctl map normal Super Tab focus-view next
riverctl map normal Super+Shift Tab focus-view previous riverctl map normal Super+Shift Tab focus-view previous
# Super+Return to bump the focused view to the top of the layout stack # Super+Return to bump the focused view to the top of the layout stack
#riverctl map normal Super Return zoom
## view related keybindings ___________________________________________________ ## view related keybindings ___________________________________________________
riverctl map normal Super w enter-mode "wlrctl"
riverctl map wlrctl Super w enter-mode "normal"
riverctl map wlrctl Super Escape enter-mode "normal"
# Super+{H,J,K,L} to move the cursor
riverctl map -repeat wlrctl Super H spawn "wlrctl pointer move -10 0"
riverctl map -repeat wlrctl Super J spawn "wlrctl pointer move 0 10"
riverctl map -repeat wlrctl Super K spawn "wlrctl pointer move 0 -10"
riverctl map -repeat wlrctl Super L spawn "wlrctl pointer move 10 0"
# Super+Shift+{H,J,K,L} to scroll the window under the cursor
riverctl map -repeat wlrctl Super+Shift H spawn "wlrctl pointer scroll -10 0"
riverctl map -repeat wlrctl Super+Shift J spawn "wlrctl pointer scroll 0 10"
riverctl map -repeat wlrctl Super+Shift K spawn "wlrctl pointer scroll 0 -10"
riverctl map -repeat wlrctl Super+Shift L spawn "wlrctl pointer scroll 10 0"
# Super+Alt+{H,J,K} to left, middle, right click
riverctl map wlrctl Super+Alt H spawn "wlrctl pointer click left"
riverctl map wlrctl Super+Alt J spawn "wlrctl pointer click middle"
riverctl map wlrctl Super+Alt K spawn "wlrctl pointer click right"
# Super+Control+{H,J,K,L} to swap views # Super+Control+{H,J,K,L} to swap views
riverctl map -repeat normal Super+Shift H swap left riverctl map -repeat normal Super+Shift H swap left
riverctl map -repeat normal Super+Shift J swap down riverctl map -repeat normal Super+Shift J swap down
@ -95,13 +121,13 @@ riverctl map-pointer normal Super BTN_RIGHT resize-view
riverctl map-pointer normal Super BTN_MIDDLE toggle-float riverctl map-pointer normal Super BTN_MIDDLE toggle-float
# Super+Space to toggle float # Super+Space to toggle float
riverctl map normal Super Space toggle-float riverctl map normal Super f toggle-float
# Super+F to toggle fullscreen # Super+F to toggle fullscreen
riverctl map normal Super F toggle-fullscreen riverctl map normal Super F11 toggle-fullscreen
# Super+T to toggle top # Super+T to toggle top
riverctl map normal Super T zoom riverctl map normal Super Space zoom
# close the focused view # close the focused view
riverctl map normal Super q close riverctl map normal Super q close
@ -144,34 +170,38 @@ riverctl map normal Super g spawn "$TERMINAL -e guix repl"
# go to last tag # go to last tag
riverctl map normal Super Escape focus-previous-tags riverctl map normal Super Escape focus-previous-tags
for i in $(seq 1 7); do for mode in normal wlrctl; do
for i in $(seq 1 7); do
tags=$((1 << ($i - 1))) tags=$((1 << ($i - 1)))
# Super+[1-8] to focus tag [0-7] # Super+[1-8] to focus tag [0-7]
riverctl map normal Super $i set-focused-tags $tags riverctl map $mode Super $i set-focused-tags $tags
# Super+Shift+[1-8] to tag focused view with tag [0-7] # Super+Shift+[1-8] to tag focused view with tag [0-7]
riverctl map normal Super+Shift $i set-view-tags $tags riverctl map $mode Super+Shift $i set-view-tags $tags
# Super+Control+[1-8] to toggle focus of tag [0-7] # Super+Control+[1-8] to toggle focus of tag [0-7]
riverctl map normal Super+Control $i toggle-focused-tags $tags riverctl map $mode Super+Control $i toggle-focused-tags $tags
# Super+Shift+Control+[1-8] to toggle tag [0-7] of focused view # Super+Shift+Control+[1-8] to toggle tag [0-7] of focused view
riverctl map normal Super+Shift+Control $i toggle-view-tags $tags riverctl map $mode Super+Shift+Control $i toggle-view-tags $tags
done
done done
scratch_tag=$((1 << 7)) scratch_tag=$((1 << 7))
# toggle the scratchpad for mode in normal wlrctl; do
riverctl map normal Super period toggle-focused-tags ${scratch_tag} # toggle the scratchpad
riverctl map $mode Super period toggle-focused-tags ${scratch_tag}
# send windows to the scratchpad # send windows to the scratchpad
riverctl map normal Super+Shift period set-view-tags ${scratch_tag} riverctl map $mode Super+Shift period set-view-tags ${scratch_tag}
# Super+0 to focus all tags # Super+0 to focus all tags
# Super+Shift+0 to tag focused view with all tags # Super+Shift+0 to tag focused view with all tags
all_tags=$(((1 << 7) - 1)) all_tags=$(((1 << 7) - 1))
riverctl map normal Super 0 set-focused-tags $all_tags riverctl map $mode Super 0 set-focused-tags $all_tags
riverctl map normal Super+Shift 0 set-view-tags $all_tags riverctl map $mode Super+Shift 0 set-view-tags $all_tags
done
## Clipboard related keybindings ______________________________________________ ## Clipboard related keybindings ______________________________________________
@ -179,15 +209,15 @@ riverctl map normal Super+Shift 0 set-view-tags $all_tags
riverctl map normal Super V spawn "wl-paste | xargs vid" riverctl map normal Super V spawn "wl-paste | xargs vid"
riverctl map normal Super+Shift V spawn "wl-paste | xargs vd" riverctl map normal Super+Shift V spawn "wl-paste | xargs vd"
riverctl map normal Super P \ riverctl map normal None Print \
spawn 'grim -g "$(slurp)" -t png - | wl-copy -t image/png' spawn 'grim -g "$(slurp)" -t png - | wl-copy -t image/png'
# screenshot (TODO: fix) # screenshot (TODO: fix)
# riverctl map normal PrintScreen \ riverctl map normal Super Print \
# spawn "grim ~/media/pictures/screenshots/$(date +'%Y-%m-%d--%H-%M-%S.png')" spawn 'grim -g "$(slurp)" ~/media/pictures/screenshots/$(date +%Y-%m-%d--%H-%M-%S.png)'
## Audio related keybindings __________________________________________________ ## Audio related keybindings __________________________________________________
for mode in normal locked for mode in normal locked wlrctl
do do
riverctl map -repeat $mode None XF86AudioRaiseVolume \ riverctl map -repeat $mode None XF86AudioRaiseVolume \
spawn 'wpctl set-volume -l 2.0 @DEFAULT_AUDIO_SINK@ 1%+' spawn 'wpctl set-volume -l 2.0 @DEFAULT_AUDIO_SINK@ 1%+'
@ -227,11 +257,11 @@ riverctl map normal Super+Shift S \
# normal mode. This makes it useful for testing a nested wayland compositor # normal mode. This makes it useful for testing a nested wayland compositor
riverctl declare-mode passthrough riverctl declare-mode passthrough
# Super+F11 to enter passthrough mode # Super+F12 to enter passthrough mode
riverctl map normal Super F11 enter-mode passthrough riverctl map normal Super F12 enter-mode passthrough
# Super+F11 to return to normal mode # Super+F12 to return to normal mode
riverctl map passthrough Super F11 enter-mode normal riverctl map passthrough Super F12 enter-mode normal
# Application rules ___________________________________________________________ # Application rules ___________________________________________________________
@ -251,21 +281,20 @@ riverctl map passthrough Super F11 enter-mode normal
# Autostart applications ______________________________________________________ # Autostart applications ______________________________________________________
dbus-update-activation-environment DISPLAY WAYLAND_DISPLAY XDG_CURRENT_DESKTOP=river dbus-update-activation-environment DISPLAY WAYLAND_DISPLAY XDG_CURRENT_DESKTOP=river
~/.guix-home/profile/libexec/xdg-desktop-portal-wlr -r & riverctl spawn "~/.guix-home/profile/libexec/xdg-desktop-portal-wlr -r >> ~/.local/state/log/xdg-desktop-portal.log 2>&1"
~/.guix-home/profile/libexec/xdg-desktop-portal -r & riverctl spawn "~/.guix-home/profile/libexec/xdg-desktop-portal -r >> ~/.local/state/log/xdg-desktop-portal.log 2>&1"
# status bar # status bar
riverctl spawn waybar riverctl spawn "waybar >> ~/.local/state/log/waybar.log 2>&1"
# password manager # password manager
riverctl spawn keepassxc riverctl spawn "keepassxc >> ~/.local/state/log/keepassxc.log 2>&1"
# notifications # notifications
riverctl spawn fnott riverctl spawn "fnott >> ~/.local/state/log/fnott.log 2>&1"
# messengers # messengers
riverctl spawn telegram-desktop riverctl spawn "telegram-desktop >> ~/.local/state/log/telegram-desktop.log 2>&1"
# wayneko # wayneko
riverctl spawn "wayneko --background-colour 0x606060" riverctl spawn "wayneko --background-colour 0x606060"