forked from michaelavila/dotfiles
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathi3config
207 lines (161 loc) · 6.59 KB
/
i3config
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
# set mod
set $mod Mod4
# font for window titles and bar
font pango:Noto Sans Regular 8
# use Mouse+$mod to drag floating windows to their wanted position
floating_modifier $mod
# app shortcuts
bindsym $mod+t exec alacritty
bindsym $mod+b exec "/usr/bin/brave"
# screenshots
bindsym --release Print exec maim ~/Pictures/screenshots/$(date +%s).png
bindsym --release Shift+Print exec maim -s | xclip -selection clipboard -t image/png
bindsym --release $mod+Shift+Print exec maim -st 9999999 | convert - \( +clone -background black -shadow 80x3+5+5 \) +swap -background none -layers merge +repage ~/Pictures/screenshots/$(date +%s).png
# kill focused window
bindsym $mod+q kill
# rofi (a proram launcher)
bindsym $mod+i exec rofi -modi drun -show drun -line-padding 4 \
-columns 2 -padding 50 -hide-scrollbar \
-show-icons -drun-icon-theme "Arc-X-D" -font "Droid Sans Regular 10"
bindsym $mod+o exec rofi -show window -line-padding 4 \
-lines 6 -padding 50 -hide-scrollbar \
-show-icons -drun-icon-theme "Arc-X-D" -font "Droid Sans Regular 10"
# change focus
bindsym $mod+h focus left
bindsym $mod+j focus down
bindsym $mod+k focus up
bindsym $mod+l focus right
bindsym $mod+Left focus left
bindsym $mod+Down focus down
bindsym $mod+Up focus up
bindsym $mod+Right focus right
# move focused window
bindsym $mod+Shift+h move left
bindsym $mod+Shift+j move down
bindsym $mod+Shift+k move up
bindsym $mod+Shift+l move right
bindsym $mod+Shift+Left move left
bindsym $mod+Shift+Down move down
bindsym $mod+Shift+Up move up
bindsym $mod+Shift+Right move right
# split in horizontal orientation
bindsym $mod+s split v
# split in vertical orientation
bindsym $mod+v split h
# change container layout (stacked, tabbed, toggle split)
bindsym $mod+Shift+s layout stacking
bindsym $mod+Shift+w layout tabbed
bindsym $mod+Shift+e layout toggle split
# toggle tiling / floating
bindsym $mod+Shift+space floating toggle
# change focus between tiling / floating windows
bindsym $mod+space focus mode_toggle
# focus the parent container
bindsym $mod+a focus parent
# focus on click
focus_follows_mouse no
# set floating (nontiling)for apps needing it
for_window [class="Yad" instance="yad"] floating enable
for_window [class="Galculator" instance="galculator"] floating enable
for_window [class="Xsane" instance="xsane"] floating enable
for_window [class="Pavucontrol" instance="pavucontrol"] floating enable
for_window [class="qt5ct" instance="qt5ct"] floating enable
for_window [class="Blueberry.py" instance="blueberry.py"] floating enable
for_window [class="Bluetooth-sendto" instance="bluetooth-sendto"] floating enable
for_window [class="Pamac-manager"] floating enable
for_window [class="zoom"] floating enable
for_window [class="Lxappearance"] floating enable
for_window [class="Nm-connection-editor"] floating enable
# set workspaces
set $ws1 "1"
set $ws2 "2"
set $ws3 "3"
set $ws4 "4"
# switch to workspace
bindsym $mod+1 workspace $ws1
bindsym $mod+2 workspace $ws2
bindsym $mod+3 workspace $ws3
bindsym $mod+4 workspace $ws4
# 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
# 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
# exit i3 (logs you out of your X session)
bindsym $mod+Shift+q exec "i3-nagbar -t warning -m 'You pressed the exit shortcut. Do you really want to exit i3? This will end your X session.' -b 'Yes, exit i3' 'i3-msg exit'"
# resize window (you can also use the mouse for that
mode "resize" {
# These bindings trigger as soon as you enter the resize mode
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 Left resize shrink width 5 px or 5 ppt
bindsym Down resize grow height 5 px or 5 ppt
bindsym Up resize shrink height 5 px or 5 ppt
bindsym Right resize grow width 5 px or 5 ppt
# back to normal: Enter or Escape
bindsym Return mode "default"
bindsym Escape mode "default"
}
bindsym $mod+r mode "resize"
# class bd bg txt ind child_bd
client.focused #282828 #fbf1c7 #282828 #282828 #fbf1c7
client.unfocused #fbf1c7 #282828 #fbf1c7 #fbf1c7 #282828
client.urgent #cc241d #fb4934 $fb4934 #cc241d #fb4934
# border & title.. Must be set to border pixel for gaps to work
for_window [class="^.*"] border pixel 4
# gaps
gaps inner 10
# enter fullscreen mode for the focused container
bindsym $mod+f fullscreen toggle
# start i3bar to display a workspace bar (plus the system information i3status
# finds out, if available)
bar {
status_command i3blocks -c ~/.config/i3/i3blocks.conf
i3bar_command i3bar -t
position top
colors {
background #00000000
separator #666666
statusline #dddddd
focused_workspace #282828 #fbf1c7 #282828
active_workspace #282828 #00000000 #282828
inactive_workspace #282828 #00000000 #282828
urgent_workspace #cc241d #fb4934 #ffffff
}
}
# volume
bindsym XF86AudioRaiseVolume exec amixer -D pulse sset Master 5%+ && pkill -RTMIN+1 i3blocks
bindsym XF86AudioLowerVolume exec amixer -D pulse sset Master 5%- && pkill -RTMIN+1 i3blocks
bindsym XF86AudioPlay exec playerctl play-pause
bindsym XF86AudioNext exec playerctl next
bindsym XF86AudioPrev exec playerctl previous
# granular volume control
bindsym $mod+XF86AudioRaiseVolume exec amixer -D pulse sset Master 1%+ && pkill -RTMIN+1 i3blocks
bindsym $mod+XF86AudioLowerVolume exec amixer -D pulse sset Master 1%- && pkill -RTMIN+1 i3blocks
# mute
bindsym XF86AudioMute exec amixer sset Master toggle && killall -USR1 i3blocks
#### autostart apps
# set wallpaper
exec --no-startup-id nitrogen --restore
# set powersavings for display:
exec --no-startup-id xset s 480 dpms 600 600 600
# desktop notifications
exec --no-startup-id /usr/bin/dunst
# get auth work with polkit-gnome
exec --no-startup-id /usr/lib/polkit-gnome/polkit-gnome-authentication-agent-1
# compositor
exec --no-startup-id picom -cC --xrender-sync-fence
# network
exec --no-startup-id nm-applet
# bluetooth
exec --no-startup-id blueberry-tray
# autotile
exec_always --no-startup-id i3-auto-layout
# screen layout
exec_always --no-startup-id ~/.screenlayout/autoxrandr.sh