blob: 3c0025990b8a30df9af0b91e39b5e69889069233 (
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
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
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
|
# info: C=control, M=meta/alt, s=super, S=shift, H = Hyper
# xnest for testing
escape grave
definekey top s-grave meta
definekey top Arabic_dammatan meta
#unmanage Nautilus Desktop
unmanage Desktop
#find files script
bind f exec ~/.ratpoison/spotlight
# set font with unicode support
#set font -*-terminus-medium-r-normal-*-14-*-*-*-*-*-*-*
set font "DejaVu Sans Mono"
#Style message box
set bgcolour #fdf6e3
set fgcolor #657b83
# Enable xcb copy/paste
source .ratpoison/ratpoisonrc.clipboard
# Make tab switch to the next screen
bind Tab nextscreen
#have windows centered
set wingravity center
# Use the name of the program rather than the title in the window list
set winname title
#Pest control.
banish
#exec unclutter -idle 1 -jitter 2 -root
#warp on
#addhook switchwin banish
#No more startup message
startup_message off
#fix mouse
exec xsetroot -cursor_name left_ptr
#Effects & Background
#exec xcompmgr -c -f &
exec nitrogen --restore
#Border & Padding
alias showpadding set border 3
alias hidepadding set border 0
hidepadding
barinpadding 0
alias showborder set barpadding 0 0
alias hideborder set barpadding 0 0
set fwcolor #657b83
set bwcolor #839496
######################################
# Panel
######################################
alias rpbarsend exec ~/.ratpoison/rpbarsend
# tell ratpoison to ignore rpbar
unmanage rpbar
# hooks
addhook switchwin rpbarsend
addhook switchframe rpbarsend
addhook switchgroup rpbarsend
addhook deletewindow rpbarsend
# RP versions >= 1.4.6 (from the git repo) have these hooks.
# Recommended!
addhook titlechanged rpbarsend
addhook newwindow rpbarsend
unmanage conky
unmanage xfce4-panel
unmanage ratbar.pl
alias showpanel set padding 0 27 0 0
alias hidepanel set padding 0 0 0 0
showpanel
#-------------------------------------------------------------
# Workspaces
#-------------------------------------------------------------
# Switcher window
alias workspace_menu exec .ratpoison/workspace_menu
bind W workspace_menu
#Get F-keys to switch windows now in /usr/bin/rpws
definekey top F1 exec rpws 1 && ratpoison -c bordscript
definekey top F2 exec rpws 2 && ratpoison -c bordscript
definekey top F3 exec ratpoison -c "exec rpws 3 && ratpoison -c bordscript"
definekey top F4 exec rpws 4 && ratpoison -c bordscript
definekey top F5 exec rpws 5 && ratpoison -c bordscript
definekey top F6 exec rpws 6 && ratpoison -c bordscript
definekey top F7 exec rpws 7 && ratpoison -c bordscript
definekey top F8 exec rpws 8 && ratpoison -c bordscript
definekey top F9 exec rpws 9 && ratpoison -c bordscript
definekey top F10 exec xset -led 3 & exec ratpoison -c "exec rpws 10 && ratpoison -c bordscript"
definekey top F11 exec rpws 11 && ratpoison -c bordscript
definekey top F12 exec rpws 12 && ratpoison -c bordscript
definekey top M-F1 rpwsm1
definekey top M-F2 rpwsm2
definekey top M-F3 rpwsm3
definekey top M-F4 rpwsm4
definekey top M-F5 rpwsm5
definekey top M-F6 rpwsm6
definekey top M-F7 rpwsm7
definekey top M-F8 rpwsm8
definekey top M-F9 rpwsm9
definekey top M-F10 rpwsm10
definekey top M-F11 rpwsm11
definekey top M-F12 rpwsm12
definekey top S-F1 exec rpws 13
definekey top S-F2 exec rpws 14
definekey top S-F3 exec rpws 15
definekey top S-F4 exec rpws 16
definekey top S-F5 exec rpws 17
definekey top S-F6 exec rpws 18
definekey top S-F7 exec rpws 19
definekey top S-F8 exec rpws 20
definekey top S-F9 exec rpws 21
definekey top S-F10 exec rpws 22
definekey top S-F11 exec rpws 23
definekey top S-F12 exec rpws 24
#definekey top s-F1 exec ratpoison -c 'meta F1'
#definekey top s-F2 exec ratpoison -c 'meta F2'
#definekey top s-F3 exec ratpoison -c 'meta F3'
#definekey top s-F4 exec ratpoison -c 'meta F4'
#definekey top s-F5 exec ratpoison -c 'meta F5'
#definekey top s-F6 exec ratpoison -c 'meta F6'
#definekey top s-F7 exec ratpoison -c 'meta F7'
#definekey top s-F8 exec ratpoison -c 'meta F8'
#definekey top s-F9 exec ratpoison -c 'meta F9'
#definekey top s-F10 exec ratpoison -c 'meta F10'
#definekey top s-F11 exec ratpoison -c 'meta F11'
#definekey top s-F12 exec ratpoison -c 'meta F12'
definekey top S-F12 exec rpws 13
definekey top M-S-F12 rpwsm13
#-------------------------------------------------------------
#Bindings
#-------------------------------------------------------------
alias window_menu exec .ratpoison/window_menu
bind h focusleft
bind l focusright
bind j focusdown
bind k focusup
bind H exchangeleft
bind L exchangeright
bind J exchangedown
bind K exchangeup
bind w window_menu
bind a title
bind t time
definekey top s-l exec i3lock
definekey top s-s exec ~/bin/sus
definekey top s-L redisplay
bind c exec gnome-control-center
bind C exec sudo gnome-control-center
bind v hsplit
bind V hsplit 2/3
bind s vsplit
bind S vsplit 2/3
bind d remove
bind space exec urxvt -e zsh
bind o only
bind semicolon colon
bind e exec
bind u undo
bind i info
bind x delete
bind X kill
bind Escape abort
#Paste goodness
bind g exec ~/bin/imgur
bind P exec xclip -o | curl -F 'sprunge=<-' http://sprunge.us | xclip
alias bordtoggle exec ~/.ratpoison/bordtoggle
alias bordscript exec ~/.ratpoison/borderscript
alias paneltoggle exec ~/.ratpoison/paneltoggle
addhook key bordscript
definekey top s-b bordtoggle
definekey top s-p paneltoggle
# b : Open url
alias browse_cmd exec .ratpoison/exec_to_workspace 2 firefox -new-tab
alias browse colon browse_cmd
bind b browse
# B : open a new firefox tab and browse to the X clipboard selection
alias browse_selection exec .ratpoison/exec_to_workspace 2 firefox -new-tab `ratpoison -c getsel`
bind B browse_selection
# Paste with X selection
alias insert_X_selection meta S-Insert
bind i insert_X_selection
#-------------------------------------------------------------
#Application Shortcuts
#-------------------------------------------------------------
definekey top s-f exec firefox
definekey top s-m exec /home/vasko/.ratpoison/pentfocus
definekey top s-v exec vlc
definekey top s-g exec gvim
#definekey top s-l exec libreoffice
#-----------------------------------------------------
# Voice control
#-----------------------------------------------------
definekey top KP_Enter exec ~/Dropbox/speech/run-duplex.sh
#-------------------------------------------------------------
# Volume Control
#-------------------------------------------------------------
# Up
alias volup exec amixer -q set Master 5+ && ratpoison -c "echo `$HOME/.ratpoison/volind`"
definekey top XF86AudioRaiseVolume volup
definekey top s-Prior volup
# Down
alias voldown exec amixer -q set Master 5- && ratpoison -c "echo `$HOME/.ratpoison/volind`"
definekey top XF86AudioLowerVolume voldown
definekey top s-Next voldown
# Mute
alias voltoggle exec amixer -D pulse set Master toggle && ratpoison -c "echo Sound: `amixer get Master|awk '/Mono:/ {print $6}'`"
definekey top XF86AudioMute voltoggle
definekey top s-Pause voltoggle
#-------------------------------------------------------------
# Brightness Control
#-------------------------------------------------------------
alias brightup exec xbacklight +2
alias brightdown exec xbacklight -2
definekey top XF86MonBrightnessUp brightup
definekey top XF86MonBrightnessDown brightdown
#-------------------------------------------------------------
# Cmus (Music) Control
#-------------------------------------------------------------
# Aliases
alias playinfo exec ratpoison -c "echo Music: `mpc -h 127.0.0.1 | head -2 | tail -1 | awk '{print $1}'`"
alias volinfo exec ratpoison -c "echo `$HOME/.ratpoison/mpdvolind`"
alias songinfo exec ratpoison -c "echo Music: `mpc -h 127.0.0.1 | head -1`"
#alias volinfo exec ratpoison -c "echo `$HOME/.ratpoison/cmusvolind`"
#alias playinfo exec ratpoison -c "echo Music: `cmus-remote -Q | awk '/status/ {print $2}'`"
#alias songinfo exec ratpoison -c "echo Playing:`cmus-remote -Q | awk '/ artist/ {$1=$2=""; print $0}'` - `cmus-remote -Q 2>/dev/null | grep title | awk '{$1=$2=""; print $0}'`"
# Play/Pause and Volume
definekey top s-space exec mpc -h 127.0.0.1 toggle && ratpoison -c 'playinfo'
definekey top s-Right exec mpc -h 127.0.0.1 next && ratpoison -c "songinfo"
definekey top s-Left exec mpc -h 127.0.0.1 prev && ratpoison -c "songinfo"
definekey top s-Up exec mpc -h 127.0.0.1 volume +5 && ratopison -c "volinfo"
definekey top s-Up exec mpc -h 127.0.0.1 volume +5 && ratpoison -c 'volinfo'
definekey top s-Down exec mpc -h 127.0.0.1 volume -5 && ratpoison -c 'volinfo'
# Old cmus controls
#definekey top s-space exec cmus-remote -u && ratpoison -c "playinfo"
#definekey top s-Right exec cmus-remote -n && ratpoison -c "songinfo"
#definekey top s-Left exec cmus-remote -r && ratpoison -c "songinfo"
#definekey top s-Up exec cmus-remote -v +5% && ratpoison -c "volinfo"
#definekey top s-Down exec cmus-remote -v -5% && ratpoison -c "volinfo"
# Show song that is playing
definekey top Print songinfo
#-------------------------------------------------------------
# Unbindings
#-------------------------------------------------------------
unbind Q
unbind C-A
unbind C-a
unbind C-p
unbind C-apostrophe
unbind C-i
unbind C-Return
unbind C-n
unbind C-m
unbind C-c
unbind C-k
unbind C-l
unbind C-K
unbind C-exclam
unbind C-grave
unbind C-u
unbind C-g
unbind C-space
unbind C-v
unbind C-s
unbind C-Right
unbind C-Up
unbind C-Down
unbind C-x
unbind C-f
unbind C-V
unbind C-S
unbind C-w
unbind C-b
#-------------------------------------------------------------
# Layout saving
#-------------------------------------------------------------
# bind M-! to store the current frame layout in slot #1
bind M-exclam exec ratpoison -c "setenv fs1 `ratpoison -c 'fdump'`"
#bind M-1 to restore the frame layout in slot #1
bind M-1 exec ratpoison -c "frestore `ratpoison -c 'getenv fs1'`"
# Do the same for slot #2 and bind it to M-@ and M-2, respectively.
bind M-at exec ratpoison -c "setenv fs2 `ratpoison -c 'fdump'`"
bind M-2 exec ratpoison -c "frestore `ratpoison -c 'getenv fs2'`"
# Give ourselves another slot on M-# and M-3, respectively.
bind M-numbersign exec ratpoison -c "setenv fs3 `ratpoison -c 'fdump'`"
bind M-3 exec ratpoison -c "frestore `ratpoison -c 'getenv fs3'`"
|