From 982b5a59674fb4fa80ea45e7f63edc2e276fb7fd Mon Sep 17 00:00:00 2001 From: Matt Singleton Date: Thu, 2 Feb 2023 20:28:41 -0600 Subject: download the default sway wallpaper and use it --- config/sway/config | 3 +-- config/swaylock/config | 3 +-- deploy.sh | 14 ++++++++++++++ 3 files changed, 16 insertions(+), 4 deletions(-) diff --git a/config/sway/config b/config/sway/config index 866cf77..0558c22 100644 --- a/config/sway/config +++ b/config/sway/config @@ -21,8 +21,7 @@ smart_borders on ### Output configuration # -# Default wallpaper (more resolutions are available in /usr/share/backgrounds/sway/) -output * background /usr/share/backgrounds/sway/Sway_Wallpaper_Blue_1366x768.png fill +output * background ~/.local/share/backgrounds/default fill # Example configuration: # diff --git a/config/swaylock/config b/config/swaylock/config index c154031..f8ceefc 100644 --- a/config/swaylock/config +++ b/config/swaylock/config @@ -1,3 +1,2 @@ -color=000000 -indicator-idle-visible +image=~/.local/share/backgrounds/default ignore-empty-password diff --git a/deploy.sh b/deploy.sh index e4e8134..baf4c7f 100755 --- a/deploy.sh +++ b/deploy.sh @@ -148,3 +148,17 @@ if command -v fc-cache > /dev/null; then echo "Hint: Run 'fc-cache -v' to rebuild your font cache" fi fi + +# download sway wallpaper +if command -v sway > /dev/null; then + bg_dir="$xdata/backgrounds" + if [ ! -d "$bg_dir" ] || [ -z "$(ls -A "$bg_dir" 2> /dev/null)" ]; then + mkdir -p "$bg_dir" + fi + if [ ! -e "$bg_dir/sway.png" ]; then + $DLCMD "$bg_dir/sway.png" "https://raw.githubusercontent.com/swaywm/sway/master/assets/Sway_Wallpaper_Blue_1366x768.png" + fi + if [ ! -e "$bg_dir/default" ]; then + ln -s "$bg_dir/sway.png" "$bg_dir/default" + fi +fi -- cgit v1.2.3