-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathwp
More file actions
executable file
·34 lines (29 loc) · 684 Bytes
/
wp
File metadata and controls
executable file
·34 lines (29 loc) · 684 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
#!/bin/zsh
#
# Basic wrapper for wal/pywal to set the wallpaper and choose a backend
# Usage: wp FILENAME BACKEND SATURATION
# Available backends:
# colorz
# colorthief
# schemer2
# wal
# haishoku
#
# TODO: Error handling
function backend() {
echo ${wal --backend}
}
function set_wallpaper() {
clear
local file="${1?}"
local backend="${2:-wal}"
local saturation="${3:-1.0}"
echo "Exec: wal -i /usr/share/backgrounds/$file.jpg --backend $backend --saturate $saturate -p $file"
wal -i /usr/share/backgrounds/$file.jpg --backend $backend --saturate $saturation -p $file
}
if [ ${1?} = "be" ]
then
backend
else
set_wallpaper $1 $2 $3
fi