summaryrefslogtreecommitdiff
path: root/lemonbar
diff options
context:
space:
mode:
authorShubham Saini <pryr@pryr.xyz>2021-05-22 12:56:08 +0000
committerShubham Saini <pryr@pryr.xyz>2021-05-22 12:56:08 +0000
commitbde9d8e1c9a6e2213fc7d40298d43a14f2e99359 (patch)
tree548d45ecb1ada0be5a099ea8b0879c82e08560d7 /lemonbar
parent4d6de10a92b0264a1cebfbe813d2e7961ef29c2b (diff)
cleaned the repo
Diffstat (limited to 'lemonbar')
-rwxr-xr-xlemonbar/launch5
-rwxr-xr-xlemonbar/lime74
2 files changed, 0 insertions, 79 deletions
diff --git a/lemonbar/launch b/lemonbar/launch
deleted file mode 100755
index 981c88f..0000000
--- a/lemonbar/launch
+++ /dev/null
@@ -1,5 +0,0 @@
1#!/bin/bash
2# Launches an instance of lemonbar
3killall -q lime lemonbar
4
5~/.config/lemonbar/lime | lemonbar -p -F "#2f2f2f" -f "JetBrains Mono Nerd Font Mono:style=medium:pixelsize=12.5:antialias=true:autohint=true:lcdfilter=lcddefault:rgba=rgb"
diff --git a/lemonbar/lime b/lemonbar/lime
deleted file mode 100755
index e2ce156..0000000
--- a/lemonbar/lime
+++ /dev/null
@@ -1,74 +0,0 @@
1#!/bin/bash
2# Outputs a configuration for lemonbar
3
4vol(){
5 vol=$(pulsemixer --get-volume | awk '{print $1}')
6 mute=$(pulsemixer --get-mute)
7 if [ "$mute" == 1 ]; then
8 echo -e "%{F#787878}vol%{F-} muted "
9 elif [ "$mute" == 0 ]; then
10 echo -e "%{F#787878}vol%{F-} $vol% "
11 fi
12}
13
14bat() {
15 power=$(cat /sys/class/power_supply/BAT0/capacity)
16 status=$(cat /sys/class/power_supply/BAT0/status)
17 if [ "$status" == "Charging" ]; then
18 echo -e "%{F#787878}bat%{F-} +$power% "
19 elif [ "$status" == "Discharging" ]; then
20 echo -e "%{F#787878}bat%{F-} $power% "
21 fi
22}
23
24dte() {
25 dte=$(date +"%a, %b %d")
26 echo -e "%{F#787878}date%{F-} $dte "
27}
28
29tie() {
30 tme=$(date +"%I:%M %P")
31 echo -e "%{F#787878}time%{F-} $tme "
32}
33
34groups() {
35 cur=`xprop -root _NET_CURRENT_DESKTOP | awk '{print $3}'`
36 tot=`xprop -root _NET_NUMBER_OF_DESKTOPS | awk '{print $3}'`
37
38 for w in `seq 0 $((cur - 1))`; do line="${line}  "; done
39 line="${line}  "
40 for w in `seq $((cur + 2)) $tot`; do line="${line}  "; done
41 echo $line
42}
43
44workspaces() {
45 all=$(bspc query -D)
46 occupied=$(bspc query -D -d .occupied)
47 current=$(bspc query -D -d .focused)
48 result=""
49 padding=" "
50 while IFS= read -r line; do
51 # Get the name of the current desktop
52 name=""
53 if [[ "$occupied" == *"$line"* ]];
54 then
55 name=""
56 fi
57
58 if [[ "$current" == *"$line"* ]];
59 then
60 name=""
61 fi
62
63 result="$result$padding"
64 result="$result$name"
65 result="$result$padding"
66 done <<< "$all"
67 echo -e "$result"
68}
69
70while true; do
71 echo " $(vol) $(bat) $(tie) $(dte) %{F#787878}$(workspaces)%{F-}"
72 xdo above -t $(xdo id -n root) $(xdo id -n lemonbar)
73 sleep 3
74done