Compare commits
3 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| c302033063 | |||
| 02c896a6c7 | |||
| 68a165862d |
@@ -144,6 +144,7 @@ backup_and_copy "$SCRIPT_DIR/ags" "$HOME_DIR/.config/ags" "AGS config"
|
|||||||
backup_and_copy "$SCRIPT_DIR/hypr" "$HOME_DIR/.config/hypr" "Hyprland config"
|
backup_and_copy "$SCRIPT_DIR/hypr" "$HOME_DIR/.config/hypr" "Hyprland config"
|
||||||
backup_and_copy "$SCRIPT_DIR/branding" "$HOME_DIR/.config/omarchy/branding" "Branding files"
|
backup_and_copy "$SCRIPT_DIR/branding" "$HOME_DIR/.config/omarchy/branding" "Branding files"
|
||||||
backup_and_copy "$SCRIPT_DIR/omarchy/hooks" "$HOME_DIR/.config/omarchy/hooks" "Omarchy hooks"
|
backup_and_copy "$SCRIPT_DIR/omarchy/hooks" "$HOME_DIR/.config/omarchy/hooks" "Omarchy hooks"
|
||||||
|
backup_and_copy "$SCRIPT_DIR/wallpapers" "$HOME_DIR/wallpapers" "Custom wallpapers"
|
||||||
|
|
||||||
mkdir -p "$HOME_DIR/scripts"
|
mkdir -p "$HOME_DIR/scripts"
|
||||||
backup_and_copy "$SCRIPT_DIR/scripts" "$HOME_DIR/scripts" "Custom scripts"
|
backup_and_copy "$SCRIPT_DIR/scripts" "$HOME_DIR/scripts" "Custom scripts"
|
||||||
|
|||||||
@@ -1,21 +1,66 @@
|
|||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
|
|
||||||
|
WALLPAPER_DIR="$HOME/wallpapers"
|
||||||
|
THEME_DIR="$HOME/.config/omarchy/themes/Blob-Dynamic"
|
||||||
|
|
||||||
|
# Create the directory if it doesn't exist
|
||||||
|
mkdir -p "$WALLPAPER_DIR"
|
||||||
|
mkdir -p "$THEME_DIR/backgrounds"
|
||||||
|
|
||||||
if [ -z "$1" ]; then
|
if [ -z "$1" ]; then
|
||||||
echo "Usage: blob_wallpaper <path-to-image>"
|
echo "Usage: blob_wallpaper <filename-or-path>"
|
||||||
|
echo "Available wallpapers in $WALLPAPER_DIR:"
|
||||||
|
ls -1 "$WALLPAPER_DIR" 2>/dev/null || echo "No wallpapers found."
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
# Check if the argument is a file in the wallpapers directory
|
||||||
|
if [ -f "$WALLPAPER_DIR/$1" ]; then
|
||||||
|
IMAGE_PATH=$(realpath "$WALLPAPER_DIR/$1")
|
||||||
|
# Check if the argument is an absolute or relative path
|
||||||
|
elif [ -f "$1" ]; then
|
||||||
IMAGE_PATH=$(realpath "$1")
|
IMAGE_PATH=$(realpath "$1")
|
||||||
|
else
|
||||||
if [ ! -f "$IMAGE_PATH" ]; then
|
echo "Error: File '$1' does not exist in $WALLPAPER_DIR or as a valid path."
|
||||||
echo "Error: File '$IMAGE_PATH' does not exist."
|
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Point the Omarchy background link to your custom image
|
echo "Extracting colors using Pywal..."
|
||||||
ln -nsf "$IMAGE_PATH" "$HOME/.config/omarchy/current/background"
|
wal -i "$IMAGE_PATH" -n -q
|
||||||
|
|
||||||
# Relaunch swaybg smoothly
|
# Clear old backgrounds and copy the new one into the dynamic theme
|
||||||
pkill -x swaybg
|
rm -f "$THEME_DIR/backgrounds/"*
|
||||||
setsid uwsm-app -- swaybg -i "$HOME/.config/omarchy/current/background" -m fill >/dev/null 2>&1 &
|
cp "$IMAGE_PATH" "$THEME_DIR/backgrounds/"
|
||||||
|
|
||||||
echo "Wallpaper updated to: $IMAGE_PATH"
|
# Parse pywal colors and write to colors.toml in the dynamic theme
|
||||||
|
cat <<EOF > "$THEME_DIR/colors.toml"
|
||||||
|
accent = "$(sed -n '2p' ~/.cache/wal/colors)"
|
||||||
|
cursor = "$(sed -n '8p' ~/.cache/wal/colors)"
|
||||||
|
foreground = "$(sed -n '8p' ~/.cache/wal/colors)"
|
||||||
|
background = "$(sed -n '1p' ~/.cache/wal/colors)"
|
||||||
|
selection_foreground = "$(sed -n '1p' ~/.cache/wal/colors)"
|
||||||
|
selection_background = "$(sed -n '2p' ~/.cache/wal/colors)"
|
||||||
|
|
||||||
|
color0 = "$(sed -n '1p' ~/.cache/wal/colors)"
|
||||||
|
color1 = "$(sed -n '2p' ~/.cache/wal/colors)"
|
||||||
|
color2 = "$(sed -n '3p' ~/.cache/wal/colors)"
|
||||||
|
color3 = "$(sed -n '4p' ~/.cache/wal/colors)"
|
||||||
|
color4 = "$(sed -n '5p' ~/.cache/wal/colors)"
|
||||||
|
color5 = "$(sed -n '6p' ~/.cache/wal/colors)"
|
||||||
|
color6 = "$(sed -n '7p' ~/.cache/wal/colors)"
|
||||||
|
color7 = "$(sed -n '8p' ~/.cache/wal/colors)"
|
||||||
|
color8 = "$(sed -n '9p' ~/.cache/wal/colors)"
|
||||||
|
color9 = "$(sed -n '10p' ~/.cache/wal/colors)"
|
||||||
|
color10 = "$(sed -n '11p' ~/.cache/wal/colors)"
|
||||||
|
color11 = "$(sed -n '12p' ~/.cache/wal/colors)"
|
||||||
|
color12 = "$(sed -n '13p' ~/.cache/wal/colors)"
|
||||||
|
color13 = "$(sed -n '14p' ~/.cache/wal/colors)"
|
||||||
|
color14 = "$(sed -n '15p' ~/.cache/wal/colors)"
|
||||||
|
color15 = "$(sed -n '16p' ~/.cache/wal/colors)"
|
||||||
|
EOF
|
||||||
|
|
||||||
|
# Apply the Blob-Dynamic theme
|
||||||
|
# omarchy-theme-set manages the background and reloads waybar and AGS
|
||||||
|
omarchy-theme-set "Blob-Dynamic"
|
||||||
|
|
||||||
|
echo "Wallpaper and dynamic theme applied successfully: $IMAGE_PATH"
|
||||||
|
After Width: | Height: | Size: 728 KiB |
|
After Width: | Height: | Size: 119 KiB |
|
After Width: | Height: | Size: 68 KiB |
|
After Width: | Height: | Size: 46 KiB |
|
After Width: | Height: | Size: 228 KiB |
|
After Width: | Height: | Size: 1.6 MiB |
|
After Width: | Height: | Size: 75 KiB |
|
After Width: | Height: | Size: 29 KiB |
|
After Width: | Height: | Size: 70 KiB |
|
After Width: | Height: | Size: 83 KiB |
|
After Width: | Height: | Size: 13 KiB |
|
After Width: | Height: | Size: 101 KiB |
|
After Width: | Height: | Size: 16 KiB |
|
After Width: | Height: | Size: 13 KiB |
|
After Width: | Height: | Size: 6.2 MiB |
|
After Width: | Height: | Size: 854 KiB |
|
After Width: | Height: | Size: 25 KiB |
|
After Width: | Height: | Size: 16 KiB |
|
After Width: | Height: | Size: 47 KiB |
|
After Width: | Height: | Size: 269 KiB |
|
After Width: | Height: | Size: 132 KiB |
|
After Width: | Height: | Size: 36 KiB |