Massive Changes
This commit is contained in:
1 parent
6a6d2f9689
commit
6fb75b53e3
18 files changed
+102
-51
No files matched your search
Executable
+32
@@ -0,0 +1,32 @@
|
||||
#!/bin/bash
|
||||
|
||||
# Define the path to the swww cache directory
|
||||
cache_dir="$HOME/.cache/swww/"
|
||||
|
||||
# Get a list of monitor outputs
|
||||
monitor_outputs=("$cache_dir"/*)
|
||||
|
||||
# Initialize a flag to determine if the ln command was executed
|
||||
ln_success=false
|
||||
|
||||
# Loop through monitor outputs
|
||||
for cache_file in "${monitor_outputs[@]}"; do
|
||||
# Check if the cache file exists for the current monitor output
|
||||
if [ -f "$cache_file" ]; then
|
||||
# Get the wallpaper path from the cache file
|
||||
wallpaper_path=$(<"$cache_file")
|
||||
|
||||
# Copy the wallpaper to the location Rofi can access
|
||||
if ln -sf "$wallpaper_path" "$HOME/.config/hypr/.current_wallpaper"; then
|
||||
ln_success=true # Set the flag to true upon successful execution
|
||||
break # Exit the loop after processing the first found monitor output
|
||||
fi
|
||||
fi
|
||||
done
|
||||
|
||||
# Add a message indicating whether the ln command was successful
|
||||
if $ln_success; then
|
||||
echo "Wallpaper linked successfully."
|
||||
else
|
||||
echo "Failed to link wallpaper."
|
||||
fi
|
||||
Reference in new issue
Block a user