-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathi3_config
235 lines (183 loc) · 6.07 KB
/
i3_config
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
# i3 config file (v4)
#
# Please see http://i3wm.org/docs/userguide.html for a complete reference!
########
# Vars #
########
# Super
set $mod Mod4
# Vim
set $up k
set $right l
set $down j
set $left h
# Screen 0
set $sc0 DP-0
# Screen 1
set $sc1 DP-1
###########
# Autorun #
###########
# Now in .xinitrc
############
# Settings #
############
popup_during_fullscreen leave_fullscreen
new_window 1pixel
font -misc-proggytinyttsz-*-*-*-*-*-*-*-*-*-*-*-*
#######
# Bar #
#######
bar {
status_command i3status
position top
}
#############
# Shortcuts #
#############
# terminal
bindsym $mod+Return exec urxvt -e zsh
# timed master mute for pandora commercials
bindsym $mod+m exec "amixer sset Master mute && sleep 15 && amixer sset Master unmute"
bindsym $mod+n exec "amixer sset Master mute && sleep 30 && amixer sset Master unmute"
bindsym $mod+o exec amixer sset Master toggle
# lock the screen
bindsym $mod+p exec ~/bin/lock
# start ranger in a terminal
bindsym $mod+t exec urxvt -e zsh -c ranger # this is really a stupid way to do it
# kill focused window
bindsym $mod+Shift+Q kill
# start dmenu
bindsym $mod+d exec dmenu_run
# reload the configuration file
bindsym $mod+Shift+C reload
# restart i3 inplace
bindsym $mod+Shift+R restart
# exit i3
bindsym $mod+Shift+E exit
################
# Window Rules #
################
# keepass
for_window [title="Open Database.*"] floating enable
for_window [title="Edit Entry"] floating enable
for_window [title="Add Entry"] floating enable
# DCSS
for_window [title="Dungeon Crawl Stone Soup.*"] floating disable
# xfreerdp
for_window [title="FreeRDP:.*"] floating disable
# Test floating dialogs
for_window [window_type="dialog"] floating enable
for_window [window_type="menu"] floating enable
# Keep citrix on CTX
assign [class="Wfica"] → "9: CTX"
#########
# Modes #
#########
# Audio
# https://www.reddit.com/r/i3wm/comments/2a1zru/some_useful_i3_mode_menus/
set $audiomenu "volume: [+]5% [-]5% [m]ute [r]eset [p]ause | play [n]uvoplayer p[i]anobar"
bindsym $mod+u mode $audiomenu
mode $audiomenu {
bindsym r exec --no-startup-id amixer -M sset Master playback 40%
bindsym plus exec --no-startup-id amixer -M sset Master playback 5%+
bindsym KP_Add exec --no-startup-id amixer -M sset Master playback 5%+
bindsym minus exec --no-startup-id amixer -M sset Master playback 5%-
bindsym KP_Subtract exec --no-startup-id amixer -M sset Master playback 5%-
bindsym m exec --no-startup-id amixer sset Master playback toggle
bindsym p exec --no-startup-id /bin/bash -c '(pidof nuvolaplayer3 > /dev/null && nuvolaplayer3ctl action pause) & (pidof pianobar > /dev/null && echo -n '''S''' > ~/.config/pianobar/ctl)'
bindsym n exec --no-startup-id /bin/bash -c '(pidof nuvolaplayer3 > /dev/null && nuvolaplayer3ctl action play)'
bindsym i exec --no-startup-id /bin/bash -c '(pidof pianobar > /dev/null && echo -n '''P''' > ~/.config/pianobar/ctl)'
bindsym Return mode "default"
bindsym Escape mode "default"
}
##################
# Window Control #
##################
floating_modifier $mod
# Assign workspaces to screens
workspace 1 output $sc0
workspace 2 output $sc0
workspace 3 output $sc0
workspace 4 output $sc0
workspace 5 output $sc0
workspace "6: ff" output $sc1
workspace "7: rdp" output $sc1
workspace 8 output $sc1
workspace "9: CTX" output $sc1
workspace "10: ff2" output $sc1
# switch to workspace
bindsym $mod+1 workspace 1
bindsym $mod+2 workspace 2
bindsym $mod+3 workspace 3
bindsym $mod+4 workspace 4
bindsym $mod+5 workspace 5
bindsym $mod+6 workspace "6: ff"
bindsym $mod+7 workspace "7: rdp"
bindsym $mod+8 workspace 8
bindsym $mod+9 workspace "9: CTX"
bindsym $mod+0 workspace "10: ff2"
# move focused container to workspace
bindsym $mod+Shift+exclam move workspace 1
bindsym $mod+Shift+at move workspace 2
bindsym $mod+Shift+numbersign move workspace 3
bindsym $mod+Shift+dollar move workspace 4
bindsym $mod+Shift+percent move workspace 5
bindsym $mod+Shift+asciicircum move workspace "6: ff"
bindsym $mod+Shift+ampersand move workspace "7: rdp"
bindsym $mod+Shift+asterisk move workspace 8
bindsym $mod+Shift+parenleft move workspace "9: CTX"
bindsym $mod+Shift+parenright move workspace "10: ff2"
#moving between workspaces, screens
bindsym $mod+Tab workspace next_on_output
bindsym $mod+Control+Tab workspace next
bindsym $mod+Shift+Tab workspace prev_on_output
bindsym $mod+Control+Shift+Tab workspace prev
# change focus
bindsym $mod+$up focus up
bindsym $mod+$right focus right
bindsym $mod+$down focus down
bindsym $mod+$left focus left
# move focused window
bindsym $mod+Shift+$up move up
bindsym $mod+Shift+$right move right
bindsym $mod+Shift+$down move down
bindsym $mod+Shift+$left move left
# split in horizontal orientation
bindsym $mod+b split h
# split in vertical orientation
bindsym $mod+v split v
# enter fullscreen mode for the focused container
bindsym $mod+f fullscreen
# change container layout (stacked, tabbed, default)
bindsym $mod+s layout stacking
bindsym $mod+w layout tabbed
bindsym $mod+e layout default
# toggle tiling / floating
bindsym $mod+Shift+space floating toggle
# change focus between tiling / floating windows
bindsym $mod+space focus mode_toggle
# resize window
# direction is grow in that direction
# shift+direction is shrink in that direction
mode "resize" {
bindsym $up resize grow up 10 px or 10 ppt
bindsym Shift+$up resize shrink up 10 px or 10 ppt
bindsym $right resize grow right 10 px or 10 ppt
bindsym Shift+$right resize shrink right 10 px or 10 ppt
bindsym $down resize grow down 10 px or 10 ppt
bindsym Shift+$down resize shrink down 10 px or 10 ppt
bindsym $left resize grow left 10 px or 10 ppt
bindsym Shift+$left resize shrink left 10 px or 10 ppt
# back to normal: Enter or Escape
bindsym Return mode "default"
bindsym Escape mode "default"
}
bindsym $mod+r mode "resize"
# New, sticky window
bindsym $mod+Shift+s sticky toggle
# Scratchpad
# Make the currently focused window a scratchpad
bindsym $mod+Shift+minus move scratchpad
# Show the first scratchpad window
bindsym $mod+minus scratchpad show