nix/module/common/bash/module/Wallpaper.sh
2024-03-04 03:04:57 +03:00

15 lines
307 B
Bash

# Set specified file as a wallpaper.
# Usage: wallpaper <FILE>
function wallpaper() {
local target="${1}"
local path_wallpaper=~/.local/share/backgrounds/background.jpg
if [[ "${target}" = "" ]]; then
help wallpaper
return 2
fi
cp "${target}" "${path_wallpaper}"
chmod 644 "${path_wallpaper}"
}