From bde9d8e1c9a6e2213fc7d40298d43a14f2e99359 Mon Sep 17 00:00:00 2001 From: Shubham Saini Date: Sat, 22 May 2021 18:26:08 +0530 Subject: cleaned the repo --- bin/.bin/lemonconf | 74 ------------------------------------------------------ 1 file changed, 74 deletions(-) delete mode 100755 bin/.bin/lemonconf (limited to 'bin/.bin/lemonconf') diff --git a/bin/.bin/lemonconf b/bin/.bin/lemonconf deleted file mode 100755 index cb5e505..0000000 --- a/bin/.bin/lemonconf +++ /dev/null @@ -1,74 +0,0 @@ -#!/bin/bash -# Outputs a configuration for lemonbar - -vol(){ - vol=$(pulsemixer --get-volume | awk '{print $1}') - mute=$(pulsemixer --get-mute) - if [ "$mute" == 1 ]; then - echo -e "%{F#787878}vol%{F-} muted " - elif [ "$mute" == 0 ]; then - echo -e "%{F#787878}vol%{F-} $vol% " - fi -} - -bat() { - power=$(cat /sys/class/power_supply/BAT0/capacity) - status=$(cat /sys/class/power_supply/BAT0/status) - if [ "$status" == "Charging" ]; then - echo -e "%{F#787878}bat%{F-} +$power% " - elif [ "$status" == "Discharging" ]; then - echo -e "%{F#787878}bat%{F-} $power% " - fi -} - -dte() { - dte=$(date +"%a, %b %d") - echo -e "%{F#787878}date%{F-} $dte " -} - -tie() { - tme=$(date +"%I:%M %P") - echo -e "%{F#787878}time%{F-} $tme " -} - -groups() { - cur=`xprop -root _NET_CURRENT_DESKTOP | awk '{print $3}'` - tot=`xprop -root _NET_NUMBER_OF_DESKTOPS | awk '{print $3}'` - - for w in `seq 0 $((cur - 1))`; do line="${line}  "; done - line="${line}  " - for w in `seq $((cur + 2)) $tot`; do line="${line}  "; done - echo $line -} - -workspaces() { - all=$(bspc query -D) - occupied=$(bspc query -D -d .occupied) - current=$(bspc query -D -d .focused) - result="" - padding=" " - while IFS= read -r line; do - # Get the name of the current desktop - name="" - if [[ "$occupied" == *"$line"* ]]; - then - name="" - fi - - if [[ "$current" == *"$line"* ]]; - then - name="" - fi - - result="$result$padding" - result="$result$name" - result="$result$padding" - done <<< "$all" - echo -e "$result" -} - -while true; do - echo " $(vol) $(bat) $(tie) $(dte) %{F#787878}%{r}$(workspaces)%{F-} " - xdo above -t $(xdo id -n root) $(xdo id -n lemonbar) - sleep 3 -done -- cgit v1.2.3