dotfiles/.local/bin/dwmbar

34 lines
538 B
Bash
Executable File

#!/bin/bash
DELIM=" "
DELIM_START=0
status() {
strt=0
[ $DELIM_START -eq 1 ] && strt=1
for FILE in $(ls ~/.local/scripts)
do
res=$(sh ~/.local/scripts/$FILE)
if [ $strt -eq 0 ]
then
strt=1
echo "$res"
else
echo "$DELIM$res"
fi
done
}
time=$(date +"%s")
while true
do
if [ $(($time - $(date +"%s"))) -lt 0 ]
then
stat=$(status | tr -d '\n')
xprop -root -set WM_NAME "$stat"
time=$(date +"%s")
fi
done