guest@dotshare [~/groups/misc/misc] $ ls My-cwmrc/ | cat

My .cwmrc (scrot, raw, dl)

rabbit386 Oct 07, 2021 (misc/misc)

SCROT

  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
# font
fontname "Sans Serif:pixelsize=15:regular"

#This is for the built-in "launch terminal" command, which is kind of redundant since it lets you bind arbitrary executable paths to keyboard/mouse shortcuts.
command term 		"st -g 80x25 -f 'Nimbus Mono PS'"

#ROOT MENU
command Terminal	"tabbed -c -r 2 st -w '' -f 'Nimbus Mono PS'"
command Qutebrowser	qutebrowser
command Firefox		firefox
command "File Manager"  pcmanfm
command Calculator	mate-calc
command Virtualbox	virtualbox
command " "      ""
command Shutdown	poweroff

borderwidth 1
#Set the borders to be one pixel. The default colors are light grey for active and dark grey for inactive

vtile 58 
#When you invoke tiling mode, this is the percentage of the horizontal area that the main window takes up. I found this pleasing enough. Default is 50.

gap 0 17 0 0 
#Make room for Xmobar. 

bind-key 4-r "rofi -show run"
#Windows-R is a habit I'll never break. This brings up Rofi, a superior clone of dmenu.

bind-key M-t "st -g 80x25 -f 'Nimbus Mono PS'"
#Alt-T to bring up a terminal

bind-key 4-t "st -g 80x25 -f 'Nimbus Mono PS'"
#Sometimes I hit Windows instead of ALT.

bind-key M-r "rofi -show run" 
#And sometimes I hit ALT instead of Windows


# Xmonad/i3wm-like bindings for showing and hiding groups (simulates multiple workspaces/desktops)
# ALT-N takes you to group N, and ALT-SHIFT-N "throws" a window to that group.
bind-key M-1 group-only-1
bind-key M-2 group-only-2
bind-key M-3 group-only-3
bind-key M-4 group-only-4
bind-key M-5 group-only-5
bind-key M-6 group-only-6
bind-key M-7 group-only-7
bind-key M-8 group-only-8
bind-key M-9 group-only-9
bind-key MS-1 window-movetogroup-1
bind-key MS-2 window-movetogroup-2
bind-key MS-3 window-movetogroup-3
bind-key MS-4 window-movetogroup-4
bind-key MS-5 window-movetogroup-5
bind-key MS-6 window-movetogroup-6
bind-key MS-7 window-movetogroup-7
bind-key MS-8 window-movetogroup-8
bind-key MS-9 window-movetogroup-9


#Volume control
bind-key 4-q "amixer sset Master 100%"
bind-key 4-a "amixer sset Master 70%"
bind-key 4-z "amixer sset Master 0%"
bind-key 4-e "pcmanfm"
bind-key 4-Tab window-vtile 
bind-key C4-Tab window-htile
bind-key 4-c "mate-calc"

sticky yes
#this just means that windows spawn in the group that's active when they're spawned.

moveamount 1
#I think this is the default but I fuck with this a lot. This is how many pixels that the window moves when you use keyboard shortcuts to move it, or how many pixels are added/removed at the bottom and right if you use keyboard shortcuts to resize it. Fast mode multiplies this by ten.

bind-mouse 4-1 window-move
#press Windows-primary click to drag window

bind-mouse 4-2 window-move
#press Windows-middle click to drag window (my Lenovo Ideapad 3 has very very sloppy differentiation 
#between the clicker buttons--there's one physical button beneath the trackpad and it guesses which 
#button you meant based on your finger's position on the lower part of the pad. Normally I would map 
#middle click to close window, but that led to some data loss when I first got this laptop. I do recommend 
#the model, though, if you can get a 17-inch one with a four-core, 8-thread Core i5 and the Iris graphics.
#Best laptop I've ever owned.

bind-mouse 4-3 window-resize
#press Windows-secondary click to resize window. Frustratingly, this wm only lets you resize the 
#bottom and right edges with the pointer

bind-mouse M-1 window-move
bind-mouse M-2 window-move
bind-mouse M-3 window-resize
#Same bindings but for ALT-keys. ALT-primary click is actually bound by default but for the sake of clarity
#it is written out here

bind-mouse CM-1 window-stick
bind-mouse CM-2 window-stick
#Assign a window to no/every group, so that it appears no matter which group(s) are on screen

bind-mouse CM-3 window-maximize
#Maximize with Control-Alt-secondary click. I don't use this much.

bind-mouse MS-1 window-vtile
bind-mouse MS-2 window-vtile
#Snap this window to the left side of the screen, with a height of the screen minus the gap for Xmobar, and
#A width of 58% of the screen, then tile all other windows in the space remaining on the right of the screen

bind-mouse MS-3 window-freeze
#ALT-SHIFT-3 freezes a window's geometry

unbind-mouse CMS-M3
unbind key M-question
unbind-key CMS-equal
unbind-key CM-Delete
unbind-key CMS-r
#Unbind various default controls

bind-key CM-Delete restart
#Ctrl-ALT-Delete reinitializes the WM, causing it to reload this file if it has been altered.

bind-key MS-F4 quit
#Ctrl-Shift-F4 closes the window manager

unbind-key CM-equal
unbind-key CM-g
unbind-key CM-n
unbind-key CM-Return
unbind-key CM-w
unbind-key M-period
unbind-key M-Left
unbind-key M-Right
#More default controls we need to unbind. ALT-Left and ALT-Right are common browser controls inter alia

bind-key M-q window-close
#ALT-q quits a window

bind-key M-w menu-window
#brings up a "search-as-you-type" menu to change to any window managed by the WM. I think I could 
#make Rofi do this but the default interface is inoffensive and unobtrusive.

bind-key M-F4 window-close
#I can't help it, some windows keybindings are seared into my soul in letters of fire. Alt-F4 closes
#the active window. Note that both KDE and GNOME implement this by default. I'm hardly the only one
#who grew up with a Compaq Presario running windows 95 and no friends.

bind-key 4-w window-close
#Also Windows-W closes windows for some reason.


#These replace the ALT-left and ALT-right bindings from earlier with corresponding vim-like keys.
#These cycle through non-empty groups/workspaces with Windows-H and Windows-L
bind-key 4-h group-rcycle
bind-key 4-l group-cycle

#And while we're building on the vim-key thing, the corresponding up and down keys, also with Windows 
#key, maximize and minimize the active window.
bind-key 4-j window-hide
bind-key 4-k window-maximize
#By default, ALT+vimkeys moves the window and Ctrl+ALT+vimkeys resizes it at the right and bottom. 
#Adding shift changes the step from MOVEAMOUNT to MOVEAMOUNT X 10.

bind-key 4S-k window-fullscreen 
#Add Shift to Windows+K to make a window fullscreen, ignoring borders and the gap for xmobar

#These move the pointer, although there's no keyboard shortcut to click. Useful I guess if your trackpad 
#Won't recognize your dry fingers. Ctrl-Windows+vimkeys for slow, add Shift for fast.
bind-key C4-h pointer-move-left
bind-key C4-l pointer-move-right
bind-key C4-j pointer-move-down
bind-key C4-k pointer-move-up
bind-key CS4-h pointer-move-left-big
bind-key CS4-l pointer-move-right-big
bind-key CS4-j pointer-move-down-big
bind-key CS4-k pointer move-up-big

CLICK TO VIEW

x

Notes

So I’m not a BSD girl (I had a bad experience once, but I think it’s mostly because I installed a 32-bit ISO back when I was a newb so it was a legacy version. I thought my old HP Notebook 2000 was 32-bit for some reason. W/ever.) but the OpenBSD people hit the nail on the head with this one. I like VTWM in some regards but it’s very old and doesn’t behave right a lot of the time.

CWM does a lot of what I liked about my VTWM setup out of the box: titleless windows, UWM-like mouse+mod controls, multiple workspaces, et cetera, but without the infinite configurability that made VTWM a real time sink for a compulsive hacker like me.

My ONLY ONLY complaint is that it does not play nice enough with Picom to allow transparency, shadows, et cet. I have a legacy AUR compton package installed, which I’m sure isn’t good to do, but it does what Picom'nt.

I use it with i3status + Xmobar.

Some notes:
I use st, pcmanfm and rofi. You may want to replace these with your preferred term, file browser and launcher.