shstatus - a simple statusline generator for i3bar and swaybar
shstatus [-h | --help] [-v | --version] [config-file]
Print a help message.
Print version information.
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.
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
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.
Same as block_pwvol, but for pulseaudio.
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
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
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
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>.
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
Generic block generator without any variables. Useful for writing your own blocks.
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