diff options
author | Adam T. Carpenter <atc@53hor.net> | 2020-09-06 08:26:26 -0400 |
---|---|---|
committer | Adam T. Carpenter <atc@53hor.net> | 2020-09-06 08:26:26 -0400 |
commit | 8633c82378ab9b3a88b956def1a05cb76b4c11fd (patch) | |
tree | 94cefff77aa6f681d5ceba4bd64013965a2ec468 /themer.sh | |
parent | c8856a355b777156ccad4fd1f01d32e10684b0b4 (diff) | |
download | scripts-8633c82378ab9b3a88b956def1a05cb76b4c11fd.tar.xz scripts-8633c82378ab9b3a88b956def1a05cb76b4c11fd.zip |
added freebsd US FTP mirror ranker
Diffstat (limited to 'themer.sh')
-rwxr-xr-x | themer.sh | 15 |
1 files changed, 7 insertions, 8 deletions
@@ -1,23 +1,23 @@ #!/bin/sh add_theme() { - indir="$1" - [ -z "$indir" ] && indir=$HOME/downloads - outdir=$HOME/.local/share/wallpapers + indir=$1 + [ -z "$indir" ] && indir=~/downloads + outdir=~/.local/share/wallpapers [ ! -d "$indir" ] && exit 1 [ ! -d "$outdir" ] && mkdir -p "$outdir" sxiv -rot "$indir" | while read infile; do - outfile="$outdir"/$(basename "$infile") + outfile=$outdir/$(basename "$infile" | tr ' ' '_' | tr '[:upper:]' '[:lower:]') convert "$infile" -geometry '1920x1080^' -gravity center -crop 1920x1080+0+0 "$outfile" wpg -a "$outfile" done } set_theme() { - theme=$(sxiv -rot $HOME/.config/wpg/wallpapers) + theme=$(sxiv -rot ~/.config/wpg/wallpapers) [ -z "$theme" ] && exit 4 - wpg -s "$theme" & - convert -verbose -background black -vignette 100x65000 "$theme" $HOME/.local/share/wallpapers/lock.png & + wpg -s "$theme" + #convert -verbose -background black -vignette 100x65000 "$theme" ~/.local/share/wallpapers/lock.png & } reapply_theme() { @@ -27,4 +27,3 @@ reapply_theme() { [ "$1" = "-r" ] && reapply_theme && exit [ "$1" = "-a" ] && add_theme "$2" [ "$1" = "-s" ] && set_theme -wait |