* .local/bin/passmenu: Import from password-store.
[~bandali/configs] / .config / i3 / config
CommitLineData
17d2cfa0
AB
1exec --no-startup-id ~/.local/bin/startup-progs
2
3# super
4set $mod Mod4
5# alt
6set $mod2 Mod1
7# hyper
8set $mod3 Mod3
9
10# window title and bar font (unless specified differently in 'bar {}'
8060c968
AB
11# font pango:Source Code Pro 9.5
12font pango:Inconsolata 11.5
13# font -misc-fixed-medium-r-normal--13-120-75-75-c-70-iso10646-1
14# font -misc-fixed-medium-r-semicondensed--13-120-75-75-c-60-iso10646-1
17d2cfa0
AB
15
16# for dragging floating windows with mouse
17floating_modifier $mod
18
19# default tabbed
20workspace_layout tabbed
21
22# terminal
08b0fb0a
AB
23bindsym $mod+Return exec xterm
24bindsym $mod+Shift+Return exec xterm -name floating
25for_window [class="XTerm" instance="floating"] floating enable
17d2cfa0
AB
26
27# kill focused window (not necessarily its application)
28bindsym $mod+Shift+w kill
29# kill an application
30#bindsym --release $mod+Shift+x exec xkill
31
32# rofi launcher and pass
33bindsym $mod+space exec rofi -show run -display-run ' > ' -display-window ' 🗔 '
34bindsym $mod+backslash exec rofi -show window -display-run ' > ' -display-window ' 🗔 '
35bindsym $mod+Shift+space exec rofi-pass
36
37# brightness
38bindsym $mod+apostrophe exec rofi-light # rofi-based brightness chooser
39bindsym XF86MonBrightnessUp exec light -A 5 # increase screen brightness
40bindsym XF86MonBrightnessDown exec light -U 5 # decrease screen brightness
41
42# volume
e064bdbf 43bindsym $mod+semicolon exec rofi-pamixer # rofi-based volume chooser
17d2cfa0
AB
44bindsym XF86AudioRaiseVolume exec pamixer --allow-boost --increase 5
45bindsym XF86AudioLowerVolume exec pamixer --allow-boost --decrease 5
46bindsym XF86AudioMute exec pamixer --toggle-mute
47bindsym XF86AudioMicMute exec pactl set-source-mute 1 toggle
48
49# window focus
50bindsym $mod+h focus left
51bindsym $mod+j focus down
52bindsym $mod+k focus up
53bindsym $mod+l focus right
54bindsym $mod+Left focus left
55bindsym $mod+Down focus down
56bindsym $mod+Up focus up
57bindsym $mod+Right focus right
58
59# window move
60bindsym $mod+Shift+h move left
61bindsym $mod+Shift+j move down
62bindsym $mod+Shift+k move up
63bindsym $mod+Shift+l move right
64bindsym $mod+Shift+Left move left
65bindsym $mod+Shift+Down move down
66bindsym $mod+Shift+Up move up
67bindsym $mod+Shift+Right move right
68
69# horizontal and vertical orientation
70bindsym $mod+shift+backslash split h
71bindsym $mod+minus split v
72
73# enter fullscreen mode for the focused container
74bindsym $mod+f fullscreen toggle
75
76# change container layout (stacked, tabbed, toggle split)
77bindsym $mod+s layout stacking
78bindsym $mod+w layout tabbed
79bindsym $mod+e layout toggle split
80
81# toggle tiling / floating
82bindsym $mod+Shift+f floating toggle
230f7fe8 83bindsym $mod+period floating toggle
17d2cfa0
AB
84# toggle tiling / floating focus
85bindsym $mod+grave focus mode_toggle
230f7fe8 86bindsym $mod+comma focus mode_toggle
17d2cfa0
AB
87
88# toggle sticky
89bindsym $mod+shift+s sticky toggle
90
91# focus parent / child
92bindsym $mod+a focus parent
93bindsym $mod+Shift+a focus child
94
95# switch to workspace
96bindsym $mod+1 workspace 1
97bindsym $mod+2 workspace 2
98bindsym $mod+3 workspace 3
99bindsym $mod+4 workspace 4
100bindsym $mod+5 workspace 5
101bindsym $mod+6 workspace 6
102bindsym $mod+7 workspace 7
103bindsym $mod+8 workspace 8
104bindsym $mod+9 workspace 9
105bindsym $mod+0 workspace 10
106bindsym $mod+bracketleft workspace prev
107bindsym $mod+bracketright workspace next
108
109# move focused container to workspace
110bindsym $mod+Shift+1 move container to workspace 1
111bindsym $mod+Shift+2 move container to workspace 2
112bindsym $mod+Shift+3 move container to workspace 3
113bindsym $mod+Shift+4 move container to workspace 4
114bindsym $mod+Shift+5 move container to workspace 5
115bindsym $mod+Shift+6 move container to workspace 6
116bindsym $mod+Shift+7 move container to workspace 7
117bindsym $mod+Shift+8 move container to workspace 8
118bindsym $mod+Shift+9 move container to workspace 9
119bindsym $mod+Shift+0 move container to workspace 10
120bindsym $mod+Shift+bracketleft move container to workspace prev
121bindsym $mod+Shift+bracketright move container to workspace next
122
123# bspwm-esque workspace switch and container move
124bindsym $mod2+bracketleft exec b-ws-util i3 switch prev
125bindsym $mod2+bracketright exec b-ws-util i3 switch next
126bindsym $mod2+Shift+bracketleft exec b-ws-util i3 move prev follow
127bindsym $mod2+Shift+bracketright exec b-ws-util i3 move next follow
128
129set $mode_system System (l)ock | (e)xit i3 | (s)uspend | (h)ibernate | (r)eboot | (S)hutdown
130mode "$mode_system" {
131 bindsym l exec i3lock, mode "default"
132 bindsym e exec i3-msg exit, mode "default"
133 bindsym s exec systemctl suspend, mode "default"
134 bindsym h exec systemctl hibernate, mode "default"
135 bindsym r exec systemctl reboot, mode "default"
136 bindsym Shift+s exec systemctl poweroff -i, mode "default"
137
138 bindsym Return mode "default"
139 bindsym Escape mode "default"
140 bindsym q mode "default"
141}
142
143bindsym $mod+Shift+c reload
144bindsym $mod+Shift+r restart
145bindsym $mod+Shift+e mode "$mode_system"
146
147# resize window (you can also use the mouse for that)
148mode "resize" {
149 # These bindings trigger as soon as you enter the resize mode
150
151 # Pressing left will shrink the window’s width.
152 # Pressing right will grow the window’s width.
153 # Pressing up will shrink the window’s height.
154 # Pressing down will grow the window’s height.
155 bindsym j resize shrink width 10 px or 10 ppt
156 bindsym k resize grow height 10 px or 10 ppt
157 bindsym l resize shrink height 10 px or 10 ppt
158 bindsym semicolon resize grow width 10 px or 10 ppt
159
160 # same bindings, but for the arrow keys
161 bindsym Left resize shrink width 10 px or 10 ppt
162 bindsym Down resize grow height 10 px or 10 ppt
163 bindsym Up resize shrink height 10 px or 10 ppt
164 bindsym Right resize grow width 10 px or 10 ppt
165
166 # back to normal: Enter or Escape
167 bindsym Return mode "default"
168 bindsym Escape mode "default"
169}
170bindsym $mod+r mode "resize"
171
298f42fe
AB
172# change theme mode
173set $mode_theme theme (d)ark | (l)ight
174mode "$mode_theme" {
175 bindsym d exec change-theme dark, mode "default"
176 bindsym l exec change-theme light, mode "default"
177 bindsym Return mode "default"
178 bindsym Escape mode "default"
179 bindsym q mode "default"
180}
181bindsym $mod+t mode "$mode_theme"
182
17d2cfa0
AB
183# application-specific window configurations
184for_window [class="mpv"] floating enable
185for_window [class="Mumble"] floating enable
186for_window [class="Nm-connection-editor"] floating enable
187for_window [class="Virt-manager"] floating enable
188
189# no title bars
190for_window [class="^.*"] border pixel 4
191
192# i3bar and system info from i3status
193bar {
194 status_command i3status | my-i3status
195 tray_output primary
196}