-
Notifications
You must be signed in to change notification settings - Fork 31
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Rename start script to be more specific
`start.sh` exists as a symlink for backward compatibility, may be removed in a future release.
- Loading branch information
Showing
3 changed files
with
53 additions
and
52 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,49 @@ | ||
#!/bin/sh | ||
# vim: ft=sh:ts=4:sw=4:et:ai:cin | ||
|
||
usage() { | ||
echo "USAGE: $(basename $0) [-n] [-p CONKY_PATH]" | ||
} | ||
|
||
conky_bin="conky" | ||
pause_flag="--pause=3" | ||
magic_id="0ce31833f8f0bae3" # truncated md5sum of 'lean-conky-config' | ||
|
||
while getopts "np:h" opt; do | ||
case $opt in | ||
n) # no-waiting | ||
pause_flag="" | ||
;; | ||
p) # path to conky binary | ||
conky_bin=$(realpath -- "$OPTARG") | ||
if [ -x "$conky_bin" ]; then | ||
echo "Conky binary path: ${conky_bin}" | ||
else | ||
echo "ERROR: ${conky_bin} is not executable, path to Conky binary needed\n" >&2 | ||
usage | ||
exit 1 | ||
fi | ||
;; | ||
h) # help | ||
usage | ||
exit | ||
;; | ||
\?) | ||
echo "ERROR: Invalid option: -$OPTARG\n" >&2 | ||
usage | ||
exit 2 | ||
;; | ||
esac | ||
done | ||
shift "$((OPTIND - 1))" | ||
|
||
cd $(dirname $0) | ||
pkill -f "conky.*\s-- $magic_id" | ||
font/install | ||
|
||
[ -z "$pause_flag" ] && echo "Starting Conky..." || echo "Conky waiting 3 seconds to start..." | ||
if "$conky_bin" --daemonize --quiet "$pause_flag" --config=./conky.conf -- $magic_id; then | ||
echo "Started" | ||
else | ||
echo "Failed" | ||
fi |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
start-lcc.sh |