Compare commits
2 commits
469415abb6
...
2cacecdd10
Author | SHA1 | Date | |
---|---|---|---|
2cacecdd10 | |||
5ad4887a33 |
2 changed files with 23 additions and 1 deletions
|
@ -2,6 +2,6 @@ set -e
|
||||||
apt-get update
|
apt-get update
|
||||||
apt-get install git curl wget vim neovim fd-find bat python3 \
|
apt-get install git curl wget vim neovim fd-find bat python3 \
|
||||||
python-is-python3 tmux btop htop fzf lsd tldr trash-cli \
|
python-is-python3 tmux btop htop fzf lsd tldr trash-cli \
|
||||||
ripgrep tree nmap unzip
|
ripgrep tree nmap unzip zsh
|
||||||
apt-get upgrade
|
apt-get upgrade
|
||||||
apt-get autoremove
|
apt-get autoremove
|
||||||
|
|
22
wkgen
Executable file
22
wkgen
Executable file
|
@ -0,0 +1,22 @@
|
||||||
|
#!/bin/bash
|
||||||
|
date='date +%Y-%m-%d\ %T'
|
||||||
|
logfile=~/.wkgen.log
|
||||||
|
prepath="${XDG_PICTURES_DIR:=$HOME/Pictures}"
|
||||||
|
mkdir -p "$prepath/wallpaper"
|
||||||
|
filelocation="$prepath/wallpaper/wk-progress.1.png"
|
||||||
|
set -e
|
||||||
|
oldhash="$(sha256sum $filelocation || echo none)"
|
||||||
|
echo "[$(eval $date)]: starting webrequests..." | tee -a $logfile
|
||||||
|
curl -s -o $filelocation -A "Mozilla/5.0 (Windows NT 6.1) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/41.0.2228.0 Safari/537.36" -o "wallpaper.png" "http://wkw.natural20design.com/?k=7b98a684-5c91-44ab-86b1-f7023609fe4e&d=1"
|
||||||
|
newhash="$(sha256sum $filelocation)"
|
||||||
|
echo -e "\tnew:\t$newhash\n\told:\t$oldhash"
|
||||||
|
if [[ "$oldhash" = "$newhash" ]]; then
|
||||||
|
echo "same files, nothing to do"
|
||||||
|
exit
|
||||||
|
else
|
||||||
|
echo "[$(eval $date)]: setting wallpaper..." | tee -a $logfile
|
||||||
|
gsettings set org.gnome.desktop.background picture-uri file://${filelocation}
|
||||||
|
gsettings set org.gnome.desktop.background picture-uri-dark file://${filelocation}
|
||||||
|
gsettings set org.gnome.desktop.background picture-options 'stretched'
|
||||||
|
echo "[$(eval $date)]: done" | tee -a $logfile
|
||||||
|
fi
|
Loading…
Add table
Reference in a new issue