From b7487a098cc140448a633e763d1e7dd2fd087653 Mon Sep 17 00:00:00 2001 From: Vidhu Kant Sharma Date: Fri, 25 Dec 2020 20:58:03 +0530 Subject: moved lemonbar to different folder --- herbstluftwm/bar/functions/sysinfo | 48 ---------------------------------- herbstluftwm/bar/functions/volume_info | 3 --- herbstluftwm/bar/functions/weather | 21 --------------- herbstluftwm/bar/launch | 11 -------- herbstluftwm/bar/sysinfo_bar | 25 ------------------ herbstluftwm/bar/ws_bar | 25 ------------------ 6 files changed, 133 deletions(-) delete mode 100755 herbstluftwm/bar/functions/sysinfo delete mode 100755 herbstluftwm/bar/functions/volume_info delete mode 100755 herbstluftwm/bar/functions/weather delete mode 100755 herbstluftwm/bar/launch delete mode 100755 herbstluftwm/bar/sysinfo_bar delete mode 100755 herbstluftwm/bar/ws_bar (limited to 'herbstluftwm/bar') diff --git a/herbstluftwm/bar/functions/sysinfo b/herbstluftwm/bar/functions/sysinfo deleted file mode 100755 index a377c600..00000000 --- a/herbstluftwm/bar/functions/sysinfo +++ /dev/null @@ -1,48 +0,0 @@ -#!/bin/zsh - -date_time() { - datetime=$(date +"%d %b(%A) %H:%M") - echo $datetime -} - -cpu_load() { - read cpu a b c previdle rest < /proc/stat - prevtotal=$((a+b+c+previdle)) - sleep 0.5 - read cpu a b c idle rest < /proc/stat - total=$((a+b+c+idle)) - cpu=$((100*( (total-prevtotal) - (idle-previdle) ) / (total-prevtotal) )) - echo -e "CPU: $cpu%" -} - -cpu_temp() { - CEL=$'\xc2\xb0C' - temp=$( cat /sys/devices/virtual/thermal/thermal_zone0/temp ) - temp=`expr $temp / 1000` - echo "TEMP: " $temp$CEL -} - -root_usage() { - root=$(df -h / | awk 'NR==2 {print $4 "/" $2}') - echo "ROOT: "$root -} - -home_usage() { - home=$(df -h /home | awk 'NR==2 {print $4 "/" $2}') - echo "HOME: "$home -} - -mem_usage() { - mem=$(free -m | grep Mem: | awk '{print$3 / $2 * 100}') - printf "MEM: %.0f %%" $mem -} - -while :; do - echo $(date_time) > /home/zt/.cache/lemon/clock - echo $(cpu_load) > /home/zt/.cache/lemon/cpu_load - echo $(cpu_temp) > /home/zt/.cache/lemon/cpu_temp - echo $(root_usage) > /home/zt/.cache/lemon/disk_root - echo $(home_usage) > /home/zt/.cache/lemon/disk_home - echo $(mem_usage) > /home/zt/.cache/lemon/mem - sleep 3 -done diff --git a/herbstluftwm/bar/functions/volume_info b/herbstluftwm/bar/functions/volume_info deleted file mode 100755 index e5d06f8d..00000000 --- a/herbstluftwm/bar/functions/volume_info +++ /dev/null @@ -1,3 +0,0 @@ -#!/bin/zsh - -echo $(pamixer --get-volume-human) > /home/zt/.cache/lemon/volume diff --git a/herbstluftwm/bar/functions/weather b/herbstluftwm/bar/functions/weather deleted file mode 100755 index df6cf24b..00000000 --- a/herbstluftwm/bar/functions/weather +++ /dev/null @@ -1,21 +0,0 @@ -#!/bin/zsh - -get_current_temp() { - if [ $stat = "Smoke" ] || [ $stat = "Sunny" ]; then - temp=$(curl wttr.in | grep °C | awk 'NR==1 {print $4 "°C"}' | sed -r "s/\x1B\[(([0-9]+)(;[0-9]+)*)?[m,K,H,f,J]//g") - else - temp=$(curl wttr.in | grep °C | awk 'NR==1 {print $9 "°C"}' | sed -r "s/\x1B\[(([0-9]+)(;[0-9]+)*)?[m,K,H,f,J]//g") - fi - - echo $temp -} - -get_current_weather() { - stat=$(curl wttr.in | awk 'NR==3 {print $1}') - echo $(get_current_temp)"("$stat")" -} - -while :; do - echo $(get_current_weather) > /home/zt/.cache/lemon/weather - sleep 3600 -done diff --git a/herbstluftwm/bar/launch b/herbstluftwm/bar/launch deleted file mode 100755 index 1b8f46bd..00000000 --- a/herbstluftwm/bar/launch +++ /dev/null @@ -1,11 +0,0 @@ -#!/bin/zsh - -# kill running scripts, just in case they are -killall sysinfo weather ws_bar sysinfo_bar lemonbar - -./functions/sysinfo & -./functions/weather & - -./ws_bar | lemonbar -g 600x21+0+0 -B '#00000000' -p -F '#ffffff' -f "Source Han Sans JP:size=10" -o -3 -f "RobotoMono Nerd Font:style=Regular:size=15" -f -n "workspaceinfo-bar" -o 0 & - -./sysinfo_bar | lemonbar -g 1020x21+346+0 -B '#171520' -p -F '#ffffff' -f "Source Han Sans JP:size=10" -o -3 -f "RobotoMono Nerd Font:style=Regular:size=15" -f -n "sysinfo-bar" -o 0 diff --git a/herbstluftwm/bar/sysinfo_bar b/herbstluftwm/bar/sysinfo_bar deleted file mode 100755 index 83158c50..00000000 --- a/herbstluftwm/bar/sysinfo_bar +++ /dev/null @@ -1,25 +0,0 @@ -#!/bin/zsh -BAR_COLOR="#171520" -COLOR1="#0d0c13" -COLOR2="#70638F" - -A0="%{B"$COLOR1"}%{F"$COLOR2"}%{B"$COLOR2"}%{F"$COLOR1"}" -A1="%{B"$COLOR2"}%{F"$COLOR1"}%{B"$COLOR1"}%{F"$COLOR2"}" -A2="%{B"$COLOR1"}%{F"$COLOR2"}%{B"$COLOR2"}%{F"$COLOR1"}" - -right_modules() { - clock=$(