tChanged status bar script content - scripts - various script and utils
(HTM) git clone git://z3bra.org/scripts
(DIR) Log
(DIR) Files
(DIR) Refs
---
(DIR) commit 732d6ffb84c4735eee0383f5c58917052573c175
(DIR) parent 91aa76b20a26f49acebcfbe36a907fcebc8eca65
(HTM) Author: Willy Goiffon <w.goiffon@gmail.com>
Date: Tue, 1 Oct 2013 08:21:08 +0200
Changed status bar script content
Diffstat:
M bar/config.sh | 6 +++---
M bar/status.sh | 13 ++++++++++---
2 files changed, 13 insertions(+), 6 deletions(-)
---
(DIR) diff --git a/bar/config.sh b/bar/config.sh
t@@ -56,7 +56,7 @@ i_fans='FAN'
i_musk='MPD'
i_alsa='VOL'
i_mail='MSG'
-i_time="$(date '+%d/%m')" # clock
+i_time='CLK'
# workspace icons / names (α β γ δ ε ζ η θ ι κ λ)
# i_trm=$(echo -e '\ue09f') # default
t@@ -84,7 +84,7 @@ i_far=$(echo -e 'ALL')
dskp_tag=('' $i_trm $i_web $i_dev $i_com $i_fun $i_sys $i_wrk $i_meh $i_far)
# now playing format
-mpc_format='[[%artist% - ]%title%]|[%file%]'
+mpc_format='[%title% ]|[%file%]'
# volume channel
alsa_channel='Master'
t@@ -96,7 +96,7 @@ net_wifi='enp3s0'
net_interface=$net_wire
# Only the time ? with seconds ? Maybe the current year...?
-date_format="%H:%M"
+date_format="%H.%M"
# used to get current workspace
wm_lib_xcb="XCB" # DO NOT MODIFY
(DIR) diff --git a/bar/status.sh b/bar/status.sh
t@@ -60,7 +60,9 @@ function groups() {
}
function mails () {
- val=$(~/bin/mailcount)
+ new=$(~/bin/mcount ~/var/mail/INBOX/new/)
+ cur=$(~/bin/mcount ~/var/mail/INBOX/cur/)
+ val="$new/$cur"
ico=${i_mail}
display "$val" "$ico"
t@@ -68,9 +70,13 @@ function mails () {
function mpd_now_playing () {
val=$(mpc current --format "$mpc_format" 2>/dev/null)
- [[ -z $val ]] && val="mute"
ico=${i_musk}
+ if [[ -z $val ]]; then
+ val=''
+ ico=''
+ fi
+
display "$val" "$ico"
}
t@@ -162,6 +168,7 @@ function network () {
function clock () {
val=$(date +${date_format})
+ #val=$((100*$(date +%H%M)/2400)) # Give the time in percentage
ico=${i_time}
display "$val" "$ico"
t@@ -169,7 +176,6 @@ function clock () {
function fillbar () {
buffer="\b${bg}\f${fg}\l\u${bg} "
- buffer="$buffer$(volume) ${sp}"
buffer="$buffer$(mpd_now_playing) "
buffer="$buffer\c"
buffer="$buffer$(groups) "
t@@ -180,6 +186,7 @@ function fillbar () {
#buffer="$buffer$(processes) ${sp}"
#buffer="$buffer$(gputemp) ${sp}"
buffer="$buffer$(gpufanspeed) ${sp}"
+ buffer="$buffer$(volume) ${sp}"
#buffer="$buffer$(packages) ${sp}"
buffer="$buffer$(clock)"
buffer="$buffer "