Skip to content

oscgu/basic-statusbar

Repository files navigation

basic-statusbar

A very basic statusbar for dwm, I quickly threw together for my fresh install :)

statusbar

Build

Dependencies

Tools

  • dwm
  • make
  • clang

Libs

  • libx11
  • libpulse

Configure

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"

Make

Build the binary:

make

Install the binary:

make install

Usage

Simply execute the statusbar after starting dwm

statusbar

Modules

MemoryModule

Shortname Source
mm /proc/mem

Shows the current memory usage in Gb

ProcessorLoadModule

Shortname Source
plm /proc/stats

Shows the current cpu usage in %

ProcessorTempModule

Shortname Source
ptm /sys/class/hwmon/hwmon1/temp1_input

Shows the current cpu temperature in Celsius

Date/TimeModule

Shortname Source
dm/tm time.h

Shows the current date/time

Nordvpn

Shortname Source
nvpn /bin/nordvpn status

Shows wether you are connected to a vpn

Uptime

Shortname Source
ut /sys/sysinfo.h

Shows the current uptime in days

Network

Shortname Source
nm /sys/class/net/eth0/statistics/rx_bytes

Shows the current network traffic (receive & send) of eth0 (broken as of right now)

BatteryModule

Shortname Source
bm /sys/class/power_suply/BAT0/capacity

Shows the current battery percentage

BatteryChargingMode

Shortname Source
bcm /sys/class/power_suply/AC/online

Shows the current charging state

Script

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.

VolumeModule

Shortname Source
vm pulseaudio

Gets the volume of the current default device (idx: 0). Make sure you are using PulseAudio.

Releases

No releases published

Packages

No packages published