index.md - sites - public wiki contents of suckless.org | |
git clone git://git.suckless.org/sites | |
Log | |
Files | |
Refs | |
--- | |
index.md (9187B) | |
--- | |
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 Alternatively, instead of xsetroot also xprop can be used to set the | |
14 status-bar-text. | |
15 | |
16 xprop -root -set WM_NAME $status | |
17 | |
18 Set The Status Using A Shell Script | |
19 ----------------------------------- | |
20 while true; do | |
21 xsetroot -name "$(date)" | |
22 sleep 2 | |
23 done | |
24 | |
25 Set The Status Using Other Methods | |
26 ---------------------------------- | |
27 There are two status monitors maintained at suckless: | |
28 | |
29 slstatus - suckless status | |
30 -------------------------- | |
31 A somewhat complex status monitor which includes all batteries. | |
32 | |
33 You can read more [on the project page](//tools.suckless.org/slstatus/). | |
34 | |
35 dwmstatus | |
36 --------- | |
37 Barebone status monitor with basic functions written in C. This follows … | |
38 suckless philosophy, to give you an easy way to extend the source code t… | |
39 needs. See the helper functions for C below, to extend it to your needs.… | |
40 check it out and keep on hacking. | |
41 | |
42 git clone git://git.suckless.org/dwmstatus | |
43 cd dwmstatus | |
44 make | |
45 make PREFIX=/usr install | |
46 # add »dwmstatus 2>&1 >/dev/null &« to your .xinitrc | |
47 | |
48 Status Monitors Submitted By Others | |
49 ----------------------------------- | |
50 Feel free to add your own status monitors here (keeping the list sorted). | |
51 | |
52 * [akuma-v-dwm](https://gitlab.com/narvin/avd) - event driven, modular, | |
53 and extensible with date/time, all batteries, volume (amixer), backlig… | |
54 memory and cpu usage out of the box. | |
55 * [babashka-status-bar](https://github.com/perpen/babashka-status-bar) -… | |
56 status bar for dwm/tmux/etc, written in clojure. Supports external tri… | |
57 * [barM](barM.c) - can display all, time/date, ram usage, output of comm… | |
58 * [dsblocks](https://github.com/ashish-yadav11/dsblocks) - modular status | |
59 monitor, written and meant to be configured in C, with support for sig… | |
60 clickability, cursor hinting and color. | |
61 * [dstat](https://www.umaxx.net/dl) | |
62 [Screenshot](https://www.umaxx.net/dstat.png) - displays the current n… | |
63 throughput, CPU usage, performance settings, battery status, temperatu… | |
64 volume settings, as well as the current date and time (OpenBSD only, n… | |
65 for Linux). | |
66 * [dwm-bar](https://github.com/joestandring/dwm-bar) - modular status ba… | |
67 modules for date/time, alsa volume, cmus track, countdown timer, | |
68 current keyboard layout, mail count, system resources, and weather. | |
69 * [dwmblocks](https://github.com/torrinfail/dwmblocks) - i3blocks-like | |
70 status bar where you can refresh each "block" independently by update … | |
71 or signal. | |
72 * [dwmblocks](https://github.com/ashish-yadav11/dwmblocks) - rewrite of | |
73 dwmblocks with added features including clickability, cursor hinting a… | |
74 color. | |
75 * [dwmblocks-async](https://github.com/UtkarshVerma/dwmblocks-async) - A… | |
76 dwmblocks with support for clickability. Unlike dwmblocks, each block … | |
77 asynchronously so that the status bar never goes stale when a block ta… | |
78 * [dwms](https://github.com/ianremmler/dwms) - displays time, network, a… | |
79 and battery status, written in Go using XGB. | |
80 * [dwmsd](https://github.com/johnko/dwmsd) - a daemon that listens on lo… | |
81 tcp (may be useful as a base for asynchronous updates) | |
82 * [dwm-sss](https://github.com/roadkillcat/dwm_sss) - shell script provi… | |
83 date, time and CPU temperature | |
84 * [dwmstat](https://notabug.org/kl3/dwmstat) - small and simple | IP, CPU | |
85 temperature, system volume, current local time (and more) | config.h |… | |
86 * [estadobar](https://lee-phillips.org/estadobarpage/) - Volume, CPU loa… | |
87 colored icon warnings on high temperature, high load, and low or charg… | |
88 'statuscolors' patch; written in Python. | |
89 * [goblocks](https://github.com/Stargarth/Goblocks) - Partially inspired… | |
90 Go status bar that allows you to refresh each block independently. Inc… | |
91 features for frequently refreshed blocks. | |
92 * [gocaudices](https://github.com/lordrusk/gocaudices) - dwmblocks alter… | |
93 Gocaudices is a dwmblocks replacement meant to be simple, fast, and el… | |
94 adhere to the suckless philosophy. | |
95 * [go-dwmstatus](https://github.com/oniichaNj/go-dwmstatus) - A Go bar t… | |
96 prints current MPD song, load averages, time/date and battery percenta… | |
97 * [gods](https://github.com/schachmat/gods) - implemented in Go. prints … | |
98 speed, cpu, ram, date/time | |
99 * [integrated-status-text](../patches/integrated-status-text) - A patch … | |
100 dwm itself handle the blocks asynchronously: this way we can handle mo… | |
101 clicks, colors, etc. much easier. | |
102 * [mblocks](https://gitlab.com/mhdy/mblocks) - A multi-threaded, memory-… | |
103 * [modbar](https://github.com/shirozuki/modbar) - A modular status bar. … | |
104 * [mtstatus](https://gitlab.com/mhdy/mtstatus) - A multi-threaded status… | |
105 * [profil-dwmstatus-1.0.c](profil-dwmstatus-1.0.c) - cpufreq, battery pe… | |
106 and date/time | |
107 * [rsblocks](https://github.com/MustafaSalih1993/rsblocks) - A fast mult… | |
108 * [sb](https://git.ckyln.com/sb/log.html) - another modular bar written … | |
109 shell | |
110 * [sdwmbar](https://github.com/sakhmatd/sdwmbar) - Simple DWM Bar writte… | |
111 pure C; written for FreeBSD and OpenBSD, can be easily modified to wor… | |
112 Linux | |
113 * [spoon](https://git.2f30.org/spoon/) - set dwm status. Supports batter… | |
114 cpu freq, date, file, load avg, keyboard layout, mpd, network speed, | |
115 screen brightness, temperature, wifi, volume mixer. | |
116 Works well on OpenBSD and Linux. | |
117 * [suspend-statusbar.c](https://github.com/snobb/dwm-statusbar) - date, | |
118 loadavg, battery and more. If battery goes below threshold - run suspe… | |
119 command | |
120 * [sysmon](https://github.com/blmayer/sysmon) - Net in/out, mem, swap, C… | |
121 date info. Written in go using xgb and xproto to not spawn other proce… | |
122 * [zara](https://github.com/lordrusk/zara) - Extremely simple status bar… | |
123 * [ztatus](https://git.noxz.tech/ztatus/log.html) - simple statusbar and | |
124 notification daemon (through fifo). Displays only date and time normal… | |
125 Configured to work with 'statuscolors' patch by default. | |
126 | |
127 Helper Functions In The Shell | |
128 ----------------------------- | |
129 * [posix scripts](https://notabug.org/kl3/scripts) - basic collection of… | |
130 * [i3blocks-contrib](https://github.com/vivien/i3blocks-contrib) - colle… | |
131 * Free memory: `free -h | awk '(NR==2){ print $4 }'` | |
132 * Volume (device Master): `amixer get Master | awk -F'[][]' 'END{ print … | |
133 * Keyboard layout: `setxkbmap -query | awk '/layout/{ print $2 }'` | |
134 * Empty disk space (mountpoint /home): `df -h | awk '{ if ($6 == "/home"… | |
135 * wifi status (interface wlp3s0): `cat /sys/class/net/wlp3s0/operstate` | |
136 * CPU temperature: `sed 's/000$/°C/' /sys/class/thermal/thermal_zone0/t… | |
137 Alternatively you can use `acpi -t` or `sensors` from lm-sensors packa… | |
138 older systems you can get the cpu temperature from | |
139 `/proc/acpi/thermal_zone/THM0/temperature` | |
140 * Remaining battery: `cat /sys/class/power_supply/BAT0/capacity`. Altern… | |
141 you can use `acpi -b`. For older systems you can get the battery capac… | |
142 `/proc/acpi/battery/BAT0/state`. | |
143 | |
144 Using shell scripts very well leads to big scripts, which pull in unneed… | |
145 dependencies. One solution for this is to write everything in C, which i… | |
146 more efficient. | |
147 | |
148 Helper Functions In C (for dwmstatus or slstatus etc.) | |
149 ------------------------------------------------------ | |
150 If you have simple C functions for gathering system information, feel fr… | |
151 add them here (keeping the list sorted). | |
152 | |
153 * [ACPI battery status on Linux](new-acpi-battery.c) | |
154 * [Battery on Linux](batterystatus.c): Battery percentage and status. + … | |
155 charging, - if discharging, = if full. | |
156 * [Detecting Man-In-The-Middle](dwmstatus-mitm.c) | |
157 * [Disk usage and execute some check at different moments](diskspace_tim… | |
158 * [FIFO info](fifo.c): Replaces dynamic_info. | |
159 * [Line per line the content of a file](dynamic_info.c): See | |
160 tmpinfo function. It prints line after line the content of | |
161 /tmp/dwmbuf. | |
162 * [MPD title/artist](mpdstatus.c) | |
163 * [Number of new mails in a Maildir](mail_counter.c) | |
164 * [Temperature from /sys on Linux](dwmstatus-temperature.c) | |
165 * [Uptime](uptime.c) | |
166 * [Up-, and downspeeds of all network interfaces from /proc/net on Linux… | |
167 * [Volume via ALSA API](getvol.c) |