feat: add change wallpaper shortcut to yazi
This commit is contained in:
parent
d1f25b377f
commit
c45ba82b90
18 changed files with 188 additions and 21 deletions
|
|
@ -2,9 +2,11 @@
|
|||
let
|
||||
mkWall = pkgs.writeShellScriptBin "setWall" ''
|
||||
url="$1"
|
||||
filepath="/tmp/wall_cache/$(echo -n "$url" | base64 | tr -d '\n')"
|
||||
DIR="$HOME/Pictures/Wallpapers"
|
||||
filepath="$DIR/$(echo -n "$url" | sha256sum | awk '{print $1}' | tr -d '\n').jpg"
|
||||
|
||||
if [[ ! -f "$filepath" ]]; then
|
||||
${pkgs.libnotify}/bin/notify-send " Wallpaper" "$filepath\nDownloading..."
|
||||
curl -sL "$url" -o "$filepath"
|
||||
fi
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue