Robstat is a status-bar generator for use with i3/sway, written and configured in Lisp.
Robstat is configured via ~/.config/robstat/stat.lisp. Example:
(status ()
(wifi)
(vpn)
(battery)
(disk-free "/")
(system-load)
(volume)
(bluetooth)
(local-time:format-timestring
nil (local-time:now)
:format '(:short-weekday #\ (:year 4) #\- (:month 2) #\-
(:day 2) #\ (:hour 2) #\: (:min 2))))STATUS takes a list of function calls to run periodically,
outputting their result in i3stat format. Items can return a bare
string or '(:text "words" :color :red).
Predefined status formatters. These tend to be fairly opinionated; their associated queries are also exposed if you want it different.
WIFIShows current wifi connection with strength and address, per NetworkManager.
VPNShows current VPN connections, per NetworkManager.
BATTERYbattery readout in “BAT 69% 3:00” / “CHG 20% 0:45” format. Turns red at <30min remaining.
DISK-FREEfs-pathShows free space on the fs at fs-path.
VOLUMEShows volume and muted-status.
BLUETOOTHShows connected bluetooth devices, abbreviated, with battery if available.
NB. bluez currently only queries battery stats with
[General] Experimental=true
in
/etc/bluetooth/main.conf.
-
BATTERY-LEVELBattery level in
$[0.0, 1.0]$ -
BATTERY-SECONDSHow long does the battery have left to discharge/charge, in seconds
-
BATTERY-STATUSGet the battery status:
"Charging","Discharging"and"Full"are the commonly reported ones. -
VOLUME-LEVELGets the current master volume, as
(list :volume 0.7 :muted nil). Volume range is$[0.0, 1.0]$ . -
CONNECTIONSActive NetworkManager connections, returned as
(list '(name type dbus-path)) -
BLUETOOTH-DEVICESFetches currently connected bluetooth devices. Returned as
(list '(:name "SomeTec Headphones" [:battery 69]))
MEMOIZE-STATUS(args) &body bodyMemoizes calls to body, keyed by args (as compared by
EQUAL). This is used on most of the builtin queries to cache their results. Cleared on refresh.ROUND-BYTESbytesRounds bytes to kibi/mebi/etc.
> (round-bytes 20480) "20.0K"