added custom command support
This commit is contained in:
parent
da49b07be1
commit
d008f4947e
12
README.md
12
README.md
@ -32,6 +32,18 @@ $ ./styli.sh -s sea -w 1080
|
|||||||
# To get a random wallpaper from one of the set subreddits
|
# To get a random wallpaper from one of the set subreddits
|
||||||
# NOTE: The width/height/search parameters DON't work with reddit
|
# NOTE: The width/height/search parameters DON't work with reddit
|
||||||
$ ./styli.sh -l reddit
|
$ ./styli.sh -l reddit
|
||||||
|
|
||||||
|
# To get a random wallpaper from a custom subreddit
|
||||||
|
$ ./styli.sh -r <custom_reddit>
|
||||||
|
$ ./styli.sh -r wallpaperdump
|
||||||
|
|
||||||
|
# To use the builtin feh --bg options
|
||||||
|
$ ./styli.sh -b <option>
|
||||||
|
$ ./styli.sh -b bg-scale -r widescreen-wallpaper
|
||||||
|
|
||||||
|
# To add custom feh flags
|
||||||
|
$ ./styli.sh -c <flags>
|
||||||
|
$ ./styli.sh -c --no-xinerama -r widescreen-wallpaper
|
||||||
```
|
```
|
||||||
## Tips And Tricks
|
## Tips And Tricks
|
||||||
To set a new background every time you reboot your computer add the following to your ```i3/config``` file
|
To set a new background every time you reboot your computer add the following to your ```i3/config``` file
|
||||||
|
|||||||
6
styli.sh
6
styli.sh
@ -40,7 +40,7 @@ reddit(){
|
|||||||
wget -T $timeout -U "$useragent" --no-check-certificate -q -P down -O "wallpaper.jpg" $target_url &>/dev/null
|
wget -T $timeout -U "$useragent" --no-check-certificate -q -P down -O "wallpaper.jpg" $target_url &>/dev/null
|
||||||
|
|
||||||
}
|
}
|
||||||
while getopts h:w:s:l:b:r: flag
|
while getopts h:w:s:l:b:r:c: flag
|
||||||
do
|
do
|
||||||
case "${flag}" in
|
case "${flag}" in
|
||||||
b) bgtype=${OPTARG};;
|
b) bgtype=${OPTARG};;
|
||||||
@ -49,6 +49,7 @@ do
|
|||||||
w) width=${OPTARG};;
|
w) width=${OPTARG};;
|
||||||
l) link=${OPTARG};;
|
l) link=${OPTARG};;
|
||||||
r) sub=${OPTARG};;
|
r) sub=${OPTARG};;
|
||||||
|
c) custom=${OPTARG};;
|
||||||
esac
|
esac
|
||||||
done
|
done
|
||||||
|
|
||||||
@ -73,6 +74,9 @@ if [ ! -z $bgtype ]; then
|
|||||||
else
|
else
|
||||||
feh+=(--bg-scale)
|
feh+=(--bg-scale)
|
||||||
fi
|
fi
|
||||||
|
if [ ! -z $custom ]; then
|
||||||
|
feh+=($custom)
|
||||||
|
fi
|
||||||
if [ $link = "reddit" ] || [ ! -z $sub ]
|
if [ $link = "reddit" ] || [ ! -z $sub ]
|
||||||
then
|
then
|
||||||
reddit "$sub"
|
reddit "$sub"
|
||||||
|
|||||||
BIN
wallpaper.jpg
BIN
wallpaper.jpg
Binary file not shown.
|
Before Width: | Height: | Size: 1.3 MiB After Width: | Height: | Size: 635 KiB |
Loading…
x
Reference in New Issue
Block a user