From 7f0137d734865e167a020a6cc651871b398ed7da Mon Sep 17 00:00:00 2001 From: alejandrogs73 Date: Mon, 28 Sep 2026 12:28:04 +0200 Subject: [PATCH] README: apartado propio para la barra y sus clics Co-Authored-By: Claude Opus 5.5 Claude-Session: https://claude.ai/code/session_01C5v1qWDwgkaVM5kjVHGGh8 --- README-en.md | 31 ++++++++++++++++++++++--------- README.md | 31 ++++++++++++++++++++++--------- 2 files changed, 44 insertions(+), 18 deletions(-) diff --git a/README-en.md b/README-en.md index fdeb02d..12ee707 100644 --- a/README-en.md +++ b/README-en.md @@ -144,18 +144,31 @@ slstatus and shows a notification with the level. The script menus (`apagado`, `bluetooth`, `volumen salida`...) use `menu`, which is dmenu with the dwm font and colours. -### Bar clicks - -| Area | Left | Middle | Right | Wheel | -|---|---|---|---|---| -| Network | Connect to a network (`wifi`) | | `wpa_cli` | | -| VOL | Pick the audio output (`volumen salida`) | Mute | Mute the mic | Volume ± | -| BT | Bluetooth menu (`bluetooth`): connect, disconnect, scan and pair, power off | | Power on or off | | -| Date | This month's calendar | | | | - Screenshots are saved in `~/Images/Screenshots`, copied to the clipboard and shown in a notification. +## Bar (slstatus) + + [ CPU: 12% ] [ RAM: 40% ] [ WiFi: Livebox6 ] [ BAT: 80% + ] [ VOL: 50% ] [ BT: OFF ] [ 28/09/26 12:30 ] + +The network, VOL, BT and date blocks are clickable (dwm's `statuscmd` +patch). What each click does is in `statuscmds`, in `suckless/dwm/config.h`, +and which area is which is marked by the `\001`...`\004` bytes in +`suckless/slstatus/config.h`. + +| Block | Shows | Left | Middle | Right | Wheel | +|---|---|---|---|---|---| +| CPU, RAM | Usage in % | | | | | +| Network | `ETH` on cable; otherwise `WiFi:` and the network | `wifi` menu: networks by signal, connect, ask for and save the password | | `wpa_cli` in a floating st | | +| BAT | Percentage and state (`+` charging, `-` discharging) | | | | | +| VOL | Volume; `MUT` if muted, `MIC OFF` if the mic is | Pick the audio output (`volumen salida`) | Mute | Mute the mic | Up / down | +| BT | `OFF`, or the connected device | `bluetooth` menu: connect, disconnect, scan and pair, power off | | Power on or off | | +| Date | Day and time | This month's calendar (`calendario`) | | | | + +After changing dwm's `config.h`, reinstall and restart it for new clicks to +work: `pkill -HUP dwm` restarts it without closing windows (restartsig and +preserveonrestart patches). + ## Session - Logging in on tty1 starts `startx` automatically (`.bash_profile`); other diff --git a/README.md b/README.md index d8ae132..2eaa5f4 100644 --- a/README.md +++ b/README.md @@ -142,18 +142,31 @@ y muestra una notificación con el nivel. Los menús de los scripts (`apagado`, `bluetooth`, `volumen salida`...) usan `menu`, que es dmenu con la fuente y los colores de dwm. -### Clics en la barra - -| Zona | Izquierdo | Central | Derecho | Rueda | -|---|---|---|---|---| -| Red | Conectarse a una red (`wifi`) | | `wpa_cli` | | -| VOL | Elegir la salida de audio (`volumen salida`) | Silenciar | Silenciar el micro | Volumen ± | -| BT | Menú de bluetooth (`bluetooth`): conectar, desconectar, buscar y emparejar, apagar | | Encender o apagar | | -| Fecha | Calendario del mes | | | | - Las capturas se guardan en `~/Images/Screenshots`, se copian al portapapeles y muestran una notificación. +## Barra (slstatus) + + [ CPU: 12% ] [ RAM: 40% ] [ WiFi: Livebox6 ] [ BAT: 80% + ] [ VOL: 50% ] [ BT: OFF ] [ 28/09/26 12:30 ] + +Los bloques de red, VOL, BT y fecha se pueden pulsar (parche `statuscmd` de +dwm). Lo que hace cada clic está en `statuscmds`, en `suckless/dwm/config.h`, +y qué zona es cada una lo marcan los bytes `\001`...`\004` de +`suckless/slstatus/config.h`. + +| Bloque | Muestra | Izquierdo | Central | Derecho | Rueda | +|---|---|---|---|---|---| +| CPU, RAM | Uso en % | | | | | +| Red | `ETH` con cable; si no, `WiFi:` y la red | Menú `wifi`: redes por señal, conectar, pedir y guardar la contraseña | | `wpa_cli` en una st flotante | | +| BAT | Porcentaje y estado (`+` cargando, `-` descargando) | | | | | +| VOL | Volumen; `MUT` si está silenciado, `MIC OFF` si el micro lo está | Elegir la salida de audio (`volumen salida`) | Silenciar | Silenciar el micro | Subir / bajar | +| BT | `OFF`, o el dispositivo conectado | Menú `bluetooth`: conectar, desconectar, buscar y emparejar, apagar | | Encender o apagar | | +| Fecha | Día y hora | Calendario del mes (`calendario`) | | | | + +Si se cambia el `config.h` de dwm, hay que reinstalarlo y reiniciarlo para +que los clics nuevos funcionen: `pkill -HUP dwm` lo relanza sin cerrar las +ventanas (parches restartsig y preserveonrestart). + ## Sesión - Al entrar en tty1 se lanza `startx` solo (`.bash_profile`); en las demás