mirror of
https://github.com/cjfranko/NTP-Timeturner.git
synced 2025-11-08 18:32:02 +00:00
fixed wallpaper
This commit is contained in:
parent
4a89fde3f6
commit
a6f4c51fcd
1 changed files with 9 additions and 4 deletions
13
setup.sh
13
setup.sh
|
|
@ -105,13 +105,15 @@ mkdir -p /home/hermione/Pictures
|
||||||
curl -L -o /home/hermione/Pictures/wallpaper.png https://raw.githubusercontent.com/cjfranko/NTP-Timeturner/master/wallpaper.png
|
curl -L -o /home/hermione/Pictures/wallpaper.png https://raw.githubusercontent.com/cjfranko/NTP-Timeturner/master/wallpaper.png
|
||||||
chown hermione:hermione /home/hermione/Pictures/wallpaper.png
|
chown hermione:hermione /home/hermione/Pictures/wallpaper.png
|
||||||
|
|
||||||
# Set LXDE wallpaper via pcmanfm config (assumes default LXDE desktop)
|
# Find LXDE config directory (e.g. LXDE, LXDE-pi)
|
||||||
|
PCMANFM_CONF_DIR=$(find /home/hermione/.config/pcmanfm -type d -name "LXDE*" | head -n 1)
|
||||||
|
CONFIG_FILE="$PCMANFM_CONF_DIR/desktop-items-0.conf"
|
||||||
WALLPAPER_PATH="/home/hermione/Pictures/wallpaper.png"
|
WALLPAPER_PATH="/home/hermione/Pictures/wallpaper.png"
|
||||||
CONFIG_FILE="/home/hermione/.config/pcmanfm/LXDE/desktop-items-0.conf"
|
|
||||||
mkdir -p "$(dirname "$CONFIG_FILE")"
|
|
||||||
|
|
||||||
|
echo "Updating LXDE config in $CONFIG_FILE..."
|
||||||
|
mkdir -p "$(dirname "$CONFIG_FILE")"
|
||||||
if [ -f "$CONFIG_FILE" ]; then
|
if [ -f "$CONFIG_FILE" ]; then
|
||||||
sed -i "s|wallpaper=.*|wallpaper=$WALLPAPER_PATH|g" "$CONFIG_FILE"
|
sed -i "s|^wallpaper=.*|wallpaper=$WALLPAPER_PATH|g" "$CONFIG_FILE"
|
||||||
else
|
else
|
||||||
echo "[*]" > "$CONFIG_FILE"
|
echo "[*]" > "$CONFIG_FILE"
|
||||||
echo "wallpaper=$WALLPAPER_PATH" >> "$CONFIG_FILE"
|
echo "wallpaper=$WALLPAPER_PATH" >> "$CONFIG_FILE"
|
||||||
|
|
@ -119,6 +121,9 @@ else
|
||||||
fi
|
fi
|
||||||
chown hermione:hermione "$CONFIG_FILE"
|
chown hermione:hermione "$CONFIG_FILE"
|
||||||
|
|
||||||
|
echo "Attempting to refresh desktop wallpaper..."
|
||||||
|
sudo -u hermione DISPLAY=:0 pcmanfm --reconfigure || echo "Desktop not running or not LXDE — wallpaper will apply on next login."
|
||||||
|
|
||||||
echo "Custom splash and wallpaper applied."
|
echo "Custom splash and wallpaper applied."
|
||||||
|
|
||||||
# ---------------------------------------------------------
|
# ---------------------------------------------------------
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue