/
config
210 lines (172 loc) · 7.66 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
set $mod Mod4
set $scripts ~/.local/bin/scripts
set_from_resource $primary screens.primary DP-1
set_from_resource $secondary screens.secondary eDP-1
set_from_resource $main_font i3.font Iosevka 10
set_from_resource $inner_gaps i3.inner_gaps 1
font pango:$main_font
default_border none
default_floating_border normal
focus_follows_mouse no
workspace_auto_back_and_forth yes
smart_gaps on
gaps outer 0
gaps inner $inner_gaps
bindsym $mod+Return exec alacritty --working-directory="`xcwd`"
bindsym $mod+Shift+Return exec alacritty
bindsym $mod+r exec rofi -show run
bindsym Hyper_L exec rofi -show combi
bindsym $mod+c exec rofi -modi "clipboard:greenclip print" -show clipboard -run-command '{cmd}'
bindsym $mod+q kill
# Focus
bindsym $mod+h focus left
bindsym $mod+j focus down
bindsym $mod+k focus up
bindsym $mod+l focus right
# Moving windows
bindsym $mod+Shift+h move left
bindsym $mod+Shift+j move down
bindsym $mod+Shift+k move up
bindsym $mod+Shift+l move right
# Moving workspaces
bindsym $mod+Mod1+h move workspace to output left
bindsym $mod+Mod1+j move workspace to output down
bindsym $mod+Mod1+k move workspace to output up
bindsym $mod+Mod1+l move workspace to output right
# Switch to workspace
bindsym $mod+1 workspace number 1
bindsym $mod+2 workspace number 2
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 number 8
bindsym $mod+9 workspace number 9
bindsym $mod+0 workspace number 10
# Move focused container to workspace
bindsym $mod+Shift+1 move container to workspace number 1; workspace number 1
bindsym $mod+Shift+2 move container to workspace number 2; workspace number 2
bindsym $mod+Shift+3 move container to workspace number 3; workspace number 3
bindsym $mod+Shift+4 move container to workspace number 4; workspace number 4
bindsym $mod+Shift+5 move container to workspace number 5; workspace number 5
bindsym $mod+Shift+6 move container to workspace number 6; workspace number 6
bindsym $mod+Shift+7 move container to workspace number 7; workspace number 7
bindsym $mod+Shift+8 move container to workspace number 8; workspace number 8
bindsym $mod+Shift+9 move container to workspace number 9; workspace number 9
bindsym $mod+Shift+0 move container to workspace number 10; workspace number 10
bindsym $mod+Control+Shift+1 move container to workspace number 1
bindsym $mod+Control+Shift+2 move container to workspace number 2
bindsym $mod+Control+Shift+3 move container to workspace number 3
bindsym $mod+Control+Shift+4 move container to workspace number 4
bindsym $mod+Control+Shift+5 move container to workspace number 5
bindsym $mod+Control+Shift+6 move container to workspace number 6
bindsym $mod+Control+Shift+7 move container to workspace number 7
bindsym $mod+Control+Shift+8 move container to workspace number 8
bindsym $mod+Control+Shift+9 move container to workspace number 9
bindsym $mod+Control+Shift+0 move container to workspace number 10
# Fullscreen
bindsym $mod+f fullscreen toggle
# Change layouts
bindsym $mod+e split h
bindsym $mod+d split v
bindsym $mod+v layout stacking
bindsym $mod+b layout tabbed
bindsym $mod+n layout toggle split
bindsym $mod+w focus parent
bindsym $mod+s focus child
# Floating
floating_modifier $mod
bindsym $mod+Shift+space floating toggle
bindsym $mod+space focus mode_toggle
# Resizing
set $mode_resize Resize
bindsym $mod+Shift+r mode "$mode_resize"
mode "$mode_resize" {
bindsym h resize shrink width 5 px or 5 ppt
bindsym j resize grow height 5 px or 5 ppt
bindsym k resize shrink height 5 px or 5 ppt
bindsym l resize grow width 5 px or 5 ppt
bindsym Shift+h resize shrink width 10 px or 10 ppt
bindsym Shift+j resize grow height 10 px or 10 ppt
bindsym Shift+k resize shrink height 10 px or 10 ppt
bindsym Shift+l resize grow width 10 px or 10 ppt
bindsym Return mode "default"
bindsym Escape mode "default"
}
# Functional keys
bindsym XF86AudioRaiseVolume exec amixer -q set Master 5%+ unmute
bindsym XF86AudioLowerVolume exec amixer -q set Master 5%- unmute
bindsym XF86AudioMute exec amixer -q set Master toggle
bindsym XF86AudioPrev exec $scripts/music_control prev
bindsym XF86AudioNext exec $scripts/music_control next
bindsym XF86AudioPlay exec $scripts/music_control toggle
bindsym XF86MonBrightnessUp exec $scripts/change_brightness up
bindsym XF86MonBrightnessDown exec $scripts/change_brightness down
# Screenshots
bindsym --release Print exec flameshot full -p ~/Pictures/Screenshots
bindsym --release Shift+Print exec flameshot gui
bindsym --release Shift+Control+Print exec flameshot screen -p ~/Pictures/Screenshots
# Other
bindsym Mod1+F7 exec --no-startup-id $scripts/toggle_touchpad
# Remember - F13 - 191
#bindcode 191 exec --no-startup-id $scripts/connect_headphones
#bindcode 192 exec --no-startup-id /usr/bin/bluetoothctl disconnect
#bindcode 194 exec --no-startup-id $scripts/music iris
#bindcode 195 exec --no-startup-id $scripts/music shuffle
#bindcode 196 exec --no-startup-id $scripts/music
# Custom modes
set $mode_actions Actions: (b)rowser fil(e)s (d)nd (o)paque (g)reenclip_clear (l)ock (c)alc (r)estart
bindsym $mod+a mode "$mode_actions"
mode "$mode_actions" {
bindsym b exec --no-startup-id available_browser; mode "default"
bindsym e exec "nautilus"; mode "default"
bindsym d exec --no-startup-id toggle_dnd; mode "default"
bindsym o exec --no-startup-id $scripts/toggle_opaque; mode "default"
bindsym g exec --no-startup-id $scripts/greenclip_clear; mode "default"
bindsym l exec --no-startup-id $scripts/i3exit lock; mode "default"
bindsym c exec --no-startup-id $scripts/calc; mode "default"
bindsym r restart; mode "default"
bindsym Return mode "default"
bindsym Escape mode "default"
}
set $mode_graphics Graphics card used: (n)vidia (i)ntel
bindsym $mod+g mode "$mode_graphics"
mode "$mode_graphics" {
bindsym n exec --no-startup-id optimus-manager --switch nvidia --no-confirm; mode "default"
bindsym i exec --no-startup-id optimus-manager --switch intel --no-confirm; mode "default"
bindsym Return mode "default"
bindsym Escape mode "default"
}
# Dunst
bindsym $mod+Control+space exec --no-startup-id dunstctl close
bindsym $mod+Control+Shift+space exec --no-startup-id dunstctl close-all
bindsym $mod+grave exec --no-startup-id dunstctl history-pop
for_window [all] border none
for_window [window_role="pop-up"] floating enable
for_window [class="1Password"] floating enable
assign [class="Slack"] workspace number 10
assign [class="Spotify"] workspace number 9
for_window [class="Spotify"] move to workspace number 9
workspace 1 output $primary
workspace 2 output $primary
workspace 3 output $primary
workspace 4 output $primary
workspace 5 output $primary
workspace 6 output $secondary
workspace 7 output $secondary
workspace 8 output $secondary
workspace 9 output $secondary
workspace 10 output $secondary
# Required or configuration-related apps
exec --no-startup-id optimus-manager --print-mode | grep "nvidia" && sleep 3; picom -b; sleep 1; $scripts/wallpaper
exec --no-startup-id "killall -q xcape; xcape -e \"Super_L=Hyper_L\""
exec --no-startup-id "killall -q xss-lock; xss-lock -- $scripts/i3exit lock&"
exec --no-startup-id $scripts/configure_displays
exec --no-startup-id /usr/lib/geoclue-2.0/demos/agent
exec_always --no-startup-id "killall -q polybar; polybar main&"
exec_always --no-startup-id "pkill -f 'autoname_workspaces\$'; $scripts/autoname_workspaces&"
exec_always --no-startup-id $scripts/toggle_dnd --force-enable&
# User apps
exec --no-startup-id "killall -q slack; slack&"
# vim:filetype=i3config