-
Notifications
You must be signed in to change notification settings - Fork 0
/
.ratpoisonrc
165 lines (137 loc) · 5.82 KB
/
.ratpoisonrc
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
# .ratpoisonrc
# Parts of this is inspired by http://aerosuidae.net/musca/User:Batz/musca_start
# Last Modified: 09/09/2017, 09:13:49 IST
# Stop managing {{{1
#unmanage tint2
#unbind all
# Customize: Windows, Bar {{{1
## Frames
#set fgcolor red
#set bgcolor black
#set fwcolor black
set bwcolor dim gray
## Set the border width for all windows.
set border 0
set padding 0 0 0 0
set font -*-dina-medium-r-normal-*-12-*-*-*-*-*-*-*
#set waitcursor 1
#set transgravity center
## Rat bar
set barborder 0
set bargravity c
#set barpadding 1 1
#set inputwidth 9999
## Windows position
set winname title
set winfmt %n %s %t
set wingravity c
set winliststyle row
## Setup initial workspaces
# This should set up rpws and groups, bind defaults
exec /usr/bin/rpws init 4 -k
## Ratpoison shortcuts
# Create a new keymap for all window management
newkmap win
definekey top Super_L readkey win
# Groups
definekey win 1 rpws1
definekey win 2 rpws2
definekey win 3 rpws3
definekey win 4 rpws4
definekey win M-1 gmove default
definekey win M-2 gmove wspl2
definekey win M-3 gmove wspl3
definekey win M-4 gmove wspl4
definekey win greater rpwsn
definekey win less rpwsp
# Frames
definekey win s hsplit 1/2
definekey win S vsplit 1/2
definekey win r remove
definekey win o only
definekey win u undo
definekey win d dedicate
definekey win h focusleft
definekey win j focusdown
definekey win k focusup
definekey win l focusright
definekey win Left focusleft
definekey win Down focusdown
definekey win Up focusup
definekey win Right focusright
definekey win M-h exchangeleft
definekey win M-j exchangedown
definekey win M-k exchangeup
definekey win M-l exchangeright
definekey win M-Left exchangeleft
definekey win M-Down exchangedown
definekey win M-Up exchangeup
definekey win M-Right exchangeright
definekey win M-C-h resize -10 0
definekey win M-C-j resize 0 -10
definekey win M-C-k resize 0 10
definekey win M-C-l resize 10 0
definekey win M-C-Left resize -10 0
definekey win M-C-Down resize 0 -10
definekey win M-C-Up resize 0 10
definekey win M-C-Right resize 10 0
definekey win M-Tab next
definekey win Tab next
definekey win M-S-Tab prev
definekey win S-Tab prev
#definekey win w switch window
#definekey win Mod4+space stack flip
definekey win question help win
## Ratpoison options
#escape Caps_Lock
warp on
startup_message off
exec xsetroot -cursor_name left_ptr
## Shortcuts {{{1
# Set a background, randomly picking from a certain directory.
#exec cd ~/pics/Wallpapers/clean && Esetroot ~/pics/Wallpapers/clean/flatgreen.jpg
bind I exec cd ~/pics/wallpapers && feh --bg-center `w=(*.jpg); n=${#w[@]}; echo "${w[RANDOM%n]}"` && cd ~/
alias term exec ~/bin/urxvt-client
bind c term
bind a time
bind grave other
## Dmenu magic
# Rat shell
unbind r
bind r exec $(dmenu_run -i -nb '#000000' -nf '#777777' -sb '#770000' -sf '#ffffff' -fn '-*-dina-medium-r-normal-*-12-*-*-*-*-*-*-*' -p '> ')
# Rat windows select
unbind w
bind w exec $(ratpoison -c "select `ratpoison -c "windows" | dmenu -i -nb '#000000' -nf '#777777' -sb '#770000' -sf '#ffffff' -fn '-*-dina-medium-r-normal-*-12-*-*-*-*-*-*-*' -p ':: ' | awk '{print $1}'`")
## Applications {{{1
bind e exec gvim
bind E exec ~/bin/urxvt-client -e /usr/bin/vim
bind o exec vivaldi-stable
bind O exec chromium
bind m exec smplayer
bind M exec vlc
bind v exec VirtualBox
bind x exec zathura
#bind C-g exec ratpoison -c 'hsplit 288' -c 'fselect 1' -c 'exec /usr/bin/gimp' && sleep 5 && ratpoison -c 'dedicate 1'
# Make prtscreen work, as long as in ratpoison mode. "import" is an Imagemagick command.
bind Print exec maim -st 9999999 ~/$(date +%s).png
## Keybindings {{{1
# volume
definekey top XF86AudioRaiseVolume exec ~/bin/voltun -c up -i 3% -m Master
definekey top XF86AudioMute exec ~/bin/voltun -c mute -i 3% -m Master
definekey top XF86AudioLowerVolume exec ~/bin/voltun -c down -i 3% -m Master
# multimedia keys
definekey top S-XF86AudioNext exec mpc seek +00:00:05 >/dev/null
definekey top S-XF86AudioPrev exec mpc seek -00:00:05 >/dev/null
definekey top XF86AudioNext exec mpc next >/dev/null && notify-send "$(mpc --format '[[%artist% - ]%title%]|[%file%] #| %time%' | head -n1)" -i notification-audio-next -t 1000
definekey top XF86AudioPrev exec mpc prev >/dev/null && notify-send "$(mpc --format '[[%artist% - ]%title%]|[%file%] #| %time%' | head -n1)" -i notification-audio-previous -t 1000
definekey top XF86AudioStop exec mpc stop >/dev/null && notify-send "$(mpc --format '[[%artist% - ]%title%]|[%file%] #| %time%' | head -n1)" -t 1000
definekey top S-XF86AudioStop exec notify-send "$(mpc --format '[[%artist% - ]%title%]|[%file%] #| %time%' | head -n1)" -i notification-audio-play -t 1000
definekey top XF86AudioPlay exec mpc toggle >/dev/null && notify-send "$(mpc --format '[[%artist% - ]%title%]|[%file%] #| %time%' | head -n1)" -i notification-audio-play -t 1000
definekey top XF86Calculator exec mpc next >/dev/null && notify-send "$(mpc --format '[[%artist% - ]%title%]|[%file%] #| %time%' | head -n1)" -i notification-audio-next -t 1000
## Aliasing long commands within ratpoison {{{1
#alias conkeror exec mozilla-firefox -chrome chrome://conkeror/content
#alias elinks exec aterm -e elinks
## Extras {{{1
# Cheat java programs
exec wmname LG3D
# vim: set tw=999: