diff --git a/programs/xmonad/xmobar/scripts/cbr.sh b/programs/xmonad/xmobar/scripts/cbr.sh index 85f0a46..bc7d02c 100755 --- a/programs/xmonad/xmobar/scripts/cbr.sh +++ b/programs/xmonad/xmobar/scripts/cbr.sh @@ -14,12 +14,15 @@ cc=($(curl --no-progress-meter "https://www.cbr.ru/scripts/XML_dynamic.asp?date_ sed -e "s/,/./g")) diff=$(echo ${cc[-2]} ${cc[-1]} | awk '{ print $1 - $2 }') +arror="↑" color='#50fa7b' if [ ${diff:0:1} == '-' ]; then + diff=${diff:1} + arror="↓" color='#ff5555' fi -echo "${cc[-1]} ($diff)" +echo "${cc[-1]} (${arror}${diff})" exit 0 diff --git a/programs/xmonad/xmobar/src/xmobar.hs b/programs/xmonad/xmobar/src/xmobar.hs index 311fcba..c61f98b 100644 --- a/programs/xmonad/xmobar/src/xmobar.hs +++ b/programs/xmonad/xmobar/src/xmobar.hs @@ -104,11 +104,6 @@ colorGreen = "#50fa7b" colorYellow = "#f1fa8c" colorCyan = "#8be9fd" -cyan, green, yellow :: String -> String -cyan = xmobarColor colorCyan "" -green = xmobarColor colorGreen "" -yellow = xmobarColor colorYellow "" - regularFont, boldFont :: Int -> String regularFont size = "xft:Fira Code:size=" <> show size <> ":antialias=true" boldFont size = "xft:Fira Code:bold:size=" <> show size <> ":antialias=true"