-
Notifications
You must be signed in to change notification settings - Fork 1
/
config
309 lines (252 loc) · 10.4 KB
/
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
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
#########################################
#########################################
# Desktop config
#########################################
#########################################
#########################################
### KEY DEFINITIONS ####
#########################################
## $Mod = Super key or Mod4 ##
## Mod1 = ALT key ##
## Control = CTRL key ##
## Shift = SHIFT key ##
## Escape = ESCAPE key ##
## Return = ENTER or RETURN key ##
## Pause = PAUSE key ##
## Print = PRINT key ##
## Tab = TAB key ##
#########################################
# Xresources var value fallback
set_from_resource $bg background #19043C
set_from_resource $fg foreground #F1F1F1
set_from_resource $red color1 #EE79A9
set_from_resource $green color2 #8C9440
set_from_resource $yellow color3 #DE935F
set_from_resource $blue color4 #05C6F1
set_from_resource $purple color5 #85678F
set_from_resource $cyan color6 #5E8D87
set_from_resource $grey color7 #969CD3
set_from_resource $white color15 #F1F1F1
set_from_resource $black color0 #19043C
set $orange #d08770
set $turq #88c0d0
set $li #65737e
set $mdk_bg #252c37
set $dk_bg #1b2129
set $md_bg #37414e
# Font for window titles. Will also be used by the bar unless a different font
# is used in the bar {} block below.
font pango:monospace 8
# TODO switch to polybar
bar {
status_command i3status
position bottom
font xft:Droid Sans Mono, FontAwesome 11
}
################################################################################
# Variables
################################################################################
# $Mod = Super (Mod4) or Alt (Mod1)
set $Mod Mod1
# direction keys
set $left h
set $down j
set $up k
set $right l
set $WS1 "1"
set $WS2 "2"
set $WS3 "3"
set $WS4 "4"
set $WS5 "5"
set $WS6 "6"
set $WS7 "7"
set $WS8 "8"
set $WS9 "9"
set $WS10 "10"
# monitors
set $Mon1 HDMI1
set $Mon2 HDMI2
# the terminal emulator
set $terminal gnome-terminal
################################################################################
# Autostart
################################################################################
# run with each reload
exec_always feh --bg-scale ~/.config/i3/wall
exec_always xrandr --output DP1 --auto --left-of HDMI2
exec_always --no-startup-id compton
#exec_always --no-startup-id numlockx on
#exec_always --no-startup-id xrdb -load ~/.Xresources
#exec_always --no-startup-id pkill trayer; trayer --edge bottom --align left --heighttype pixel --height 18 --widthtype request --SetDockType false --expand true --transparent true --alpha 255
# run once
exec --no-startup-id nm-applet
exec --no-startup-id /usr/lib64/polkit-gnome/polkit-gnome-authentication-agent-1
exec --no-startup-id dunst
exec firefox
exec xflux -l 47 -g 19
#exec redshift
# drop down terminal
#exec --no-startup-id ~/bin/dropdown-terminal.sh # TODO fix
for_window [instance="dropdown-terminal"] floating enable;
for_window [instance="dropdown-terminal"] move scratchpad; [instance="dropdown-terminal"] scratchpad show; move position 0px 24px; move scratchpad
bindsym $Mod+t [instance="dropdown-terminal"] scratchpad show
bindsym $Mod+Shift+t exec --no-startup-id ~/bin/dropdown-terminal.sh
################################################################################
# Bindings
################################################################################
# kill focused window
bindsym $Mod+Shift+q kill
bindsym Mod1+q kill
# launchers
bindsym $mod+d exec dmenu_run
bindsym $Mod+Return exec --no-startup-id $terminal
# vim-anywhere
bindsym $mod+Shift+v exec ~/.vim-anywhere/bin/run
# partial screen shot with scrot
bindsym --release $Mod+Shift+c exec --no-startup-id scrot -s
# screen shot with scrot
bindsym Print exec --no-startup-id "scrot '%S.png' -e 'mv $f $$(xdg-user-dir PICTURES)/ArchLabs-%S-$wx$h.png'"
#; gpicview $$(xdg-user-dir PICTURES)/ArchLabs-%S-$wx$h.png'"
# logout
bindsym $Mod+x exec --no-startup-id ~/bin/rofi-logout
# audio
bindsym XF86AudioPlay exec playerctl play-pause
bindsym XF86AudioPause exec playerctl pause
bindsym XF86AudioPrev exec playerctl previous
bindsym XF86AudioNext exec playerctl next
# raise Volume
bindsym XF86AudioRaiseVolume exec --no-startup-id amixer -D pulse sset Master 5%+ && \
paplay /usr/share/sounds/freedesktop/stereo/audio-volume-change.oga
# lower Volume
bindsym XF86AudioLowerVolume exec --no-startup-id amixer -D pulse sset Master 5%- && \
paplay /usr/share/sounds/freedesktop/stereo/audio-volume-change.oga
# toggle muting
bindsym XF86AudioMute exec --no-startup-id amixer -D pulse sset Master toggle-mute
################################################################################
# Workspace bindings
################################################################################
# workspace assignment
workspace $WS1 output $Mon1
workspace $WS2 output $Mon1
workspace $WS3 output $Mon1
workspace $WS4 output $Mon1
workspace $WS5 output $Mon1
workspace $WS6 output $Mon1
workspace $WS7 output $Mon1
workspace $WS8 output $Mon1
workspace $WS9 output $Mon1
workspace $WS10 output $Mon1
# switch to workspace
bindsym $Mod+1 workspace $WS1
bindsym $Mod+2 workspace $WS2
bindsym $Mod+3 workspace $WS3
bindsym $Mod+4 workspace $WS4
bindsym $Mod+5 workspace $WS5
bindsym $Mod+6 workspace $WS6
bindsym $Mod+7 workspace $WS7
bindsym $Mod+8 workspace $WS8
bindsym $Mod+9 workspace $WS9
bindsym $Mod+0 workspace $WS10
# move focused container to workspace
bindsym $Mod+Shift+1 move container to workspace $WS1; workspace $WS1
bindsym $Mod+Shift+2 move container to workspace $WS2; workspace $WS2
bindsym $Mod+Shift+3 move container to workspace $WS3; workspace $WS3
bindsym $Mod+Shift+4 move container to workspace $WS4; workspace $WS4
bindsym $Mod+Shift+5 move container to workspace $WS5; workspace $WS5
bindsym $Mod+Shift+6 move container to workspace $WS6; workspace $WS6
bindsym $Mod+Shift+7 move container to workspace $WS7; workspace $WS7
bindsym $Mod+Shift+8 move container to workspace $WS8; workspace $WS8
bindsym $Mod+Shift+9 move container to workspace $WS9; workspace $WS9
bindsym $Mod+Shift+0 move container to workspace $WS10; workspace $WS10
# move workspace to left and right monitors
bindsym $mod+Shift+bracketleft move workspace to output left
bindsym $mod+Shift+bracketright move workspace to output right
################################################################################
# Reload configs
################################################################################
# restart i3 inplace (preserves your layout/session, can be used to upgrade i3)
bindsym $Mod+Shift+r restart
# reload the configuration file
bindsym $Mod+Shift+c reload
# exit i3 (logs you out of your X session)
bindsym $mod+Shift+e exec "i3-nagbar -t warning -m 'You pressed the exit shortcut. Do you really want to exit i3? This will end your X session.' -b 'Yes, exit i3' 'i3-msg exit'"
################################################################################
# Container/window control
################################################################################
# Scratchpad, Floating
#bindsym Mod1+minus move scratchpad
#bindsym Mod1+plus scratchpad show
bindsym $Mod+Shift+space floating toggle
floating_modifier Mod1
# change focus
bindsym $Mod+$left focus left
bindsym $Mod+$down focus down
bindsym $Mod+$up focus up
bindsym $Mod+$right focus right
# alternatively, you can use the cursor keys:
bindsym $Mod+Left focus left
bindsym $Mod+Down focus down
bindsym $Mod+Up focus up
bindsym $Mod+Right focus right
bindsym $Mod+p focus parent
bindsym $Mod+c focus child
# move focused window
bindsym $Mod+Shift+$left move left 10px
bindsym $Mod+Shift+$down move down 10px
bindsym $Mod+Shift+$up move up 10px
bindsym $Mod+Shift+$right move right 10px
# alternatively, you can use the cursor keys:
bindsym $Mod+Shift+Up move up 10px
bindsym $Mod+Shift+Down move down 10px
bindsym $Mod+Shift+Left move left 10px
bindsym $Mod+Shift+Right move right 10px
# switch to workspace with urgent window
for_window [urgent="latest"] focus
focus_on_window_activation focus
# toggle fullscreen mode for the focused container
bindsym $Mod+f fullscreen toggle
# container layout
bindsym $Mod+o split h
bindsym $Mod+v split v
bindsym $Mod+s layout stacking
bindsym $Mod+w layout tabbed
bindsym $Mod+e layout toggle split
default_orientation horizontal
# layout toggle, keycode 23 is Tab
bindcode Mod4+23 layout toggle tabbed split
bindcode $Mod+23 layout toggle splitv splith
# resize window (you can also use the mouse)
mode "resize" {
# These bindings trigger as soon as you enter the resize mode
# Pressing left will shrink the window’s width.
# Pressing right will grow the window’s width.
# Pressing up will shrink the window’s height.
# Pressing down will grow the window’s height.
bindsym $left resize shrink width 10 px or 10 ppt
bindsym $down resize shrink height 10 px or 10 ppt
bindsym $up resize grow height 10 px or 10 ppt
bindsym $right resize grow width 10 px or 10 ppt
# same bindings, but for the arrow keys
bindsym Left resize shrink width 10 px or 10 ppt
bindsym Up resize grow height 10 px or 10 ppt
bindsym Down resize shrink height 10 px or 10 ppt
bindsym Right resize grow width 10 px or 10 ppt
# back to normal: Enter or Escape
bindsym Return mode "default"
bindsym Escape mode "default"
}
bindsym $Mod+r mode "resize"
################################################################################
# Application settings
################################################################################
# focus & floating
for_window [class="(?i)(?:lxapp\w+|peek)"] floating enable
for_window [class="(?i)(?:gpic\w+|gvim)"] floating enable
for_window [class="(?i)(?:qt5ct|pinentry)"] floating enable
# focus, floating, & sticky
for_window [title="(?i)(?:copying|deleting|moving\w+)"] floating enable, sticky enable
for_window [window_role="(?i)(?:pop-up|setup|task_dialog|preferen\w+)"] floating enable, sticky enable
# set trayer to be borderless
for_window [class="(?i)trayer"] border pixel 0
# start on main workspaces when reloading i3 (keep me at the bottom)
exec_always --no-startup-id i3-msg 'workspace $WS5, workspace $WS1'