summaryrefslogtreecommitdiff
path: root/.ratpoisonrc
blob: 39d7569ad3bbca12d64213b32311dcd14723f995 (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
# initialise dzen2
#exec ratpoison -c "exec ~/.local/bin/dzen-bar-left" -c "exec ~/.local/bin/dzen-bar-right"

set rudeness 15
set startupmessage 0

# this only works for my primary display
# have to adjust secondary display manually
#set padding 0 18 0 0

# set info style
set winname class
set wingravity center
set transgravity center
set border 0
set font "xft:Hack Nerd Font:size=11"
set bgcolor #000000
set fgcolor #c4c4c4

# Set the escape key to the ctrl-z
escape C-z

# ALIASES

# store frames
alias store-fs1   exec ratpoison -c "setenv fs1 `ratpoison -c 'fdump'`"
alias restore-fs1 exec ratpoison -c "frestore `ratpoison -c 'getenv fs1'`"
alias store-fs2   exec ratpoison -c "setenv fs2 `ratpoison -c 'fdump'`"
alias restore-fs2 exec ratpoison -c "frestore `ratpoison -c 'getenv fs2'`"
alias store-fs3   exec ratpoison -c "setenv fs3 `ratpoison -c 'fdump'`"
alias restore-fs3 exec ratpoison -c "frestore `ratpoison -c 'getenv fs3'`"
alias store-fs4   exec ratpoison -c "setenv fs4 `ratpoison -c 'fdump'`"
alias restore-fs4 exec ratpoison -c "frestore `ratpoison -c 'getenv fs4'`"
alias store-fs5   exec ratpoison -c "setenv fs5 `ratpoison -c 'fdump'`"
alias restore-fs5 exec ratpoison -c "frestore `ratpoison -c 'getenv fs5'`"

## KEYBINDS

# unbind defaults
unbind b
unbind C-b
unbind a
unbind C-a
unbind p
unbind C-p
unbind n
unbind C-n

# switch between windows and monitors
definekey top s-n next
definekey top s-p prev
definekey top s-Left nextscreen
definekey top s-Right nextscreen

# manage frames and windows
definekey top s-h focusleft
definekey top s-j focusdown
definekey top s-k focusup
definekey top s-l focusright
definekey top s-H exchangeleft
definekey top s-J exchangedown
definekey top s-K exchangeup
definekey top s-L exchangeright
definekey top s-C delete

bind M-exclam store-fs1
bind M-1 restore-fs1
bind M-at store-fs2
bind M-2 restore-fs2
bind M-numbersign store-fs3
bind M-3 restore-fs3
bind M-dollar store-fs4
bind M-4 restore-fs4
bind M-percent store-fs5
bind M-5 restore-fs5

#bind b exec ratpoison -c "exec ~/.local/bin/dzen-bar-right" -c "set padding 0 18 0 0"
#bind C-b exec pkill dzen-bar-right && ratpoison -c "set padding 0 0 0 0"
#bind p exec ratpoison -c "set padding 0 0 0 0"
#bind C-p exec ratpoison -c "set padding 0 18 0 0"

# volume and media control
definekey top XF86AudioRaiseVolume exec wpctl set-volume @DEFAULT_AUDIO_SINK@ 5%+
definekey top XF86AudioLowerVolume exec wpctl set-volume @DEFAULT_AUDIO_SINK@ 5%-
definekey top XF86AudioMute exec wpctl set-mute @DEFAULT_AUDIO_SINK@ toggle
#definekey top XF86AudioPrev exec mpc prev && notify-send -r "$(cat ~/.config/mpd/notification-id)" "$(mpc status)"
#definekey top XF86AudioNext exec mpc next && notify-send -r "$(cat ~/.config/mpd/notification-id)" "$(mpc status)"
#definekey top XF86AudioPlay exec mpc toggle && notify-send -r "$(cat ~/.config/mpd/notification-id)" "$(mpc status)"
definekey top XF86AudioPrev exec mpc prev && exec ratpoison -c "echo $(mpc status)"
definekey top XF86AudioNext exec mpc next && exec ratpoison -c "echo $(mpc status)"
definekey top XF86AudioPlay exec mpc toggle && exec ratpoison -c "echo $(mpc status)"

# Information
bind C-v exec ratpoison -c "echo $(wpctl get-volume @DEFAULT_AUDIO_SINK@ | awk '{ print $3,$1,$2*100 }')%"
bind C-a exec ratpoison -c "echo `date +'%A, %F - %H:%M'`  `cal | tail -n +2 | sed -e 's/^Su/\n\n Su/' -e 's/.*/ & /' -e \"s/\ $(date +%e) /\<$(date +%e)\>/\"`"
bind C-s exec ratpoison -c "echo $(date +'%A, %F - %H:%M')"
bind C-t exec ratpoison -c "echo $(sensors | sed -n /Tctl/p | sed 's/Tctl:  *+/Temp: /')"

# application keybinds
definekey top s-S-Return exec urxvtc
definekey top s-F exec firefox -P default-release
definekey top s-B exec firefox -P less-strict
definekey top s-E exec emacsclient -c -a ""
definekey top s-M exec notify-send -p "$(mpc status)" >~/.config/mpd/notification-id
definekey top s-z exec boomer
definekey top s-m exec mpdmenu
definekey top s-p exec dmenu_run -m 0 -fn "xft:Hack Nerd Font:size=11" -nb "#222222" -nf "#bbbbbb" -sb "#005577" -sf "#eeeeee"
definekey top s-Print exec scrot -s -e 'mv $f ~/pics/'
definekey top Print exec scrot -u -e 'mv $f ~/pics/'