shstatus manual

NAME

shstatus - a simple statusline generator for i3bar and swaybar

SYNOPSIS

shstatus [-h | --help] [-v | --version] [config-file]

OPTIONS

-h, --help

Print a help message.

-v, --version

Print version information.

CONFIGURATION

shstatus looks for configuration files in the following order:

1. ~/config/shstatus/config.sh

2. /etc/shstatus/config.sh

Specifying an alternate config file overrides the default paths.

In the config file, you have to define:

1. A variable 'interval'

2. A function 'update'

update() will be run every 'interval' seconds to update the status bar. You can see an example config file in /etc/shstatus/config.sh. It contains usage examples of every builtin block. Copy it to ~/.config/shstatus/config.sh and edit it from there.

Inside update() you can either use some builtin blocks or write your own. Before using a builtin block function, you can define variables to customize its output. For a list of variables, see swaybar-protocol(7) or https://i3wm.org/docs/i3bar-protocol.html. Inside 'full_text' and 'short_text' additional variables for each block are available. They are described in the next section.

BUILTIN BLOCKS

block_datetime <date-formatstring> <program>

Shows the date and time.

<program> can be either 'printf' or 'date'. See strftime(3) for how to use printf, or date(1) for how to use date.

Available variables:
%date - current date

block_pwvol <pipewire-sink> <mute-string>

Shows the current volume. Works on pipewire with wireplumber.

Available variables:
%vol - current volume
%mutestatus - if volume is muted, this variable contains <mute-string>. Otherwise it is empty.

block_pavol <pulseaudio-sink> <mute-string>

Same as block_pwvol, but for pulseaudio.

block_disk <device or mountpoint>

Shows disk usage.

Available variables:
%disk - device
%size - disk size
%used - used disk space
%avail - available disk space
%usepercent - percentage of used disk space
%mountpoint - device mountpoint

block_mem

Shows memory and swap usage.

Available variables:
%memtotal - total memory
%memused - used memory
%memavail - available memory
%swaptotal - total swap
%swapused - used swap
%swapavail - available swap

block_loadavg

Shows the load average.

Available variables:
%load1 - load average during the last 1 minute
%load5 - load average during the last 5 minutes
%load15 - load average during the last 15 minutes

block_battery <battery-name> <charging-label> <discharging-label> <full-label>

Shows battery information.

To list available batteries, run 'ls /sys/class/power_supply'

Available variables:
%percentage - battery percentage
%status - depending on the current battery status, this contains either <charging-label>, <discharging-label> or <full-label>.

block_backlight <card> <brightness-file>

Shows information about the current monitor brightness.

<brightness_file> can be either 'actual_brightness' or 'brightness'.
To list available cards, run 'ls /sys/class/backlight'

Available variables:
%current - contents of /sys/class/backlight/<card>/<brightness-file>
%max - contents of /sys/class/backlight/<card>/max_brightness
%percentage - brightness percentage

block

Generic block generator without any variables. Useful for writing your own blocks.

SEE ALSO

swaybar-protocol(7), strftime(3), date(1), pactl(1)

i3bar protocol specification
https://i3wm.org/docs/i3bar-protocol.html

Repository
https://github.com/acuteenvy/shstatus