Skip to content

Commit ffd65c8

Browse files
committed
Rename start script to be more specific
`start.sh` exists as a symlink for backward compatibility, may be removed in a future release.
1 parent 43094bf commit ffd65c8

File tree

3 files changed

+53
-52
lines changed

3 files changed

+53
-52
lines changed

README.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ If `~/.config/conky` doesn't exist yet, you may simply use that path which is fo
3131
Start Conky/LCC by:
3232

3333
```bash
34-
/path/to/lean-conky-config/start.sh
34+
/path/to/lean-conky-config/start-lcc.sh
3535
```
3636

3737
In a few seconds you should see the panel showing up, docked to the right side your desktop. If you have multiple monitors, the panel should appear on one of them.
@@ -43,12 +43,12 @@ If there are Conky instances running already, the LCC script will terminate them
4343
You might have installed Conky [as an AppImage](https://github.com/brndnmtthws/conky#quickstart) or built it from source, and the binary is not in the standard location. No worries, start LCC this way to use your specific Conky:
4444

4545
```bash
46-
/path/to/lean-conky-config/start.sh -p /path/to/your/conky
46+
/path/to/lean-conky-config/start-lcc.sh -p /path/to/your/conky
4747
```
4848

4949
### Auto-start
5050

51-
In order to auto-start Conky on Ubuntu, follow [this tutorial](https://linuxconfig.org/ubuntu-20-04-system-monitoring-with-conky-widgets#h2-enable-conky-to-start-at-boot), replacing Command with the full path to the `start.sh` script we just ran. For other desktop environments, check the information [here](https://wiki.archlinux.org/index.php/Autostarting#On_desktop_environment_startup).
51+
In order to auto-start Conky on Ubuntu, follow [this tutorial](https://linuxconfig.org/ubuntu-20-04-system-monitoring-with-conky-widgets#h2-enable-conky-to-start-at-boot), replacing Command with the `start-lcc.sh` command line you have run successfully. For other desktop environments, check the information [here](https://wiki.archlinux.org/index.php/Autostarting#On_desktop_environment_startup).
5252

5353
### Enable/disable LCC font
5454

start-lcc.sh

Lines changed: 49 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,49 @@
1+
#!/bin/sh
2+
# vim: ft=sh:ts=4:sw=4:et:ai:cin
3+
4+
usage() {
5+
echo "USAGE: $(basename $0) [-n] [-p CONKY_PATH]"
6+
}
7+
8+
conky_bin="conky"
9+
pause_flag="--pause=3"
10+
magic_id="0ce31833f8f0bae3" # truncated md5sum of 'lean-conky-config'
11+
12+
while getopts "np:h" opt; do
13+
case $opt in
14+
n) # no-waiting
15+
pause_flag=""
16+
;;
17+
p) # path to conky binary
18+
conky_bin=$(realpath -- "$OPTARG")
19+
if [ -x "$conky_bin" ]; then
20+
echo "Conky binary path: ${conky_bin}"
21+
else
22+
echo "ERROR: ${conky_bin} is not executable, path to Conky binary needed\n" >&2
23+
usage
24+
exit 1
25+
fi
26+
;;
27+
h) # help
28+
usage
29+
exit
30+
;;
31+
\?)
32+
echo "ERROR: Invalid option: -$OPTARG\n" >&2
33+
usage
34+
exit 2
35+
;;
36+
esac
37+
done
38+
shift "$((OPTIND - 1))"
39+
40+
cd $(dirname $0)
41+
pkill -f "conky.*\s-- $magic_id"
42+
font/install
43+
44+
[ -z "$pause_flag" ] && echo "Starting Conky..." || echo "Conky waiting 3 seconds to start..."
45+
if "$conky_bin" --daemonize --quiet "$pause_flag" --config=./conky.conf -- $magic_id; then
46+
echo "Started"
47+
else
48+
echo "Failed"
49+
fi

start.sh

Lines changed: 0 additions & 49 deletions
This file was deleted.

start.sh

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
start-lcc.sh

0 commit comments

Comments
 (0)