Files
tms-archlinux-calamares-ins…/archiso/airootfs/home/liveuser/set-xfce4-wall.sh
2025-12-28 15:15:19 +08:00

18 lines
986 B
Bash

#!/bin/bash
IMG="/usr/share/backgrounds/BBTTMS.png"
for mon in $(xrandr --listmonitors | awk 'NR>1 {print $4}'); do
xfconf-query -c xfce4-desktop -p /backdrop/screen0/$mon/last-image -s "$IMG" --create --type string
xfconf-query -c xfce4-desktop -p /backdrop/screen0/monitor$mon/last-image -s "$IMG" --create --type string
xfconf-query -c xfce4-desktop -p /backdrop/screen0/monitor$mon/workspace0/last-image -s "$IMG" --create --type string
xfconf-query -c xfce4-desktop -p /backdrop/screen0/$mon/workspace0/last-image -s "$IMG" --create --type string
done
# 保险起见也设置 monitor0/monitor1
for mon in monitor0 monitor1 monitorVirtual-1; do
xfconf-query -c xfce4-desktop -p /backdrop/screen0/$mon/last-image -s "$IMG" --create --type string
xfconf-query -c xfce4-desktop -p /backdrop/screen0/$mon/workspace0/last-image -s "$IMG" --create --type string
done
xfdesktop --reload
rm -rf ~/.config/autostart/set-xfce4-wall.desktop
rm -rf ~/set-xfce4-wall.sh