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
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
|
# Rahm's Rice'd Desktop Environment
This is Rahm's Desktop Environment. It is a *very* configured XMonad/XMobar
based desktop environment.
[](https://git.josher.dev/cgit/rde.git/)
# Requirements
* GHC
* X11
* Xinerama
* Monofur NERD Font. Should be included with the NERD fonts package.
* GCC
* Perl
* Knowledge of Linux/Unix
* Linux, maybe Mac
# Configuration
## Window Manager
The Window Manager is a *heavily* configured XMonad. Many of the keys are
designed to be reminiscent of Vim.
Similar to Vim, Rde contains within it, its own kind of "language" called WML
(Window management language) to describe workspaces and windows to make very
powerful key bindngs. See the section about Window Management Language.
### Some things to note
I type in Programmer Dvorak, which means some of the key bindings make more
sense on the Dvorak layout vs QWERTY layout, but many of the keybindings should
work well in both.
The mod key is by default set to the Hyper Key. One would probably want to
change this in `Main.hs` before using this. Chose the hyper key to avoid conflicts
with other applications.
## Bar
The Bar is XMobar, pretty heavily configured and leverages the number of scripts
that ship with Rde.
### Features
* OS Logo
* For Debian, Arch, Ubuntu and BSD
* Kernel version
* Shows workspace layout as icon
* Workspaces
* Red is current
* Blue is not current, but visible
* Gray is not visible
* Window Name
* Time
* CPU and Mem Usage displayed as dashes.
* Weather Info
* Spotify Info
* Bluetooth Info
* Battery Info
* Date
## Battery
XMobar's battery plugin is not quite good enough. I want to be able to display
an icon as I'm charging, etc. So, I included a battery monitor C program
designed to interface with XMobar. Namely the program is in
`xmobar/extras/battery/battery.c`.
## Weather
The Weather is controlled by a barely functional Perl script which Hard Codes
the weather station to KLMO (Longmont, CO). Maybe you should change that? The
TODO here is to use wttr.in, but I'm too lazy to fix it.
## Spotify
If you don't use Spotify, then I'm sorry. It's one of the pieces of proprietary
garbage (PG, for short) I allow on my system (along with the Nvidia Drivers and
Intel Management Sytem, ick).
Rde is admittedly coupled with Spotify, and contains a spotify-control
script to work with it. Maybe you should make that script work with your media
player?
## Bluetooth
The `bluetooth-select` script allows the user to connect to bluetooth devices.
If you haven't paired your bluetooth device yet, maybe you should use
`bluetoothctl`?
## Compositor
Picom/Compton is my compositor, and it mostly works, but sometimes doesn't.
## Window Management Language (WML)
There are some commands that operate on "Window Management Objects," (WMO) there
are two types of WMOs, Workspaces and Windows.
WML consists of "sentences," and sentences and objects to operate on. For example: typing `<M-g>a`
will "goto" the workspace 'a'. Typing `<M-w>s` will go to the window tagged with
's'. Thats pretty simple, However things get more complex. For example:
* `<M-s>\%@.,,^` Shift all windows not on the current workspace to the
workspace on the third monitor from the left.
* `<M-s>\%*_` Kill all the Windows not currently visible
* `<M-g>,.` Switch to the workspace to the right of the current workspace
* `<M-s>,,~@.,.` Move all but the last two windows on the current workspace to
the next monitor
* `<M-s>|@a@b.` Move all the windows on workspaces 'a' and 'b' to the current
workspace.
* `<M-s>%.<M-s>%:s` Float all windows.
* `<M-s>%.<M-s>%::s` Sink all windows.
* `<M-s>--` Undo the last shift.
It looks complicated, but it's actually quite simple. All WML "sentances" start
have a "verb", which is usually triggered with a mod key. What comes next
depends to the verb.
### Verbs
* `<M-g>[Workspace]` *goto*, jumps to a workspace
* `<M-s>[WindowSet][Workspace]` *shift*, shifts windows to a workspace.
* `<M-m>[WindowSet][:alpha:]` *mark*, marks a window with the given alpha
character.
* `<M-w>[WindowSet]` *navigate*, Navigates to the first window in the
referenced windowset.
#### Workspace Object
Workspace object describe a place where windows can go. In XMonad workspaces can
either be hidden or visible. On a multi monitor setup multiple workspaces may be
visible at a single time.
The base of the Workspace object is the workspace tag. These are any alpha
numeric characters and are referenced by their tag. Thus the keystroke 'a'
references the 'a' workspace, 'b' references the 'b' workspace, 'π' references
thes 'π' workspace (yes, any alphanumeric character work).
So `<M-g>a` will simply go to the 'a' workspace.
That's pretty simple, but things get more interesting when using special
workspaces.
* *x* | *x* is alphanumeric: the workspace with that tag
* `.`: The current workspace
* `[`: The next non-visible workspace to the right of this one.
* `]`: The next non-visible workspace to the left of this one.
* `(`: The next workspace to the right
* `)`: The next workspace to the left
* `^`: The workspace on the rightmost screen.
* `$`: The workspace on the leftmost screen.
* `,`: The workspace on the monitor to the right of the next typed workspace
(i.e. `,a` is the workspace to the right of workspace a. '
* `;`: Like `,`, but to the left.
* `:`: Delegates to the next workspace, but float windows sent to it. (i.e.
`<M-s>@.:.` will float all the windows on the current screen.
* `::`: Delegates to the next workspace, but sink windows sent to it. (i.e.
`<M-s>@.::.` will sink all the windows on the current screen.
* `/`: Search for a window and reference the workspace on that window.
* `@`: The workspace associated with the following window set object. (i.e.
`@a` references the workspace the window marked a is on)
* ` ` (space): The current workspace's associated workspace. The associated
workspace is the workspace with the tag of the toggled case (i.e.
Associated workspace for 'a' is 'A' and vice versa). Note that workspaces
with number tags do not have associated workspaces.
* `_`: The black hole "workspace." Cannot be travelled to, but sending a
window to it will kill it.
* `-`: The alternate workspace. Each window has an alternate workspace, which
is generally the last workspace that contained that window. Sending a
window to the alternate workspace will send it to the last workspace it was
a part of.
* `*`: The hidden workspace. Acts just like other base workspaces except that
it does not show up in the workspace list in XMobar and cannot be navigated
to using `[` or `]` .
#### WindowSet Objects
Window set object reference sets of windows. Operations that only require one
Window will use the first element in the windowset referenced.
Windows can be marked using the `M-m` verb.
Like workspaces, the base are alpha (non-numeric), and these referenced marked
windows, but there are also special marks and operators to better describe
exactly what one is wanting to do.
* *x* | x is alpha: The windows marked with *x*
* `.`: The current window.
* `^`: The window on the far left (across all screens)
* `$`: The window on the far right (across all screens)
* `'`: The last window
* `*`: All currently visible windows
* `-`: The windows used in the last command. (NOTE: <M-s>-- will send last
referenced windows to where they came from -- basically undo)
* `/`: Search for a window and select all the ones with that title
* `%`: All windows
* `_`: No windows
* `@`: All the windows on the next entered workspace. (i.e. @,. references
all windows on the creen to the right of the current workspace).
* `!`: The first window in the following windowset (i.e. !@.
references the master window on the current workspace).
* `:`: The floating windows.
* `,`: The following window set, but without the first element.
* `~`: The following window set, but reversed (i.e. `!~@.` references the
last window on the current workspace`
* `?`: takes two window sets, if the first one is empty, then return the
second one, otherwise return the first.
* `|`: The union of the next two window sets (i.e. `|@.a` is the union of
the windows on the current workspace and the windows marked with 'a'.
* `&`: The intersection between the next two window sets.
* `\`: The difference between two window sets. (i.e. `\%a` references all
windows except those marked with 'a')
#### Revisiting Examples
* `<M-s>\%@.,,^` *Shift all windows not on the current workspace to the
workspace on the third monitor from the left.*
* `<M-s>`: we're shifting windows to a workspace.
* `\%@.`: All windows not on the current workspace (`\\` is the set
difference operator, `%` is all windows, `@.` is all windows on the
current workspace)
* `,,^`: Third screen from the left. `^` references the far left screen,
the `,` (applied twice) shifts that to the right once.
* `<M-s>\%*_` *Kill all the Windows not currently visible*
* `<M-s>` we're shifting windows.
* `\%*` All windows except those visible.
* `_` The black hole workspace. Kills windows sent to it.
* `<M-s>,,~@.,.` *Move all but the last two windows on the current workspace to
the next monitor*
* `<M-s>`: We're shifting windows to a workspace
* `,,~@.`: `@.` references the windows on the current workspace, `~`
reverses that list, and `,` (applied twice) takes the first element off
the list. So it's all windows on the current workspace, except the last
two.
* `,.`: The workspace on the screen to the right.
* `<M-s>%.<M-s>%:-`: *Float all windows*
* `<M-s>%.` Moves all the windows to the current workspace.
* `<M-s>%:.` Moves all the windows back to where they came from, but
floats them.
#### Some Identities
* `<M-s>..` is a No-op. It move the current window to the current workspace,
which does nothing.
* `&x_` References nothing for any x because `_` is the empty windowset.
* `|_x` References x for any x.
* `<M-g>.` Is a No-op. It just goes to the current workspace
* `<M-s>@xx` is a no-op for any x because it just moves all windows on
workspace x to worksapce x.
* `,;x` is just references x for any x because the `;` undos the `,`
#### Macros
Remembering and using some of these key sequences can be troublesome, especially
if that key sequences is used often. For this reason, RDE has the ability to
record macros to reference these objects.
To record a macro, type `<M-d>` then if
* You want to record a windowset macro, type `w`
1. Type the key chord to record the macro to (Ctrl+characters work well)
1. Type the key sequence to record and hit `<Return>`
* You want to record a workspace macro, type `t`
1. Type the key chord to record the macro to (Ctrl+characters work well)
1. Type the key sequence to record and hit `<Return>`
Example:
If one types `<M-d>w+\@..<Return>` this will record the macro `\@..` (Which
references all windows on the current workspace except the current window) as
`+`, so now one can type `<M-s>+_` to kill all the windows on the current
workspace except the current window.
NOTE: Recursive macros are not prohibited. Be careful!
|