-
Notifications
You must be signed in to change notification settings - Fork 0
/
config
219 lines (170 loc) · 6.86 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
# Rob's i3 config file
##
# Variables
##
set $alt Mod1
set $windows Mod4
set $scripts ~/.i3/scripts
set $left_monitor DP-5
set $center_monitor DP-3
set $right_monitor HDMI-0
##
# Custom Hotkeys
##
# Lock screen (this script does a little more than just locking the screen)
bindsym $alt+Ctrl+l exec $scripts/lock-wrapper
# Suspend
bindsym $alt+Shift+s exec $scripts/suspend
# Take a screenshot, OSX-style. Requires MAIM.
bindsym $alt+Shift+4 exec maim -s --format=png ~/Desktop/Screenshot\ $(date +%s).png
bindsym $alt+Ctrl+Shift+4 exec maim -s --format=png /dev/stdout | xclip -selection clipboard -t image/png -i
# Start a terminal in active screen. Can add 'h' or 'v' to align it with other apps.
bindsym $windows+Return exec terminator
# Kill focused window. Also kills the application running in the window.
bindsym $windows+Shift+q kill
# Program launcher
bindsym $windows+d exec --no-startup-id i3-dmenu-desktop
# Reload the configuration file
bindsym $windows+Shift+c reload
# Restart i3 inplace (preserves your layout/session, can be used to upgrade i3)
bindsym $windows+Shift+r restart
# Exit i3 (logs you out of your X session)
bindsym $windows+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'"
###
# Media Player Controls
##
# Windows + Print screen key jumps to start of song, or previous song
bindsym $windows+Delete exec "$scripts/mediaplayer.sh 'previous'"
# Windows + Scroll lock key toggles the play/pause playback state
bindsym $windows+Insert exec "$scripts/mediaplayer.sh 'toggle'"
# Windows + Pause key jumps to next song
bindsym $windows+End exec "$scripts/mediaplayer.sh 'next'"
# Windows + PageUp key increases the system volume
bindsym $windows+Prior exec "$scripts/mediaplayer.sh 'volume_up'"
# Windows + PageDn key decreases the system volume
bindsym $windows+Next exec "$scripts/mediaplayer.sh 'volume_down'"
# Windows + Shift + PageDn key mutes/unmutes the system volume
bindsym $windows+Shift+Pause exec "$scripts/mediaplayer.sh 'volume_mute'"
###
# Screen Brightness Controls
##
# Increase the screen brightness
bindsym $windows+Ctrl+Up exec "$scripts/adjust-brightness.sh 'inc'"
# Decrease the screen brightness
bindsym $windows+Ctrl+Down exec "$scripts/adjust-brightness.sh 'dec'"
# Reset the screen brightness
bindsym $windows+F11 exec "$scripts/adjust-brightness.sh 'reset'"
# Turn off screen
bindsym $windows+Shift+F11 exec "$scripts/adjust-brightness.sh 'off'"
##
# Status Bar
##
bar {
status_command $scripts/status.sh
position bottom
mode dock
workspace_buttons yes
tray_output none
font pango:Droid Sans 8
colors {
background #333333
statusline #dddddd
separator #aaaaaa
focused_workspace #777777 #cccccc #444444
active_workspace #777777 #cccccc #444444
inactive_workspace #555555 #444444 #cccccc
urgent_workspace #999999 #ffffff #222222
}
}
##
# Workspace Management
##
font pango:DejaVu Sans Mono 8
# Define named workspaces on specific monitors:
workspace "1: main" output $center_monitor
workspace "2: chat" output $left_monitor
workspace "3: term" output $right_monitor
workspace "4: spotify" output $right_monitor
workspace "5: atom" output $center_monitor
# Configure applications to launch on certain workspaces.
# Note: these are global settings.
assign [class="Firefox"] "1: main"
assign [class="Slack"] "2: chat"
assign [class="Atom"] "5: atom"
for_window [class="Spotify"] move to workspace "4: spotify"
# Switch to workspace
bindsym $windows+1 workspace number 1
bindsym $windows+2 workspace number 2
bindsym $windows+3 workspace number 3
bindsym $windows+4 workspace number 4
bindsym $windows+5 workspace number 5
bindsym $windows+6 workspace number 6
bindsym $windows+7 workspace number 7
bindsym $windows+8 workspace number 8
# Move focused container to workspace
bindsym $windows+Shift+1 move container to workspace number 1
bindsym $windows+Shift+2 move container to workspace number 2
bindsym $windows+Shift+3 move container to workspace number 3
bindsym $windows+Shift+4 move container to workspace number 4
bindsym $windows+Shift+5 move container to workspace number 5
bindsym $windows+Shift+6 move container to workspace number 6
bindsym $windows+Shift+7 move container to workspace number 7
bindsym $windows+Shift+8 move container to workspace number 8
# Use Mouse+$windows to drag floating windows to their wanted position
floating_modifier $windows
# Change focus
bindsym $windows+Left focus left
bindsym $windows+Down focus down
bindsym $windows+Up focus up
bindsym $windows+Right focus right
# Move focused window
bindsym $windows+Shift+Left move left
bindsym $windows+Shift+Down move down
bindsym $windows+Shift+Up move up
bindsym $windows+Shift+Right move right
# Split in horizontal orientation
bindsym $windows+h split h
# Split in vertical orientation
bindsym $windows+v split v
# Enter fullscreen mode for the focused container
bindsym $windows+f fullscreen
# Change container layout (stacked, tabbed, toggle split)
bindsym $windows+s layout stacking
bindsym $windows+w layout tabbed
bindsym $windows+e layout toggle split
# Toggle tiling / floating
bindsym $windows+Shift+space floating toggle
# Change focus between tiling / floating windows
bindsym $windows+space focus mode_toggle
# Focus the parent container
bindsym $windows+a focus parent
# 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 j resize shrink width 10 px or 10 ppt
bindsym k resize grow height 10 px or 10 ppt
bindsym l resize shrink height 10 px or 10 ppt
bindsym semicolon 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
bindsym Return mode "default"
bindsym Escape mode "default"
}
bindsym $windows+r mode "resize"
##
# Startup Scripts
##
# Set the background image
exec feh --bg-scale --no-xinerama --no-fehbg .desktop-background
# Set up multiple monitors
exec $scripts/xrandr.sh
# Launch startup programs
exec $scripts/startup-programs.sh