-
Notifications
You must be signed in to change notification settings - Fork 26
/
Copy pathtmuxline
executable file
·40 lines (30 loc) · 1.08 KB
/
tmuxline
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
#!/bin/sh
LSEP="◀"
LSEPE=
RSEP="◀"
RSEPE="◀"
CLOCK=⌚
CALENDAR=☼
MUSIC=♫
CPUIMG=⎈
# WIDTH=${1}
WIDTH=120
SMALL=80
MEDIUM=110
# if [ "$WIDTH" -gt "$MEDIUM" ]; then
# MPD="#[fg=colour252,bg=default,nobold,noitalics,nounderscore]$RSEP#[fg=colour16,bg=colour252,bold,noitalics,nounderscore] $MUSIC $(mpc current)"
# date_colour='colour252'
# fi
SPECIAL_CHAR=""
if [ "$IS_SIMPLE_FONT" -eq "1" ] ; then
SPECIAL_CHAR=" "
fi
if [ "$WIDTH" -gt "$MEDIUM" ]; then
PROC="#[fg=colour240,bg=colour238,nobold,noitalics,nounderscore]${SPECIAL_CHAR}#[fg=colour16,bg=colour240,bold,noitalics,nounderscore]$(uptime | rev | cut -d":" -f1 | rev | sed s/,\ /\ /g | sed s/,/./g)"
date_colour='colour252'
fi
if [ "$WIDTH" -ge "$SMALL" ]; then
UNAME="#[fg=colour160,bg=colour240,nobold,noitalics,nounderscore]${SPECIAL_CHAR}#[fg=colour16,bg=colour160,bold,noitalics,nounderscore] $(uname -n)"
fi
TIME="#[fg=colour238,bg=colour234,nobold,noitalics,nounderscore]${SPECIAL_CHAR}#[fg=colour252,bg=colour238,bold,noitalics,nounderscore] $(date +'%H:%M')"
echo "$TIME $PROC $UNAME" | sed 's/ *$/ /g'