diff options
author | Manuel Palenzuela <manuelpalenzuelamerino@gmail.com> | 2019-07-05 00:21:40 +0200 |
---|---|---|
committer | Manuel Palenzuela <manuelpalenzuelamerino@gmail.com> | 2019-07-05 00:21:40 +0200 |
commit | 8e1f9528ab48380942d3e4f0942326e084657d7a (patch) | |
tree | 292e8ac0d97d305974ad2ea4996b0739f06cd1d2 | |
parent | Added better wallpaper switch handling (diff) | |
download | smart-wallpaper-8e1f9528ab48380942d3e4f0942326e084657d7a.tar.gz smart-wallpaper-8e1f9528ab48380942d3e4f0942326e084657d7a.tar.bz2 smart-wallpaper-8e1f9528ab48380942d3e4f0942326e084657d7a.zip |
Added timer command line option
-rw-r--r-- | README.md | 1 | ||||
-rwxr-xr-x | smart-wallpaper | 4 |
2 files changed, 4 insertions, 1 deletions
diff --git a/README.md b/README.md index b8c0995..8c7adb7 100644 --- a/README.md +++ b/README.md @@ -21,6 +21,7 @@ Usage: smart-wallpaper [FLAG]<br /> [-d]: NEEDED : daytime wallpaper file/folder<br /> [-n]: NEEDED : nighttime wallpaper file/folder<br /> [-l]: OPTIONAL : manual location (lat:long), if not added geoclue gets the location (requires internet)<br /> + [-t]: OPTIONAL : set the time period for the script to check if it is day or night<br /> [-h]: OPTIONAL : print help message Example: diff --git a/smart-wallpaper b/smart-wallpaper index e9a0fe5..0200545 100755 --- a/smart-wallpaper +++ b/smart-wallpaper @@ -26,6 +26,7 @@ print_usage() { echo " [-d]: NEEDED : daytime wallpaper file/folder" echo " [-n]: NEEDED : nighttime wallpaper file/folder" echo " [-l]: OPTIONAL : manual location (lat:long), if not added geoclue gets the location (requires internet)" + echo " [-t]: OPTIONAL : set the time period for the script to check if it is day or night " echo " [-h]: OPTIONAL : print help message" } @@ -66,10 +67,11 @@ if (( $# == 0 )); then exit 1 fi -while getopts 'd:n:l:h' flag; do +while getopts 'd:n:l:t:h' flag; do case "${flag}" in d) input_daytimewallpaper="${OPTARG}" ;; n) input_nighttimewallpaper="${OPTARG}" ;; + t) period="${OPTARG}" ;; l) location="${OPTARG}" ;; h) print_usage exit 0 ;; |