diff --git a/atom.xml b/atom.xml index eda0d53..df0f323 100644 --- a/atom.xml +++ b/atom.xml @@ -4,8 +4,30 @@ Zola - 2024-07-29T14:18:00+00:00 + 2024-07-29T21:16:00+00:00 https://paulwilde.uk/atom.xml + + BatMon + 2024-07-29T21:16:00+00:00 + 2024-07-29T21:16:00+00:00 + + + + + Unknown + + + + + + https://paulwilde.uk/ponderings/batmon/ + + <p>A simple battery monitor tool that can notify you on battery status changes for FreeBSD.<br /> +Inspired by but in no way similar to <a href="https://github.com/electrickite/batsignal">batsignal</a> - inspiring the basic function only. +Written in pure <a href="https://paulwilde.uk/ponderings/batmon/https/nim-lang.org">Nim</a>.</p> + + + TootInstall 2024-07-29T14:18:00+00:00 diff --git a/ponderings/batmon/index.html b/ponderings/batmon/index.html new file mode 100644 index 0000000..c6e5be9 --- /dev/null +++ b/ponderings/batmon/index.html @@ -0,0 +1,218 @@ + + + + + BatMon | Paul's Site of Stuff + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ +
+ + + + + + + +
+ + +
+ +

BatMon

+ + + + + + + + + + + + + + + + + + + + + + +
+

A simple battery monitor tool that can notify you on battery status changes for FreeBSD.
+Inspired by but in no way similar to batsignal - inspiring the basic function only. +Written in pure Nim.

+

Requirements

+

Run Requirements

+
    +
  • apm
  • +
  • notify-send
  • +
+

Build Requirements

+
    +
  • nim
  • +
  • nimble
  • +
+

Installation

+

To install into your .nimble/bin directory

+
git clone https://codeberg.org/pswilde/batmon && cd batmon
+nimble install
+
+

Running

+
# To run the daemon server notifier, just run:
+batmon -d
+
+# To run once and just show battery level, run:
+batmon -o
+
+

Using

+

When importing Batmon as a module you have access to the get_battery_status() +procedure which will return a Battery object you can use elsewhere.

+

Battery Type

+
type 
+  Battery* = object
+    status*: Status
+    charge*: float
+  Status* = enum
+    High,
+    Low,
+    Critical,
+    Charging,
+    Unknown
+
+

Also, you have access to the notification handler module, where you can build +and send your own notifications:

+
var n = newNotification("Title", "Body", urgency = Normal , timeout = 5000)
+discard n.send()
+
+ +
+ + + + +
+ + + + + +
+ + + diff --git a/ponderings/index.html b/ponderings/index.html index d8a17ca..adac274 100644 --- a/ponderings/index.html +++ b/ponderings/index.html @@ -81,6 +81,46 @@
+

BatMon

+ + + + + + + + +
+

A simple battery monitor tool that can notify you on battery status changes for FreeBSD.
+Inspired by but in no way similar to batsignal - inspiring the basic function only. +Written in pure Nim.

+ +
+
+ + + Read more  + ↩︎ + +
+ + +
+ +
+

TootInstall

-
- -
- -

thisisnotmy.email

- - - - - - - - -
-

I run the thisisnotmy.email email service.

-

What's it all about?

-

Don’t you hate it when people, businesses, random telephone callers, etc. ask you for your email address out of the blue under the ruse of “providing you a better service”? -It's early days but I'm hoping to be able to offer something for people to -use eventually.

- -
-
- - - Read more  - ↩︎ - -
- -