i3/config (view raw)
1# _ _____ _____
2# (_)__ / _________ ____ / __(_)___ _
3# / / /_ < / ___/ __ \/ __ \/ /_/ / __ `/
4# / /___/ / / /__/ /_/ / / / / __/ / /_/ /
5#/_//____/ \___/\____/_/ /_/_/ /_/\__, /
6# /____/
7
8
9
10set $mod Mod4
11
12# set fonts in funky way
13font pango: SF Mono SemiBold 12
14# for_window [class=".*"] title_format "<span font='SF Mono SemiBold 11'> › %title</span>"
15# Use Mouse+$mod to drag floating windows to their wanted position
16floating_modifier $mod
17for_window [class="^.*"] border none
18
19# start a terminal
20bindsym $mod+Return exec xfce4-terminal
21for_window [class="Telegram"] floating enable
22
23# kill focused window
24bindsym $mod+Shift+q kill
25
26# lock the screen
27bindsym $mod+Ctrl+l exec ~/bin/lock.sh
28
29# start rofi (an alternative to dmenu)
30bindsym $mod+d exec "rofi -show run"
31
32# disable title bar
33#new_window pixel 2
34new_window normal 0
35
36# change focus
37bindsym $mod+h focus left
38bindsym $mod+j focus down
39bindsym $mod+k focus up
40bindsym $mod+l focus right
41
42# alternatively, you can use the cursor keys:
43bindsym $mod+Left focus left
44bindsym $mod+Down focus down
45bindsym $mod+Up focus up
46bindsym $mod+Right focus right
47
48# move focused window
49bindsym $mod+Shift+h move left
50bindsym $mod+Shift+j move down
51bindsym $mod+Shift+k move up
52bindsym $mod+Shift+l move right
53
54# alternatively, you can use the cursor keys:
55bindsym $mod+Shift+Left move left
56bindsym $mod+Shift+Down move down
57bindsym $mod+Shift+Up move up
58bindsym $mod+Shift+Right move right
59
60# split in horizontal orientation
61bindsym $mod+g split h
62
63# split in vertical orientation
64bindsym $mod+v split v
65
66# enter fullscreen mode for the focused container
67bindsym $mod+f fullscreen toggle
68
69# change container layout (stacked, tabbed, toggle split)
70bindsym $mod+s layout stacking
71bindsym $mod+w layout tabbed
72bindsym $mod+e layout toggle split
73
74# toggle tiling / floating
75bindsym $mod+Shift+space floating toggle
76
77# change focus between tiling / floating windows
78bindsym $mod+space focus mode_toggle
79
80# focus the parent container
81bindsym $mod+a focus parent
82
83# focus the child container
84bindsym $mod+x focus child
85
86# Name the workspaces
87set $tag1 1:""
88set $tag2 2:""
89set $tag3 3:""
90set $tag4 4:""
91set $tag5 5:""
92
93
94# switch to workspace
95bindsym $mod+1 workspace $tag1
96bindsym $mod+2 workspace $tag2
97bindsym $mod+3 workspace $tag3
98bindsym $mod+4 workspace $tag4
99bindsym $mod+5 workspace $tag5
100
101
102# move focused container to workspace
103bindsym $mod+Shift+1 move container to workspace $tag1
104bindsym $mod+Shift+2 move container to workspace $tag2
105bindsym $mod+Shift+3 move container to workspace $tag3
106bindsym $mod+Shift+4 move container to workspace $tag4
107bindsym $mod+Shift+5 move container to workspace $tag5
108
109
110# reload the configuration file
111bindsym $mod+Shift+c reload
112# restart i3 inplace (preserves your layout/session, can be used to upgrade i3)
113bindsym $mod+Shift+r restart
114
115# resize window (you can also use the mouse for that)
116mode "resize" {
117 # These bindings trigger as soon as you enter the resize mode
118
119 # Pressing left will shrink the window’s width.
120 # Pressing right will grow the window’s width.
121 # Pressing up will shrink the window’s height.
122 # Pressing down will grow the window’s height.
123 bindsym h resize shrink width 15 px or 15 ppt
124 bindsym j resize grow height 15 px or 15 ppt
125 bindsym k resize shrink height 15 px or 15 ppt
126 bindsym l resize grow width 15 px or 15 ppt
127
128 # same bindings, but for the arrow keys
129 bindsym Left resize shrink width 10 px or 10 ppt
130 bindsym Down resize grow height 10 px or 10 ppt
131 bindsym Up resize shrink height 10 px or 10 ppt
132 bindsym Right resize grow width 10 px or 10 ppt
133
134 # back to normal: Enter or Escape
135 bindsym Return mode "default"
136 bindsym Escape mode "default"
137}
138
139# assign windows to workspaces
140
141assign [class="Steam"] $tag4
142assign [class="Battle.net.exe"] $tag5
143assign [class="firefox"] $tag1
144assign [class="spotify"] $tag3
145
146# selectively enable floating
147
148for_window [class="Steam"] floating enable
149for_window [class="Keybase"] floating enable
150for_window [class="Battle.net.exe"] floating enable
151
152bindsym $mod+r mode "resize"
153
154## colors
155
156set $base00 #212121
157set $base01 #303030
158set $base02 #353535
159set $base03 #4a4a4a
160set $base04 #b2ccd6
161set $base05 #eeffff
162set $base06 #eeffff
163set $base07 #ffffff
164set $base08 #f07178
165set $base09 #f78c6c
166set $base0A #ffcb6b
167set $base0B #c3e88d
168set $base0C #89ddff
169set $base0D #82aaff
170set $base0E #c792ea
171set $base0F #ff5370
172
173# Basic color configuration using the Base16 variables for windows and borders.
174# Property Name Border BG Text Indicator Child Border
175client.focused $base05 $base05 $base00 $base05 $base05
176client.focused_inactive $base01 $base01 $base05 $base03 $base01
177client.unfocused $base00 $base00 $base05 $base03 $base01
178client.urgent $base08 $base08 $base00 $base08 $base08
179client.placeholder $base00 $base00 $base05 $base00 $base00
180client.background $base07
181# smart_gaps on
182# smart_borders on
183
184
185# executions
186exec xrdb -load ~/.Xresources
187exec compton &
188exec xautolock -time 7 -locker ~/bin/lock.sh
189exec_always --no-startup-id ~/bin/bar.sh
190exec feh --bg-fill ~/.wall
191exec_always --no-startup-id ~/.local/bin/flashfocus
192exec_always dunst
193exec --no-startup-id udiskie -ans &
194
195# cycle workspaces
196bindsym $mod+Tab workspace back_and_forth
197bindsym $mod+q workspace next
198
199# rofi-pass
200bindsym $mod+p exec "rofi-pass"
201
202# volume controls
203bindsym XF86AudioRaiseVolume exec --no-startup-id pactl set-sink-volume 0 +5%
204bindsym XF86AudioLowerVolume exec --no-startup-id pactl set-sink-volume 0 -5%
205bindsym XF86AudioMute exec --no-startup-id pactl set-sink-mute 0 toggle
206
207# brightness controls
208bindsym XF86MonBrightnessUp exec xbacklight -inc 5
209bindsym XF86MonBrightnessDown exec xbacklight -dec 5
210
211# media player controls
212
213bindsym XF86AudioPlay exec playerctl play
214bindsym XF86AudioPause exec playerctl pause
215bindsym XF86AudioNext exec playerctl next
216bindsym XF86AudioPrev exec playerctl previous