Browse Source

Created help menu for i3 keybindings

master
Micah Halter 1 month ago
parent
commit
5fab16710f
4 changed files with 51 additions and 43 deletions
  1. 1
    0
      Makefile
  2. 40
    43
      i3/.config/i3/config
  3. 5
    0
      scripts/.config/Scripts/dmenui3
  4. 5
    0
      zsh/.zprofile

+ 1
- 0
Makefile View File

@@ -56,6 +56,7 @@ arch: pacman
56 56
 		dmenu \
57 57
 		dunst \
58 58
 		exfat-utils \
59
+		fd \
59 60
 		firefox \
60 61
 		fzf \
61 62
 		gcc-fortran \

+ 40
- 43
i3/.config/i3/config View File

@@ -3,9 +3,6 @@ set $mod Mod1
3 3
 floating_modifier $mod
4 4
 
5 5
 # set variables
6
-set $i3exit      "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'"
7
-set $layoutupdate exec --no-startup-id pkill -SIGRTMIN+10 i3blocks
8
-set $volumeupdate exec --no-startup-id pkill -SIGRTMIN+11 i3blocks
9 6
 set $smallwidth   900
10 7
 set $smallheight  640
11 8
 set $bigwidth     1500
@@ -239,8 +236,8 @@ bindsym $mod+Shift+a         exec --no-startup-id i3-cliprog ncpamixer "ncpamixe
239 236
 #bindsym $mod+Control+a
240 237
 #bindsym $mod+Shift+Control+a
241 238
 
242
-bindsym $mod+s               split toggle; $layoutupdate
243
-bindsym $mod+Shift+s         exec --no-startup-id i3-workspaceswap; $layoutupdate
239
+bindsym $mod+s               split toggle; exec --no-startup-id bash -c "$I3BLOCKS_LAYOUT"
240
+bindsym $mod+Shift+s         exec --no-startup-id i3-workspaceswap; exec --no-startup-id bash -c "$I3BLOCKS_LAYOUT"
244 241
 #bindsym $mod+Control+s
245 242
 #bindsym $mod+Shift+Control+s
246 243
 
@@ -259,25 +256,25 @@ bindsym $mod+Shift+f         exec --no-startup-id firefox
259 256
 #bindsym $mod+Control+g
260 257
 bindsym $mod+Shift+Control+g exec --no-startup-id killall gpymusic & killall cava & echo '' > $HOME/.nowplaying
261 258
 
262
-bindsym $mod+h               focus left; $layoutupdate
263
-bindsym $mod+Shift+h         move left; $layoutupdate
259
+bindsym $mod+h               focus left; exec --no-startup-id bash -c "$I3BLOCKS_LAYOUT"
260
+bindsym $mod+Shift+h         move left; exec --no-startup-id bash -c "$I3BLOCKS_LAYOUT"
264 261
 bindsym $mod+Control+h       exec --no-startup-id i3-resize left
265
-bindsym $mod+Shift+Control+h move workspace to output left; $layoutupdate
262
+bindsym $mod+Shift+Control+h move workspace to output left; exec --no-startup-id bash -c "$I3BLOCKS_LAYOUT"
266 263
 
267
-bindsym $mod+j               focus down; $layoutupdate
268
-bindsym $mod+Shift+j         move down; $layoutupdate
264
+bindsym $mod+j               focus down; exec --no-startup-id bash -c "$I3BLOCKS_LAYOUT"
265
+bindsym $mod+Shift+j         move down; exec --no-startup-id bash -c "$I3BLOCKS_LAYOUT"
269 266
 bindsym $mod+Control+j       exec --no-startup-id i3-resize down
270
-bindsym $mod+Shift+Control+j exec --no-startup-id amixer -D pulse sset Master 5%-; $volumeupdate
267
+bindsym $mod+Shift+Control+j exec --no-startup-id amixer -D pulse sset Master 5%-; exec --no-startup-id bash -c "$I3BLOCKS_VOLUME"
271 268
 
272
-bindsym $mod+k               focus up; $layoutupdate
273
-bindsym $mod+Shift+k         move up; $layoutupdate
269
+bindsym $mod+k               focus up; exec --no-startup-id bash -c "$I3BLOCKS_LAYOUT"
270
+bindsym $mod+Shift+k         move up; exec --no-startup-id bash -c "$I3BLOCKS_LAYOUT"
274 271
 bindsym $mod+Control+k       exec --no-startup-id i3-resize up
275
-bindsym $mod+Shift+Control+k exec --no-startup-id amixer -D pulse sset Master 5%+; $volumeupdate
272
+bindsym $mod+Shift+Control+k exec --no-startup-id amixer -D pulse sset Master 5%+; exec --no-startup-id bash -c "$I3BLOCKS_VOLUME"
276 273
 
277
-bindsym $mod+l               focus right; $layoutupdate
278
-bindsym $mod+Shift+l         move right; $layoutupdate
274
+bindsym $mod+l               focus right; exec --no-startup-id bash -c "$I3BLOCKS_LAYOUT"
275
+bindsym $mod+Shift+l         move right; exec --no-startup-id bash -c "$I3BLOCKS_LAYOUT"
279 276
 bindsym $mod+Control+l       exec --no-startup-id i3-resize right
280
-bindsym $mod+Shift+Control+l move workspace to output right; $layoutupdate
277
+bindsym $mod+Shift+Control+l move workspace to output right; exec --no-startup-id bash -c "$I3BLOCKS_LAYOUT"
281 278
 
282 279
 bindsym $mod+z               exec --no-startup-id dmenumount
283 280
 bindsym $mod+Shift+z         exec --no-startup-id dmenuumount
@@ -312,51 +309,51 @@ bindsym $mod+Shift+n         exec --no-startup-id $TERMINAL -e 'i3-runner "newsb
312 309
 bindsym $mod+m               exec --no-startup-id i3-cliprog email "neomutt"
313 310
 bindsym $mod+Shift+m         exec --no-startup-id $TERMINAL --name=gpymusic -e 'i3-runner "gpymusic"'
314 311
 #bindsym $mod+Control+m
315
-bindsym $mod+Shift+Control+m exec --no-startup-id amixer -D pulse sset Master toggle; $volumeupdate
312
+bindsym $mod+Shift+Control+m exec --no-startup-id amixer -D pulse sset Master toggle; exec --no-startup-id bash -c "$I3BLOCKS_VOLUME"
316 313
 
317 314
 
318 315
 ######################
319 316
 # NUMBER KEYBINDINGS #
320 317
 ######################
321 318
 
322
-bindsym $mod+1               workspace $workspace1; $layoutupdate
323
-bindsym $mod+Shift+1         move container to workspace $workspace1; $layoutupdate
319
+bindsym $mod+1               workspace $workspace1; exec --no-startup-id bash -c "$I3BLOCKS_LAYOUT"
320
+bindsym $mod+Shift+1         move container to workspace $workspace1; exec --no-startup-id bash -c "$I3BLOCKS_LAYOUT"
324 321
 #bindsym $mod+Shift+Control+1
325 322
 
326
-bindsym $mod+2               workspace $workspace2; $layoutupdate
327
-bindsym $mod+Shift+2         move container to workspace $workspace2; $layoutupdate
323
+bindsym $mod+2               workspace $workspace2; exec --no-startup-id bash -c "$I3BLOCKS_LAYOUT"
324
+bindsym $mod+Shift+2         move container to workspace $workspace2; exec --no-startup-id bash -c "$I3BLOCKS_LAYOUT"
328 325
 #bindsym $mod+Shift+Control+2
329 326
 
330
-bindsym $mod+3               workspace $workspace3; $layoutupdate
331
-bindsym $mod+Shift+3         move container to workspace $workspace3; $layoutupdate
327
+bindsym $mod+3               workspace $workspace3; exec --no-startup-id bash -c "$I3BLOCKS_LAYOUT"
328
+bindsym $mod+Shift+3         move container to workspace $workspace3; exec --no-startup-id bash -c "$I3BLOCKS_LAYOUT"
332 329
 #bindsym $mod+Shift+Control+3
333 330
 
334
-bindsym $mod+4               workspace $workspace4; $layoutupdate
335
-bindsym $mod+Shift+4         move container to workspace $workspace4; $layoutupdate
331
+bindsym $mod+4               workspace $workspace4; exec --no-startup-id bash -c "$I3BLOCKS_LAYOUT"
332
+bindsym $mod+Shift+4         move container to workspace $workspace4; exec --no-startup-id bash -c "$I3BLOCKS_LAYOUT"
336 333
 #bindsym $mod+Shift+Control+4
337 334
 
338
-bindsym $mod+5               workspace $workspace5; $layoutupdate
339
-bindsym $mod+Shift+5         move container to workspace $workspace5; $layoutupdate
335
+bindsym $mod+5               workspace $workspace5; exec --no-startup-id bash -c "$I3BLOCKS_LAYOUT"
336
+bindsym $mod+Shift+5         move container to workspace $workspace5; exec --no-startup-id bash -c "$I3BLOCKS_LAYOUT"
340 337
 #bindsym $mod+Shift+Control+5
341 338
 
342
-bindsym $mod+6               workspace $workspace6; $layoutupdate
343
-bindsym $mod+Shift+6         move container to workspace $workspace6; $layoutupdate
339
+bindsym $mod+6               workspace $workspace6; exec --no-startup-id bash -c "$I3BLOCKS_LAYOUT"
340
+bindsym $mod+Shift+6         move container to workspace $workspace6; exec --no-startup-id bash -c "$I3BLOCKS_LAYOUT"
344 341
 #bindsym $mod+Shift+Control+6
345 342
 
346
-bindsym $mod+7               workspace $workspace7; $layoutupdate
347
-bindsym $mod+Shift+7         move container to workspace $workspace7; $layoutupdate
343
+bindsym $mod+7               workspace $workspace7; exec --no-startup-id bash -c "$I3BLOCKS_LAYOUT"
344
+bindsym $mod+Shift+7         move container to workspace $workspace7; exec --no-startup-id bash -c "$I3BLOCKS_LAYOUT"
348 345
 #bindsym $mod+Shift+Control+7
349 346
 
350
-bindsym $mod+8               workspace $workspace8; $layoutupdate
351
-bindsym $mod+Shift+8         move container to workspace $workspace8; $layoutupdate
347
+bindsym $mod+8               workspace $workspace8; exec --no-startup-id bash -c "$I3BLOCKS_LAYOUT"
348
+bindsym $mod+Shift+8         move container to workspace $workspace8; exec --no-startup-id bash -c "$I3BLOCKS_LAYOUT"
352 349
 #bindsym $mod+Shift+Control+8
353 350
 
354
-bindsym $mod+9               workspace $workspace9; $layoutupdate
355
-bindsym $mod+Shift+9         move container to workspace $workspace9; $layoutupdate
351
+bindsym $mod+9               workspace $workspace9; exec --no-startup-id bash -c "$I3BLOCKS_LAYOUT"
352
+bindsym $mod+Shift+9         move container to workspace $workspace9; exec --no-startup-id bash -c "$I3BLOCKS_LAYOUT"
356 353
 #bindsym $mod+Shift+Control+9
357 354
 
358
-bindsym $mod+0               workspace $workspace10; $layoutupdate
359
-bindsym $mod+Shift+0         move container to workspace $workspace10; $layoutupdate
355
+bindsym $mod+0               workspace $workspace10; exec --no-startup-id bash -c "$I3BLOCKS_LAYOUT"
356
+bindsym $mod+Shift+0         move container to workspace $workspace10; exec --no-startup-id bash -c "$I3BLOCKS_LAYOUT"
360 357
 #bindsym $mod+Shift+Control+0
361 358
 bindsym $mod+Control+0       gaps inner current set $defaultgaps
362 359
 
@@ -416,7 +413,7 @@ bindsym $mod+Shift+Return               exec --no-startup-id dmenucolor -c dmenu
416 413
 #bindsym $mod+Shift+Control+period
417 414
 
418 415
 #bindsym $mod+slash
419
-#bindsym $mod+Shift+slash
416
+bindsym $mod+Shift+slash                exec --no-startup-id dmenui3
420 417
 #bindsym $mod+Shift+Control+slash
421 418
 
422 419
 bindsym $mod+space                      focus mode_toggle
@@ -493,10 +490,10 @@ bindsym $mod+Shift+Control+Next         exec --no-startup-id dmenushutdown
493 490
 # MEDIA KEYBINDINGS #
494 491
 #####################
495 492
 
496
-bindsym XF86AudioLowerVolume            exec --no-startup-id amixer -D pulse sset Master 5%-; $volumeupdate
497
-bindsym XF86AudioRaiseVolume            exec --no-startup-id amixer -D pulse sset Master 5%+; $volumeupdate
498
-bindsym XF86AudioMute                   exec --no-startup-id amixer -D pulse sset Master toggle; $volumeupdate
499
-bindsym XF86AudioMicMute           exec --no-startup-id pactl set-source-mute  $(pacmd list-sources|awk '/\* index:/{ print $3 }') toggle
493
+bindsym XF86AudioLowerVolume            exec --no-startup-id amixer -D pulse sset Master 5%-; exec --no-startup-id bash -c "$I3BLOCKS_VOLUME"
494
+bindsym XF86AudioRaiseVolume            exec --no-startup-id amixer -D pulse sset Master 5%+; exec --no-startup-id bash -c "$I3BLOCKS_VOLUME"
495
+bindsym XF86AudioMute                   exec --no-startup-id amixer -D pulse sset Master toggle; exec --no-startup-id bash -c "$I3BLOCKS_VOLUME"
496
+bindsym XF86AudioMicMute                exec --no-startup-id pactl set-source-mute  $(pacmd list-sources|awk '/\* index:/{ print $3 }') toggle
500 497
 
501 498
 bindsym XF86AudioPause                  exec --no-startup-id echo "cycle pause" > $HOME/.config/mpv/control
502 499
 bindsym XF86AudioNext                   exec --no-startup-id echo "playlist-next" > $HOME/.config/mpv/control

+ 5
- 0
scripts/.config/Scripts/dmenui3 View File

@@ -0,0 +1,5 @@
1
+#!/bin/bash
2
+
3
+dmenu=$HOME/.config/Scripts/dmenucolor
4
+
5
+i3-msg "$(cat ~/.config/i3/config | sed -E 's/^bindsym\s*(\S*)\s*(\S.*$)/\1|\2/;t;d'|column -s'|' -t | $dmenu -l 30 | cut -d' ' -f2- | xargs -0)"

+ 5
- 0
zsh/.zprofile View File

@@ -7,6 +7,11 @@ export VISUAL=$EDITOR
7 7
 export BROWSER="$HOME/.config/Scripts/linkhandler"
8 8
 export TRUEBROWSER="qutebrowser"
9 9
 
10
+export I3BLOCKS_LAYOUT="pkill -SIGRTMIN+10 i3blocks"
11
+export I3BLOCKS_VOLUME="pkill -SIGRTMIN+11 i3blocks"
12
+export I3BLOCKS_POWERSAVER="pkill -SIGRTMIN+12 i3blocks"
13
+export I3BLOCKS_MAIL="pkill -SIGRTMIN+13 i3blocks"
14
+
10 15
 PATH="$PATH:$HOME/.config/Scripts/:$HOME/.gem/ruby/2.5.0/bin:$HOME/go/bin:$HOME/.local/bin"
11 16
 
12 17
 export DEFAULT_USER="micah"

Loading…
Cancel
Save