diff options
author | Raymaekers Luca <raymaekers.luca@gmail.com> | 2023-05-04 10:58:52 +0200 |
---|---|---|
committer | Raymaekers Luca <raymaekers.luca@gmail.com> | 2023-05-04 10:58:52 +0200 |
commit | fc769b5297a67ecec2690dde9b5f8ace9c9a9258 (patch) | |
tree | 50593f8b7c8089c871113239408f1a3639d203dd /bin/guiscripts | |
parent | e1f598365038e9d0f9244879d3dd31122ef02334 (diff) |
use variable for resolution
Diffstat (limited to 'bin/guiscripts')
-rwxr-xr-x | bin/guiscripts/newwal | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/bin/guiscripts/newwal b/bin/guiscripts/newwal index 87cb9ce..427f501 100755 --- a/bin/guiscripts/newwal +++ b/bin/guiscripts/newwal @@ -4,13 +4,14 @@ which swaybg wal identify > /dev/null || exit 1 wall="$HOME/pics/wallpaper" wdir="$HOME/.cache/wal" +res="1920x1080" test -d "$wdir" || exit 1 # if no (valid) argument, use random wallpaper test -f "${wal:=$(realpath "$1")}" || wal="$(find $HOME/pics/wallpapers -type f | xargs identify | - grep 1920x1080 | + grep "$res" | awk '{print $1}' | shuf -n 1)" |