-
-
Save b4dtR1p/0a303d89722966359900 to your computer and use it in GitHub Desktop.
lemonbar config
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# SETTINGS | |
FONT="-shdw-candy-*-*-*--11-*-*-*-*-*-*-*" | |
RES="1366x14" | |
BG="#080608" | |
FG="#E8EAEC" | |
BLK="#525252" | |
RED="#A35656" | |
GRN="#A3A356" | |
YLW="#DD7733" | |
BLU="#567DA3" | |
MAG="#908C9C" | |
CYN="#56A3A3" | |
BYLW="#EECC55" | |
function statusbar { | |
function desk() { | |
CUR=$(xprop -root _NET_CURRENT_DESKTOP | awk '{print $3}') | |
case $CUR in | |
0) echo "%{F$RED}%{R} %{R}%{F-}%{F$BYLW} %{F-}%{F$BYLW} %{F-}";; | |
1) echo "%{F$BYLW} %{F-}%{F$RED}%{R} %{R}%{F-}%{F$BYLW} %{F-}";; | |
2) echo "%{F$BYLW} %{F-}%{F$BYLW} %{F-}%{F$RED}%{R} %{R}%{F-}";; | |
*) echo "" | |
esac | |
} | |
function music() { | |
mus=$(mpc -f %artist% current) | |
song=$(mpc -f %title% current) | |
if [[ $mus ]]; then | |
echo %{F$BLU}%{R} %{R} $mus %{F$YLW}$song%{F-} | |
else | |
echo %{F$BLK}%{R} %{R}%{F-} | |
fi | |
} | |
function temperature() { | |
temp=$(sensors | grep "Physical id 0" | cut -d'+' -f2 | head -c2) | |
if [[ $temp < 80 ]]; then | |
echo %{F$CYN}%{R} %{R} $temp %{F-} | |
else | |
echo %{F$RED}%{R} %{R} $temp %{F-} | |
fi | |
} | |
function life() { | |
bat=$(cat /sys/class/power_supply/BAT1/capacity) | |
echo %{F$GRN}%{R} %{R} $bat %{F-} | |
} | |
function clock() { | |
time=$(date "+%a %d %b %R") | |
echo %{F$MAG}%{R} %{R} $time %{F-} | |
} | |
echo "$(desk)$(music)%{r}$(temperature)$(life)$(clock) " | |
} | |
while :; do | |
echo $(statusbar) | |
sleep 0.1 | |
done | lemonbar -f ${FONT} -g ${RES} -B ${BG} -F ${FG} & |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment