diff options
Diffstat (limited to 'config/hypr/scripts')
| -rwxr-xr-x | config/hypr/scripts/ChangeBlur.sh | 6 | ||||
| -rwxr-xr-x | config/hypr/scripts/Distro_update.sh | 16 | ||||
| -rwxr-xr-x | config/hypr/scripts/Kitty_themes.sh | 10 | ||||
| -rwxr-xr-x | config/hypr/scripts/KooLsDotsUpdate.sh | 16 | ||||
| -rwxr-xr-x | config/hypr/scripts/Kool_Quick_Settings.sh | 10 | ||||
| -rwxr-xr-x | config/hypr/scripts/ScreenShot.sh | 2 |
6 files changed, 33 insertions, 27 deletions
diff --git a/config/hypr/scripts/ChangeBlur.sh b/config/hypr/scripts/ChangeBlur.sh index 46aaad68..895987a4 100755 --- a/config/hypr/scripts/ChangeBlur.sh +++ b/config/hypr/scripts/ChangeBlur.sh @@ -2,16 +2,16 @@ # /* ---- 💫 https://github.com/JaKooLit 💫 ---- */ ## # Script for changing blurs on the fly -notif="$HOME/.config/swaync/images/ja.png" +notif="$HOME/.config/swaync/images" STATE=$(hyprctl -j getoption decoration:blur:passes | jq ".int") if [ "${STATE}" == "2" ]; then hyprctl keyword decoration:blur:size 2 hyprctl keyword decoration:blur:passes 1 - notify-send -e -u low -i "$notif" " Less Blur" + notify-send -e -u low -i "$notif/note.png" " Less Blur" else hyprctl keyword decoration:blur:size 5 hyprctl keyword decoration:blur:passes 2 - notify-send -e -u low -i "$notif" " Normal Blur" + notify-send -e -u low -i "$notif/ja.png" " Normal Blur" fi diff --git a/config/hypr/scripts/Distro_update.sh b/config/hypr/scripts/Distro_update.sh index c687ba0c..b0b1446b 100755 --- a/config/hypr/scripts/Distro_update.sh +++ b/config/hypr/scripts/Distro_update.sh @@ -3,11 +3,11 @@ # Simple bash script to check and will try to update your system # Local Paths -iDIR="$HOME/.config/swaync/images/ja.png" +iDIR="$HOME/.config/swaync/images" # Check for required tools (kitty) if ! command -v kitty &> /dev/null; then - notify-send -i $iDIR "Need Kitty:" "Kitty terminal not found. Please install Kitty terminal." + notify-send -i "$iDIR/error.png" "Need Kitty:" "Kitty terminal not found. Please install Kitty terminal." exit 1 fi @@ -16,25 +16,25 @@ if command -v paru &> /dev/null || command -v yay &> /dev/null; then # Arch-based if command -v paru &> /dev/null; then kitty -T update paru -Syu - notify-send -i $iDIR -u low 'Arch-based system' 'has been updated.' + notify-send -i "$iDIR/ja.png" -u low 'Arch-based system' 'has been updated.' else kitty -T update yay -Syu - notify-send -i $iDIR -u low 'Arch-based system' 'has been updated.' + notify-send -i "$iDIR/ja.png" -u low 'Arch-based system' 'has been updated.' fi elif command -v dnf &> /dev/null; then # Fedora-based kitty -T update sudo dnf update --refresh -y - notify-send -i $iDIR -u low 'Fedora system' 'has been updated.' + notify-send -i "$iDIR/ja.png" -u low 'Fedora system' 'has been updated.' elif command -v apt &> /dev/null; then # Debian-based (Debian, Ubuntu, etc.) kitty -T update sudo apt update && sudo apt upgrade -y - notify-send -i $iDIR -u low 'Debian/Ubuntu system' 'has been updated.' + notify-send -i "$iDIR/ja.png" -u low 'Debian/Ubuntu system' 'has been updated.' elif command -v zypper &> /dev/null; then # openSUSE-based kitty -T update sudo zypper dup -y - notify-send -i $iDIR -u low 'openSUSE system' 'has been updated.' + notify-send -i "$iDIR/ja.png" -u low 'openSUSE system' 'has been updated.' else # Unsupported distro - notify-send -i $iDIR -u critical "Unsupported system" "This script does not support your distribution." + notify-send -i "$iDIR/error.png" -u critical "Unsupported system" "This script does not support your distribution." exit 1 fi diff --git a/config/hypr/scripts/Kitty_themes.sh b/config/hypr/scripts/Kitty_themes.sh index 471b7143..31c19a1d 100755 --- a/config/hypr/scripts/Kitty_themes.sh +++ b/config/hypr/scripts/Kitty_themes.sh @@ -9,12 +9,18 @@ kitty_config="$HOME/.config/kitty/kitty.conf" iDIR="$HOME/.config/swaync/images" rofi_theme="$HOME/.config/rofi/config-kitty-theme.rasi" +# Check if the Kitty Themes directory exists +if [ ! -d "$kitty_themes_DiR" ]; then + notify-send -i "$iDIR/error.png" "E-R-R-O-R" "Unable to locate Kitty Themes directory. Exiting....." + exit 1 +fi + # List the kitty-theme files from the themes directory theme=$(ls "$kitty_themes_DiR"/*.conf | xargs -n 1 basename | sed 's/\.conf$//' | rofi -dmenu -config $rofi_theme) -# Check if the user selected a theme +# Check if no theme was selected, and exit if empty if [ -z "$theme" ]; then - echo "No theme selected, exiting..." + notify-send -u low -i "$iDIR/note.png" "No kitty theme" "selected. Exiting....." exit 1 fi diff --git a/config/hypr/scripts/KooLsDotsUpdate.sh b/config/hypr/scripts/KooLsDotsUpdate.sh index 4996da82..f4b8814a 100755 --- a/config/hypr/scripts/KooLsDotsUpdate.sh +++ b/config/hypr/scripts/KooLsDotsUpdate.sh @@ -4,13 +4,13 @@ # Local Paths local_dir="$HOME/.config/hypr" -iDIR="$HOME/.config/swaync/images/ja.png" +iDIR="$HOME/.config/swaync/images/" local_version=$(ls $local_dir/v* 2>/dev/null | sort -V | tail -n 1 | sed 's/.*v\(.*\)/\1/') KooL_Dots_DIR="$HOME/Hyprland-Dots" # exit if cannot find local version if [ -z "$local_version" ]; then - notify-send -i $iDIR "ERROR "!?!?!!"" "Unable to find KooL's dots version . exiting.... " + notify-send -i "$iDIR/error.png" "ERROR "!?!?!!"" "Unable to find KooL's dots version . exiting.... " exit 1 fi @@ -28,12 +28,12 @@ fi # Comparing local and github versions if [ "$(echo -e "$github_version\n$local_version" | sort -V | head -n 1)" = "$github_version" ]; then - notify-send -i $iDIR "KooL Hyprland:" "No update available" + notify-send -i "$iDIR/note.png" "KooL Hyprland:" "No update available" exit 0 else # update available notify_cmd_base="notify-send -t 10000 -A action1=Update -A action2=NO -h string:x-canonical-private-synchronous:shot-notify" - notify_cmd_shot="${notify_cmd_base} -i $iDIR" + notify_cmd_shot="${notify_cmd_base} -i $iDIR/ja.png" response=$($notify_cmd_shot "KooL Hyprland:" "Update available! Update now?") @@ -41,7 +41,7 @@ else "action1") if [ -d $KooL_Dots_DIR ]; then if ! command -v kitty &> /dev/null; then - notify-send -i $iDIR "Need Kitty:" "Kitty terminal not found. Please install Kitty terminal." + notify-send -i "$iDIR/error.png" "E-R-R-O-R" "Kitty terminal not found. Please install Kitty terminal." exit 1 fi kitty -e bash -c " @@ -49,12 +49,12 @@ else git stash && git pull && ./copy.sh && - notify-send -u critical -i $iDIR 'Update Completed:' 'Kindly log out and relogin to take effect' + notify-send -u critical -i "$iDIR/ja.png" 'Update Completed:' 'Kindly log out and relogin to take effect' " else if ! command -v kitty &> /dev/null; then - notify-send -i $iDIR "Need Kitty:" "Kitty terminal not found. Please install Kitty terminal." + notify-send -i "$iDIR/error.png" "E-R-R-O-R" "Kitty terminal not found. Please install Kitty terminal." exit 1 fi kitty -e bash -c " @@ -62,7 +62,7 @@ else cd $KooL_Dots_DIR && chmod +x copy.sh && ./copy.sh && - notify-send -u critical -i $iDIR 'Update Completed:' 'Kindly log out and relogin to take effect' + notify-send -u critical -i "$iDIR/ja.png" 'Update Completed:' 'Kindly log out and relogin to take effect' " fi ;; diff --git a/config/hypr/scripts/Kool_Quick_Settings.sh b/config/hypr/scripts/Kool_Quick_Settings.sh index 85351216..e43749bf 100755 --- a/config/hypr/scripts/Kool_Quick_Settings.sh +++ b/config/hypr/scripts/Kool_Quick_Settings.sh @@ -66,31 +66,31 @@ main() { "Choose Kitty Terminal Theme") $scriptsDir/Kitty_themes.sh ;; "Configure Monitors (nwg-displays)") if ! command -v nwg-displays &>/dev/null; then - notify-send -i "$iDIR/ja.png" "E-R-R-O-R" "Install nwg-displays first" + notify-send -i "$iDIR/error.png" "E-R-R-O-R" "Install nwg-displays first" exit 1 fi nwg-displays ;; "Configure Workspace Rules (nwg-displays)") if ! command -v nwg-displays &>/dev/null; then - notify-send -i "$iDIR/ja.png" "E-R-R-O-R" "Install nwg-displays first" + notify-send -i "$iDIR/error.png" "E-R-R-O-R" "Install nwg-displays first" exit 1 fi nwg-displays ;; "GTK Settings (nwg-look)") if ! command -v nwg-look &>/dev/null; then - notify-send -i "$iDIR/ja.png" "E-R-R-O-R" "Install nwg-look first" + notify-send -i "$iDIR/error.png" "E-R-R-O-R" "Install nwg-look first" exit 1 fi nwg-look ;; "QT Apps Settings (qt6ct)") if ! command -v qt6ct &>/dev/null; then - notify-send -i "$iDIR/ja.png" "E-R-R-O-R" "Install qt6ct first" + notify-send -i "$iDIR/error.png" "E-R-R-O-R" "Install qt6ct first" exit 1 fi qt6ct ;; "QT Apps Settings (qt5ct)") if ! command -v qt5ct &>/dev/null; then - notify-send -i "$iDIR/ja.png" "E-R-R-O-R" "Install qt5ct first" + notify-send -i "$iDIR/error.png" "E-R-R-O-R" "Install qt5ct first" exit 1 fi qt5ct ;; diff --git a/config/hypr/scripts/ScreenShot.sh b/config/hypr/scripts/ScreenShot.sh index 852be4b0..b0f666aa 100755 --- a/config/hypr/scripts/ScreenShot.sh +++ b/config/hypr/scripts/ScreenShot.sh @@ -18,7 +18,7 @@ active_window_path="${dir}/${active_window_file}" notify_cmd_base="notify-send -t 10000 -A action1=Open -A action2=Delete -h string:x-canonical-private-synchronous:shot-notify" notify_cmd_shot="${notify_cmd_base} -i ${iDIR}/picture.png " notify_cmd_shot_win="${notify_cmd_base} -i ${iDIR}/picture.png " -notify_cmd_NOT="notify-send -u low -i ${iDoR}/ja.png " +notify_cmd_NOT="notify-send -u low -i ${iDoR}/note.png " # notify and view screenshot notify_view() { |
