From dbccadac495253621679de3283016c0f24709cf3 Mon Sep 17 00:00:00 2001 From: Rushil Umaretiya Date: Wed, 25 Oct 2023 18:07:36 -0400 Subject: [PATCH] added i3 and kmonad config --- i3/config | 7 ++++--- kmonad/config.kbd | 28 ++++++++++++++++++++++++++++ polybar/scripts/launcher.sh | 2 +- polybar/scripts/powermenu.sh | 8 +------- polybar/scripts/style-switch.sh | 2 +- 5 files changed, 35 insertions(+), 12 deletions(-) create mode 100644 kmonad/config.kbd diff --git a/i3/config b/i3/config index 4486274..bdabd04 100644 --- a/i3/config +++ b/i3/config @@ -183,7 +183,7 @@ for_window [class="URxvt" instance="floating_urxvt$"] floating toggle bindsym $mod+q kill # exit-menu -bindsym $mod+Shift+p exec ~/.config/polybar/forest/scripts/powermenu.sh +bindsym $mod+Shift+p exec ~/.config/polybar/scripts/powermenu.sh # Lock the system # lock with a picture: @@ -584,7 +584,7 @@ client.urgent $urgentred $urgentred $white $yellowbrown $yellowbrown ## rofi bindings fancy application menu ($mod+d /F9 optional disabled) -bindsym $mod+space exec ~/.config/polybar/forest/scripts/launcher.sh +bindsym $mod+space exec ~/.config/polybar/scripts/launcher.sh # bindsym F9 exec rofi -modi drun -show drun \ # -config ~/.config/rofi/rofidmenu.rasi @@ -604,4 +604,5 @@ bindsym $mod+t exec rofi -show window \ # -config ~/.config/rofi/rofidmenu.rasi exec --no-startup-id parcellite -exec --no-startup-id ~/.config/polybar/launch.sh +exec_always --no-startup-id ~/.config/polybar/launch.sh +exec_always --no-startup-id ~/.config/kmonad/launch.sh; diff --git a/kmonad/config.kbd b/kmonad/config.kbd new file mode 100644 index 0000000..f7e6306 --- /dev/null +++ b/kmonad/config.kbd @@ -0,0 +1,28 @@ +(defcfg + ;; For Linux + input (device-file "/dev/input/by-path/platform-i8042-serio-0-event-kbd") + output (uinput-sink "My KMonad output" + "/bin/sleep 1 && /bin/setxkbmap -option compose:ralt") + + fallthrough true +) + +(defsrc + a s d f g h j k l ; +) + +(defalias + home_a (tap-hold-next-release 200 a lmet) + home_s (tap-hold-next-release 200 s lalt) + home_d (tap-hold-next-release 200 d lctl) + home_f (tap-hold-next-release 200 f lsft) + + home_j (tap-hold-next-release 200 j rsft) + home_k (tap-hold-next-release 200 k rctl) + home_l (tap-hold-next-release 200 l lalt) + home_; (tap-hold-next-release 200 ; rmet) +) + +(deflayer homerowmods + @home_a @home_s @home_d @home_f g h @home_j @home_k @home_l @home_; +) diff --git a/polybar/scripts/launcher.sh b/polybar/scripts/launcher.sh index 991c3d3..1cd9e86 100755 --- a/polybar/scripts/launcher.sh +++ b/polybar/scripts/launcher.sh @@ -10,4 +10,4 @@ SE="${COLORS[$(( $RANDOM % 14 ))]}" sed -i -e "s/ac: .*/ac: ${AC}FF;/g" $FILE sed -i -e "s/se: .*/se: ${SE}FF;/g" $FILE -rofi -no-config -no-lazy-grab -show drun -modi drun -theme ~/.config/polybar/forest/scripts/rofi/launcher.rasi +rofi -no-config -no-lazy-grab -show drun -modi drun -theme ~/.config/polybar/scripts/rofi/launcher.rasi diff --git a/polybar/scripts/powermenu.sh b/polybar/scripts/powermenu.sh index 6ba2ee3..64f85ab 100755 --- a/polybar/scripts/powermenu.sh +++ b/polybar/scripts/powermenu.sh @@ -79,13 +79,7 @@ case $chosen in $logout) ans=$(confirm_exit &) if [[ $ans == "yes" || $ans == "YES" || $ans == "y" || $ans == "Y" ]]; then - if [[ "$DESKTOP_SESSION" == "Openbox" ]]; then - openbox --exit - elif [[ "$DESKTOP_SESSION" == "bspwm" ]]; then - bspc quit - elif [[ "$DESKTOP_SESSION" == "i3" ]]; then - i3-msg exit - fi + i3-msg exit elif [[ $ans == "no" || $ans == "NO" || $ans == "n" || $ans == "N" ]]; then exit 0 else diff --git a/polybar/scripts/style-switch.sh b/polybar/scripts/style-switch.sh index e0188f3..767ce48 100755 --- a/polybar/scripts/style-switch.sh +++ b/polybar/scripts/style-switch.sh @@ -1,6 +1,6 @@ #!/usr/bin/env bash -SDIR="$HOME/.config/polybar/forest/scripts" +SDIR="$HOME/.config/polybar/scripts" # Launch Rofi MENU="$(rofi -no-config -no-lazy-grab -sep "|" -dmenu -i -p '' \