A very basic statusbar for dwm, I quickly threw together for my fresh install :)
- dwm
- make
- clang
- libx11
- libpulse
Edit config.h
Modules are added as follows:
Modules modules = {
{ module_short_name, { icon_count, values[], icons[] } }
}
The default formatter will chose icons depending on the provided values, e.g:
values[] = 1, 2
icons[] = "a", "b", "c"
if value < 1 then "a"
if value > 1 and value < 2 then "b"
if value > 2 then "c"
Build the binary:
make
Install the binary:
make install
Simply execute the statusbar after starting dwm
statusbar
Shortname | Source |
---|---|
mm | /proc/mem |
Shows the current memory usage in Gb
Shortname | Source |
---|---|
plm | /proc/stats |
Shows the current cpu usage in %
Shortname | Source |
---|---|
ptm | /sys/class/hwmon/hwmon1/temp1_input |
Shows the current cpu temperature in Celsius
Shortname | Source |
---|---|
dm/tm | time.h |
Shows the current date/time
Shortname | Source |
---|---|
nvpn | /bin/nordvpn status |
Shows wether you are connected to a vpn
Shortname | Source |
---|---|
ut | /sys/sysinfo.h |
Shows the current uptime in days
Shortname | Source |
---|---|
nm | /sys/class/net/eth0/statistics/rx_bytes |
Shows the current network traffic (receive & send) of eth0 (broken as of right now)
Shortname | Source |
---|---|
bm | /sys/class/power_suply/BAT0/capacity |
Shows the current battery percentage
Shortname | Source |
---|---|
bcm | /sys/class/power_suply/AC/online |
Shows the current charging state
Shortname | Source |
---|---|
script | byo |
Runs a script and puts the output into the status. Make sure you dont exceed the maximum module text length of 32 chars.
Shortname | Source |
---|---|
vm | pulseaudio |
Gets the volume of the current default device (idx: 0). Make sure you are using PulseAudio.