diff options
| author | Ja.KooLit <85185940+JaKooLit@users.noreply.github.com> | 2025-01-30 12:13:14 +0900 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2025-01-30 12:13:14 +0900 |
| commit | 6c8bba4f3cdcaec0e2a978c47252b63dbcf4af38 (patch) | |
| tree | 3e33a5e4e712ed76702396feca7e433561c59ef1 /config/hypr/UserScripts/Animations.sh | |
| parent | fe7318f179d9e767e974e7613de3fdfdc8c3ddfd (diff) | |
| parent | bee0fe2eba9b5f463c3dcc4318e0a1e476477ccd (diff) | |
Merge pull request #537 from JaKooLit/development
Development to Main
Diffstat (limited to 'config/hypr/UserScripts/Animations.sh')
| -rwxr-xr-x | config/hypr/UserScripts/Animations.sh | 35 |
1 files changed, 35 insertions, 0 deletions
diff --git a/config/hypr/UserScripts/Animations.sh b/config/hypr/UserScripts/Animations.sh new file mode 100755 index 00000000..71368bbe --- /dev/null +++ b/config/hypr/UserScripts/Animations.sh @@ -0,0 +1,35 @@ +#!/bin/bash +# /* ---- 💫 https://github.com/JaKooLit 💫 ---- */ ## +# For applying Animations from different users + +# 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" +animations_dir="$HOME/.config/hypr/animations" +UserConfigs="$HOME/.config/hypr/UserConfigs" + +# list of animation files +animations_list=$(find "$animations_dir" -maxdepth 1 -type f | sed 's/.*\///' | sed 's/\.conf$//') + +# Rofi Menu +chosen_file=$(echo "$animations_list" | rofi -i -dmenu -config ~/.config/rofi/config-Animations.rasi "Choose animation:") + +# Check if a file was selected +if [[ -n "$chosen_file" ]]; then + # Find the full path of the chosen file + full_path="$animations_dir/$chosen_file.conf" + + cp "$full_path" "$UserConfigs/UserAnimations.conf" + + notify-send -u low -i "$iDIR/ja.png" "$chosen_file" "Animation Loaded" +else + notify-send -u low -i "$iDIR/ja.png" "You chose to" "NOT apply other animations" +fi + +sleep 1 +"$SCRIPTSDIR/RefreshNoWaybar.sh" |
