summaryrefslogtreecommitdiffstats
path: root/.config/i3/config##c.desktop,h.Maus
blob: 9616a7df59561c08d1342d28930454b737a6c9db (plain)
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
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
# i3 config file (v4)
# Please see https://i3wm.org/docs/userguide.html for a complete reference!

# set modifiers
set $mod Mod4
set $alt Mod1

# launch polybar
exec --no-startup-id $HOME/.config/polybar/launch.sh &

# start the screensaver, '' at the end is not a typo
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"' ''

#autostart
exec --no-startup-id xsettingsd &
exec --no-startup-id picom -b
exec --no-startup-id flashfocus &
exec --no-startup-id nextcloud &
exec --no-startup-id copyq &
exec --no-startup-id redshift-gtk &
exec --no-startup-id nm-applet &
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 &
exec --no-startup-id xdotool key --clearmodifiers Num_Lock
exec --no-startup-id udiskie --automount --file-manager thunar --tray --notify &

# swap caps lock and escape, set keyboard layout
exec --no-startup-id setxkbmap -model pc105 -layout tr,us -variant ,colemak -option grp:alt_shift_toggle,caps:backspace

# and ctrl to escape
exec --no-startup-id xcape -e 'Control_L=Escape'

#launch conky windows
exec --no-startup-id conky --daemonize -c ~/.config/conky/conky.conf
exec --no-startup-id conky --daemonize -c ~/.config/conky/task.conf

# set the wallpaper last (hopefully after xrandr)
exec --no-startup-id ~/.fehbg

# Font for window titles
font pango:Lato 11

# Use Mouse+$mod to drag floating windows to their wanted position
floating_modifier $alt

##############
#  bindings  #
##############

# i switched back to firefox can you tell
bindsym Ctrl+q exec --no-startup-id true

# get the mouse out of the way
bindsym $mod+o exec --no-startup-id xdotool mousemove 1087 1101

# bookmark from clipboard
bindsym $mod+u exec --no-startup-id ~/bin/bukuadd_c

# swap caps lock and escape, set keyboard layout, 35 is ]/ü (layout agnostic)
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

# use flameshot with print screen
bindsym Print exec flameshot gui

# media keys
bindsym XF86AudioRaiseVolume exec --no-startup-id "amixer set Master 2%+ && volnoti-show $(amixer get Master | grep -Po '[0-9]+(?=%)' | head -1)"
bindsym XF86AudioLowerVolume exec --no-startup-id "amixer set Master 2%- && volnoti-show $(amixer get Master | grep -Po '[0-9]+(?=%)' | head -1)"
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"
bindsym XF86AudioPlay exec --no-startup-id playerctl play-pause # for spotify
bindsym XF86AudioPrev exec --no-startup-id playerctl previous
bindsym XF86AudioNext exec --no-startup-id playerctl next
bindsym XF86Tools exec --no-startup-id mpc toggle # for mpd/ncmpcpp

# # media keys for "regular" keyboards
# bindsym $mod+Up exec --no-startup-id "amixer set Master 2%+ && volnoti-show $(amixer get Master | grep -Po '[0-9]+(?=%)' | head -1)"
# bindsym $mod+Down exec --no-startup-id "amixer set Master 2%- && volnoti-show $(amixer get Master | grep -Po '[0-9]+(?=%)' | head -1)"
# 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"
# bindsym $mod+q exec --no-startup-id playerctl play-pause
# bindsym $mod+Left exec --no-startup-id playerctl previous
# bindsym $mod+Right exec --no-startup-id playerctl next

# Make the currently focused window a scratchpad
bindsym $mod+Shift+minus move scratchpad

# Show the first scratchpad window
bindsym $mod+minus scratchpad show

# shortcuts for frequent programs
bindsym $mod+Shift+z exec zotero
bindcode $mod+Shift+41 exec thunar # t on colemak f on turkish

# start a terminal
bindsym $mod+Return exec kitty

# kill focused window
bindsym $mod+Shift+q kill
bindsym --whole-window $mod+button2 kill

# start rofi (a program launcher)
bindsym $mod+d exec rofi -show combi

# change focus
bindsym $mod+h focus left
bindsym $mod+j focus down
bindsym $mod+k focus up
bindsym $mod+l 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

# split in horizontal orientation
bindsym $mod+b split h

# split in vertical orientation
bindsym $mod+v split v

# enter fullscreen mode for the focused container
bindsym $mod+f fullscreen toggle

# change container layout (stacked, tabbed, toggle split)
bindsym $mod+s layout stacking
bindsym $mod+w layout tabbed
bindsym $mod+e layout toggle split

# toggle tiling / floating
bindsym $mod+Shift+space floating toggle

# toggle sticky floating window
bindsym $mod+a sticky toggle

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

# Define names for default workspaces for which we configure key bindings later on.
# We use variables to avoid repeating the names in multiple places.
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"
set $wsmusic "♫"
set $wszotero "ζ"
set $wsdesktop "Ξ"

workspace $wsmusic output HDMI-0

# 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
bindsym $mod+m workspace $wsmusic
bindcode $mod+49 workspace $wszotero
bindcode $mod+60 workspace $wsdesktop

# 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
bindsym $mod+Shift+m move container to workspace $wsmusic
bindcode $mod+Shift+49 move container to workspace $wszotero
bindcode $mod+Shift+60 move container to workspace $wsdesktop

bindsym $mod+z move container to output right

# 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

# resize window (you can also use the mouse for that)
mode "resize" {
        # These bindings trigger as soon as you enter the resize mode

        # Pressing left will shrink the window’s width.
        # Pressing right will grow the window’s width.
        # Pressing up will shrink the window’s height.
        # Pressing down will grow the window’s height.
        bindsym h resize shrink width 10 px or 10 ppt
        bindsym j resize grow height 10 px or 10 ppt
        bindsym k resize shrink height 10 px or 10 ppt
        bindsym l resize grow width 10 px or 10 ppt

        # back to normal: Enter or Escape or $mod+r
        bindsym Return mode "default"
        bindsym Escape mode "default"
        bindsym $mod+r mode "default"
}
bindsym $mod+r mode "resize"

# session
mode " (L)ock (S)ignout (R)eboot (P)oweroff" {
    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"
    bindsym $mod+r exec systemctl reboot
    bindsym $mod+p exec systemctl poweroff
    bindsym $mod+s exit
    bindsym Escape mode "default"
}
bindsym $mod+Shift+e mode " (L)ock (S)ignout (R)eboot (P)oweroff"

bindsym $mod+Shift+Escape exec --no-startup-id ~/bin/power.sh

set $mode_gaps Gaps: (o)uter, (i)nner
#, (h)orizontal, (v)ertical, (t)op, (r)ight, (b)ottom, (l)eft
set $mode_gaps_outer Outer Gaps: +|-|0 (local), Shift + +|-|0 (global)
set $mode_gaps_inner Inner Gaps: +|-|0 (local), Shift + +|-|0 (global)
# set $mode_gaps_horiz Horizontal Gaps: +|-|0 (local), Shift + +|-|0 (global)
# set $mode_gaps_verti Vertical Gaps: +|-|0 (local), Shift + +|-|0 (global)
# set $mode_gaps_top Top Gaps: +|-|0 (local), Shift + +|-|0 (global)
# set $mode_gaps_right Right Gaps: +|-|0 (local), Shift + +|-|0 (global)
# set $mode_gaps_bottom Bottom Gaps: +|-|0 (local), Shift + +|-|0 (global)
# set $mode_gaps_left Left Gaps: +|-|0 (local), Shift + +|-|0 (global)
bindsym $mod+Shift+g mode "$mode_gaps"

mode "$mode_gaps" {
        bindsym o      mode "$mode_gaps_outer"
        bindsym i      mode "$mode_gaps_inner"
        # bindsym h      mode "$mode_gaps_horiz"
        # bindsym v      mode "$mode_gaps_verti"
        # bindsym t      mode "$mode_gaps_top"
        # bindsym r      mode "$mode_gaps_right"
        # bindsym b      mode "$mode_gaps_bottom"
        # bindsym l      mode "$mode_gaps_left"
        # bindsym Return mode "$mode_gaps"
        bindsym Escape mode "default"
}

mode "$mode_gaps_outer" {
        bindsym plus  gaps outer current plus 5
        bindsym minus gaps outer current minus 5
        bindsym 0     gaps outer current set 0

        bindsym Shift+plus  gaps outer all plus 5
        bindsym Shift+minus gaps outer all minus 5
        bindsym Shift+0     gaps outer all set 0

        bindsym Return mode "$mode_gaps"
        bindsym Escape mode "default"
}
mode "$mode_gaps_inner" {
        bindsym plus  gaps inner current plus 5
        bindsym minus gaps inner current minus 5
        bindsym 0     gaps inner current set 0

        bindsym Shift+plus  gaps inner all plus 5
        bindsym Shift+minus gaps inner all minus 5
        bindsym Shift+0     gaps inner all set 0

        bindsym Return mode "$mode_gaps"
        bindsym Escape mode "default"
}

# for_window [class=".*"] border pixel 5
default_border pixel 2
for_window [class="Zotero" instance="Toplevel" title="Quick Format Citation"] floating enable
for_window [class="Zotero" instance="Toplevel" title="Progress"] floating enable
assign [class="^Steam$"] 9
assign [class="^Zotero$"] $wszotero

# class                 border  backgr. text    indicator child_border
client.focused          #458588 #285577 #ffffff #458588   #285577
client.focused_inactive #b16286 #5f676a #ffffff #484e50   #5f676a
client.unfocused        #927374 #222222 #888888 #292d2e   #222222
client.urgent           #2f343a #900000 #ffffff #900000   #900000
client.placeholder      #000000 #0c0c0c #ffffff #000000   #0c0c0c

client.background       #ffffff

# config
hide_edge_borders none
workspace_auto_back_and_forth yes
focus_follows_mouse no
mouse_warping none