chore: add xps wallpapers
This commit is contained in:
36
.set-wallpaper.sh
Executable file
36
.set-wallpaper.sh
Executable file
@@ -0,0 +1,36 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
if [[ -z $WALLPAPER_HOME ]]; then
|
||||||
|
WALLPAPER_HOME="~/wallpapers/"
|
||||||
|
fi
|
||||||
|
WALLPAPER_HOME=$(realpath "${WALLPAPER_HOME/#~/$HOME}")
|
||||||
|
|
||||||
|
selected_file=$(
|
||||||
|
(
|
||||||
|
while IFS= read -r file; do
|
||||||
|
# Pass the image path as an icon
|
||||||
|
printf "%s\0icon\x1f%s\n" "$(basename "$file")" "$file"
|
||||||
|
done < <(find "$WALLPAPER_HOME" -maxdepth 1 -name '*.jpg')
|
||||||
|
) | sort | rofi -dmenu -i -show-icons -p "Wallpapers" \
|
||||||
|
-theme-str '
|
||||||
|
window { width: 600px; }
|
||||||
|
listview { lines: 5; columns: 1; }
|
||||||
|
element { orientation: horizontal; children: [ element-icon, element-text ]; spacing: 10px; padding: 10px; }
|
||||||
|
element-icon { size: 3em; }
|
||||||
|
element-text { vertical-align: 0.5; }'
|
||||||
|
)
|
||||||
|
|
||||||
|
if [ -z "$selected_file" ]; then
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [ ! -d "$WALLPAPER_HOME/current" ]; then
|
||||||
|
mkdir -p "$WALLPAPER_HOME/current/"
|
||||||
|
fi
|
||||||
|
|
||||||
|
selected="$WALLPAPER_HOME/$selected_file"
|
||||||
|
echo "$selected" > "$WALLPAPER_HOME/current/selected"
|
||||||
|
magick "$selected" -scale 10% -blur 0x2.5 -resize 1000% "$WALLPAPER_HOME/current/blurred.jpg"
|
||||||
|
cp "$selected" "$WALLPAPER_HOME/current/current.jpg"
|
||||||
|
export WALLPAPER=$(cat "$WALLPAPER_HOME/current/selected")
|
||||||
|
hyprctl hyprpaper wallpaper ", $WALLPAPER"
|
||||||
|
matugen -t scheme-content image "$WALLPAPER_HOME/current/current.jpg"
|
||||||
BIN
911-gt3-r.jpg
Normal file
BIN
911-gt3-r.jpg
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 1.4 MiB |
BIN
current/blurred.jpg
Normal file
BIN
current/blurred.jpg
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 238 KiB |
BIN
current/current.jpg
Normal file
BIN
current/current.jpg
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 523 KiB |
1
current/selected
Normal file
1
current/selected
Normal file
@@ -0,0 +1 @@
|
|||||||
|
/home/jan/wallpapers/r26.jpg
|
||||||
Reference in New Issue
Block a user