From 4ce4c311780d855cd7cd1c2ca511577e574c5a93 Mon Sep 17 00:00:00 2001 From: Joe <50464604+JozanLeClerc@users.noreply.github.com> Date: Thu, 14 Nov 2019 10:46:19 +0100 Subject: Correct argc, should work by now --- bin/lowbat | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/bin/lowbat b/bin/lowbat index 528588b..48a6a38 100755 --- a/bin/lowbat +++ b/bin/lowbat @@ -1,10 +1,10 @@ #!/bin/sh -##if [ $@ -lt 2 ]; then -## message="beep beep - low battery" -##else -## message=$2 -##fi +if [ $# -lt 2 ]; then + message="beep beep - low battery" +else + message=$2 +fi notify() { notify-send "Low battery" "Please plug in computer" -u critical -t 15000 -- cgit v1.2.3 From d98053b825c269eec192f1452ccb66f9fc84668c Mon Sep 17 00:00:00 2001 From: Joe <50464604+JozanLeClerc@users.noreply.github.com> Date: Thu, 14 Nov 2019 10:53:12 +0100 Subject: Man update --- man/lowbat.1 | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/man/lowbat.1 b/man/lowbat.1 index 5b35837..a595c4d 100644 --- a/man/lowbat.1 +++ b/man/lowbat.1 @@ -2,10 +2,11 @@ .\" Contact bousset.rudy@gmail.com to correct errors and typos. .TH man 1 "14 Nov 2019" "1.0" "lowbat Reference" .SH NAME -lowbat \- A lightweight battery warning daemon +lowbat \- A lightweight battery warning utility .SH SYNOPSYS .B lowbat +[OPTION] .SH DESCRIPTION .B lowbat @@ -19,7 +20,7 @@ when your battery is falling under 15%. .SH OPTIONS .B lowbat -does not take any options. +does only take one option. You can enter a string as an as an argument. It will come as a replacement for the default warning message. .SH BUGS No known bugs. .SH AUTHOR -- cgit v1.2.3 From 5e02d6a825ad039b8c0656d8d7f859bebfa0832c Mon Sep 17 00:00:00 2001 From: Joe <50464604+JozanLeClerc@users.noreply.github.com> Date: Thu, 14 Nov 2019 11:02:11 +0100 Subject: Better bold format --- man/lowbat.1 | 15 +++++---------- 1 file changed, 5 insertions(+), 10 deletions(-) diff --git a/man/lowbat.1 b/man/lowbat.1 index a595c4d..dc9d0f9 100644 --- a/man/lowbat.1 +++ b/man/lowbat.1 @@ -4,22 +4,17 @@ .SH NAME lowbat \- A lightweight battery warning utility .SH SYNOPSYS -.B -lowbat +.B lowbat [OPTION] .SH DESCRIPTION -.B -lowbat +.B lowbat is a small script meant to be run in the background. It warns you using -.B -notify-send +.B notify-send and -.B -espeak +.B espeak when your battery is falling under 15%. .SH OPTIONS -.B -lowbat +.B lowbat does only take one option. You can enter a string as an as an argument. It will come as a replacement for the default warning message. .SH BUGS No known bugs. -- cgit v1.2.3 From 7f2271ec63321c74ff02c3e229c8843927243598 Mon Sep 17 00:00:00 2001 From: Joe <50464604+JozanLeClerc@users.noreply.github.com> Date: Thu, 14 Nov 2019 11:03:22 +0100 Subject: Formatting --- man/lowbat.1 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/man/lowbat.1 b/man/lowbat.1 index dc9d0f9..f1f31eb 100644 --- a/man/lowbat.1 +++ b/man/lowbat.1 @@ -2,7 +2,7 @@ .\" Contact bousset.rudy@gmail.com to correct errors and typos. .TH man 1 "14 Nov 2019" "1.0" "lowbat Reference" .SH NAME -lowbat \- A lightweight battery warning utility +lowbat \- Lightweight battery warning utility .SH SYNOPSYS .B lowbat [OPTION] -- cgit v1.2.3