dotfiles

<-- duh.
Log | Files | Refs | LICENSE

commit aa2b60997ff0019efe86aa811ec8d8a686780239
parent 44964ce8b5b62fe070b6a6b9c7f505e40b5893f7
Author: hhvn <dev@hhvn.uk>
Date:   Sat,  1 Jan 2022 19:33:30 +0000

.scripts/dwmblocks --> .scripts/bin/dwmbar

Diffstat:
R.scripts/dwmblocks/README -> .scripts/bin/dwmbar/README | 0
R.scripts/dwmblocks/bat -> .scripts/bin/dwmbar/bat | 0
R.scripts/dwmblocks/cal -> .scripts/bin/dwmbar/cal | 0
R.scripts/dwmblocks/cpu -> .scripts/bin/dwmbar/cpu | 0
A.scripts/bin/dwmbar/dwmbar | 47+++++++++++++++++++++++++++++++++++++++++++++++
R.scripts/dwmblocks/mail -> .scripts/bin/dwmbar/mail | 0
R.scripts/dwmblocks/mem -> .scripts/bin/dwmbar/mem | 0
R.scripts/dwmblocks/net -> .scripts/bin/dwmbar/net | 0
R.scripts/dwmblocks/time -> .scripts/bin/dwmbar/time | 0
R.scripts/dwmblocks/time2 -> .scripts/bin/dwmbar/time2 | 0
R.scripts/dwmblocks/torrent -> .scripts/bin/dwmbar/torrent | 0
R.scripts/dwmblocks/vol -> .scripts/bin/dwmbar/vol | 0
D.scripts/dwmblocks/dwmbar | 51---------------------------------------------------
13 files changed, 47 insertions(+), 51 deletions(-)

diff --git a/.scripts/dwmblocks/README b/.scripts/bin/dwmbar/README diff --git a/.scripts/dwmblocks/bat b/.scripts/bin/dwmbar/bat diff --git a/.scripts/dwmblocks/cal b/.scripts/bin/dwmbar/cal diff --git a/.scripts/dwmblocks/cpu b/.scripts/bin/dwmbar/cpu diff --git a/.scripts/bin/dwmbar/dwmbar b/.scripts/bin/dwmbar/dwmbar @@ -0,0 +1,47 @@ +#!/bin/rc + +cd `{dirname $0} + +mkdir -p /tmp/blocks +fn block { + dwmbar/$1 > /tmp/blocks/$1 & +} + +block vol +while (true) { + block bat + block cpu + block mem + sleep 3 +} & + +while (true) { + block time2 + sleep 1 +} & + +while (true) { + block news + block mail + block rem + block torrent + sleep 20 +} & + +while (true) { + block time + block net + sleep 900 +} & + +mkdir /tmp/dwmblocks +cd /tmp/dwmblocks +while (true) { + sleep 0.1 + for (f in /tmp/blocks/*) { + grep '[[:alnum:]]' < $f >/dev/null && cp $f /tmp/dwmblocks + } + xsetroot -name ``(''){cat bat net torrent cpu mem vol time time2 >[2]/dev/null | + tr -d '\n' | + sed 's/^\[/^f4^/;s~\[~^c#000000^^r0,0,1,50^^d^^f4^~g;s~\]~^f4^~g'} +} diff --git a/.scripts/dwmblocks/mail b/.scripts/bin/dwmbar/mail diff --git a/.scripts/dwmblocks/mem b/.scripts/bin/dwmbar/mem diff --git a/.scripts/dwmblocks/net b/.scripts/bin/dwmbar/net diff --git a/.scripts/dwmblocks/time b/.scripts/bin/dwmbar/time diff --git a/.scripts/dwmblocks/time2 b/.scripts/bin/dwmbar/time2 diff --git a/.scripts/dwmblocks/torrent b/.scripts/bin/dwmbar/torrent diff --git a/.scripts/dwmblocks/vol b/.scripts/bin/dwmbar/vol diff --git a/.scripts/dwmblocks/dwmbar b/.scripts/dwmblocks/dwmbar @@ -1,51 +0,0 @@ -#!/bin/sh - -cd $(dirname $0) - -mkdir -p /tmp/blocks -block(){ - $HOME/.scripts/dwmblocks/$1 > /tmp/blocks/$1 & -} - -block vol -while true -do - block bat - block cpu - block mem - sleep 3 -done & - -while true -do - block time2 - sleep 1 -done & - -while true -do - block news - block mail - block rem - block torrent - sleep 20 -done & - -while true -do - block time - block net - sleep 900 -done & - -mkdir /tmp/dwmblocks -cd /tmp/dwmblocks -while true -do - sleep 0.1 - for f in /tmp/blocks/* - do - grep '[[:alnum:]]' < $f >/dev/null && cp $f /tmp/dwmblocks - done - xsetroot -name "$(cat bat net torrent cpu mem vol time time2 2>/dev/null | tr -d '\n' | sed 's/^\[/^f4^/;s~\[~^c#000000^^r0,0,1,50^^d^^f4^~g;s~\]~^f4^~g')" -done