-
Notifications
You must be signed in to change notification settings - Fork 7
/
i3config
222 lines (168 loc) · 6.55 KB
/
i3config
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
# Dave Eddy's i3 config
#
# Author: Dave Eddy <dave@daveeddy.com>
# Date: June 19, 2018
# License: MIT
# Set keys
set $alt Mod1
set $sup Mod4
set $ctrl Control
# Disabled system bell
exec --no-startup-id xset b off
# Setup system to lock when suspended/screensaver
exec --no-startup-id exec xss-lock -- ~/bin/i3lock-retry -enfi ~/Pictures/lock.png
# Set screensaver to 10 minutes (xss-lock will start lock)
exec --no-startup-id xset s 600
# Set suspend to 10 minutes (xss-lock will start lock if not already locked)
# no automatic sleep
#exec --no-startup-id xautolock -time 10 -locker 'systemctl suspend' -detectsleep
# Enable tap-to-click on the touchpad
exec --no-startup-id xinput set-prop 'SynPS/2 Synaptics TouchPad' 'libinput Tapping Enabled' 1
# Disable middle-mouse button on the touchpad itself
exec --no-startup-id xinput set-prop 'SynPS/2 Synaptics TouchPad' 'libinput Middle Emulation Enabled' 1
# Set the DPI
exec --no-startup-id xrandr --output eDP1 --dpi 96
# Reduce tearing and fix notification area on xfce4-panel
exec --no-startup-id compton -CG --backend glx --vsync opengl-swc -b -D 0 --no-fading-openclose
# Keyboard Repeat Rate
exec --no-startup-id xset r rate 250 44
# Backgruond Image
exec --no-startup-id feh --bg-fill ~/Pictures/bg.png
# Load Xresources
exec --no-startup-id xrdb -merge ~/.Xresources
# Load xfce4-panel
exec --no-startup-id exec xfce4-panel --disable-wm-check
# Load volumeicon
exec --no-startup-id exec volumeicon
# Load network manager applet
exec --no-startup-id exec nm-applet
# Set initial keyboard layout
exec --no-startup-id setxkbmap dvorak,us
# Disable Bluetooth (done in my BIOS)
#exec --no-startup-id bluetooth off
# Disable CapsLock (why doesn't this work?!)
exec --no-startup-id setxkbmap -option caps:none
# Hide mouse when typing
exec --no-startup-id exec xbanish -i shift -i control -i mod1 -i mod4
# Start keeweb in the scratch space
#for_window [title="KeeWeb"] move scratchpad
#exec --no-startup-id KeeWeb
# Float some windows by default
for_window [class="Xfce4-panel" instance="xfce4-panel"] floating enable
for_window [class="Lxappearance" instance="lxappearance"] floating enable
for_window [class="Nm-connection-editor" instance="nm-connection-editor"] floating enable
# Give all windows a border
for_window [class="^.*"] border pixel 1
# Default font
font pango:DejaVu Sans Mono 12
# i3-gaps
gaps inner 9
gaps outer 0
# Use Mouse+$sup to drag floating windows to their wanted position
floating_modifier $sup
# Backlight keys
bindsym XF86MonBrightnessUp exec --no-startup-id xbacklight -inc 5
bindsym XF86MonBrightnessDown exec --no-startup-id xbacklight -dec 5
# Volume keys (handled by volumeicon, left in here for reference)
#bindsym XF86AudioRaiseVolume exec --no-startup-id pactl set-sink-volume 0 +5%
#bindsym XF86AudioLowerVolume exec --no-startup-id pactl set-sink-volume 0 -5%
#bindsym XF86AudioMute exec --no-startup-id pactl set-sink-mute 0 toggle
# Screenshots
bindsym Print exec scrot '%Y-%m-%d_%H:%M:%S_$wx$h_scrot.png' -e 'mv $f ~/Pictures/screenshots'
bindsym --release $sup+Print exec scrot -s '%Y-%m-%d_%H:%M:%S_$wx$h_scrot.png' -e 'mv $f ~/Pictures/screenshots'
# Start screensaver (xss-lock will start lock)
bindsym $sup+shift+l exec xset s activate
# start a terminal
bindsym $sup+Return exec exec urxvt
# kill focused window
bindsym $sup+q kill
# Toggle Keyboard Layout
bindsym $ctrl+space exec ~/bin/keyboard toggle
# Rofi
bindsym $alt+space exec exec rofi -modi drun -show-icons -show drun -sidebar-mode
bindsym $alt+Tab exec exec rofi -show window
# 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
# move focus
bindsym $sup+Left focus left
bindsym $sup+Right focus right
bindsym $sup+Down focus down
bindsym $sup+Up focus up
bindsym $alt+shift+Left focus left
bindsym $alt+shift+Right focus right
bindsym $alt+shift+Up focus up
bindsym $alt+shift+Down focus down
# move window
bindsym $sup+Shift+Left move left
bindsym $sup+Shift+Right move right
bindsym $sup+Shift+Down move down
bindsym $sup+Shift+Up move up
# Resize
bindsym $sup+Ctrl+Right resize shrink width 1 px or 1 ppt
bindsym $sup+Ctrl+Up resize grow height 1 px or 1 ppt
bindsym $sup+Ctrl+Down resize shrink height 1 px or 1 ppt
bindsym $sup+Ctrl+Left resize grow width 1 px or 1 ppt
# split in horizontal orientation
bindsym $sup+h split h
# split in vertical orientation
bindsym $sup+v split v
# enter fullscreen mode for the focused container
bindsym $alt+Return fullscreen toggle
# change container layout (stacked, tabbed, toggle split)
bindsym $sup+s layout stacking
bindsym $sup+n layout toggle split
bindsym $sup+t layout tabbed
bindsym $sup+space 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 to scratchpad
bindsym $sup+Shift+minus move scratchpad
# Show the first scratchpad window
bindsym $sup+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
# Switch to next/prev workspace
bindsym $ctrl+Left workspace prev
bindsym $ctrl+Right workspace next
# 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
# 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'"