diff options
| author | JaKooLit <ejhay.games@gmail.com> | 2024-09-20 02:23:55 +0900 |
|---|---|---|
| committer | JaKooLit <ejhay.games@gmail.com> | 2024-09-20 02:23:55 +0900 |
| commit | 3056d2060700d35b37b05634e226c734304a5efe (patch) | |
| tree | 8ecd99cdce93da4ef374a83739744cb75446e7a7 | |
| parent | 0088ba45b72b01314a8f1d9ec976874d4d2d9e5c (diff) | |
Added Searchable Keybinds using rofi
Default Keybind SUPER SHIFT K
| -rwxr-xr-x | config/hypr/UserScripts/QuickEdit.sh | 2 | ||||
| -rwxr-xr-x | config/hypr/UserScripts/RainbowBorders.sh | 3 | ||||
| -rwxr-xr-x | config/hypr/UserScripts/Weather.py | 3 | ||||
| -rwxr-xr-x | config/hypr/UserScripts/Weather.sh | 4 | ||||
| -rw-r--r-- | config/hypr/configs/Keybinds.conf | 2 | ||||
| -rwxr-xr-x | config/hypr/scripts/KeyBinds.sh | 27 | ||||
| -rwxr-xr-x | config/hypr/scripts/KeyHints.sh | 1 | ||||
| -rw-r--r-- | config/rofi/config-keybinds.rasi | 20 |
8 files changed, 61 insertions, 1 deletions
diff --git a/config/hypr/UserScripts/QuickEdit.sh b/config/hypr/UserScripts/QuickEdit.sh index c8168ca3..2a860464 100755 --- a/config/hypr/UserScripts/QuickEdit.sh +++ b/config/hypr/UserScripts/QuickEdit.sh @@ -1,4 +1,6 @@ #!/bin/bash + +# /* ---- 💫 https://github.com/JaKooLit 💫 ---- */ ## # Rofi menu for Quick Edit/View of Settings (SUPER E) # Define preferred text editor and terminal diff --git a/config/hypr/UserScripts/RainbowBorders.sh b/config/hypr/UserScripts/RainbowBorders.sh index 49295680..93536c2c 100755 --- a/config/hypr/UserScripts/RainbowBorders.sh +++ b/config/hypr/UserScripts/RainbowBorders.sh @@ -1,5 +1,8 @@ #!/bin/bash +# /* ---- 💫 https://github.com/JaKooLit 💫 ---- */ ## +# for rainbow borders animation + function random_hex() { random_hex=("0xff$(openssl rand -hex 3)") echo $random_hex diff --git a/config/hypr/UserScripts/Weather.py b/config/hypr/UserScripts/Weather.py index c0a40fd7..eb81b9ea 100755 --- a/config/hypr/UserScripts/Weather.py +++ b/config/hypr/UserScripts/Weather.py @@ -1,5 +1,8 @@ #!/usr/bin/env python3 +# /* ---- 💫 https://github.com/JaKooLit 💫 ---- */ # +# weather using python + import subprocess from pyquery import PyQuery # install using `pip install pyquery` import json diff --git a/config/hypr/UserScripts/Weather.sh b/config/hypr/UserScripts/Weather.sh index f916b028..0ecb791b 100755 --- a/config/hypr/UserScripts/Weather.sh +++ b/config/hypr/UserScripts/Weather.sh @@ -1,5 +1,9 @@ #!/bin/bash +# /* ---- 💫 https://github.com/JaKooLit 💫 ---- */ ## +# weather info from wttr. https://github.com/chubin/wttr.in +# Remember to add city + city= cachedir=~/.cache/rbn cachefile=${0##*/}-$1 diff --git a/config/hypr/configs/Keybinds.conf b/config/hypr/configs/Keybinds.conf index 9bd89647..9c077336 100644 --- a/config/hypr/configs/Keybinds.conf +++ b/config/hypr/configs/Keybinds.conf @@ -37,7 +37,7 @@ bind = $mainMod, W, exec, $UserScripts/WallpaperSelect.sh # Select wallpaper to bind = $mainMod SHIFT, W, exec, $UserScripts/WallpaperEffects.sh # Wallpaper Effects by imagemagickWW bind = CTRL ALT, W, exec, $UserScripts/WallpaperRandom.sh # Random wallpapers bind = $mainMod ALT, O, exec, hyprctl setprop active opaque toggle #disable opacity to active window - +bind = $mainMod SHIFT, K, exec, $scriptsDir/KeyBinds.sh # searchable keybinds # Waybar / Bar related bind = $mainMod, B, exec, pkill -SIGUSR1 waybar # Toggle hide/show waybar bind = $mainMod CTRL, B, exec, $scriptsDir/WaybarStyles.sh # Waybar Styles Menu diff --git a/config/hypr/scripts/KeyBinds.sh b/config/hypr/scripts/KeyBinds.sh new file mode 100755 index 00000000..29217910 --- /dev/null +++ b/config/hypr/scripts/KeyBinds.sh @@ -0,0 +1,27 @@ +#!/bin/bash + +# /* ---- 💫 https://github.com/JaKooLit 💫 ---- */ ## +# Searchable enabled keybinds using rofi + +# Define the config files +KEYBINDS_CONF="$HOME/.config/hypr/configs/Keybinds.conf" +USER_KEYBINDS_CONF="$HOME/.config/hypr/UserConfigs/UserKeybinds.conf" +LAPTOP_CONF="$HOME/.config/hypr/UserConfigs/Laptop.conf" + +# Combine the contents of the keybinds files and filter for keybinds +KEYBINDS=$(cat "$KEYBINDS_CONF" "$USER_KEYBINDS_CONF" | grep -E '^(bind|bindl|binde|bindm)') + +# Check if Laptop.conf exists and add its keybinds if present +if [[ -f "$LAPTOP_CONF" ]]; then + LAPTOP_BINDS=$(grep -E '^(bind|bindl|binde|bindm)' "$LAPTOP_CONF") + KEYBINDS+=$'\n'"$LAPTOP_BINDS" +fi + +# Check if we have any keybinds to display +if [[ -z "$KEYBINDS" ]]; then + echo "No keybinds found." + exit 1 +fi + +# Use rofi to display the keybinds +echo "$KEYBINDS" | rofi -dmenu -i -p "Keybinds" -config ~/.config/rofi/config-keybinds.rasi diff --git a/config/hypr/scripts/KeyHints.sh b/config/hypr/scripts/KeyHints.sh index 0f8a989a..3534f2e4 100755 --- a/config/hypr/scripts/KeyHints.sh +++ b/config/hypr/scripts/KeyHints.sh @@ -43,6 +43,7 @@ GDK_BACKEND=$BACKEND yad --width=$dynamic_width --height=$dynamic_height \ "ESC" "close this app" "" "=" "SUPER KEY (Windows Key)" "(SUPER KEY)" \ " enter" "Terminal" "(kitty)" \ " SHIFT enter" "DropDown Terminal" "(kitty-pyprland)" \ +" SHIFT K" "Searchable Keybinds" "(Keybinds)" \ " A" "Desktop Overview" "(AGS Overview)" \ " D" "App Launcher" "(rofi-wayland)" \ " T" "Open File Manager" "(Thunar)" \ diff --git a/config/rofi/config-keybinds.rasi b/config/rofi/config-keybinds.rasi new file mode 100644 index 00000000..13a070a0 --- /dev/null +++ b/config/rofi/config-keybinds.rasi @@ -0,0 +1,20 @@ +/* ---- 💫 https://github.com/JaKooLit 💫 ---- */ +/* Keybinds Config - For Keybinds generation */ + +@import "~/.config/rofi/master-config.rasi" + +/* ---- Entry ---- */ +entry { + width: 80%; + placeholder: "⌨ Search Keybinds - NOTE: Clicking with Mouse or Pressing ENTER will have NO function"; +} + +/* ---- Listview ---- */ +listview { + columns: 2; + lines: 12; +} + +window { + width: 90%; +}
\ No newline at end of file |
