~gpanders/dotfiles

ref: c8e63bac959db19c138dcc3198a56514f0b444ff dotfiles/.config/i3/config -rw-r--r-- 8.6 KiB
c8e63bacGreg Anders Manage dotfiles directly in home directory 1 year, 4 months ago
                                                                                
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
# This file has been auto-generated by i3-config-wizard(1).
# It will not be overwritten, so edit it as you like.
#
# Should you change your keyboard layout some time, delete
# this file and re-run i3-config-wizard(1).
#

# i3 config file (v4)
#
# Please see https://i3wm.org/docs/userguide.html for a complete reference!

set $sup Mod4
set $alt Mod1

## Base16 Eighties
set $base00 #2d2d2d
set $base01 #393939
set $base02 #515151
set $base03 #747369
set $base04 #a09f93
set $base05 #d3d0c8
set $base06 #e8e6df
set $base07 #f2f0ec
set $base08 #f2777a
set $base09 #f99157
set $base0A #ffcc66
set $base0B #99cc99
set $base0C #66cccc
set $base0D #6699cc
set $base0E #cc99cc
set $base0F #d27b53

## Base16 Tomorrow
# set $base00 #ffffff
# set $base01 #e0e0e0
# set $base02 #d6d6d6
# set $base03 #8e908c
# set $base04 #969896
# set $base05 #4d4d4c
# set $base06 #282a2e
# set $base07 #1d1f21
# set $base08 #c82829
# set $base09 #f5871f
# set $base0A #eab700
# set $base0B #718c00
# set $base0C #3e999f
# set $base0D #4271ae
# set $base0E #8959a8
# set $base0F #a3685a

font pango:monospace 11

# xss-lock grabs a logind suspend inhibit lock and will use i3lock to lock the
# screen before suspend. Use loginctl lock-session to lock your screen.
exec --no-startup-id xss-lock --transfer-sleep-lock -- ~/.local/share/i3/i3lock.sh

# Lock screen with ctrl+alt+L
bindsym Control+$alt+l exec --no-startup-id loginctl lock-session

# NetworkManager is the most popular way to manage wireless networks on Linux,
# and nm-applet is a desktop environment-independent system tray GUI for it.
exec --no-startup-id nm-applet

# Use pactl to adjust volume in PulseAudio.
bindsym XF86AudioRaiseVolume exec --no-startup-id pactl set-sink-volume @DEFAULT_SINK@ +10%
bindsym XF86AudioLowerVolume exec --no-startup-id pactl set-sink-volume @DEFAULT_SINK@ -10%
bindsym XF86AudioMute exec --no-startup-id pactl set-sink-mute @DEFAULT_SINK@ toggle
bindsym XF86AudioMicMute exec --no-startup-id pactl set-source-mute @DEFAULT_SOURCE@ toggle

# Use Mouse+$sup to drag floating windows to their wanted position
floating_modifier $sup

# Start a terminal
bindsym $sup+Return exec i3-sensible-terminal

# Kill focused window
bindsym $sup+Shift+q kill

# Start i3-dmenu-desktop. This is a wrapper around dmenu which only displays
# applications shipping a .desktop file
bindsym $alt+space exec i3-dmenu-desktop --dmenu='dmenu -i -l 10 -nb #393939 -nf #d3d0c8 -sb #6699cc -sf #f2f0ec'

# Change focus
bindsym $sup+h focus left
bindsym $sup+j focus down
bindsym $sup+k focus up
bindsym $sup+l focus right

# Alternatively, you can use the cursor keys:
bindsym $sup+Left focus left
bindsym $sup+Down focus down
bindsym $sup+Up focus up
bindsym $sup+Right focus right

# Move focused window
bindsym $sup+Shift+h move left
bindsym $sup+Shift+j move down
bindsym $sup+Shift+k move up
bindsym $sup+Shift+l move right

# Alternatively, you can use the cursor keys:
bindsym $sup+Shift+Left move left
bindsym $sup+Shift+Down move down
bindsym $sup+Shift+Up move up
bindsym $sup+Shift+Right move right

# Split in horizontal orientation
bindsym $sup+backslash split h

# Split in vertical orientation
bindsym $sup+minus split v

# Enter fullscreen mode for the focused container
bindsym $sup+f fullscreen toggle

# Change container layout (stacked, tabbed, toggle split)
bindsym $sup+s layout stacking
bindsym $sup+w layout tabbed
bindsym $sup+e layout toggle split

# Toggle tiling / floating
bindsym $sup+Shift+space floating toggle

# Change focus between tiling / floating windows
bindsym $sup+space focus mode_toggle

# Focus the parent container
bindsym $sup+a focus parent

# Focus the child container
#bindsym $sup+d focus child

# move the currently focused window to the scratchpad
bindsym $alt+Shift+minus move scratchpad

# Show the next scratchpad window or hide the focused scratchpad window.
# If there are multiple scratchpad windows, this command cycles through them.
bindsym $alt+minus scratchpad show

# Define names for default workspaces for which we configure key bindings later on.
# We use variables to avoid repeating the names in multiple places.
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"

# Switch to workspace
bindsym $sup+1 workspace $ws1
bindsym $sup+2 workspace $ws2
bindsym $sup+3 workspace $ws3
bindsym $sup+4 workspace $ws4
bindsym $sup+5 workspace $ws5
bindsym $sup+6 workspace $ws6
bindsym $sup+7 workspace $ws7
bindsym $sup+8 workspace $ws8
bindsym $sup+9 workspace $ws9
bindsym $sup+0 workspace $ws10

# Move focused container to workspace
bindsym $sup+Shift+1 move container to workspace $ws1
bindsym $sup+Shift+2 move container to workspace $ws2
bindsym $sup+Shift+3 move container to workspace $ws3
bindsym $sup+Shift+4 move container to workspace $ws4
bindsym $sup+Shift+5 move container to workspace $ws5
bindsym $sup+Shift+6 move container to workspace $ws6
bindsym $sup+Shift+7 move container to workspace $ws7
bindsym $sup+Shift+8 move container to workspace $ws8
bindsym $sup+Shift+9 move container to workspace $ws9
bindsym $sup+Shift+0 move container to workspace $ws10

# Reload the configuration file
bindsym $sup+Shift+c reload
# Restart i3 inplace (preserves your layout/session, can be used to upgrade i3)
bindsym $sup+Shift+r restart
# Exit i3 (logs you out of your X session)
bindsym $sup+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'"

# Screenshot
bindsym --release Print exec "import -window `xwininfo | awk '/.*Window id:.*/ {print $4}'` ~/Screenshots/$(date --iso-8601='seconds').png"

# Resize window (you can also use the mouse for that)
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 h resize shrink width 10 px or 10 ppt
    bindsym j resize grow height 10 px or 10 ppt
    bindsym k resize shrink height 10 px or 10 ppt
    bindsym l 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 Down resize grow height 10 px or 10 ppt
    bindsym Up resize shrink height 10 px or 10 ppt
    bindsym Right resize grow width 10 px or 10 ppt

    # Back to normal: Enter or Escape or $sup+r
    bindsym Return mode "default"
    bindsym Escape mode "default"
    bindsym $sup+r mode "default"
}
bindsym $sup+r mode "resize"

# Shutdown, reboot, lock screen
set $mode_system System (l) lock, (e) logout, (s) suspend, (h) hibernate, (r) reboot, (Shift+s) shutdown
mode "$mode_system" {
    bindsym l exec --no-startup-id loginctl lock-session, mode "default"
    bindsym e exec --no-startup-id i3-msg exit, mode "default"
    bindsym s exec --no-startup-id systemctl suspend, mode "default"
    bindsym h exec --no-startup-id systemctl hibernate, mode "default"
    bindsym r exec --no-startup-id systemctl reboot, mode "default"
    bindsym Shift+s exec --no-startup-id systemctl poweroff -i, mode "default"

    # Back to normal: Enter or Escape
    bindsym Return mode "default"
    bindsym Escape mode "default"
}
bindsym $alt+Control+Delete mode "$mode_system"

# Assign windows to workspaces
assign [class="Firefox"] workspace $ws2

# Basic color configuration using the Base16 variables for windows and borders.
# Property Name         Border  BG      Text    Indicator Child Border
client.focused          $base01 $base01 $base06 $base0D $base02
client.focused_inactive $base01 $base01 $base05 $base03 $base01
client.unfocused        $base01 $base00 $base05 $base01 $base01
client.urgent           $base08 $base08 $base00 $base08 $base08
client.placeholder      $base00 $base00 $base05 $base00 $base00
client.background       $base07

# Use smart edge borders
hide_edge_borders smart_no_gaps

# Gaps
for_window [class=".*"] border pixel 2
gaps inner 30

# Correct handling of floating dialogs
for_window [window_role="pop-up"] floating enable
for_window [window_role="task_dialog"] floating enable
for_window [title="^JidePopup$"] floating enable

# Launch polybar
exec_always --no-startup-id $HOME/.config/polybar/launch.sh

# Set wallpaper
exec --no-startup-id bash -c "source ~/.fehbg"

# Start desktop notification daemon
exec --no-startup-id dunst -config "$HOME/.config/dunst/dunstrc"

# Start compton
exec --no-startup-id compton --config ~/.config/compton/compton.conf -b -d :0

# Autostart applications
exec --no-startup-id xset r rate 200 40
exec --no-startup-id firefox