summaryrefslogtreecommitdiff
path: root/.config/wpg/templates/i3.base
blob: c216586f36a98519d2753cb128913166d764294e (plain) (blame)
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
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
## i3 config file (v4)
##
## Please see https://i3wm.org/docs/userguide.html for a complete reference!

## GENERAL
font pango:sans-serif 13
set $display_primary DP-3
set $display_secondary VGA-0
set $locker xautolock -locknow
set $mod Mod1
set $sigaudio pkill -75 i3blocks

## WORKSPACES
set $ws1  "1:󰖟"
set $ws2  "2:󰲢"
set $ws3  "3:󰲤"
set $ws4  "4:󰲦"
set $ws5  "5:󰲨"
set $ws6  "6:󰲪"
set $ws7  "7:󰲬"
set $ws8  "8:󰲮"
set $ws9  "9:󰣀"
set $ws10 "10:󰭹"
workspace $ws10 output $display_secondary

# switch to workspace
bindsym $mod+1 workspace $ws1
bindsym $mod+2 workspace $ws2
bindsym $mod+3 workspace $ws3
bindsym $mod+4 workspace $ws4
bindsym $mod+5 workspace $ws5
bindsym $mod+6 workspace $ws6
bindsym $mod+7 workspace $ws7
bindsym $mod+8 workspace $ws8
bindsym $mod+9 workspace $ws9
bindsym $mod+0 workspace $ws10

# move focused container to workspace
bindsym $mod+shift+1 move container to workspace $ws1
bindsym $mod+shift+2 move container to workspace $ws2
bindsym $mod+shift+3 move container to workspace $ws3
bindsym $mod+shift+4 move container to workspace $ws4
bindsym $mod+shift+5 move container to workspace $ws5
bindsym $mod+shift+6 move container to workspace $ws6
bindsym $mod+shift+7 move container to workspace $ws7
bindsym $mod+shift+8 move container to workspace $ws8
bindsym $mod+shift+9 move container to workspace $ws9
bindsym $mod+shift+0 move container to workspace $ws10

## GAPS/BORDERS
default_border pixel 5
default_floating_border normal
gaps inner 10
smart_borders no_gaps
title_align center
workspace_auto_back_and_forth yes

# Note: if there's only one container, give it a 4:3-ish aspect ratio
gaps horizontal 220
smart_gaps inverse_outer


## COLORS
# base colors -- set by WPG
set $coloract "{active}"
set $colorin "{inactive}"
set_from_resource $color0 i3wm.color0 "{color0}"
set_from_resource $color15 i3wm.color15 "{color15}"
set_from_resource $color8 i3wm.color8 "{color8}"
set_from_resource $coloru i3wm.color2 "{color2}"
set_from_resource $split i3wm.color10 "{color10}"

# class                 border    backgr    text    indicator child_border
client.background       $color0
client.focused          $coloract $coloract $color15 $split  $coloract
client.focused_inactive $coloract $coloract $color15 $split  $colorin
client.placeholder      $color0   $color8   $color15 $color0 $color8
client.unfocused        $colorin  $colorin  $color15 $split  $colorin
client.urgent           $coloru   $coloru   $color15 $coloru $coloru

## WINDOW CONTROL
# movement
floating_modifier $mod
set $down j
set $left h
set $right l
set $up k

# change focus
bindsym $mod+$down focus down
bindsym $mod+$left focus left
bindsym $mod+$right focus right
bindsym $mod+$up focus up

# move focused window
bindsym $mod+shift+$down move down
bindsym $mod+shift+$left move left
bindsym $mod+shift+$right move right
bindsym $mod+shift+$up move up

# resize
bindsym $mod+i 				resize grow height 30 px or 10 ppt
bindsym $mod+o 				resize grow width 30 px or 10 ppt
bindsym $mod+u 				resize shrink height 30 px or 10 ppt
bindsym $mod+y				resize shrink width 30 px or 10 ppt
bindsym $mod+minus			gaps outer current minus 10
bindsym $mod+plus        	gaps outer current plus 10
bindsym $mod+shift+minus 	gaps inner current minus 10
bindsym $mod+shift+plus  	gaps inner current plus 10

## LAYOUT
# split direction
bindsym $mod+q split toggle

# fullscreen mode
bindsym $mod+f fullscreen toggle

# container layout
bindsym $mod+shift+w layout tabbed
bindsym $mod+shift+e layout toggle split

# toggle tiling / floating
bindsym $mod+shift+space floating toggle
bindsym $mod+s sticky toggle
bindsym $mod+shift+s floating toggle; sticky toggle

# change focus between tiling / floating windows
bindsym $mod+space focus mode_toggle

## SHORTCUTS
bindsym $mod+shift+F1			exec --no-startup-id firefox /usr/local/share/doc/freebsd/handbook/book.html
bindsym $mod+F2					exec --no-startup-id firefox
bindsym $mod+F3					exec i3-filescmd.sh
bindsym $mod+F4 				exec i3-mailcmd.sh
bindsym $mod+F5 				exec i3-newsboatcmd.sh
bindsym $mod+F6 				exec yt.sh
bindsym $mod+F7 				exec dict.sh
bindsym $mod+F8 				exec toggle-docked.sh
bindsym $mod+shift+F8			exec toggle-compositing.sh
bindsym $mod+F9					exec abraham-porter.sh
bindsym $mod+F10				exec toggle-webcam.sh
bindsym $mod+Shift+F10			exec toggle-screencast.sh
bindsym $mod+F11				exec xautolock -toggle
bindsym $mod+F12				exec i3-mixercmd.sh
bindsym $mod+Return 			split horizontal; exec alacritty
bindsym $mod+Shift+Return		split vertical; exec alacritty
bindsym $mod+Shift+Insert		exec --no-startup-id $locker
bindsym $mod+Tab				exec i3-msg workspace back_and_forth
bindsym $mod+a					exec rofi -show run
bindsym $mod+shift+q			kill
bindsym --release Print			exec i3-screeniecmd.sh
bindsym --release shift+Print	exec i3-screenie_regioncmd.sh
bindsym Mod4+p					exec arandr
bindsym XF86AudioLowerVolume	exec mixer vol -5 && $sigaudio
bindsym XF86AudioMute			exec mixer vol 0 && $sigaudio
bindsym XF86AudioRaiseVolume 	exec mixer vol +5 && $sigaudio

# scratchpad terminal
bindsym $mod+shift+p move scratchpad
bindsym $mod+p scratchpad show

# reload the configuration file
bindsym $mod+shift+c reload
# restart i3 inplace (preserves your layout/session, can be used to upgrade i3)
bindsym $mod+shift+r restart

## MODES AND BARS
set $mode_display 󰍺
mode "$mode_display" {{
	bindsym $left move workspace to output left
		bindsym $right move workspace to output right
		bindsym Return mode "default"
		bindsym q mode "default"
		bindsym Escape mode "default"
}}

set $mode_system 󰌾l  󰩈e  󰤄s  󰤁r  󰤂shift+s
mode "$mode_system" {{
	bindsym e exec --no-startup-id i3-msg exit, mode "default"
	bindsym l exec --no-startup-id $locker, mode "default"
	bindsym s exec --no-startup-id $locker && sleep 2 && doas acpiconf -s3, mode "default"
	bindsym r exec --no-startup-id doas reboot, mode "default"
	bindsym shift+s exec --no-startup-id doas poweroff, mode "default"
	bindsym Return mode "default"
	bindsym q mode "default"
	bindsym Escape mode "default"
}}

set $mode_help 󱊫Help/Handbook 󱊬Browser 󱊭Files 󱊮Email 󱊯News 󱊰YouTube 󱊱Dictionary 󱊲Dock/Compositor 󱊳Ports 󱊴Webcam/Screencast 󱊵AutoLock-Toggle 󱊶Mixer
mode "$mode_help" {{
	bindsym Return mode "default"
	bindsym q mode "default"
	bindsym Escape mode "default"
}}

bindsym $mod+d mode "$mode_display"
bindsym $mod+Insert mode "$mode_system"
bindsym $mod+F1 mode "$mode_help"

## BARS
bar {{
	height 30
	output $display_primary
	strip_workspace_numbers yes
	position bottom
	status_command i3blocks 2>/var/log/xinit/i3blocks.log

	colors {{
		background $color8
		statusline $color15
		separator $colorin
		# class border background foreground
		focused_workspace $color15 $coloract $color15
		active_workspace $color15 $coloract $color15
		inactive_workspace $split $colorin $color15
		urgent_workspace $coloru $coloru $color15
	}}
}}

## DEFAULT PLACEMENT
for_window [class = "Wpg"] floating enable
for_window [title = "Reading Email"] floating enable
for_window [title = "Reading News"] floating enable
for_window [title = "Streaming from YouTube"] floating enable; sticky enable
for_window [title = "pwcview"] border pixel 1; floating enable; sticky enable; move position 1598px 808px
for_window [title = "sxiv"] floating enable

## STARTUP
exec --no-startup-id firefox