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