Skip to content

Commit

Permalink
Rename start script to be more specific
Browse files Browse the repository at this point in the history
`start.sh` exists as a symlink for backward compatibility, may be
removed in a future release.
  • Loading branch information
jxai committed Apr 25, 2022
1 parent 43094bf commit ffd65c8
Show file tree
Hide file tree
Showing 3 changed files with 53 additions and 52 deletions.
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ If `~/.config/conky` doesn't exist yet, you may simply use that path which is fo
Start Conky/LCC by:

```bash
/path/to/lean-conky-config/start.sh
/path/to/lean-conky-config/start-lcc.sh
```

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.
Expand All @@ -43,12 +43,12 @@ If there are Conky instances running already, the LCC script will terminate them
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:

```bash
/path/to/lean-conky-config/start.sh -p /path/to/your/conky
/path/to/lean-conky-config/start-lcc.sh -p /path/to/your/conky
```

### Auto-start

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).
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).

### Enable/disable LCC font

Expand Down
49 changes: 49 additions & 0 deletions start-lcc.sh
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
49 changes: 0 additions & 49 deletions start.sh

This file was deleted.

1 change: 1 addition & 0 deletions start.sh

0 comments on commit ffd65c8

Please sign in to comment.