aboutsummaryrefslogtreecommitdiff
path: root/Scripts/.local/scripts/set_bar
diff options
context:
space:
mode:
Diffstat (limited to 'Scripts/.local/scripts/set_bar')
-rwxr-xr-xScripts/.local/scripts/set_bar85
1 files changed, 0 insertions, 85 deletions
diff --git a/Scripts/.local/scripts/set_bar b/Scripts/.local/scripts/set_bar
deleted file mode 100755
index d13ab3e..0000000
--- a/Scripts/.local/scripts/set_bar
+++ /dev/null
@@ -1,85 +0,0 @@
-#!/bin/bash
-
-delimiter=' | '
-
-timedate() {
- echo $(date +'%a %F %R')
-}
-
-battery() {
- capacity=$(cat /sys/class/power_supply/BAT0/capacity) || break
- status=$(cat /sys/class/power_supply/BAT0/status)
-
- if [[ $status == "Charging" ]]
- then
- status=""
- else
- if [[ $capacity -ge 75 ]]
- then
- status=""
- elif [[ $capacity -ge 50 ]]
- then
- status=""
- elif [[ $capacity -ge 25 ]]
- then
- status=""
- elif [[ $capacity -ge 10 ]]
- then
- status=""
- else
- status=""
- fi
- fi
- echo "$status $capacity%"
-}
-
-volume() {
- sinks="$(pactl list sinks)"
- vol="$(echo "$sinks" | grep '[0-9]\+%' | sed "s,.* \([0-9]\+\)%.*,\1,;1q")"
-
- if [[ $vol -gt 50 ]]
- then
- icon=""
- elif [[ $vol -gt 10 ]]
- then
- icon=""
- else
- icon=""
- fi
-
- echo "$icon $vol%"
-}
-
-ram() {
- echo $(vmstat -s -a -S M | grep 'used memory' | grep -Po "\d+")M
-}
-
-disk() {
- echo $(df | grep /dev/sda2 | awk '{print $5}')
-}
-
-mpd() {
- name=$(mpc -f '%title%' | head -1)
- if [[ $name == "MPD error: Connection refused\n" ]]
- then
- name="MPD offline"
- else
- name="Playing: $name"
- fi
- echo $name
-}
-
-connections() {
- internet=$(nmcli g | sed -n 2p | awk '{print $1}')
- if [[ $internet == "connected" ]]
- then
- echo "Connected"
- else
- echo "Not connected"
- fi
-}
-
-while true; do
- xsetroot -name "$(mpd) $delimiter Meme level at $(disk) $delimiter $(ram) $delimiter $(connections) $delimiter $(volume) $delimiter $(battery) $delimiter $(timedate)"
- sleep 30s;
-done