From 4f20f0630fb41bcf53a6801d01c94e39593cce08 Mon Sep 17 00:00:00 2001 From: JaKooLit Date: Mon, 24 Feb 2025 20:45:31 +0900 Subject: fixed for the mini BUG when selecting wallpaper to apply as SDDM background --- config/hypr/UserScripts/WallpaperEffects.sh | 32 ++++++++--------------------- config/hypr/UserScripts/WallpaperSelect.sh | 30 ++++++++------------------- 2 files changed, 17 insertions(+), 45 deletions(-) (limited to 'config/hypr/UserScripts') diff --git a/config/hypr/UserScripts/WallpaperEffects.sh b/config/hypr/UserScripts/WallpaperEffects.sh index 948c637c..5ddc9fd3 100755 --- a/config/hypr/UserScripts/WallpaperEffects.sh +++ b/config/hypr/UserScripts/WallpaperEffects.sh @@ -101,36 +101,22 @@ fi main sleep 1 -# Check if user selected a wallpaper + if [[ -n "$choice" ]]; then sddm_sequoia="/usr/share/sddm/themes/sequoia_2" if [ -d "$sddm_sequoia" ]; then - notify-send -i "$iDIR/ja.png" "Set wallpaper" "as SDDM background?" \ - -t 10000 \ - -A "yes=Yes" \ - -A "no=No" \ - -h string:x-canonical-private-synchronous:wallpaper-notify - - # Wait for user input using dbus-monitor - dbus-monitor "interface='org.freedesktop.Notifications',member='ActionInvoked'" | - while read -r line; do - if echo "$line" | grep -q "yes"; then + if yad --question --text="Set wallpaper as SDDM background?\nNOTE: This only applies to SEQUOIA SDDM Theme" --title="SDDM Background" --ok-label="Yes"; then # Check if terminal exists - if ! command -v "$terminal" &>/dev/null; then - notify-send -i "$iDIR/ja.png" "Missing $terminal" "Install $terminal to enable setting of wallpaper background" - exit 1 - fi - + if ! command -v "$terminal" &>/dev/null; then + notify-send -i "$iDIR/ja.png" "Missing $terminal" "Install $terminal to enable setting of wallpaper background" + exit 1 + fi + + # Open terminal and set the wallpaper $terminal -e bash -c "echo 'Enter your password to set wallpaper as SDDM Background'; \ sudo cp -r $wallpaper_output '$sddm_sequoia/backgrounds/default' && \ notify-send -i '$iDIR/ja.png' 'SDDM' 'Background SET'" - break - elif echo "$line" | grep -q "no"; then - echo "Wallpaper not set as SDDM background. Exiting." - break - fi - - done & + fi fi fi \ No newline at end of file diff --git a/config/hypr/UserScripts/WallpaperSelect.sh b/config/hypr/UserScripts/WallpaperSelect.sh index 78bf8d2f..272797e3 100755 --- a/config/hypr/UserScripts/WallpaperSelect.sh +++ b/config/hypr/UserScripts/WallpaperSelect.sh @@ -130,32 +130,18 @@ sleep 1 if [[ -n "$choice" ]]; then sddm_sequoia="/usr/share/sddm/themes/sequoia_2" if [ -d "$sddm_sequoia" ]; then - notify-send -i "$iDIR/ja.png" "Set wallpaper" "as SDDM background?" \ - -t 10000 \ - -A "yes=Yes" \ - -A "no=No" \ - -h string:x-canonical-private-synchronous:wallpaper-notify - - # Wait for user input using dbus-monitor - dbus-monitor "interface='org.freedesktop.Notifications',member='ActionInvoked'" | - while read -r line; do - if echo "$line" | grep -q "yes"; then + if yad --question --text="Set wallpaper as SDDM background?\nNOTE: This only applies to SEQUOIA SDDM Theme" --title="SDDM Background" --ok-label="Yes"; then # Check if terminal exists - if ! command -v "$terminal" &>/dev/null; then - notify-send -i "$iDIR/ja.png" "Missing $terminal" "Install $terminal to enable setting of wallpaper background" - exit 1 - fi - + if ! command -v "$terminal" &>/dev/null; then + notify-send -i "$iDIR/ja.png" "Missing $terminal" "Install $terminal to enable setting of wallpaper background" + exit 1 + fi + + # Open terminal to enter password $terminal -e bash -c "echo 'Enter your password to set wallpaper as SDDM Background'; \ sudo cp -r $wallpaper_current '$sddm_sequoia/backgrounds/default' && \ notify-send -i '$iDIR/ja.png' 'SDDM' 'Background SET'" - break - elif echo "$line" | grep -q "no"; then - echo "Wallpaper not set as SDDM background. Exiting." - break - fi - - done & + fi fi fi \ No newline at end of file -- cgit v1.2.3 From 410f02f0ad701272071d4c27f633a68022c9f643 Mon Sep 17 00:00:00 2001 From: JaKooLit Date: Tue, 25 Feb 2025 15:10:56 +0900 Subject: added blockage for nixos on changing oh my zsh --- config/hypr/UserScripts/ZshChangeTheme.sh | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) (limited to 'config/hypr/UserScripts') diff --git a/config/hypr/UserScripts/ZshChangeTheme.sh b/config/hypr/UserScripts/ZshChangeTheme.sh index fafd7fb0..4919a890 100755 --- a/config/hypr/UserScripts/ZshChangeTheme.sh +++ b/config/hypr/UserScripts/ZshChangeTheme.sh @@ -5,13 +5,19 @@ # preview of theme can be view here: https://github.com/ohmyzsh/ohmyzsh/wiki/Themes # after choosing theme, TTY need to be closed and re-open -themes_dir="$HOME/.oh-my-zsh/themes" -file_extension=".zsh-theme" - # Variables iDIR="$HOME/.config/swaync/images" rofi_theme="$HOME/.config/rofi/config-zsh-theme.rasi" +if [ -n "$(grep -i nixos < /etc/os-release)" ]; then + notify-send -i "$iDIR/ja.png" "NOT Supported" "Sorry NixOS does not support this KooL feature" + exit 1 +fi + +themes_dir="$HOME/.oh-my-zsh/themes" +file_extension=".zsh-theme" + + themes_array=($(find -L "$themes_dir" -type f -name "*$file_extension" -exec basename {} \; | sed -e "s/$file_extension//")) # Add "Random" option to the beginning of the array -- cgit v1.2.3 From bb487754c030937a068fb6b0978c22044638fec4 Mon Sep 17 00:00:00 2001 From: JaKooLit Date: Tue, 25 Feb 2025 17:21:05 +0900 Subject: switching back rainbow borders on active window again :) --- config/hypr/UserScripts/RainbowBorders.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'config/hypr/UserScripts') diff --git a/config/hypr/UserScripts/RainbowBorders.sh b/config/hypr/UserScripts/RainbowBorders.sh index 6690a5f8..cc1419fb 100755 --- a/config/hypr/UserScripts/RainbowBorders.sh +++ b/config/hypr/UserScripts/RainbowBorders.sh @@ -8,7 +8,7 @@ function random_hex() { } # rainbow colors only for active window -#hyprctl keyword general:col.active_border $(random_hex) $(random_hex) $(random_hex) $(random_hex) $(random_hex) $(random_hex) $(random_hex) $(random_hex) $(random_hex) $(random_hex) 270deg +hyprctl keyword general:col.active_border $(random_hex) $(random_hex) $(random_hex) $(random_hex) $(random_hex) $(random_hex) $(random_hex) $(random_hex) $(random_hex) $(random_hex) 270deg # rainbow colors for inactive window (uncomment to take effect) -hyprctl keyword general:col.inactive_border $(random_hex) $(random_hex) $(random_hex) $(random_hex) $(random_hex) $(random_hex) $(random_hex) $(random_hex) $(random_hex) $(random_hex) 270deg \ No newline at end of file +#hyprctl keyword general:col.inactive_border $(random_hex) $(random_hex) $(random_hex) $(random_hex) $(random_hex) $(random_hex) $(random_hex) $(random_hex) $(random_hex) $(random_hex) 270deg \ No newline at end of file -- cgit v1.2.3