#!/bin/bash # Color directory CD="$HOME/.Xresources" # Fetch the Colors BG=$(cat ${CD} | grep -i background | tail -c 8) FG=$(cat ${CD} | grep -i foreground | tail -c 8) BLACK=$(cat ${CD} | grep -i color8 | tail -c 8) RED=$(cat ${CD} | grep -i color9 | tail -c 8) GREEN=$(cat ${CD} | grep -i color10 | tail -c 8) YELLOW=$(cat ${CD} | grep -i color11 | tail -c 8) BLUE=$(cat ${CD} | grep -i color12 | tail -c 8) MAGENTA=$(cat ${CD} | grep -i color13 | tail -c 8) CYAN=$(cat ${CD} | grep -i color14 | tail -c 8) WHITE=$(cat ${CD} | grep -i color15 | tail -c 8) # Fonts FONT1="-gohu-gohufont-medium-r-normal--11-80-100-100-c-60-iso8859-1" FONT2="-lucy-tewi-medium-r-normal--11-90-75-75-p-58-iso10646-1" FONT3="-wuncon-siji-medium-r-normal--10-100-75-75-c-80-iso10646-1" FONT4="-benis-lemon-medium-r-normal--10-110-75-75-m-50-iso8859-1" FONT5="-nil-profont-medium-r-normal--10-110-72-72-c-60-iso8859-1" FONT6="-kakwa-kakwafont-medium-r-normal--12-120-72-72-c-60-iso8859-1" # Panel PW=300 PH=48 PX=533 PY=372 echo "%{c} %{A:p:}Shutdown%{A} %{A:r:}Reboot%{A} %{A:s:}Suspend%{A} %{A:b:}Exit%{A} " | lemonbar -g ${PW}x${PH}+${PX}+${PY} -f "$FONT3" -f "$FONT5" -B "$BG" -F "$FG" -dp | \ while :; do read line case $line in 'b') p=$(pgrep -n lemonbar) kill $p exit ;; 's') sudo /usr/sbin/pm-suspend & p=$(pgrep -n lemonbar) kill $p exit ;; 'p') sudo /sbin/shutdown -h now exit ;; 'r') sudo /sbin/shutdown -r now exit ;; esac done