diff options
author | InigoGutierrez <inigogf.95@gmail.com> | 2020-05-17 14:41:53 +0200 |
---|---|---|
committer | InigoGutierrez <inigogf.95@gmail.com> | 2020-05-17 14:41:53 +0200 |
commit | 4e7cf6c285f1e932a04e16cf144917333b78e579 (patch) | |
tree | d65cf35abcccc73c25e2e16953b888dc8b99a266 /i3blocks | |
parent | 1ce6627eb3c82b110eb24a28fa7697e271c21ffa (diff) | |
download | scripts-4e7cf6c285f1e932a04e16cf144917333b78e579.tar.gz scripts-4e7cf6c285f1e932a04e16cf144917333b78e579.zip |
i3blocks: short mem text and fixed exit when cmus not running.
Diffstat (limited to 'i3blocks')
-rwxr-xr-x | i3blocks/i3mem.sh | 1 | ||||
-rwxr-xr-x | i3blocks/i3music.sh | 2 |
2 files changed, 2 insertions, 1 deletions
diff --git a/i3blocks/i3mem.sh b/i3blocks/i3mem.sh index 3e1447e..fc7b94d 100755 --- a/i3blocks/i3mem.sh +++ b/i3blocks/i3mem.sh @@ -6,3 +6,4 @@ $(ps axch -o cmd:18,%mem --sort=-%mem | sed 10q)" ;; esac free -h | awk '/^Mem/ {print $3 "/" $2}' +free -h | awk '/^Mem/ {print $3}' diff --git a/i3blocks/i3music.sh b/i3blocks/i3music.sh index bb646b9..d446b50 100755 --- a/i3blocks/i3music.sh +++ b/i3blocks/i3music.sh @@ -8,7 +8,7 @@ esac symbol=🎵 ampersand='and' # & in echo messes up script -pgrep -x cmus >/dev/null || (echo "" && exit 0) +pgrep -x cmus >/dev/null || exit 0 stat="$(cmus-remote -Q | grep "^status " | awk '{print $2}' | sed "s/&/$ampersand/")" artist="$(cmus-remote -Q | grep "^tag artist " | cut -d' ' -f3- | sed "s/&/$ampersand/")" title="$(cmus-remote -Q | grep "^tag title " | cut -d' ' -f3- | sed "s/&/$ampersand/")" |