This is the cari3s Reference Manual, version 2.0.0, generated automatically by Declt version 4.0 beta 2 "William Riker" on Sun Dec 15 04:30:06 2024 GMT+0.
cari3s/cari3s.asd
cari3s/package.lisp
cari3s/toolkit.lisp
cari3s/protocol.lisp
cari3s/event.lisp
cari3s/generators.lisp
cari3s/status-bar.lisp
cari3s/toplevel.lisp
cari3s/generators/battery.lisp
cari3s/generators/clock.lisp
cari3s/generators/cpu-usage.lisp
cari3s/generators/disk-usage.lisp
cari3s/generators/io-usage.lisp
cari3s/generators/mem-usage.lisp
cari3s/generators/network-ip.lisp
cari3s/generators/uptime.lisp
cari3s/generators/weather.lisp
cari3s/documentation.lisp
The main system appears first, followed by any subsystem dependency.
cari3s
A generator for the i3 status bar.
Yukari Hafner <shinmera@tymoon.eu>
Yukari Hafner <shinmera@tymoon.eu>
(GIT https://github.com/Shinmera/cari3s.git)
zlib
2.0.0
com.inuoe.jzon
(system).
cffi
(system).
usocket
(system).
pango-markup
(system).
drakma
(system).
closer-mop
(system).
documentation-utils
(system).
package.lisp
(file).
toolkit.lisp
(file).
protocol.lisp
(file).
event.lisp
(file).
generators.lisp
(file).
status-bar.lisp
(file).
toplevel.lisp
(file).
generators/battery.lisp
(file).
generators/clock.lisp
(file).
generators/cpu-usage.lisp
(file).
generators/disk-usage.lisp
(file).
generators/io-usage.lisp
(file).
generators/mem-usage.lisp
(file).
generators/network-ip.lisp
(file).
generators/uptime.lisp
(file).
generators/weather.lisp
(file).
documentation.lisp
(file).
Files are sorted by type and then listed depth-first from the systems components trees.
cari3s/cari3s.asd
cari3s/package.lisp
cari3s/toolkit.lisp
cari3s/protocol.lisp
cari3s/event.lisp
cari3s/generators.lisp
cari3s/status-bar.lisp
cari3s/toplevel.lisp
cari3s/generators/battery.lisp
cari3s/generators/clock.lisp
cari3s/generators/cpu-usage.lisp
cari3s/generators/disk-usage.lisp
cari3s/generators/io-usage.lisp
cari3s/generators/mem-usage.lisp
cari3s/generators/network-ip.lisp
cari3s/generators/uptime.lisp
cari3s/generators/weather.lisp
cari3s/documentation.lisp
cari3s/toolkit.lisp
package.lisp
(file).
cari3s
(system).
day-short-name
(function).
eformat
(function).
format-color-string
(function).
month-short-name
(function).
parse-all-integers
(function).
cari3s/protocol.lisp
toolkit.lisp
(file).
cari3s
(system).
align
(reader method).
(setf align)
(writer method).
background
(reader method).
(setf background)
(writer method).
block
(class).
border
(reader method).
(setf border)
(writer method).
continue-signal
(reader method).
(setf continue-signal)
(writer method).
foreground
(reader method).
(setf foreground)
(writer method).
from-table
(generic function).
header
(class).
instance
(reader method).
(setf instance)
(writer method).
markup
(reader method).
(setf markup)
(writer method).
min-width
(reader method).
(setf min-width)
(writer method).
name
(reader method).
(setf name)
(writer method).
pango-block
(class).
send-click-events-p
(reader method).
(setf send-click-events-p)
(writer method).
separator
(reader method).
(setf separator)
(writer method).
short-markup
(reader method).
(setf short-markup)
(writer method).
short-text
(method).
short-text
(reader method).
(setf short-text)
(writer method).
stop-signal
(reader method).
(setf stop-signal)
(writer method).
text
(method).
text
(reader method).
(setf text)
(writer method).
text-format
(method).
text-format
(method).
to-table
(generic function).
urgent-p
(reader method).
(setf urgent-p)
(writer method).
version
(reader method).
(setf version)
(writer method).
cari3s/event.lisp
protocol.lisp
(file).
cari3s
(system).
block-size
(reader method).
button
(reader method).
click
(class).
connections
(reader method).
(setf connections)
(writer method).
echo
(class).
event
(class).
event-server
(class).
from-table
(method).
generate
(class).
instance
(reader method).
listener
(reader method).
(setf listener)
(writer method).
location
(reader method).
message
(reader method).
name
(reader method).
object-initargs
(method).
parse-event-or-lose
(method).
parse-event-or-lose
(method).
port
(reader method).
process-connections
(method).
process-event
(generic function).
relative-location
(reader method).
serialize-object
(method).
serialize-object
(method).
serialize-object
(method).
serialize-object
(method).
serialize-object
(method).
serialize-object
(method).
serialize-object
(method).
serialize-object
(method).
serialize-object
(method).
start
(method).
stop
(method).
%serialize-object
(function).
cari3s/generators.lisp
event.lisp
(file).
cari3s
(system).
compute-value
(generic function).
generate
(generic function).
generator
(class).
initialize-instance
(method).
interval
(reader method).
(setf interval)
(writer method).
process-event
(method).
short-text
(method).
single-generator
(class).
text
(method).
value-generator
(class).
last-generation
(reader method).
(setf last-generation)
(writer method).
value
(reader method).
(setf value)
(writer method).
cari3s/status-bar.lisp
generators.lisp
(file).
cari3s
(system).
click-pause
(reader method).
(setf click-pause)
(writer method).
generate
(method).
generators
(reader method).
(setf generators)
(writer method).
input
(reader method).
(setf input)
(writer method).
interval
(reader method).
(setf interval)
(writer method).
next-time
(reader method).
(setf next-time)
(writer method).
output
(reader method).
(setf output)
(writer method).
process
(method).
process-event
(method).
process-event
(method).
process-event
(method).
produce-output
(method).
run-bar
(function).
status-bar
(class).
blocks
(reader method).
(setf blocks)
(writer method).
process-inputs
(method).
with-input-ready
(macro).
cari3s/toplevel.lisp
status-bar.lisp
(file).
cari3s
(system).
load-from-file
(function).
run-bar-from-file
(function).
toplevel
(function).
cari3s/generators/battery.lisp
toplevel.lisp
(file).
cari3s
(system).
battery
(class).
compute-value
(method).
battery-name
(reader method).
(setf battery-name)
(writer method).
cari3s/generators/clock.lisp
generators/battery.lisp
(file).
cari3s
(system).
clock
(class).
compute-value
(method).
cari3s/generators/cpu-usage.lisp
generators/clock.lisp
(file).
cari3s
(system).
compute-value
(method).
cpu-usage
(class).
previous-idle
(reader method).
(setf previous-idle)
(writer method).
previous-time
(reader method).
(setf previous-time)
(writer method).
cari3s/generators/disk-usage.lisp
generators/cpu-usage.lisp
(file).
cari3s
(system).
compute-value
(method).
disk-usage
(class).
device
(reader method).
(setf device)
(writer method).
file-system-id-tclass
(class).
file-system-tclass
(class).
statfs
(function).
cari3s/generators/io-usage.lisp
generators/disk-usage.lisp
(file).
cari3s
(system).
compute-value
(method).
io-usage
(class).
device
(reader method).
(setf device)
(writer method).
direction
(reader method).
(setf direction)
(writer method).
previous-time
(reader method).
(setf previous-time)
(writer method).
previous-value
(reader method).
(setf previous-value)
(writer method).
cari3s/generators/mem-usage.lisp
generators/io-usage.lisp
(file).
cari3s
(system).
compute-value
(method).
mem-usage
(class).
include-cache
(reader method).
(setf include-cache)
(writer method).
include-swap
(reader method).
(setf include-swap)
(writer method).
parse-meminfo
(function).
cari3s/generators/network-ip.lisp
generators/mem-usage.lisp
(file).
cari3s
(system).
compute-value
(method).
network-ip
(class).
device
(reader method).
(setf device)
(writer method).
freeifaddrs
(function).
getifaddrs
(function).
getnameinfo
(function).
ifaddrs-address
(function).
(setf ifaddrs-address)
(function).
ifaddrs-broadcast/destination-address
(function).
(setf ifaddrs-broadcast/destination-address)
(function).
ifaddrs-data
(function).
(setf ifaddrs-data)
(function).
ifaddrs-flags
(function).
(setf ifaddrs-flags)
(function).
ifaddrs-name
(function).
(setf ifaddrs-name)
(function).
ifaddrs-netmask
(function).
(setf ifaddrs-netmask)
(function).
ifaddrs-next
(function).
(setf ifaddrs-next)
(function).
ifaddrs-tclass
(class).
ni-maxhost
(constant).
ni-numerichost
(constant).
sockaddr-data
(function).
(setf sockaddr-data)
(function).
sockaddr-family
(function).
(setf sockaddr-family)
(function).
sockaddr-tclass
(class).
cari3s/generators/uptime.lisp
generators/network-ip.lisp
(file).
cari3s
(system).
compute-value
(method).
uptime
(class).
cari3s/generators/weather.lisp
generators/uptime.lisp
(file).
cari3s
(system).
compute-value
(method).
location
(reader method).
(setf location)
(writer method).
weather
(class).
*weather-api*
(special variable).
api-key
(reader method).
(setf api-key)
(writer method).
cari3s/documentation.lisp
generators/weather.lisp
(file).
cari3s
(system).
Packages are listed by definition order.
cari3s
org.shirakumo.cari3s
common-lisp
.
align
(generic reader).
(setf align)
(generic writer).
background
(generic reader).
(setf background)
(generic writer).
battery
(class).
block
(class).
block-size
(generic reader).
border
(generic reader).
(setf border)
(generic writer).
button
(generic reader).
click
(class).
click-pause
(generic reader).
(setf click-pause)
(generic writer).
clock
(class).
compute-value
(generic function).
connections
(generic reader).
(setf connections)
(generic writer).
continue-signal
(generic reader).
(setf continue-signal)
(generic writer).
cpu-usage
(class).
disk-usage
(class).
echo
(class).
event
(class).
event-server
(class).
foreground
(generic reader).
(setf foreground)
(generic writer).
from-table
(generic function).
generate
(generic function).
generate
(class).
generator
(class).
generators
(generic reader).
(setf generators)
(generic writer).
header
(class).
input
(generic reader).
(setf input)
(generic writer).
instance
(generic reader).
(setf instance)
(generic writer).
interval
(generic reader).
(setf interval)
(generic writer).
io-usage
(class).
listener
(generic reader).
(setf listener)
(generic writer).
load-from-file
(function).
location
(generic reader).
(setf location)
(generic writer).
markup
(generic reader).
(setf markup)
(generic writer).
mem-usage
(class).
message
(generic reader).
min-width
(generic reader).
(setf min-width)
(generic writer).
name
(generic reader).
(setf name)
(generic writer).
network-ip
(class).
next-time
(generic reader).
(setf next-time)
(generic writer).
object-initargs
(generic function).
output
(generic reader).
(setf output)
(generic writer).
pango-block
(class).
parse-event-or-lose
(generic function).
port
(generic reader).
process
(generic function).
process-connections
(generic function).
process-event
(generic function).
produce-output
(generic function).
relative-location
(generic reader).
run-bar
(function).
run-bar-from-file
(function).
send-click-events-p
(generic reader).
(setf send-click-events-p)
(generic writer).
separator
(generic reader).
(setf separator)
(generic writer).
serialize-object
(generic function).
short-markup
(generic reader).
(setf short-markup)
(generic writer).
short-text
(generic function).
(setf short-text)
(generic writer).
single-generator
(class).
start
(generic function).
status-bar
(class).
stop
(generic function).
stop-signal
(generic reader).
(setf stop-signal)
(generic writer).
text
(generic function).
(setf text)
(generic writer).
text-format
(generic function).
to-table
(generic function).
toplevel
(function).
uptime
(class).
urgent-p
(generic reader).
(setf urgent-p)
(generic writer).
value-generator
(class).
version
(generic reader).
(setf version)
(generic writer).
weather
(class).
%serialize-object
(function).
*weather-api*
(special variable).
api-key
(generic reader).
(setf api-key)
(generic writer).
battery-name
(generic reader).
(setf battery-name)
(generic writer).
blocks
(generic reader).
(setf blocks)
(generic writer).
day-short-name
(function).
device
(generic reader).
(setf device)
(generic writer).
direction
(generic reader).
(setf direction)
(generic writer).
eformat
(function).
file-system-id-tclass
(class).
file-system-tclass
(class).
format-color-string
(function).
freeifaddrs
(function).
getifaddrs
(function).
getnameinfo
(function).
ifaddrs-address
(function).
(setf ifaddrs-address)
(function).
ifaddrs-broadcast/destination-address
(function).
(setf ifaddrs-broadcast/destination-address)
(function).
ifaddrs-data
(function).
(setf ifaddrs-data)
(function).
ifaddrs-flags
(function).
(setf ifaddrs-flags)
(function).
ifaddrs-name
(function).
(setf ifaddrs-name)
(function).
ifaddrs-netmask
(function).
(setf ifaddrs-netmask)
(function).
ifaddrs-next
(function).
(setf ifaddrs-next)
(function).
ifaddrs-tclass
(class).
include-cache
(generic reader).
(setf include-cache)
(generic writer).
include-swap
(generic reader).
(setf include-swap)
(generic writer).
last-generation
(generic reader).
(setf last-generation)
(generic writer).
month-short-name
(function).
ni-maxhost
(constant).
ni-numerichost
(constant).
parse-all-integers
(function).
parse-meminfo
(function).
previous-idle
(generic reader).
(setf previous-idle)
(generic writer).
previous-time
(generic reader).
(setf previous-time)
(generic writer).
previous-value
(generic reader).
(setf previous-value)
(generic writer).
process-inputs
(generic function).
sockaddr-data
(function).
(setf sockaddr-data)
(function).
sockaddr-family
(function).
(setf sockaddr-family)
(function).
sockaddr-tclass
(class).
statfs
(function).
value
(generic reader).
(setf value)
(generic writer).
with-input-ready
(macro).
Definitions are sorted by export status, category, package, and then by lexicographic order.
Loads a status bar definition from the given file.
The file should have the following format:
DEFINITION ::= (INITARG|GENERATOR)*
INITARG ::= keyword value
GENERATOR ::= (NAME INITARG*)
NAME — A symbol naming the class of the generator.
So for instance a simple file for a status bar with a two-second
interval, a clock generator, and a cpu-usage generator would look as
follows:
:interval 2
(clock :text "~4@*~2d:~2,’0d:~2,’0d")
(cpu-usage)
See GENERATOR
See STATUS-BAR
Starts the i3bar protocol and continuously processes the status bar.
If click-events-p is T, i3 will send click events to the status bar. Pause is the minimal number of seconds between calls to PROCESS.
See PROCESS
See STATUS-BAR
Runs a status bar initialised from a file.
See LOAD-FROM-FILE
See RUN-BAR
Lisp binary toplevel entry function.
This simply calls RUN-BAR-FROM-FILE, passing along the command line options to the binary.
Accessor to the text alignment property of the block.
Can be one of: :center :right :left
Defaults to :left
Note that alignment is only in effect if the min-width has not been
reached.
See BLOCK
Accessor to the background colour of the block.
A colour can either be an encoded RGB integer, or a list of R, G, B,
and optional A elements with each element being an integer between
0 and 255.
See BLOCK
Accessor to the block’s screen dimensions.
The dimensions is a cons of WIDTH and HEIGHT sizes in pixels.
See CLICK
Accessor to the border colour of the block.
A colour can either be an encoded RGB integer, or a list of R, G, B,
and optional A elements with each element being an integer between
0 and 255.
See BLOCK
Accessor to the X11 button ID that was used to perform the click.
By default this should be:
1 – left
2 – middle
3 – right
See CLICK
Accessor to the number of seconds that the next tick event is delayed to when a click event has come in.
See PROCESS
See NEXT-TIME
See STATUS-BAR
status-bar
)) ¶automatically generated reader method
status-bar
)) ¶automatically generated writer method
Computes the values used for the format string in a value-generator’s text.
This function is called whenever GENERATE is called on the
value-generator.
See VALUE-GENERATOR
network-ip
)) ¶disk-usage
)) ¶The list of connected client sockets.
This is not thread-safe to modify.
See EVENT-SERVER
event-server
)) ¶automatically generated reader method
event-server
)) ¶automatically generated writer method
The unix signal used to continue bar updates.
Defaults to 18 (SIGCONT)
See HEADER
Accessor to the foreground text colour of the block.
A colour can either be an encoded RGB integer, or a list of R, G, B,
and optional A elements with each element being an integer between
0 and 255.
See BLOCK
Generate an object from a table of basic types.
This is intended for json deserialisation. Allowed types are:
- hash-table
- string
- list
- vector
- number
- T
- NIL
(eql cari3s:click)
) table) ¶Generates a list of blocks to use in the status bar.
See BLOCK
See GENERATOR
status-bar
)) ¶value-generator
)) ¶single-generator
)) ¶Accessor to the list of generators that the status-bar invokes to generate its output.
See GENERATOR
See STATUS-BAR
status-bar
)) ¶automatically generated reader method
status-bar
)) ¶automatically generated writer method
Accessor to the input stream from which the status-bar reads click events.
This defaults to *STANDARD-INPUT*
See PROCESS
See STATUS-BAR
status-bar
)) ¶automatically generated reader method
status-bar
)) ¶automatically generated writer method
Accessor to the instance name of the block.
See NAME
See BLOCK
See CLICK
Accessor to the interval in seconds in which output is generated
The default interval is one second for generators, and 0.1 seconds for
status-bars.
GENERATE is only called on generators if their own interval has
expired. They will not be called more frequently than the status-bar’s
own interval however.
See NEXT-TIME
See STATUS-BAR
See GENERATOR
status-bar
)) ¶automatically generated reader method
status-bar
)) ¶automatically generated writer method
The server socket to listen for connections on.
This is NIL if the server is not running.
This is not thread-safe to modify.
See EVENT-SERVER
event-server
)) ¶automatically generated reader method
event-server
)) ¶automatically generated writer method
Accessor to the screen position of the click.
The location is a cons of X and Y coordinates, relative to the top
left corner of the X11 root window in pixels.
See CLICK
Accessor to the list of markup regions for the pango block’s text.
See PANGO-BLOCK
pango-block
)) ¶automatically generated reader method
pango-block
)) ¶automatically generated writer method
Accessor to the minimum pixel width of the block.
From i3docs:
The minimum width (in pixels) of the block. If the content of the
text key take less space than the specified min-width, the block
will be padded to the left and/or the right side, according to the
align key. This is useful when you want to prevent the whole
status line to shift when value take more or less space between each
iteration. The value can also be a string. In this case, the width
of the text given by min-width determines the minimum width of the
block. This is useful when you want to set a sensible minimum width
regardless of which font you are using, and at what particular size.
See BLOCK
Accessor to the name of the block.
From i3docs:
Every block should have a unique name (string) entry so that it can
be easily identified in scripts which process the output. i3bar
completely ignores the name and instance fields. Make sure to also
specify an instance (string) entry where appropriate. For example,
the user can have multiple disk space blocks for multiple mount
points.
See INSTANCE
See BLOCK
See CLICK
Accessor to the next time a tick event should be fired.
This is automatically updated when a tick event has fired or when a
click event has fired and click-pause is set.
The value is in internal-time-units.
See INTERVAL
See CLICK-PAUSE
See STATUS-BAR
status-bar
)) ¶automatically generated reader method
status-bar
)) ¶automatically generated writer method
Returns a list of initargs to reconstruct the given object with make-instance.
By default this simply gathers a list of all slots that are
bound and that have at least one initarg. This is for the purpose
of reconstructing the object after serialisation.
You may add methods in case you want more precise control over
the reconstruction of the object.
Accessor to the output stream to which the status-bar writes its results.
This defaults to *STANDARD-OUTPUT*
See PRODUCE-OUTPUT
See STATUS-BAR
status-bar
)) ¶automatically generated reader method
status-bar
)) ¶automatically generated writer method
Attempts to parse an event from the given source, signalling an error on failure.
This will return an EVENT instance.
See EVENT
The port on which the server listens for connections.
Defaults to 2424.
See EVENT-SERVER
event-server
)) ¶automatically generated reader method
port
.
Processes the status-bar, causing it to potentially read inputs and generate outputs.
First the input is checked for a new click event. If one is there,
it is parsed from the stream and output is produced according to
GENERATE on the generators and the click event. If click-pause is
set, the next-time is delayed by click-pause number of seconds from
the current time.
Next the next-time is checked against the current internal real
time. If the time has passed, output is produced according to
GENERATE on the generators and a new tick event. The next-time is
then delayed by interval number of seconds from the current time.
See CLICK
See TICK
See NEXT-TIME
See CLICK-PAUSE
See INTERVAL
See GENERATOR
See GENERATORS
See STATUS-BAR
status-bar
)) ¶Processes the event-server connections.
This proceeds by listening for new connections and accepting
them if there are any. It then listens on each socket in
turn, parsing and processing pending events.
If a stream or socket error occurs, the connection is removed.
If another error occurs during parsing or processing, an error
is sent back to the client.
See PARSE-EVENT-OR-LOSE
See PROCESS-EVENT
See SERIALIZE-OBJECT
See EVENT-SERVER
event-server
)) ¶Causes the given event to be processed by the specified receiver.
If the receiver does not understand the event, an error is
signalled. In the case of a status-bar, unknown events are passed
on to its generators. In the case of a generator, unknown events
are ignored.
You should add methods to this as necessary in order to interface
your object with the general event system.
See EVENT
generate
) (bar status-bar
)) ¶echo
) (bar status-bar
)) ¶event
) (bar status-bar
)) ¶Outputs the given payload as JSON to the status-bar’s output stream.
See OUTPUT
See STATUS-BAR
status-bar
) payload) ¶Accessor to the relative position of the click.
The location is a cons of X and Y coordinates, relative to the top
left corner of the block itself in pixels.
See CLICK
Whether i3 should send click updates to the process.
Defaults to NIL
See HEADER
Accessor to the block’s separator behaviour.
If set should be either T, or a number of pixels for the width of the separator. If T, the default i3 behaviour is to use 9 pixels of width for the separator.
Serialises the object to the given stream in the event protocol format.
The event protocol format is an UTF-8 based format:
OBJECT ::= "NIL" | "T" | INSTANCE
INSTANCE ::= CLASS-NAME INITARG*
INITARG ::= keyword VALUE
VALUE ::= symbol | string | real | list
Programs that intend on parsing events or return values
from Cari3s need to be able to parse this format and
serialise their respective format to it as well.
Restrictions on the encoding of values:
- Strings may not contain the Linefeed character.
- Symbols must be either unqualified (without the package
prefix), or keywords.
- Symbol names may not contain the Linefeed character.
- Symbol names must be written in all lowercase with the
exception of NIL and T which are written all uppercase.
- Only proper lists are allowed.
standard-object
) stream) ¶structure-object
) stream) ¶condition
) stream) ¶string
) stream) ¶cons
) stream) ¶real
) stream) ¶symbol
) stream) ¶(eql nil)
) stream) ¶(eql t)
) stream) ¶Accessor to the list of markup regions for the pango block’s short-text.
See PANGO-BLOCK
pango-block
)) ¶automatically generated reader method
pango-block
)) ¶automatically generated writer method
Accessor to the short, alternate text content of the block.
From i3docs:
Where appropriate, the short-text should also be provided. It
will be used in case the status line needs to be shortened
because it uses more space than your screen provides. For
example, when displaying an IPv6 address, the prefix is
usually (!) more relevant than the suffix, because the latter
stays constant when using autoconf, while the prefix changes.
When displaying the date, the time is more important than the
date (it is more likely that you know which day it is than
what time it is).
See BLOCK
value-generator
)) ¶pango-block
)) ¶Start the event-server.
If it is already started, an error is signalled.
See EVENT-SERVER
event-server
)) ¶Stops the event-server.
If it is already stopped, nothing is done.
See EVENT-SERVER
event-server
)) ¶The unix signal used to pause bar updates.
Defaults to 19 (SIGSTOP)
See HEADER
Accessor to the full textual content of the block.
This field is required to be set.
See BLOCK
value-generator
)) ¶pango-block
)) ¶Returns the text format used by the block’s text content.
Defaults to :none
See BLOCK
pango-block
)) ¶Turn the object into a table of basic types.
This is intended for json serialisation. Allowed types are:
- hash-table
- string
- list
- vector
- number
- T
- NIL
Accessor to whether the block is considered urgent or not.
From i3docs:
A boolean which specifies whether the current value is urgent.
Examples are battery charge values below 1 percent or no more
available disk space (for non-root users). The presentation of
urgency is up to i3bar.
See BLOCK
The version integer of the protocol that is used.
Defaults to 1.
See HEADER
single-generator
) &key name) ¶A generator for battery status information.
You may supply the name of the battery of interest using the :BATTERY initarg. It defaults to the first battery device.
This value-generator supplies the following six values:
0. charge-percentage
1. charging-p
2. discharging-p
3. hours-remaining
4. minutes-remaining
5. seconds-remaining
See VALUE-GENERATOR
Initarg | Value |
---|---|
:text | bat ~4,1f%~:[~; 🡅~]~:[~; 🡇~]~@[ ~d:~2,'0d~] |
:battery | t |
:markup | (quote ((0 3 color 35054))) |
:battery
Class representing a block in the i3 status bar.
A block is a textual container with some styling options.
See your i3 documentation for more information on blocks and their
behaviour.
Instances of this class can be serialised using Jonathan.
See TEXT
See SHORT-TEXT
See FOREGROUND
See BACKGROUND
See BORDER
See MIN-WIDTH
See ALIGN
See NAME
See INSTANCE
See URGENT-P
See SEPARATOR
See TEXT-FORMAT
(setf align)
.
align
.
(setf background)
.
background
.
(setf border)
.
border
.
(setf foreground)
.
foreground
.
(setf instance)
.
instance
.
(setf min-width)
.
min-width
.
(setf name)
.
name
.
(setf separator)
.
separator
.
(setf short-text)
.
short-text
.
(setf text)
.
text
.
text-format
.
to-table
.
(setf urgent-p)
.
urgent-p
.
Initarg | Value |
---|---|
:text | (error text required.) |
:short-text | nil |
:foreground | nil |
:background | nil |
:border | nil |
:min-width | nil |
:align | left |
:name | nil |
:instance | nil |
:urgent-p | nil |
:separator | t |
:short-text
:foreground
:background
:border
:min-width
:align
:instance
:urgent-p
:separator
Class representing a click event being fired on a block.
This event comes from i3 itself if the connection was opened with
a header that has SEND-CLICK-EVENTS-P set to T.
See NAME
See INSTANCE
See BUTTON
See LOCATION
See RELATIVE-LOCATION
See BLOCK-SIZE
Initarg | Value |
---|---|
:name | nil |
:instance | nil |
:button | 1 |
:location | nil |
:relative-location | nil |
:block-size | nil |
:relative-location
This slot is read-only.
:block-size
This slot is read-only.
A generator for a current local time clock.
This value-generator supplies the following nine values:
0. year
1. month
2. day-of-month
3. day-of-week
4. hour
5. minute
6. second
7. short-day-name
8. short-month-name
See VALUE-GENERATOR
Initarg | Value |
---|---|
:text | date ~7@*~a ~2@*~2d ~8@*~a ~4@*~2d:~2,'0d:~2,'0d |
:markup | (quote ((0 4 color 35054))) |
A generator for the current CPU usage.
This value-generator supplies the following value:
0. usage-percentage
See VALUE-GENERATOR
A generator for the current partition capacity usage.
You may specify the path to the partition of interest using
the :DEVICE initarg.
This value-generator supplies the following value:
0. usage-percentage
See VALUE-GENERATOR
Initarg | Value |
---|---|
:text | disk ~4,1f% |
:markup | (quote ((0 4 color 35054))) |
:device | / |
:device
An event that is sent back over the connection as-is.
This event does not reach generators.
See event
Superclass for all events that might happen in the system.
See PROCESS-EVENT
Represents an event exchange server.
This server runs a TCP listener on a given port on the
localhost. The port defaults to 2424. Once started, the
server accepts an arbitrary amount of connections, over which
events can be issued. An event should follow the format as
specified in SERIALIZE-OBJECT, and should be followed by a
single Linefeed. For each event issued, the server will
respond with one or more objects. The connection is never
closed by the server except for when the underlying stream is
closed, or a TCP error occurs and the connection is doomed
anyway. The client is allowed to terminate the connection at
any time.
This class on its own does nothing. In order to start the
server listener, START must be called. STOP can be called
to end the listener and disconnect all clients. Once started,
PROCESS-CONNECTIONS must be called regularly in order to accept
new connections, handle incoming events, and to clean up old
connections that have disconnected.
See PORT
See LISTENER
See CONNECTIONS
See START
See STOP
See PROCESS-CONNECTIONS
An event to signal that blocks should be generated immediately.
This event does not reach generators.
See event
This is the superclass for all block generators.
A generator is responsible for creating one or more blocks
that are emitted into the status bar.
A concrete class of a generator must supply a primary method
on GENERATE.
See GENERATE
See INTERVAL
See PROCESS-EVENT
Class representing the i3bar protocol header.
Instances of this class can be serialised using Jonathan.
See VERSION
See STOP-SIGNAL
See CONTINUE-SIGNAL
See SEND-CLICK-EVENTS-P
Initarg | Value |
---|---|
:version | 1 |
:stop-signal | 19 |
:continue-signal | 18 |
:send-click-events-p | nil |
:version
:stop-signal
:continue-signal
:send-click-events-p
A generator for the current disk i/o usage.
You may specify whether you’re interested in :read, :write, or
:read-write using the :DIRECTION initarg.
This value-generator supplies the following value:
0. megabytes-per-second
See VALUE-GENERATOR
Initarg | Value |
---|---|
:text | i/o ~4,1fm/s |
:markup | (quote ((0 3 color 35054))) |
:device | t |
:direction | read-write |
:device
:direction
(get-internal-real-time)
0
A generator for the current memory usage.
You may specify whether you’re interested in swap and cache
by using the :SWAP and :CACHE initargs respectively.
When :CACHE is T, memory used by the cache is counted as
occupied. When :SWAP is T, swap memory and usage are added
to the total.
This value-generator supplies the following three values:
0. usage-percentage
1. total-megabytes
2. free-megabytes
See VALUE-GENERATOR
Initarg | Value |
---|---|
:text | mem ~4,1f% |
:markup | (quote ((0 3 color 35054))) |
:include-swap | nil |
:include-cache | nil |
:include-swap
:include-cache
A generator for the current network IP address.
You may specify which device you’re interested in with the
:DEVICE initarg. It defaults to whichever device is listed
first that does not bind to localhost.
This value-generator supplies the following two values:
0. ip-address
1. device-name
See VALUE-GENERATOR
Initarg | Value |
---|---|
:text | ip ~a |
:markup | (quote ((0 2 color 35054))) |
:device | t |
:device
Represents a block whose text should be marked up with pango.
Note that neither TEXT nor SHORT-TEXT should contain raw pango
markup tags themselves, but rather you should use the MARKUP and
SHORT-MARKUP slots to set the markup regions to be used.
TEXT and SHORT-TEXT will automatically render the textual contents
with the appropriate markup regions.
Each entry in the MARKUP and SHORT-MARKUP lists should have the
following structure:
(START END . MARKUP/MARKUP-OPTIONS)
Please see the pango-markup library for more information:
https://shinmera.github.io/pango-markup
See MARKUP
See SHORT-MARKUP
See PANGO-MARKUP:MARKUP-REGIONS
Superclass for all block generators that only generate a single block.
As a convenience, this generator also directly inherits from
PANGO-BLOCK in order to let the user and subclasses customise
the block’s look and feel conveniently.
The primary method of a single-generator’s GENERATE does not
need to return anything useful, as the generator itself is
always automatically returned from GENERATE in a list.
If no :name is provided on a single-generator instance, the name is
automatically set to the class-name of the instance’s class.
See PANGO-BLOCK
See GENERATOR
See GENERATE
Class to represent an i3 status bar.
An instance of this class is capable of handling the i3 protocol and invoking a number of block generators at the appropriate times. It also handles remote client connections through the event-server.
See INTERVAL
See NEXT-TIME
See GENERATORS
See OUTPUT
See INPUT
See CLICK-PAUSE
See PRODUCE-OUTPUT
See PROCESS
See RUN-BAR
See EVENT-SERVER
Initarg | Value |
---|---|
:interval | 1 |
:click-pause | 1 |
:generators | nil |
:output | *standard-output* |
:input | *standard-input* |
:interval
0
:generators
(make-hash-table :test (quote eq))
:output
:input
:click-pause
A generator for the current system uptime.
This value-generator supplies the following four values:
0. uptime-days (NIL if zero)
1. uptime-hours
2. uptime-minutes
3. uptime-seconds
Initarg | Value |
---|---|
:text | up~@[ ~dd~] ~d:~2,'0d |
:markup | (quote ((0 2 color 35054))) |
Superclass for all block generators that generate their text content based on some computed value.
The TEXT and SHORT-TEXT of a value-generator should be format
strings that may consume however many values the respective
generator promises to supply.
Note that the pango markup for both text and short-text is
applied AFTER the format string has been formatted in order to
avoid encoding issues with entities in format directives.
A concrete class of a value-generator must supply a primary
method on COMPUTE-VALUE.
See COMPUTE-VALUE
See SINGLE-GENERATOR
A generator for current weather data.
You must specify your darksky.net api-key via the :API-KEY initarg,
and your global coordinates in the (LAT . LNG) format via the
:LOCATION initarg.
This requires an active internet connection to function.
This value-generator supplies the following seven values:
0. summary
1. temperature [C]
2. temperature-apparent-p
3. apparent-temperature [C]
4. humidity [%]
5. wind [km/h]
6. pressure [hPa]
Initarg | Value |
---|---|
:text | weather ~a at ~d°c~:[ (~d°c)~;~*~], ~d%, ~dkm/h, ~dhpa |
:markup | (quote ((0 7 color 35054))) |
:interval | (* 60 60) |
:api-key | (error api-key required) |
:location | (error location required) |
:api-key
:location
status-bar
)) ¶automatically generated reader method
status-bar
)) ¶automatically generated writer method
network-ip
)) ¶automatically generated reader method
io-usage
)) ¶automatically generated reader method
disk-usage
)) ¶automatically generated reader method
network-ip
)) ¶automatically generated writer method
io-usage
)) ¶automatically generated writer method
disk-usage
)) ¶automatically generated writer method
status-bar
)) ¶value-generator
)) ¶automatically generated reader method
value-generator
)) ¶automatically generated writer method
foreign-struct-type
.
translatable-foreign-type
.
foreign-struct-type
.
translatable-foreign-type
.
foreign-struct-type
.
translatable-foreign-type
.
foreign-struct-type
.
translatable-foreign-type
.
Jump to: | %
(
A B C D E F G I L M N O P R S T U V W |
---|
Jump to: | %
(
A B C D E F G I L M N O P R S T U V W |
---|
Jump to: | *
A B C D F G I L M N O P R S T U V |
---|
Jump to: | *
A B C D F G I L M N O P R S T U V |
---|
Jump to: | B C D E F G H I M N P S T U V W |
---|
Jump to: | B C D E F G H I M N P S T U V W |
---|