modified: i3/config
[my-dotfiles.git] / i3 / config
CommitLineData
fdd76fc5 1# This file has been auto-generated by i3-config-wizard(1).
2# It will not be overwritten, so edit it as you like.
3#
4# Should you change your keyboard layout some time, delete
5# this file and re-run i3-config-wizard(1).
6#
7
8###########################
9# xbindkeys -k #
10# xprop | grep -i 'class' #
11###########################
12
13# i3 config file (v4)
14#
15# Please see http://i3wm.org/docs/userguide.html for a complete reference!
16
17# set modifiers
18##
19## Win to be used to issue commands application related, like launching programs
20## Alt to be used to issue commands desktop related, like modifying layout of windows
21## Ctrl in combination with the other two, to issue special commands.
22set $win Mod4
23set $alt Mod1
24set $ctrl Ctrl
25
7abef725 26# browser variable
27set $browser firefox
28set $incognito-browser firefox --private-window
29# editor variable
30set $prog-editor sublime_text
31
fdd76fc5 32# title alignment
33#title_align center
34
35#set $rofi "rofi -show run -font 'Droid Sans Mono 10' -theme Monokai -width 40 -location 2 -lines 7 -bw 2 -yoffset -2"
36#set $rofissh "rofi -show ssh -font 'Droid Sans Mono 10' -theme Monokai"
37
38# Workspace names
39# # to display names or symbols instead of plain workspace numbers you can use
40# # something like: set $ws1 1:mail
41# # set $ws2 2:x
42#
7abef725 43set $ws1 "web"
44set $ws2 "editor"
45set $ws3 "console"
46set $ws4 "ssh"
47set $ws5 "graphic"
48set $ws6 "editor2"
49set $ws7 "chat"
50set $ws8 "music"
fdd76fc5 51
52# per workspace gaps
53workspace $ws1 gaps inner 0
54workspace $ws1 gaps outer 0
55workspace $ws2 gaps inner 0
56workspace $ws2 gaps outer 0
57
58
59# Font for window titles. Will also be used by the bar unless a different font
60# is used in the bar {} block below.
61font pango:"Droid Sans 10"
62
63# Use Mouse+$win to drag floating windows to their wanted position
64floating_modifier $win
65
66# start a terminal
7abef725 67# macropad 5
68bindsym $alt+Return exec --no-startup-id alacritty
69# macropad Shift+5
70bindsym Shift+$alt+Return exec --no-startup-id blackpearl-sshmenu.sh
71
fdd76fc5 72
73# custom binding
7abef725 74# macropad 4
75bindsym Shift+$ctrl+l exec --no-startup-id clipmenu -no-lazy-grab -show run -theme blackpearl/runner
76bindsym $alt+Shift+$ctrl+l exec --no-startup-id xclip -o | qrencode -o - | feh -Z -
fdd76fc5 77bindsym Print exec --no-startup-id blackpearl-scrotmenu.sh
73f936b3 78bindsym $alt+Menu exec --no-startup-id blackpearl-utilsmenu.sh
7abef725 79bindsym $win+Menu exec --no-startup-id blackpearl-appsmenu.sh
fdd76fc5 80bindsym $alt+Escape --release exec xkill
81bindsym $win+e exec pcmanfm-qt
7abef725 82# macropad 3
83bindsym $win+g exec gimp
fdd76fc5 84#bindsym $win+x exec --no-startup-id i3-exit
7abef725 85#bindsym $win+s exec --no-startup-id wol d4:c9:ef:f1:c9:24
fdd76fc5 86bindsym $win+l exec --no-startup-id i3lock-fancy
7abef725 87# macropad 1
88bindsym $win+w exec $browser
89# macropad Shift+1
90bindsym $win+Shift+w exec $incognito-browser
fdd76fc5 91bindsym XF86Calculator exec kcalc
92bindsym XF86Sleep exec i3suspend
7abef725 93# macropad 2
94bindsym $win+r exec $prog-editor
95bindsym $win+Shift+r exec Typora
fdd76fc5 96bindsym XF86HomePage exec --no-startup-id blackpearl-appsmenu.sh
7abef725 97#bindsym $win+p exec uxterm -T "spt" -geometry 90x30+800+30 -e spt
98bindsym $win+m exec Telegram
fdd76fc5 99
100# window switching bindings
101bindsym $alt+Tab exec --no-startup-id "blackpearl-window.sh desktop"
102bindsym $alt+Ctrl+Tab exec --no-startup-id "blackpearl-window.sh all"
103
7abef725 104# multimedia binding
105# macropad top encoder
fdd76fc5 106bindsym XF86AudioMute exec --no-startup-id pamixer -t
107bindsym XF86AudioLowerVolume exec --no-startup-id pamixer -d 5
108bindsym XF86AudioRaiseVolume exec --no-startup-id pamixer -i 5
7abef725 109# macropad bottom encoder
110bindsym XF86AudioPlay exec --no-startup-id playerctl play-pause
111bindsym XF86AudioPrev exec --no-startup-id playerctl previous
112bindsym XF86AudioNext exec --no-startup-id playerctl next
113
114# brightness bindings
115# macropad Alt + top encoder
116bindsym $alt+XF86AudioLowerVolume exec --no-startup-id monitor-light.sh dec 10
117bindsym $alt+XF86AudioRaiseVolume exec --no-startup-id monitor-light.sh inc 10
fdd76fc5 118
119# kill focused window
120#bindsym $ctrl+Shift+q kill
d20911e0 121bindsym --whole-window $alt+button2 kill
fdd76fc5 122
7abef725 123# restart polybar
124# macropad Alt + bottom encoder
125bindsym $alt+XF86AudioPlay exec --no-startup-id polybar-msg cmd restart
126
127# start rofi in dmenu mode (a program launcher)
fdd76fc5 128bindsym $alt+F2 exec --no-startup-id blackpearl-runner.sh
129
130# change focus
131bindsym $alt+j focus left
132bindsym $alt+k focus down
133bindsym $alt+l focus up
134bindsym $alt+ograve focus right
135
136# alternatively, you can use the cursor keys:
137bindsym $alt+Left focus left
138bindsym $alt+Down focus down
139bindsym $alt+Up focus up
140bindsym $alt+Right focus right
141
142# move focused window
143bindsym $alt+Shift+j move left
144bindsym $alt+Shift+k move down
145bindsym $alt+Shift+l move up
146bindsym $alt+Shift+ograve move right
147
148# alternatively, you can use the cursor keys:
149bindsym $alt+Shift+Left move left
150bindsym $alt+Shift+Down move down
151bindsym $alt+Shift+Up move up
152bindsym $alt+Shift+Right move right
153
154# split in horizontal orientation
7abef725 155bindsym $alt+h split h;exec notify-send 'splitting windows horizontally'
fdd76fc5 156# split in vertical orientation
7abef725 157bindsym Shift+$alt+h split v;exec notify-send 'splitting windows vertically'
fdd76fc5 158
159# enter fullscreen mode for the focused container
160bindsym $alt+f fullscreen toggle
161
162# change container layout (stacked, tabbed, toggle split)
fdd76fc5 163bindsym $alt+w layout tabbed;exec notify-send 'layout tabbed'
7abef725 164bindsym Shift+$alt+w layout stacking;exec notify-send 'layout stacking'
165bindsym Ctrl+$alt+w layout toggle split;exec notify-send 'layout split'
fdd76fc5 166
167# toggle tiling / floating
168bindsym $alt+Shift+space floating toggle
169
170# change focus between tiling / floating windows
171bindsym $alt+space focus mode_toggle
172
173# focus the parent container
174bindsym $alt+a focus parent
175
176# focus the child container
177#bindsym $win+d focus child
178
179# switch to workspace
180bindsym Ctrl+F1 workspace $ws1
181bindsym Ctrl+F2 workspace $ws2
182bindsym Ctrl+F3 workspace $ws3
183bindsym Ctrl+F4 workspace $ws4
7abef725 184bindsym Shift+Ctrl+F1 workspace $ws5
185bindsym Shift+Ctrl+F2 workspace $ws6
186bindsym Shift+Ctrl+F3 workspace $ws7
187bindsym Shift+Ctrl+F4 workspace $ws8
fdd76fc5 188
189# move focused container to workspace
7abef725 190bindsym $win+Ctrl+F1 move container to workspace $ws1
191bindsym $win+Ctrl+F2 move container to workspace $ws2
192bindsym $win+Ctrl+F3 move container to workspace $ws3
193bindsym $win+Ctrl+F4 move container to workspace $ws4
194bindsym $win+Shift+Ctrl+F1 move container to workspace $ws5
195bindsym $win+Shift+Ctrl+F2 move container to workspace $ws6
196bindsym $win+Shift+Ctrl+F3 move container to workspace $ws7
197bindsym $win+Shift+Ctrl+F4 move container to workspace $ws8
fdd76fc5 198
199# navigate workspaces
200#bindsym $win+Home workspace $ws1
201#bindsym $win+End workspace $ws8
7abef725 202bindsym $win+XF86AudioPrev workspace prev
203bindsym $win+XF86AudioNext workspace next
fdd76fc5 204
205# assign programs to specific workspaces
7abef725 206assign [class="Firefox"] $ws1
207assign [class="Sublime_text"] $ws2
208for_window [title="^ssh*"] move to workspace $ws4
209assign [class="Alacritty"] $ws3
210assign [class="Gimp"] $ws5
73f936b3 211assign [class="Typora"] $ws6
7abef725 212assign [class="trojita"] $ws6
213assign [class="Joplin"] $ws8
9ce54eaf 214assign [class="Telegram"] $ws7
fdd76fc5 215
216# open specific apps in floating mode
217for_window [class="kcalc"] floating enable border pixel 1
218for_window [class="lxsudo"] floating enable border pixel 1
219for_window [title="^spt$"] floating enable border pixel 1
220
7abef725 221# trojita starts in tabbed layout
222for_window [class="trojita"] layout tabbed
223
fdd76fc5 224# switch to workspace with urgent window automatically
225for_window [urgent=latest] focus
226
7abef725 227client.focused #f57c00 #ffb74d #303030 #7986cb
228client.focused_inactive #303030 #303030 #ffb74d #303030
229client.unfocused #303030 #303030 #BDBDBD #303030
230client.urgent #D32F2F #D32F2F #303030 #D32F2F
fdd76fc5 231
232# window borders
233hide_edge_borders both
234for_window [class="^.*"] border pixel 0
235
236gaps outer 0
237gaps inner 10
238workspace $ws1 gaps inner 0
239workspace $ws2 gaps inner 0
240workspace $ws5 gaps inner 0
241
242# reload the configuration file
243bindsym $alt+Shift+c reload
244
245# restart i3 inplace (preserves your layout/session, can be used to upgrade i3)
246bindsym $alt+Shift+r restart
247
248# exit i3 (logs you out of your X session)
249#bindsym $win+Shift+e exec "i3-nagbar -t warning -m 'Exit i3? This will end your session.' -b 'Yes, exit i3' 'i3-msg exit'"
250
251# Set shut down, restart and locking features
252bindsym $win+x exec --no-startup-id blackpearl-powermenu.sh
253
254# resize window (you can also use the mouse for that)
255mode "resize" {
256 # These bindings trigger as soon as you enter the resize mode
257
258 bindsym j resize shrink width 10 px or 10 ppt
259 bindsym k resize grow height 10 px or 10 ppt
260 bindsym l resize shrink height 10 px or 10 ppt
261 bindsym ograve resize grow width 10 px or 10 ppt
262
263 # same bindings, but for the arrow keys
264 bindsym Left resize shrink width 10 px or 10 ppt
265 bindsym Down resize grow height 10 px or 10 ppt
266 bindsym Up resize shrink height 10 px or 10 ppt
267 bindsym Right resize grow width 10 px or 10 ppt
268
269 # back to normal: Enter or Escape
270 bindsym Return mode "default"
271 bindsym Escape mode "default"
272}
273
274bindsym $win+Ctrl+r mode "resize"
275
276set $wine_gaps_outer Outer Gaps: +|-|0 (local), Shift + +|-|0 (global)
277set $wine_gaps_inner Inner Gaps: +|-|0 (local), Shift + +|-|0 (global)
278bindsym $win+Shift+g mode "$wine_gaps"
279
280mode "$wine_gaps" {
281 bindsym o mode "$wine_gaps_outer"
282 bindsym i mode "$wine_gaps_inner"
283 bindsym Return mode "$wine_gaps"
284 bindsym Escape mode "default"
285}
286
287
288mode "$wine_gaps_outer" {
289 bindsym plus gaps outer current plus 5
290 bindsym minus gaps outer current minus 5
291 bindsym 0 gaps outer current set 0
292
293 bindsym Shift+plus gaps outer all plus 5
294 bindsym Shift+minus gaps outer all minus 5
295 bindsym Shift+0 gaps outer all set 0
296
297 bindsym Return mode "$wine_gaps"
298 bindsym Escape mode "default"
299}
300mode "$wine_gaps_inner" {
301 bindsym plus gaps inner current plus 5
302 bindsym minus gaps inner current minus 5
303 bindsym 0 gaps inner current set 0
304
305 bindsym Shift+plus gaps inner all plus 5
306 bindsym Shift+minus gaps inner all minus 5
307 bindsym Shift+0 gaps inner all set 0
308
309 bindsym Return mode "$wine_gaps"
310 bindsym Escape mode "default"
311}
312
7abef725 313# start both polybar
314exec_always --no-startup-id $HOME/bin/run-polybar.sh
fdd76fc5 315
316# start networkmanager applet
317exec --no-startup-id nm-applet
318
fdd76fc5 319# start lxqt-notificationd
9ce54eaf 320exec --no-startup-id lxqt-notificationd
7abef725 321
322# start pulseaudio daemon
323exec --no-startup-id start-pulseaudio-x11
324
325# start dunst
9ce54eaf 326#exec --no-startup-id dunst
fdd76fc5 327
7abef725 328# start tint2 i3status
329#exec --no-startup-id tint2 -c ~/.config/tint2/i3status.tint2rc
330
331# start tint2 bar
332#exec --no-startup-id tint2 -c ~/.config/tint2/minima.tint2rc
333
334# start kdeconnect
335#exec --no-startup-id kdeconnect-indicator
336
337# start redshift applet
338#exec --no-startup-id redshift-gtk
339
9ce54eaf 340# start qtpass
7abef725 341#exec --no-startup-id qtpass
fdd76fc5 342
7abef725 343# start feh-blur
344exec --no-startup-id feh-blur -b 7 --no-animate -d