From 7494330d7fa7fdd47f8cf3761ed9c9c008f0b5cd Mon Sep 17 00:00:00 2001 From: Sergey Matveev Date: Tue, 2 Feb 2021 12:01:37 +0300 Subject: [PATCH] Separate flags directory --- bin/bin/xstatusbar.sh | 4 ++-- zsh/.zprofile | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/bin/bin/xstatusbar.sh b/bin/bin/xstatusbar.sh index f2baf51..17a1b77 100755 --- a/bin/bin/xstatusbar.sh +++ b/bin/bin/xstatusbar.sh @@ -2,11 +2,11 @@ while :; do life=$(apm -l) - [ -e /tmp/do-fdm ] && fdm_state="FM" || fdm_state="" + flags="$(ls /tmp/stargrave-flags | perl -e 'print join " ", sort map { chomp and $_ } <>')" topinfo=$(top -b -d 1 0 | sed s/[,:]//g) meminfo=$(echo "$topinfo" | grep "^Mem") arcinfo=$(echo "$topinfo" | grep "^ARC") swpinfo=$(echo "$topinfo" | perl -ne 'print $1 if /^Swap \w+ Total (\w+) Used/') - xsetroot -name "$swpinfo $meminfo $arcinfo $fdm_state $life% $(date "+%Y-%m-%dT%H:%M:%S")" + xsetroot -name "$swpinfo $meminfo $arcinfo [$flags] $life% $(date "+%Y-%m-%dT%H:%M:%S")" sleep 20 done diff --git a/zsh/.zprofile b/zsh/.zprofile index b03fea0..cec7998 100644 --- a/zsh/.zprofile +++ b/zsh/.zprofile @@ -1,4 +1,4 @@ umask 077 -mkdir -p /tmp/stargrave-xdg /tmp/stargrave-lldb +mkdir -p /tmp/stargrave-xdg /tmp/stargrave-lldb /tmp/stargrave-flags env | grep -q XAUTH || ~/bin/rem ~/bin/cleanup.sh -- 2.44.0