diff options
author | Yigit Sever | 2020-11-12 03:22:46 +0300 |
---|---|---|
committer | Yigit Sever | 2020-11-12 03:22:46 +0300 |
commit | 2e005dc099cace96681b7ead29a27d86c56acd4d (patch) | |
tree | 98dffe4b9def7cef72fc0d522891d40976e80211 | |
parent | 0b9f9063c8e0f05119d5e92aad8f98bdf84a79a4 (diff) | |
download | dotfiles-2e005dc099cace96681b7ead29a27d86c56acd4d.tar.gz dotfiles-2e005dc099cace96681b7ead29a27d86c56acd4d.tar.bz2 dotfiles-2e005dc099cace96681b7ead29a27d86c56acd4d.zip |
big i3 config cleanup
-rw-r--r-- | .config/i3/config##c.desktop,h.maus | 211 |
1 files changed, 58 insertions, 153 deletions
diff --git a/.config/i3/config##c.desktop,h.maus b/.config/i3/config##c.desktop,h.maus index 4a18908..47fb1bd 100644 --- a/.config/i3/config##c.desktop,h.maus +++ b/.config/i3/config##c.desktop,h.maus | |||
@@ -1,18 +1,17 @@ | |||
1 | # vim: filetype=i3config | 1 | # vim: filetype=i3config |
2 | # i3 config file (v4) | 2 | # https://i3wm.org/docs/userguide.html |
3 | # Please see https://i3wm.org/docs/userguide.html for a complete reference! | ||
4 | 3 | ||
5 | # set modifiers | 4 | # set modifiers |
6 | set $mod Mod4 | 5 | set $mod Mod4 |
7 | set $alt Mod1 | 6 | set $alt Mod1 |
8 | 7 | ||
8 | # use mouse+$mod to drag floating windows to their wanted position | ||
9 | floating_modifier $alt | ||
10 | |||
9 | # launch polybar | 11 | # launch polybar |
10 | exec --no-startup-id $HOME/.config/polybar/launch.sh & | 12 | exec --no-startup-id $HOME/.config/polybar/launch.sh & |
11 | 13 | ||
12 | # start the screensaver, '' at the end is not a typo | 14 | # autostart |
13 | exec --no-startup-id xidlehook --not-when-fullscreen --not-when-audio --timer normal 300 'i3lock -i ~/Dropbox/Wallpapers/pots.jpg --clock --time-font="FuraCode Nerd Font" --timesize=144 --datestr="" --timecolor=fefefeee --timestr="%H:%M" --radius=45 --timepos="ix:iy-250"' '' | ||
14 | |||
15 | #autostart | ||
16 | exec --no-startup-id xsettingsd & | 15 | exec --no-startup-id xsettingsd & |
17 | exec --no-startup-id picom -b | 16 | exec --no-startup-id picom -b |
18 | exec --no-startup-id flashfocus & | 17 | exec --no-startup-id flashfocus & |
@@ -20,55 +19,46 @@ exec --no-startup-id nextcloud & | |||
20 | exec --no-startup-id copyq & | 19 | exec --no-startup-id copyq & |
21 | exec --no-startup-id redshift-gtk & | 20 | exec --no-startup-id redshift-gtk & |
22 | exec --no-startup-id nm-applet & | 21 | exec --no-startup-id nm-applet & |
23 | # exec --no-startup-id xrandr --output DVI-D-0 --off --output HDMI-0 --mode 1920x1080 --pos 0x0 --rotate left --output DVI-I-1 --primary --mode 1920x1080 --pos 1132x608 --rotate normal --output DVI-I-0 --off --output DP-1 --off --output DP-0 --off & | ||
24 | exec --no-startup-id xdotool key --clearmodifiers Num_Lock | ||
25 | exec --no-startup-id udiskie --automount --file-manager thunar --tray --notify & | 22 | exec --no-startup-id udiskie --automount --file-manager thunar --tray --notify & |
26 | exec --no-startup-id /usr/lib/pam_kwallet_init | 23 | exec --no-startup-id /usr/lib/pam_kwallet_init |
27 | exec --no-startup-id remind -z -k'dunstify -i "view-calendar" "⏰ reminder!" "%s" &' ~/.reminders & | 24 | exec --no-startup-id remind -z -k'dunstify -i "view-calendar" "⏰ reminder!" "%s" &' ~/.reminders & |
28 | 25 | ||
29 | # swap caps lock and escape, set keyboard layout | 26 | # swap caps lock and escape, set keyboard layout |
30 | exec --no-startup-id setxkbmap -model pc105 -layout tr,us -variant ,colemak -option grp:alt_shift_toggle,caps:backspace | 27 | exec --no-startup-id setxkbmap -model pc105 -layout us -variant colemak -option caps:backspace |
31 | 28 | ||
32 | # and ctrl to escape | 29 | # tap ctrl to esc, hold ctrl to ctrl |
33 | exec --no-startup-id xcape -e 'Control_L=Escape' | 30 | exec --no-startup-id xcape -e 'Control_L=Escape' |
34 | 31 | ||
35 | #launch conky windows | 32 | # launch conky windows |
36 | exec --no-startup-id conky --daemonize -c ~/.config/conky/conky.conf | 33 | exec --no-startup-id conky --daemonize -c ~/.config/conky/conky.conf |
37 | exec --no-startup-id conky --daemonize -c ~/.config/conky/task.conf | 34 | # exec --no-startup-id conky --daemonize -c ~/.config/conky/task.conf |
38 | 35 | ||
39 | # set the wallpaper last (hopefully after xrandr) | 36 | # set the wallpaper (hopefully after xrandr) |
40 | exec --no-startup-id ~/.fehbg | 37 | exec --no-startup-id ~/.fehbg |
41 | 38 | ||
42 | # Font for window titles | 39 | # font for window titles |
43 | font pango:Lato 11 | 40 | font pango:Iosevka 11 |
44 | |||
45 | # Use Mouse+$mod to drag floating windows to their wanted position | ||
46 | floating_modifier $alt | ||
47 | 41 | ||
48 | ############## | 42 | ############## |
49 | # bindings # | 43 | # bindings # |
50 | ############## | 44 | ############## |
51 | 45 | ||
52 | # i switched back to firefox can you tell | 46 | # launch emoji picker with mod+c |
53 | bindsym Ctrl+q exec --no-startup-id true | 47 | bindcode $mod+54 exec --no-startup-id rofimoji --skin-tone neutral |
54 | 48 | ||
55 | bindsym $mod+c exec --no-startup-id rofimoji --skin-tone neutral --insert-with-clipboard | 49 | # get the mouse out of the way with mod+y |
50 | bindcode $mod+32 exec --no-startup-id xdotool mousemove 1087 1101 | ||
56 | 51 | ||
57 | # get the mouse out of the way | 52 | # bookmark from clipboard with mod+l |
58 | bindsym $mod+o exec --no-startup-id xdotool mousemove 1087 1101 | 53 | bindcode $mod+30 exec --no-startup-id ~/.local/bin/bukuadd_c |
59 | 54 | ||
60 | # bookmark from clipboard | 55 | # swap caps lock and escape, set keyboard layout with mod+] |
61 | bindsym $mod+u exec --no-startup-id ~/.local/bin/bukuadd_c | 56 | bindcode $mod+35 exec --no-startup-id "setxkbmap -model pc105 -layout us,us,tr -variant ,colemak, -option grp:alt_shift_toggle,caps:backspace" |
62 | |||
63 | # swap caps lock and escape, set keyboard layout, 35 is ]/ü (layout agnostic) | ||
64 | bindcode $mod+35 exec --no-startup-id "setxkbmap -model pc105 -layout us,us,tr -variant ,colemak, -option grp:alt_shift_toggle,caps:backspace" # ] on colemak ü on turkish | ||
65 | 57 | ||
66 | # use flameshot with print screen | 58 | # use flameshot with print screen |
67 | bindsym Print exec flameshot gui | 59 | bindsym Print exec flameshot gui |
68 | 60 | ||
69 | # media keys | 61 | # media keys |
70 | # bindsym XF86AudioRaiseVolume exec --no-startup-id "amixer set Master 2%+ && volnoti-show $(amixer get Master | grep -Po '[0-9]+(?=%)' | head -1)" | ||
71 | # bindsym XF86AudioLowerVolume exec --no-startup-id "amixer set Master 2%- && volnoti-show $(amixer get Master | grep -Po '[0-9]+(?=%)' | head -1)" | ||
72 | bindsym XF86AudioRaiseVolume exec --no-startup-id "amixer set Master 2%+ && amixer get Master | grep -Po '[0-9]+(?=%)' | head -1 > /tmp/xobpipe" | 62 | bindsym XF86AudioRaiseVolume exec --no-startup-id "amixer set Master 2%+ && amixer get Master | grep -Po '[0-9]+(?=%)' | head -1 > /tmp/xobpipe" |
73 | bindsym XF86AudioLowerVolume exec --no-startup-id "amixer set Master 2%- && amixer get Master | grep -Po '[0-9]+(?=%)' | head -1 > /tmp/xobpipe" | 63 | bindsym XF86AudioLowerVolume exec --no-startup-id "amixer set Master 2%- && amixer get Master | grep -Po '[0-9]+(?=%)' | head -1 > /tmp/xobpipe" |
74 | bindsym XF86AudioMute exec --no-startup-id "amixer set Master toggle && if amixer get Master | grep -Fq '[off]'; then volnoti-show -m; else volnoti-show $(amixer get Master | grep -Po '[0-9]+(?=%)' | head -1); fi" | 64 | bindsym XF86AudioMute exec --no-startup-id "amixer set Master toggle && if amixer get Master | grep -Fq '[off]'; then volnoti-show -m; else volnoti-show $(amixer get Master | grep -Po '[0-9]+(?=%)' | head -1); fi" |
@@ -77,68 +67,63 @@ bindsym XF86AudioPrev exec --no-startup-id playerctl previous | |||
77 | bindsym XF86AudioNext exec --no-startup-id playerctl next | 67 | bindsym XF86AudioNext exec --no-startup-id playerctl next |
78 | bindsym XF86Tools exec --no-startup-id mpc toggle # for mpd/ncmpcpp | 68 | bindsym XF86Tools exec --no-startup-id mpc toggle # for mpd/ncmpcpp |
79 | 69 | ||
80 | # # media keys for "regular" keyboards | 70 | # make the currently focused window a scratchpad |
81 | # bindsym $mod+Up exec --no-startup-id "amixer set Master 2%+ && volnoti-show $(amixer get Master | grep -Po '[0-9]+(?=%)' | head -1)" | 71 | bindcode $mod+Shift+20 move scratchpad |
82 | # bindsym $mod+Down exec --no-startup-id "amixer set Master 2%- && volnoti-show $(amixer get Master | grep -Po '[0-9]+(?=%)' | head -1)" | ||
83 | # bindsym $mod+m exec --no-startup-id "amixer set Master toggle && if amixer get Master | grep -Fq '[off]'; then volnoti-show -m; else volnoti-show $(amixer get Master | grep -Po '[0-9]+(?=%)' | head -1); fi" | ||
84 | # bindsym $mod+q exec --no-startup-id playerctl play-pause | ||
85 | # bindsym $mod+Left exec --no-startup-id playerctl previous | ||
86 | # bindsym $mod+Right exec --no-startup-id playerctl next | ||
87 | |||
88 | # Make the currently focused window a scratchpad | ||
89 | bindsym $mod+Shift+minus move scratchpad | ||
90 | 72 | ||
91 | # Show the first scratchpad window | 73 | # show the first scratchpad window |
92 | bindsym $mod+minus scratchpad show | 74 | bindcode $mod+20 scratchpad show |
93 | 75 | ||
94 | # Pause notifications for a while | 76 | # pause notifications for a while with mod+shift+y |
95 | bindcode $mod+Shift+32 exec /home/yigit/.local/bin/toggle_notifications.sh | 77 | bindcode $mod+Shift+32 exec /home/yigit/.local/bin/toggle_notifications.sh |
96 | 78 | ||
97 | # shortcuts for frequent programs | 79 | # shortcuts for frequent programs |
98 | bindsym $mod+Shift+z exec zotero | 80 | |
99 | bindcode $mod+Shift+41 exec thunar # t on colemak f on turkish | 81 | # zotero on mod+shift+z |
82 | bindcode $mod+Shift+52 exec zotero | ||
83 | # thunar on mod+shift+t | ||
84 | bindcode $mod+Shift+41 exec thunar | ||
100 | 85 | ||
101 | # start a terminal | 86 | # start a terminal |
102 | bindsym $mod+Return exec kitty | 87 | bindsym $mod+Return exec kitty |
103 | 88 | ||
104 | # kill focused window | 89 | # kill focused window |
105 | bindsym $mod+Shift+q kill | 90 | bindcode $mod+Shift+24 kill |
106 | bindsym --whole-window $mod+button2 kill | 91 | bindsym --whole-window $mod+button2 kill |
107 | 92 | ||
108 | # start rofi (a program launcher) | 93 | # start rofi with mod+s |
109 | bindsym $mod+d exec rofi -show combi | 94 | bindcode $mod+40 exec rofi -show combi |
110 | 95 | ||
111 | # change focus | 96 | # change focus on mod+hnei |
112 | bindsym $mod+h focus left | 97 | bindcode $mod+43 focus left |
113 | bindsym $mod+j focus down | 98 | bindcode $mod+44 focus down |
114 | bindsym $mod+k focus up | 99 | bindcode $mod+45 focus up |
115 | bindsym $mod+l focus right | 100 | bindcode $mod+46 focus right |
116 | 101 | ||
117 | # move focused window | 102 | # move focused window on mod+shift+hnei |
118 | bindsym $mod+Shift+h move left | 103 | bindcode $mod+Shift+43 move left |
119 | bindsym $mod+Shift+j move down | 104 | bindcode $mod+Shift+44 move down |
120 | bindsym $mod+Shift+k move up | 105 | bindcode $mod+Shift+45 move up |
121 | bindsym $mod+Shift+l move right | 106 | bindcode $mod+Shift+46 move right |
122 | 107 | ||
123 | # split in horizontal orientation | 108 | # split in horizontal orientation with mod+b |
124 | bindsym $mod+b split h | 109 | bindcode $mod+56 split h |
125 | 110 | ||
126 | # split in vertical orientation | 111 | # split in vertical orientation with mod+v |
127 | bindsym $mod+v split v | 112 | bindcode $mod+55 split v |
128 | 113 | ||
129 | # enter fullscreen mode for the focused container | 114 | # enter fullscreen mode for the focused container with mod+t |
130 | bindsym $mod+f fullscreen toggle | 115 | bindcode $mod+41 fullscreen toggle |
131 | 116 | ||
132 | # change container layout (stacked, tabbed, toggle split) | 117 | # change container layout (stacked, tabbed, toggle split) |
133 | bindsym $mod+s layout stacking | 118 | bindcode $mod+39 layout stacking |
134 | bindsym $mod+w layout tabbed | 119 | bindcode $mod+25 layout tabbed |
135 | bindsym $mod+e layout toggle split | 120 | bindcode $mod+26 layout toggle split |
136 | 121 | ||
137 | # toggle tiling / floating | 122 | # toggle tiling / floating |
138 | bindsym $mod+Shift+space floating toggle | 123 | bindsym $mod+Shift+space floating toggle |
139 | 124 | ||
140 | # toggle sticky floating window | 125 | # toggle sticky floating window with mod+a |
141 | bindsym $mod+a sticky toggle | 126 | bindcode $mod+38 sticky toggle |
142 | 127 | ||
143 | # change focus between tiling / floating windows | 128 | # change focus between tiling / floating windows |
144 | bindsym $mod+space focus mode_toggle | 129 | bindsym $mod+space focus mode_toggle |
@@ -191,95 +176,15 @@ bindsym $mod+Shift+m move container to workspace $wsmusic | |||
191 | bindcode $mod+Shift+49 move container to workspace $wszotero | 176 | bindcode $mod+Shift+49 move container to workspace $wszotero |
192 | bindcode $mod+Shift+60 move container to workspace $wsdesktop | 177 | bindcode $mod+Shift+60 move container to workspace $wsdesktop |
193 | 178 | ||
194 | bindsym $mod+z move container to output right | 179 | bindcode $mod+52 move container to output right |
195 | 180 | ||
196 | # reload the configuration file | 181 | # reload the configuration file |
197 | bindsym $mod+Shift+c reload | 182 | bindcode $mod+Shift+54 reload |
198 | # restart i3 inplace (preserves your layout/session, can be used to upgrade i3) | 183 | # restart i3 inplace (preserves your layout/session, can be used to upgrade i3) |
199 | bindsym $mod+Shift+r restart | 184 | bindcode $mod+Shift+27 restart |
200 | 185 | # launch the poweroff menu | |
201 | # resize window (you can also use the mouse for that) | ||
202 | mode "resize" { | ||
203 | # These bindings trigger as soon as you enter the resize mode | ||
204 | |||
205 | # Pressing left will shrink the window’s width. | ||
206 | # Pressing right will grow the window’s width. | ||
207 | # Pressing up will shrink the window’s height. | ||
208 | # Pressing down will grow the window’s height. | ||
209 | bindsym h resize shrink width 10 px or 10 ppt | ||
210 | bindsym j resize grow height 10 px or 10 ppt | ||
211 | bindsym k resize shrink height 10 px or 10 ppt | ||
212 | bindsym l resize grow width 10 px or 10 ppt | ||
213 | |||
214 | # back to normal: Enter or Escape or $mod+r | ||
215 | bindsym Return mode "default" | ||
216 | bindsym Escape mode "default" | ||
217 | bindsym $mod+r mode "default" | ||
218 | } | ||
219 | bindsym $mod+r mode "resize" | ||
220 | |||
221 | # session | ||
222 | mode " (L)ock (S)ignout (R)eboot (P)oweroff" { | ||
223 | bindsym $mod+l exec i3lock -i ~/Dropbox/Wallpapers/pots.jpg --clock --time-font="FuraCode Nerd Font" --timesize=144 --datestr="" --timecolor=fefefeee --timestr="%H:%M" --radius=45 --timepos="ix:iy-250" | ||
224 | bindsym $mod+r exec systemctl reboot | ||
225 | bindsym $mod+p exec systemctl poweroff | ||
226 | bindsym $mod+s exit | ||
227 | bindsym Escape mode "default" | ||
228 | } | ||
229 | bindsym $mod+Shift+e mode " (L)ock (S)ignout (R)eboot (P)oweroff" | ||
230 | |||
231 | bindsym $mod+Shift+Escape exec --no-startup-id ~/.local/bin/power.sh | 186 | bindsym $mod+Shift+Escape exec --no-startup-id ~/.local/bin/power.sh |
232 | 187 | ||
233 | set $mode_gaps Gaps: (o)uter, (i)nner | ||
234 | #, (h)orizontal, (v)ertical, (t)op, (r)ight, (b)ottom, (l)eft | ||
235 | set $mode_gaps_outer Outer Gaps: +|-|0 (local), Shift + +|-|0 (global) | ||
236 | set $mode_gaps_inner Inner Gaps: +|-|0 (local), Shift + +|-|0 (global) | ||
237 | # set $mode_gaps_horiz Horizontal Gaps: +|-|0 (local), Shift + +|-|0 (global) | ||
238 | # set $mode_gaps_verti Vertical Gaps: +|-|0 (local), Shift + +|-|0 (global) | ||
239 | # set $mode_gaps_top Top Gaps: +|-|0 (local), Shift + +|-|0 (global) | ||
240 | # set $mode_gaps_right Right Gaps: +|-|0 (local), Shift + +|-|0 (global) | ||
241 | # set $mode_gaps_bottom Bottom Gaps: +|-|0 (local), Shift + +|-|0 (global) | ||
242 | # set $mode_gaps_left Left Gaps: +|-|0 (local), Shift + +|-|0 (global) | ||
243 | bindsym $mod+Shift+g mode "$mode_gaps" | ||
244 | |||
245 | mode "$mode_gaps" { | ||
246 | bindsym o mode "$mode_gaps_outer" | ||
247 | bindsym i mode "$mode_gaps_inner" | ||
248 | # bindsym h mode "$mode_gaps_horiz" | ||
249 | # bindsym v mode "$mode_gaps_verti" | ||
250 | # bindsym t mode "$mode_gaps_top" | ||
251 | # bindsym r mode "$mode_gaps_right" | ||
252 | # bindsym b mode "$mode_gaps_bottom" | ||
253 | # bindsym l mode "$mode_gaps_left" | ||
254 | # bindsym Return mode "$mode_gaps" | ||
255 | bindsym Escape mode "default" | ||
256 | } | ||
257 | |||
258 | mode "$mode_gaps_outer" { | ||
259 | bindsym plus gaps outer current plus 5 | ||
260 | bindsym minus gaps outer current minus 5 | ||
261 | bindsym 0 gaps outer current set 0 | ||
262 | |||
263 | bindsym Shift+plus gaps outer all plus 5 | ||
264 | bindsym Shift+minus gaps outer all minus 5 | ||
265 | bindsym Shift+0 gaps outer all set 0 | ||
266 | |||
267 | bindsym Return mode "$mode_gaps" | ||
268 | bindsym Escape mode "default" | ||
269 | } | ||
270 | mode "$mode_gaps_inner" { | ||
271 | bindsym plus gaps inner current plus 5 | ||
272 | bindsym minus gaps inner current minus 5 | ||
273 | bindsym 0 gaps inner current set 0 | ||
274 | |||
275 | bindsym Shift+plus gaps inner all plus 5 | ||
276 | bindsym Shift+minus gaps inner all minus 5 | ||
277 | bindsym Shift+0 gaps inner all set 0 | ||
278 | |||
279 | bindsym Return mode "$mode_gaps" | ||
280 | bindsym Escape mode "default" | ||
281 | } | ||
282 | |||
283 | # for_window [class=".*"] border pixel 5 | 188 | # for_window [class=".*"] border pixel 5 |
284 | default_border pixel 2 | 189 | default_border pixel 2 |
285 | for_window [class="Zotero" instance="Toplevel" title="Quick Format Citation"] floating enable | 190 | for_window [class="Zotero" instance="Toplevel" title="Quick Format Citation"] floating enable |