Massive Changes

This commit is contained in:
sankalp committed 2024-01-10 14:57:53 +05:45
1 parent 6a6d2f9689
commit 6fb75b53e3
18 files changed
+102 -51

No files matched your search

Binary file not shown.
+32
View File
@@ -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
+1 -1
View File
@@ -42,4 +42,4 @@ hyprctl keyword input:kb_layout "$new_layout"
echo "$new_layout" > "$layout_f"
# Notification for the new keyboard layout
notify-send -u low -i "$notif" "Keyboard layout changed to $new_layout"
notify-send -u low -i "$notif" "Keyboad Layout Changed to $new_layout"