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