diff options
| author | JaKooLit <ejhay.games@gmail.com> | 2025-02-21 16:14:38 +0900 |
|---|---|---|
| committer | JaKooLit <ejhay.games@gmail.com> | 2025-02-21 16:14:38 +0900 |
| commit | c35b1026d16cff151b763ee484d9fc773952aeb1 (patch) | |
| tree | 8bfa32960031dc68423fc0d41b11519f73c52661 /config/hypr/scripts | |
| parent | 4fee6c130280ecdd97ace82250c6ecd4b382a625 (diff) | |
pushing for monitor profiles, changed the version to dev first indicating still in dev branch. Enhance functionality of KooL Quick Settings
Diffstat (limited to 'config/hypr/scripts')
| -rwxr-xr-x | config/hypr/scripts/KeyHints.sh | 2 | ||||
| -rwxr-xr-x | config/hypr/scripts/MonitorProfiles.sh | 42 |
2 files changed, 43 insertions, 1 deletions
diff --git a/config/hypr/scripts/KeyHints.sh b/config/hypr/scripts/KeyHints.sh index 60b2d689..973ca6b6 100755 --- a/config/hypr/scripts/KeyHints.sh +++ b/config/hypr/scripts/KeyHints.sh @@ -25,7 +25,7 @@ GDK_BACKEND=$BACKEND yad \ --timeout-indicator=bottom \ "ESC" "close this app" "" " = " "SUPER KEY (Windows Key Button)" "(SUPER KEY)" \ " SHIFT K" "Searchable Keybinds" "(Search all Keybinds via rofi)" \ -" SHIFT E" "View or EDIT Keybinds, Settings, Monitor" "" \ +" SHIFT E" "KooL Hyprland Settings Menu" "" \ "" "" "" \ " enter" "Terminal" "(kitty)" \ " SHIFT enter" "DropDown Terminal" "(Not available in Debian and Ubuntu)" \ diff --git a/config/hypr/scripts/MonitorProfiles.sh b/config/hypr/scripts/MonitorProfiles.sh new file mode 100755 index 00000000..ebab0144 --- /dev/null +++ b/config/hypr/scripts/MonitorProfiles.sh @@ -0,0 +1,42 @@ +#!/bin/bash +# /* ---- 💫 https://github.com/JaKooLit 💫 ---- */ ## +# For applying Pre-configured Monitor Profiles + +# Check if rofi is already running +if pidof rofi > /dev/null; then + pkill rofi +fi + +# Variables +iDIR="$HOME/.config/swaync/images" +SCRIPTSDIR="$HOME/.config/hypr/scripts" +monitor_dir="$HOME/.config/hypr/Monitor_Profiles" +target="$HOME/.config/hypr/monitors.conf" +rofi_theme="~/.config/rofi/config-Monitors.rasi" +msg='❗NOTE:❗ This will overwrite ~/.config/hypr/monitors.conf' + +# Define the list of files to ignore +ignore_files=( + "README" +) + +# list of Monitor Profiles, sorted alphabetically with numbers first +mon_profiles_list=$(find -L "$monitor_dir" -maxdepth 1 -type f | sed 's/.*\///' | sed 's/\.conf$//' | sort -V) + +# Remove ignored files from the list +for ignored_file in "${ignore_files[@]}"; do + mon_profiles_list=$(echo "$mon_profiles_list" | grep -v -E "^$ignored_file$") +done + +# Rofi Menu +chosen_file=$(echo "$mon_profiles_list" | rofi -i -dmenu -config $rofi_theme -mesg "$msg") + +# Check if a file was selected +if [[ -n "$chosen_file" ]]; then + full_path="$monitor_dir/$chosen_file.conf" + cp -r "$target" "$monitor_dir/Previous_Profile.conf" && cp "$full_path" "$target" + notify-send -u low -i "$iDIR/ja.png" "$chosen_file" "Monitor Profile Loaded" +fi + +sleep 1 +"$SCRIPTSDIR/RefreshNoWaybar.sh" |
