summaryrefslogtreecommitdiffstats
path: root/.config/i3
diff options
context:
space:
mode:
authorYigit Sever2020-11-12 03:22:46 +0300
committerYigit Sever2020-11-12 03:22:46 +0300
commit2e005dc099cace96681b7ead29a27d86c56acd4d (patch)
tree98dffe4b9def7cef72fc0d522891d40976e80211 /.config/i3
parent0b9f9063c8e0f05119d5e92aad8f98bdf84a79a4 (diff)
downloaddotfiles-2e005dc099cace96681b7ead29a27d86c56acd4d.tar.gz
dotfiles-2e005dc099cace96681b7ead29a27d86c56acd4d.tar.bz2
dotfiles-2e005dc099cace96681b7ead29a27d86c56acd4d.zip
big i3 config cleanup
diffstat (limited to '.config/i3')
-rw-r--r--.config/i3/config##c.desktop,h.maus211
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
6set $mod Mod4 5set $mod Mod4
7set $alt Mod1 6set $alt Mod1
8 7
8# use mouse+$mod to drag floating windows to their wanted position
9floating_modifier $alt
10
9# launch polybar 11# launch polybar
10exec --no-startup-id $HOME/.config/polybar/launch.sh & 12exec --no-startup-id $HOME/.config/polybar/launch.sh &
11 13
12# start the screensaver, '' at the end is not a typo 14# autostart
13exec --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
16exec --no-startup-id xsettingsd & 15exec --no-startup-id xsettingsd &
17exec --no-startup-id picom -b 16exec --no-startup-id picom -b
18exec --no-startup-id flashfocus & 17exec --no-startup-id flashfocus &
@@ -20,55 +19,46 @@ exec --no-startup-id nextcloud &
20exec --no-startup-id copyq & 19exec --no-startup-id copyq &
21exec --no-startup-id redshift-gtk & 20exec --no-startup-id redshift-gtk &
22exec --no-startup-id nm-applet & 21exec --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 &
24exec --no-startup-id xdotool key --clearmodifiers Num_Lock
25exec --no-startup-id udiskie --automount --file-manager thunar --tray --notify & 22exec --no-startup-id udiskie --automount --file-manager thunar --tray --notify &
26exec --no-startup-id /usr/lib/pam_kwallet_init 23exec --no-startup-id /usr/lib/pam_kwallet_init
27exec --no-startup-id remind -z -k'dunstify -i "view-calendar" "⏰ reminder!" "%s" &' ~/.reminders & 24exec --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
30exec --no-startup-id setxkbmap -model pc105 -layout tr,us -variant ,colemak -option grp:alt_shift_toggle,caps:backspace 27exec --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
33exec --no-startup-id xcape -e 'Control_L=Escape' 30exec --no-startup-id xcape -e 'Control_L=Escape'
34 31
35#launch conky windows 32# launch conky windows
36exec --no-startup-id conky --daemonize -c ~/.config/conky/conky.conf 33exec --no-startup-id conky --daemonize -c ~/.config/conky/conky.conf
37exec --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)
40exec --no-startup-id ~/.fehbg 37exec --no-startup-id ~/.fehbg
41 38
42# Font for window titles 39# font for window titles
43font pango:Lato 11 40font pango:Iosevka 11
44
45# Use Mouse+$mod to drag floating windows to their wanted position
46floating_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
53bindsym Ctrl+q exec --no-startup-id true 47bindcode $mod+54 exec --no-startup-id rofimoji --skin-tone neutral
54 48
55bindsym $mod+c exec --no-startup-id rofimoji --skin-tone neutral --insert-with-clipboard 49# get the mouse out of the way with mod+y
50bindcode $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
58bindsym $mod+o exec --no-startup-id xdotool mousemove 1087 1101 53bindcode $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+]
61bindsym $mod+u exec --no-startup-id ~/.local/bin/bukuadd_c 56bindcode $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)
64bindcode $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
67bindsym Print exec flameshot gui 59bindsym 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)"
72bindsym XF86AudioRaiseVolume exec --no-startup-id "amixer set Master 2%+ && amixer get Master | grep -Po '[0-9]+(?=%)' | head -1 > /tmp/xobpipe" 62bindsym XF86AudioRaiseVolume exec --no-startup-id "amixer set Master 2%+ && amixer get Master | grep -Po '[0-9]+(?=%)' | head -1 > /tmp/xobpipe"
73bindsym XF86AudioLowerVolume exec --no-startup-id "amixer set Master 2%- && amixer get Master | grep -Po '[0-9]+(?=%)' | head -1 > /tmp/xobpipe" 63bindsym XF86AudioLowerVolume exec --no-startup-id "amixer set Master 2%- && amixer get Master | grep -Po '[0-9]+(?=%)' | head -1 > /tmp/xobpipe"
74bindsym 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" 64bindsym 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
77bindsym XF86AudioNext exec --no-startup-id playerctl next 67bindsym XF86AudioNext exec --no-startup-id playerctl next
78bindsym XF86Tools exec --no-startup-id mpc toggle # for mpd/ncmpcpp 68bindsym 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)" 71bindcode $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
89bindsym $mod+Shift+minus move scratchpad
90 72
91# Show the first scratchpad window 73# show the first scratchpad window
92bindsym $mod+minus scratchpad show 74bindcode $mod+20 scratchpad show
93 75
94# Pause notifications for a while 76# pause notifications for a while with mod+shift+y
95bindcode $mod+Shift+32 exec /home/yigit/.local/bin/toggle_notifications.sh 77bindcode $mod+Shift+32 exec /home/yigit/.local/bin/toggle_notifications.sh
96 78
97# shortcuts for frequent programs 79# shortcuts for frequent programs
98bindsym $mod+Shift+z exec zotero 80
99bindcode $mod+Shift+41 exec thunar # t on colemak f on turkish 81# zotero on mod+shift+z
82bindcode $mod+Shift+52 exec zotero
83# thunar on mod+shift+t
84bindcode $mod+Shift+41 exec thunar
100 85
101# start a terminal 86# start a terminal
102bindsym $mod+Return exec kitty 87bindsym $mod+Return exec kitty
103 88
104# kill focused window 89# kill focused window
105bindsym $mod+Shift+q kill 90bindcode $mod+Shift+24 kill
106bindsym --whole-window $mod+button2 kill 91bindsym --whole-window $mod+button2 kill
107 92
108# start rofi (a program launcher) 93# start rofi with mod+s
109bindsym $mod+d exec rofi -show combi 94bindcode $mod+40 exec rofi -show combi
110 95
111# change focus 96# change focus on mod+hnei
112bindsym $mod+h focus left 97bindcode $mod+43 focus left
113bindsym $mod+j focus down 98bindcode $mod+44 focus down
114bindsym $mod+k focus up 99bindcode $mod+45 focus up
115bindsym $mod+l focus right 100bindcode $mod+46 focus right
116 101
117# move focused window 102# move focused window on mod+shift+hnei
118bindsym $mod+Shift+h move left 103bindcode $mod+Shift+43 move left
119bindsym $mod+Shift+j move down 104bindcode $mod+Shift+44 move down
120bindsym $mod+Shift+k move up 105bindcode $mod+Shift+45 move up
121bindsym $mod+Shift+l move right 106bindcode $mod+Shift+46 move right
122 107
123# split in horizontal orientation 108# split in horizontal orientation with mod+b
124bindsym $mod+b split h 109bindcode $mod+56 split h
125 110
126# split in vertical orientation 111# split in vertical orientation with mod+v
127bindsym $mod+v split v 112bindcode $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
130bindsym $mod+f fullscreen toggle 115bindcode $mod+41 fullscreen toggle
131 116
132# change container layout (stacked, tabbed, toggle split) 117# change container layout (stacked, tabbed, toggle split)
133bindsym $mod+s layout stacking 118bindcode $mod+39 layout stacking
134bindsym $mod+w layout tabbed 119bindcode $mod+25 layout tabbed
135bindsym $mod+e layout toggle split 120bindcode $mod+26 layout toggle split
136 121
137# toggle tiling / floating 122# toggle tiling / floating
138bindsym $mod+Shift+space floating toggle 123bindsym $mod+Shift+space floating toggle
139 124
140# toggle sticky floating window 125# toggle sticky floating window with mod+a
141bindsym $mod+a sticky toggle 126bindcode $mod+38 sticky toggle
142 127
143# change focus between tiling / floating windows 128# change focus between tiling / floating windows
144bindsym $mod+space focus mode_toggle 129bindsym $mod+space focus mode_toggle
@@ -191,95 +176,15 @@ bindsym $mod+Shift+m move container to workspace $wsmusic
191bindcode $mod+Shift+49 move container to workspace $wszotero 176bindcode $mod+Shift+49 move container to workspace $wszotero
192bindcode $mod+Shift+60 move container to workspace $wsdesktop 177bindcode $mod+Shift+60 move container to workspace $wsdesktop
193 178
194bindsym $mod+z move container to output right 179bindcode $mod+52 move container to output right
195 180
196# reload the configuration file 181# reload the configuration file
197bindsym $mod+Shift+c reload 182bindcode $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)
199bindsym $mod+Shift+r restart 184bindcode $mod+Shift+27 restart
200 185# launch the poweroff menu
201# resize window (you can also use the mouse for that)
202mode "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}
219bindsym $mod+r mode "resize"
220
221# session
222mode " (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}
229bindsym $mod+Shift+e mode " (L)ock (S)ignout (R)eboot (P)oweroff"
230
231bindsym $mod+Shift+Escape exec --no-startup-id ~/.local/bin/power.sh 186bindsym $mod+Shift+Escape exec --no-startup-id ~/.local/bin/power.sh
232 187
233set $mode_gaps Gaps: (o)uter, (i)nner
234#, (h)orizontal, (v)ertical, (t)op, (r)ight, (b)ottom, (l)eft
235set $mode_gaps_outer Outer Gaps: +|-|0 (local), Shift + +|-|0 (global)
236set $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)
243bindsym $mod+Shift+g mode "$mode_gaps"
244
245mode "$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
258mode "$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}
270mode "$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
284default_border pixel 2 189default_border pixel 2
285for_window [class="Zotero" instance="Toplevel" title="Quick Format Citation"] floating enable 190for_window [class="Zotero" instance="Toplevel" title="Quick Format Citation"] floating enable