aboutsummaryrefslogtreecommitdiff
path: root/riverrc
blob: 8970579bbb793655779a171c4257dce4d0db8a01 (plain) (blame)
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
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
#! /bin/sh

#
# wm independent hotkeys
#

# terminal emulator
riverctl map normal Super Return spawn alacritty

# program launcher
riverctl map normal Super A spawn "wofi -S run"

# lock screen
riverctl map normal Super L spawn waylock

# kill session completely
riverctl map normal Super+Alt O spawn "pkill -u ${USER}"

# kill session completely (force)
riverctl map normal Super+Alt+Shift O spawn "pkill -9 -u ${USER}"

# screenshot
riverctl map normal Super Print spawn 'grim -g "$(slurp)" - | tee "/tmp/screenshot_$(date +%Y-%m-%d_%H_%M_%S).png" | wl-copy'

# firefox
riverctl map normal Super+Shift F spawn firefox

# thunderbird
riverctl map normal Super+Shift L spawn thunderbird

# zathura
riverctl map normal Super+Shift Z spawn zathura

# aerc
riverctl map normal Super+Shift A spawn "alacritty -e ~/bin/start-aerc"

# signal
riverctl map normal Super+Shift S spawn signal-desktop

# element
riverctl map normal Super+Shift M spawn "LIBGL_ALWAYS_INDIRECT=1 element-desktop"

#
# river hotkeys
#

# quit river
riverctl map normal Super+Alt Q exit

# close focused window
riverctl map normal Super Q close

#
# state/flags
#

# toggle floating
riverctl map normal Super S toggle-float

# toggle fullscreen
riverctl map normal Super F toggle-fullscreen

#
# focus/swap
#

# focus next window
riverctl map normal Super J focus-view next

# focus previous window
riverctl map normal Super K focus-view previous

# focus next output
riverctl map normal Super Period focus-output next

# focus previous output
riverctl map normal Super Comma focus-output previous

# swap with next window
riverctl map normal Super+Shift J swap next

# swap with previous window
riverctl map normal Super+Shift K swap previous

# send to next output
riverctl map normal Super+Shift Period send-to-output next

# send to previous output
riverctl map normal Super+Shift Comma send-to-output previous

#
# move/resize
#

# expand floating window horizontally
riverctl map normal Super+Alt+Shift H resize horizontal -20

# expand floating window vertically
riverctl map normal Super+Alt+Shift J resize vertical 20

# contract floating window vertically
riverctl map normal Super+Alt+Shift K resize vertical -20

# contract floating window horizontally
riverctl map normal Super+Alt+Shift L resize horizontal 20

# move floating window left
riverctl map normal Super+Alt H move left 20

# move floating window down
riverctl map normal Super+Alt J move down 20

# move floating window up
riverctl map normal Super+Alt K move up 20

# move floating window right
riverctl map normal Super+Alt L move right 20

#
# tags
#

ALL_TAGS=$(((1 << 32) - 1))

for i in $(seq 1 9); do
	TAGS=$((1 << ($i - 1)))

	# focus tag
	riverctl map normal Super $i set-focused-tags ${TAGS}

	# tag focused window (toggle)
	riverctl map normal Super+Shift $i toggle-view-tags ${TAGS}

	# toggle tag focus
	riverctl map normal Super+Control $i toggle-focused-tags ${TAGS}
done

# focus all tags
riverctl map normal Super 0 set-focused-tags ${ALL_TAGS}

# tag focused window (all)
riverctl map normal Super+Shift 0 set-view-tags ${ALL_TAGS}

#
# init
#

dbus-update-activation-environment DISPLAY WAYLAND_DISPLAY XDG_CURRENT_DESKTOP=river

riverctl spawn "swayidle timeout 600 waylock timeout 900 \"wlopm --off '*'\" resume \"wlopm --on '*'\""

riverctl keyboard-layout $(cat ~/.kblayout)

riverctl border-width 0

riverctl spawn "river-bsp-layout -i 2 -o 5"
riverctl default-layout bsp-layout

riverctl spawn "swaybg -i ~/.wallpaper"

riverctl spawn waybar

killall -qw pipewire
riverctl spawn pipewire
while [ -z "$(pgrep -x pipewire)" ]; do false; done

killall -qw pipewire-pulse
riverctl spawn pipewire-pulse
while [ -z "$(pgrep -x pipewire-pulse)" ]; do false; done

killall -qw wireplumber
riverctl spawn wireplumber
while [ -z "$(pgrep -x wireplumber)" ]; do false; done

riverctl spawn wired