From 2ace04e247de492f756967b927e6a785bce43ce4 Mon Sep 17 00:00:00 2001 From: Armaan Bhojwani Date: Fri, 18 Jun 2021 18:05:54 -0400 Subject: [PATCH] dwmsetroot: new script --- dwmsetroot | 10 ++++++++++ man/dwmsetroot.1.scd | 14 ++++++++++++++ 2 files changed, 24 insertions(+) create mode 100755 dwmsetroot create mode 100644 man/dwmsetroot.1.scd diff --git a/dwmsetroot b/dwmsetroot new file mode 100755 index 0000000..f27749e --- /dev/null +++ b/dwmsetroot @@ -0,0 +1,10 @@ +#!/usr/bin/env sh + +while (true); do + date=$(date "+%A %Y-%m-%d %I:%M:%S %p") + charge=$(cat /sys/class/power_supply/BAT0/capacity) + status=$(cat /sys/class/power_supply/BAT0/status) + volume=$(amixer sget Master | awk -F"[][]" '/dB/ { print $2 ", " $6 }') + xsetroot -name "[${charge}%, ${status}] [${volume}] [${date}]" + sleep 1 +done diff --git a/man/dwmsetroot.1.scd b/man/dwmsetroot.1.scd new file mode 100644 index 0000000..adf40d2 --- /dev/null +++ b/man/dwmsetroot.1.scd @@ -0,0 +1,14 @@ +dwmsetroot(1) + +# NAME +dwmsetroot - simple dwm status bar + +# SYNOPSIS +*dwmsetroot* + +# DESCRIPTION +Dead simple status bar for dwm. Shows battery level, volume, and time/date. + +# COPYRIGHT +This is free and unencumbered software released into the public domain. For more +information, please refer to . \ No newline at end of file -- 2.39.2