-
Notifications
You must be signed in to change notification settings - Fork 30
/
config
275 lines (234 loc) · 9.68 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
###############################################################################################################
# Filename: i3/config #
# Maintainer: Yash Srivastav <[email protected]> #
# URL: https://github.com/yashsriv/i3-config #
# #
# Sets i3 settings for the session #
###############################################################################################################
set $mod Mod4
# Font for window titles. Will also be used by the bar unless a different font
# is used in the bar {} block below.
# This font is widely installed, provides lots of unicode glyphs, right-to-left
# text rendering and scalability on retina/hidpi displays (thanks to pango).
font pango:Noto Sans 12
# Use Mouse+$mod to drag floating windows to their wanted position
floating_modifier $mod
# start a terminal
bindsym $mod+Shift+Return exec /home/yash/bin/terminal
bindsym $mod+Return exec st
# kill focused window
bindsym $mod+q kill
# start rofi (a program launcher)
bindsym $mod+d exec --no-startup-id "rofi -combi-modi drun,run -show combi"
bindsym $mod+Shift+d exec --no-startup-id rofi -show window
bindsym Mod1+Tab exec --no-startup-id rofi -show window
# change focus
bindsym $mod+j focus left
bindsym $mod+k focus down
bindsym $mod+l focus up
bindsym $mod+semicolon 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
# move focused window
bindsym $mod+Shift+j move left
bindsym $mod+Shift+k move down
bindsym $mod+Shift+l move up
bindsym $mod+Shift+semicolon move right
# alternatively, you can use the cursor keys:
bindsym $mod+Shift+Left move left
bindsym $mod+Shift+Down move down
bindsym $mod+Shift+Up move up
bindsym $mod+Shift+Right move right
# split in horizontal orientation
bindsym $mod+h 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, toggle split)
bindsym $mod+s layout stacking
bindsym $mod+w layout tabbed
bindsym $mod+e layout toggle split
# toggle tiling / floating
bindsym $mod+Shift+space floating toggle
# change focus between tiling / floating windows
bindsym $mod+space focus mode_toggle
# focus the parent container
bindsym $mod+a focus parent
# focus the child container
bindsym $mod+z focus child
# switch to workspace
set $workspace1 "1: "
set $workspace2 "2: "
set $workspace8 "8: "
set $workspace9 "9: "
set $workspace10 "10: "
set $binfolder "~/.i3/bin"
bindsym $mod+1 workspace $workspace1
bindsym $mod+2 workspace $workspace2
bindsym $mod+3 workspace number 3
bindsym $mod+4 workspace number 4
bindsym $mod+5 workspace number 5
bindsym $mod+6 workspace number 6
bindsym $mod+7 workspace number 7
bindsym $mod+8 workspace $workspace8
bindsym $mod+9 workspace $workspace9
bindsym $mod+0 workspace $workspace10
# move focused container to workspace
bindsym $mod+Shift+1 move container to workspace $workspace1
bindsym $mod+Shift+2 move container to workspace $workspace2
bindsym $mod+Shift+3 move container to workspace number 3
bindsym $mod+Shift+4 move container to workspace number 4
bindsym $mod+Shift+5 move container to workspace number 5
bindsym $mod+Shift+6 move container to workspace number 6
bindsym $mod+Shift+7 move container to workspace number 7
bindsym $mod+Shift+8 move container to workspace number 8
bindsym $mod+Shift+9 move container to workspace $workspace9
bindsym $mod+Shift+0 move container to workspace $workspace10
# reload the configuration file
bindsym $mod+Shift+c reload
# restart i3 inplace (preserves your layout/session, can be used to upgrade i3)
bindsym $mod+Shift+r restart
# 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'"
# 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
bindsym Return mode "default"
bindsym Escape mode "default"
}
bindsym $mod+r mode "resize"
# Start i3bar to display a workspace bar (plus the system information i3status
# finds out, if available)
bar {
i3bar_command i3bar
status_command /usr/bin/i3blocks -c /home/yash/.i3/i3blocks.conf
position top
font pango:SauceCodePro Nerd Font
strip_workspace_numbers yes
separator_symbol "-"
workspace_buttons yes
bindsym button4 nop
bindsym button5 nop
tray_padding 0
colors {
statusline #ffffff
background #000000
separator #000000ff
# BORDER BACKGROUND TEXT
focused_workspace #00000000 #00000000 #c6ff00
inactive_workspace #00000000 #00000000 #dddddd
active_workspace #00000000 #00000000 #ffffff
urgent_workspace #b71c1c #b71c1c #00000000
binding_mode #b71c1c #b71c1c #00000000
}
}
# Brightness
bindsym XF86MonBrightnessUp exec xbacklight + 10
bindsym XF86MonBrightnessDown exec xbacklight - 10
# Pulse Audio controls
#increase sound volume
bindsym XF86AudioRaiseVolume exec --no-startup-id /bin/bash "/home/yash/.i3/bin/volume.sh" up
#decrease sound volume
bindsym XF86AudioLowerVolume exec --no-startup-id /bin/bash "/home/yash/.i3/bin/volume.sh" down
# mute sound
bindsym XF86AudioMute exec --no-startup-id /bin/bash "/home/yash/.i3/bin/volume.sh" mute
# Next Song
bindsym XF86AudioNext exec --no-startup-id cmus-remote --next && pkill --signal SIGRTMIN+13 i3blocks
# Prev Song
bindsym XF86AudioPrev exec --no-startup-id cmus-remote --prev && pkill --signal SIGRTMIN+13 i3blocks
# Play Pause
bindsym XF86AudioPlay exec --no-startup-id cmus-remote --pause && pkill --signal SIGRTMIN+13 i3blocks
# Screenshot
bindsym Print exec teiler
# switch workspace
bindsym $mod+comma workspace prev
bindsym $mod+period workspace next
# Special system mode
set $mode_system System (l) lock, (e) logout, (s) suspend, (h) hibernate
mode "$mode_system" {
bindsym l exec --no-startup-id light-locker-command -l, 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"
# back to normal
bindsym Return mode "default"
bindsym Escape mode "default"
}
bindsym $mod+Alt_R mode "$mode_system"
# Set background
exec_always --no-startup-id nitrogen --restore
# Capslock is control
exec --no-startup-id xmodmap ~/.Xmodmap
# run special warning script
exec --no-startup-id ~/.i3/bin/i3nag.sh
# Wallpaper Script
exec --no-startup-id ~/.i3/bin/wallpaper.sh
# Network Applet
exec --no-startup-id nm-applet
# Redshift Applet
exec --no-startup-id systemctl --user start redshift-gtk
# Workspace music
bindsym $mod+m workspace "♪"
bindsym $mod+Shift+m move container to workspace "♪"
# Set workspace name
bindsym $mod+t exec i3-input -F 'rename workspace to %s' -P 'New name: '
# Music control
# Special music mode
set $music Music (n) next, (b) prev, (p) play/pause
mode "$music" {
bindsym n exec --no-startup-id cmus-remote --next && pkill --signal SIGRTMIN+13 i3blocks, mode "default"
bindsym b exec --no-startup-id cmus-remote --prev && pkill --signal SIGRTMIN+13 i3blocks, mode "default"
bindsym p exec --no-startup-id cmus-remote --pause && pkill --signal SIGRTMIN+13 i3blocks, mode "default"
# back to normal
bindsym Return mode "default"
bindsym Escape mode "default"
}
# Emergency start cmus
bindsym $mod+Shift+Tab exec screen -S cmus -d -m cmus && pkill --signal SIGRTMIN+13 i3blocks
bindsym $mod+Tab mode "$music"
# Compositing Manager
exec --no-startup-id compton -b
# Tiling Window Manager Notification Daemon
exec --no-startup-id twmnd
# Set color Profile
exec --no-startup-id xcalib -d :0 /home/yash/.color/icc/Seiko.icc
# Move workspaces between output
bindsym $mod+y move workspace to output left
# Colors
client.focused #c6ff00 #c6ff00 #000000 #dddddd
client.focused_inactive #333333 #333333 #c6ff00 #ffffff
client.unfocused #333333 #333333 #888888 #292d2e
client.urgent #2f343a #900000 #ffffff #900000
assign [class=".*(F|f)irefox.*"] $workspace1
assign [class="chromium"] $workspace9
assign [class="mpv"] $workspace10
for_window [class="^.*"] border pixel 3
for_window [class="^Floatme$"] floating enable
for_window [class="^mpv$"] move to $workspace10
for_window [class="^chromium$"] move to $workspace9
for_window [class="^Vivaldi$"] move to $workspace9
gaps outer 5
gaps inner 10
smart_gaps on
smart_borders no_gaps
# Startup
exec --no-startup-id i3-msg 'workspace 2: ; exec st'
# Start cmus in the background on a separate screen session
exec screen -S cmus -d -m cmus && sleep 5 && pkill --signal SIGRTMIN+13 i3blocks