summaryrefslogtreecommitdiff
path: root/desktop-wayland/.config/river/init
blob: f0d9b9d637556d2258fbac64795fda88e0068c89 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
# -------------------------------------------------------------------------------------------------
# Key bindings

# Workspaces
for i in $(seq 1 10); do
  tags=$((1 << ($i - 1)))
  n=$(($i % 10))
  riverctl map normal Super                $n  set-focused-tags $tags
  riverctl map normal Super+Shift          $n  set-view-tags $tags
  riverctl map normal Super+Control        $n  toggle-focused-tags $tags
  riverctl map normal Super+Shift+Control  $n  toggle-view-tags $tags
done

# Terminal
riverctl map normal Super                Return  spawn st
riverctl map normal Super+Shift          Return  spawn "st -e tmux"
riverctl map normal Super+Control        Return  spawn "st -z 24 -c Floating"
riverctl map normal Super+Shift+Control  Return  spawn "st -z 30"

# Notifications
# Redisplay last message(s).
riverctl map normal Control            grave   dunstctl history-pop
# Close notification.
riverctl map normal Control+Shift      grave   dunstctl close
# Close all notifications.
riverctl map normal Control+Shift+Alt  grave   dunstctl close-all
# Context menu.
riverctl map normal Control+Shift      period  dunstctl context

# Launcher
riverctl map normal Super Space spawn  'rofi -show drun -window-thumbnail -window-format "{w}   {t}"'
riverctl map normal Super P     spawn  "rofi-pass --last-used -lines 12"
riverctl map normal Super Q     spawn  \
  "rofi -show session-menu -modi 'session-menu:rofi-power-menu --choices=shutdown/reboot/logout/lockscreen'"

# Views (windows)
riverctl map normal Super F toggle-fullscreen
riverctl map normal Super S toggle-float
riverctl map normal Super T zoom

# Move between views
riverctl map normal Super              H  focus-view previous
riverctl map normal Super              J  focus-view next
riverctl map normal Super              K  focus-view previous
riverctl map normal Super              L  focus-view next

# Super+Alt+{H,J,K,L} to move views
riverctl map normal Super+Alt          H  move left 100
riverctl map normal Super+Alt          J  move down 100
riverctl map normal Super+Alt          K  move up 100
riverctl map normal Super+Alt          L  move right 100

# Super+Alt+Shift+{H,J,K,L} to resize views
riverctl map normal Super+Alt+Shift    H  resize horizontal -100
riverctl map normal Super+Alt+Shift    J  resize vertical 100
riverctl map normal Super+Alt+Shift    K  resize vertical -100
riverctl map normal Super+Alt+Shift    L  resize horizontal 100

# Screen
riverctl map normal Super Escape spawn screenlock-wayland

# Applications
riverctl map normal Super          N  spawn nautilus
riverctl map normal Super          O  spawn epiphany
riverctl map normal Super+Control  P  spawn epiphany --incognito-mode


# -------------------------------------------------------------------------------------------------
# Settings

riverctl keyboard-layout -rules evdev -model evdev -variant altgr-intl -options caps:escape us
riverctl focus-follows-cursor normal
riverctl output-layout rivertile
riverctl border-color-focused 0xfdf070
riverctl border-color-unfocused 0x345985

# -------------------------------------------------------------------------------------------------
# Rules

riverctl rule-add -app-id "Floating" float

# -------------------------------------------------------------------------------------------------
# Processes

riverctl spawn dunst
riverctl spawn waybar
riverctl spawn nm-applet
riverctl spawn "rivertile -view-padding 2 -outer-padding 1 -main-ratio 0.5"
riverctl spawn "swaybg -i /usr/local/share/backgrounds/dore-christ-leaving-the-praetorium.jpg"
riverctl spawn "dbus-update-activation-environment --systemd WAYLAND_DISPLAY XDG_CURRENT_DESKTOP=river"
riverctl spawn "systemctl --user import-environment WAYLAND_DISPLAY XDG_CURRENT_DESKTOP=river"
riverctl spawn "swayidle -w timeout 300 screenlock-wayland \
                            timeout 400 'wlr-randr --output eDP-1 --off' \
                            resume 'wlr-randr --output eDP-1 --on' \
                            before-sleep screenlock-wayland"