# wmsl contrib scripts This directory contains useful system monitoring scripts for use with wmsl. ## Available Scripts - **wmsl-battery** - Battery status and percentage - **wmsl-cpu** - CPU usage percentage - **wmsl-memory** - Memory usage (used/total) - **wmsl-disk** - Disk usage for root filesystem - **wmsl-time** - Current date and time - **wmsl-ip** - IP address of primary network interface - **wmsl-volume** - Audio volume level (requires alsa-utils) - **wmsl-load** - System load average - **wmsl-temp** - CPU temperature - **wmsl-wifi** - WiFi SSID and signal strength (requires iw) ## Installation Copy the scripts you want to use to a directory in your PATH, such as `~/.local/bin`: ```sh cp contrib/wmsl-* ~/.local/bin/ chmod +x ~/.local/bin/wmsl-* ``` ## Configuration Example Create or edit `~/.config/wmsl/wmslrc`: ``` delim= | prefix= suffix= block=wmsl-ip block-id=3 block-sleep=60 block=wmsl-memory block-id=4 block-sleep=5 block=wmsl-cpu block-id=5 block-sleep=2 block=wmsl-battery block-id=2 block-sleep=10 block=wmsl-time block-id=1 block-sleep=1 ``` ## Triggering Updates Use `sigwmsl` to manually trigger updates for specific blocks: ```sh sigwmsl 2 # Update battery sigwmsl 1 # Update time ``` This is useful for responding to events like volume changes or battery alerts. ## Creating Custom Scripts Scripts should: - Output a single line of text - Be executable (`chmod +x`) - Exit quickly (preferably under 100ms) - Handle errors gracefully Example custom script: ```sh #!/bin/sh printf "Hello %s" "$USER" ```