sites

public wiki contents of suckless.org
git clone git://git.suckless.org/sites
Log | Files | Refs

index.md (7109B)


      1 status monitor
      2 ==============
      3 The status bar text of dwm is stored in the WM\_NAME X11 property of the
      4 root window, which is managed by dwm.
      5 
      6 It can be easily set and retrieved using standard Unix tools.
      7 
      8 	xsetroot -name $status
      9 
     10 	xprop -root -notype -f WM_NAME "8u" \
     11 		| sed -n -r 's/WM_NAME = \"(.*)\"/\1/p'
     12 
     13 Set The Status Using A Shell Script
     14 -----------------------------------
     15 	while true; do
     16 		xsetroot -name "$(date)"
     17 		sleep 2
     18 	done
     19 
     20 Set The Status Using Other Methods
     21 ----------------------------------
     22 There are two status monitors maintained at suckless:
     23 
     24 slstatus - suckless status
     25 --------------------------
     26 A somewhat complex status monitor which includes all batteries.
     27 
     28 You can read more [on the project page](//tools.suckless.org/slstatus/).
     29 
     30 dwmstatus
     31 ---------
     32 Barebone status monitor with basic functions written in C. This follows the
     33 suckless philosophy, to give you an easy way to extend the source code to your
     34 needs. See the helper functions for C below, to extend it to your needs. Just
     35 check it out and keep on hacking.
     36 
     37 	git clone git://git.suckless.org/dwmstatus
     38 	cd dwmstatus
     39 	make
     40 	make PREFIX=/usr install
     41 	# add »dwmstatus 2>&1 >/dev/null &« to your .xinitrc
     42 
     43 Status Monitors Submitted By Others
     44 -----------------------------------
     45 Feel free to add your own status monitors here (keeping the list sorted).
     46 
     47 * [akuma-v-dwm](https://gitlab.com/narvin/avd) - event driven, modular,
     48   and extensible with date/time, all batteries, volume (amixer), backlight,
     49   memory and cpu usage out of the box.
     50 * [barM](barM.c) - can display all, time/date, ram usage, output of commands (the New BarMonitor).
     51 * [dsblocks](https://github.com/ashish-yadav11/dsblocks) - modular status
     52   monitor, written and meant to be configured in C, with support for signaling,
     53   clickability, cursor hinting and color.
     54 * [dstat](https://www.umaxx.net/dl)
     55   [Screenshot](https://www.umaxx.net/dstat.png) - displays the current network
     56   throughput, CPU usage, performance settings, battery status, temperature,
     57   volume settings, as well as the current date and time (OpenBSD only, no support
     58   for Linux).
     59 * [dwm-bar](https://github.com/joestandring/dwm-bar) - modular status bar.
     60   modules for date/time, alsa volume, cmus track, countdown timer,
     61   current keyboard layout, mail count, system resources, and weather.
     62 * [dwmblocks](https://github.com/torrinfail/dwmblocks) - i3blocks-like
     63   status bar where you can refresh each "block" independently by update time
     64   or signal.
     65 * [dwmblocks](https://github.com/ashish-yadav11/dwmblocks) - rewrite of
     66   dwmblocks with added features including clickability, cursor hinting and
     67   color.
     68 * [dwms](https://github.com/ianremmler/dwms) - displays time, network, audio,
     69   and battery status, written in Go using XGB.
     70 * [dwmsd](https://github.com/johnko/dwmsd) - a daemon that listens on localhost
     71   tcp (may be useful as a base for asynchronous updates)
     72 * [dwm-sss](https://github.com/roadkillcat/dwm_sss) - shell script providing
     73   date, time and CPU temperature
     74 * [dwmstat](https://notabug.org/kl3/dwmstat) - small and simple | IP, CPU
     75   temperature, system volume, current local time (and more) | config.h | OpenBSD
     76 * [goblocks](https://github.com/Stargarth/Goblocks) - Partially inspired by dwmblocks,
     77   Go status bar that allows you to refresh each block independently. Includes built in
     78   features for frequently refreshed blocks.
     79 * [gocaudices](https://github.com/lordrusk/gocaudices) - dwmblocks alternative written in go,
     80 Gocaudices is a dwmblocks replacement meant to be simple, fast, and elegant. It tries to adhere
     81 to the suckless philosophy.
     82 * [go-dwmstatus](https://github.com/oniichaNj/go-dwmstatus) - A Go bar that
     83   prints current MPD song, load averages, time/date and battery percentage.
     84 * [gods](https://github.com/schachmat/gods) - implemented in Go. prints network
     85   speed, cpu, ram, date/time
     86 * [profil-dwmstatus-1.0.c](profil-dwmstatus-1.0.c) - cpufreq, battery percent
     87   and date/time
     88 * [rsblocks](https://github.com/MustafaSalih1993/rsblocks) - A fast multi threaded status bar written in Rust, configurable with a yaml file.
     89 * [sb](https://git.ckyln.com/sb/log.html) - another modular bar written in POSIX
     90   shell
     91 * [spoon](https://git.2f30.org/spoon/) - set dwm status. Supports battery,
     92   cpu freq, date, file, load avg, keyboard layout, mpd, network speed,
     93   screen brightness, temperature, wifi, volume mixer.
     94   Works well on OpenBSD and Linux.
     95 * [suspend-statusbar.c](https://github.com/snobb/dwm-statusbar) - date,
     96   loadavg, battery and more. If battery goes below threshold - run suspend
     97   command
     98 * [ztatus](https://git.noxz.tech/ztatus/log.html) - simple statusbar and
     99   notification daemon (through fifo). Displays only date and time normally.
    100   Configured to work with 'statuscolors' patch by default.
    101 
    102 Helper Functions In The Shell
    103 -----------------------------
    104 * [posix scripts](https://notabug.org/kl3/scripts) - basic collection of simple, fully POSIX sh compliant scripts to get various system information
    105 * [i3blocks-contrib](https://github.com/vivien/i3blocks-contrib) - collection of python, perl and shell scripts
    106 * Free memory: `free -h | awk '(NR==2){ print $4 }'`
    107 * Volume (device Master): `amixer get Master | awk -F'[][]' 'END{ print $4":"$2 }'`
    108 * Keyboard layout: `setxkbmap -query | awk '/layout/{ print $2 }'`
    109 * Empty disk space (mountpoint /home): `df -h | awk '{ if ($6 == "/home") print $4 }'`
    110 * wifi status (interface wlp3s0): `cat /sys/class/net/wlp3s0/operstate`
    111 * CPU temperature: `sed 's/000$/°C/' /sys/class/thermal/thermal_zone0/temp`.
    112   Alternatively you can use `acpi -t` or `sensors` from lm-sensors package. For
    113   older systems you can get the cpu temperature from
    114   `/proc/acpi/thermal_zone/THM0/temperature`
    115 * Remaining battery: `cat /sys/class/power_supply/BAT0/capacity`. Alternatively
    116   you can use `acpi -b`. For older systems you can get the battery capacity from
    117   `/proc/acpi/battery/BAT0/state`.
    118 
    119 Using shell scripts very well leads to big scripts, which pull in unneeded
    120 dependencies. One solution for this is to write everything in C, which is much
    121 more efficient.
    122 
    123 Helper Functions In C (for dwmstatus or slstatus etc.)
    124 ------------------------------------------------------
    125 If you have simple C functions for gathering system information, feel free to
    126 add them here (keeping the list sorted).
    127 
    128 * [ACPI battery status on Linux](new-acpi-battery.c)
    129 * [Battery on Linux](batterystatus.c): Battery percentage and status. + if
    130   charging, - if discharging, = if full.
    131 * [Detecting Man-In-The-Middle](dwmstatus-mitm.c)
    132 * [Disk usage and execute some check at different moments](diskspace_timechk.c)
    133 * [FIFO info](fifo.c): Replaces dynamic_info.
    134 * [Line per line the content of a file](dynamic_info.c): See
    135   tmpinfo function. It prints line after line the content of
    136   /tmp/dwmbuf.
    137 * [MPD title/artist](mpdstatus.c)
    138 * [Number of new mails in a Maildir](mail_counter.c)
    139 * [Temperature from /sys on Linux](dwmstatus-temperature.c)
    140 * [Uptime](uptime.c)
    141 * [Up-, and downspeeds of all network interfaces from /proc/net on Linux](dwmstatus-netusage.c)
    142 * [Volume via ALSA API](getvol.c)