arch hyprland

This commit is contained in:
[yuri]
2025-11-19 20:41:01 +01:00
parent 6ecde1d092
commit b415a3d71f
112 changed files with 2884 additions and 0 deletions

View File

@@ -0,0 +1,49 @@
#!/usr/bin/env bash
# _ _
# __ ____ _| | |_ __ __ _ _ __ ___ _ __
# \ \ /\ / / _` | | | '_ \ / _` | '_ \ / _ \ '__|
# \ V V / (_| | | | |_) | (_| | |_) | __/ |
# \_/\_/ \__,_|_|_| .__/ \__,_| .__/ \___|_|
# |_| |_|
#
# -----------------------------------------------------
# Restore last wallpaper
# -----------------------------------------------------
# -----------------------------------------------------
# Set defaults
# -----------------------------------------------------
ml4w_cache_folder="$HOME/.cache/ml4w/hyprland-dotfiles"
defaultwallpaper="$HOME/.config/ml4w/wallpapers/default.jpg"
cachefile="$ml4w_cache_folder/current_wallpaper"
# -----------------------------------------------------
# Get current wallpaper
# -----------------------------------------------------
if [ -f "$cachefile" ]; then
sed -i "s|~|$HOME|g" "$cachefile"
wallpaper=$(cat $cachefile)
if [ -f $wallpaper ]; then
echo ":: Wallpaper $wallpaper exists"
else
echo ":: Wallpaper $wallpaper does not exist. Using default."
wallpaper=$defaultwallpaper
fi
else
echo ":: $cachefile does not exist. Using default wallpaper."
wallpaper=$defaultwallpaper
fi
# -----------------------------------------------------
# Set wallpaper
# -----------------------------------------------------
echo ":: Setting wallpaper with source image $wallpaper"
if [ -f ~/.local/bin/waypaper ]; then
export PATH=$PATH:~/.local/bin/
fi
waypaper --wallpaper "$wallpaper"