Cleanup Bar and i3 font
This commit is contained in:
@@ -1,7 +0,0 @@
|
||||
#!/bin/sh
|
||||
|
||||
if [ -f "/sys/class/power_supply/BAT0/capacity" ];then
|
||||
echo $(cat /sys/class/power_supply/BAT0/capacity)%
|
||||
else
|
||||
echo 100%
|
||||
fi
|
||||
@@ -1,9 +0,0 @@
|
||||
#!/bin/sh
|
||||
|
||||
if [ -f "/sys/class/net/enp24s0/carrier" ]; then
|
||||
echo "LAN connected"
|
||||
elif [ -f "/sys/class/net/wlo1/carrier" ]; then
|
||||
echo "$(nmcli -t -f active,ssid, dev wifi | egrep '^yes' | cut -d\' -f2 | cut -d ':' -f2)"
|
||||
else
|
||||
echo "No network"
|
||||
fi
|
||||
@@ -1,37 +0,0 @@
|
||||
#!/bin/sh
|
||||
|
||||
function scroll () {
|
||||
prefix="$1"
|
||||
scrolling="$2"
|
||||
temp="$(echo "$scrolling"| sed "s/^\(.\{20\}\)\(.*\)$/\1[\2]/"| sed "s/\[ *\]$//"| sed "s/\[.*\]$//")"
|
||||
suffix="$3"
|
||||
if [ "$(echo -n $scrolling |wc -c)" -gt 30 ]; then
|
||||
echo "${prefix}${temp}${suffix}"
|
||||
sleep 0.5
|
||||
|
||||
zscroll -l 30 \
|
||||
--delay 0.2 \
|
||||
--before-text "$prefix" \
|
||||
--after-text "$suffix" \
|
||||
--scroll-padding " " \
|
||||
--update-check true "echo '$(get_title)'" &
|
||||
|
||||
wait
|
||||
else
|
||||
echo "$prefix $temp $suffix"
|
||||
fi
|
||||
} #
|
||||
|
||||
function get_artist () {
|
||||
echo "$(playerctl -p spotify metadata --format "{{ artist }}"| sed -e "s/[[(]....*[])]*//g" | sed "s/ *$//"| sed "s/^\(.\{20\}[^ ]*\)\(.*\)$/\1[\2]/"| sed "s/\[ *\]$//"| sed "s/\[.*\]$/.../")"
|
||||
} #
|
||||
|
||||
function get_title () {
|
||||
echo "$(playerctl -p spotify metadata --format "{{title}}" | sed 's/'\''/\\'\''/g')"
|
||||
} #
|
||||
|
||||
[ ! -z "$(playerctl -p spotify status 2>/dev/null)" ] \
|
||||
&& artist=$(get_artist) \
|
||||
&& title=$(get_title) \
|
||||
&& ([ -z "$artist$title" ] && scroll "" "Spotify is not connected on this pc" "" || scroll "$title - $artist" ) \
|
||||
|| exit 1
|
||||
@@ -1,18 +0,0 @@
|
||||
#!/bin/sh
|
||||
|
||||
SINK=$(pactl list short sinks | grep -n RUNNING | cut -d":" -f1)
|
||||
if [ "$SINK" = "" ]; then
|
||||
SINK=1
|
||||
fi
|
||||
NOW=$( pactl list sinks | grep '^[[:space:]]Volume:' | head -n $SINK | tail -n 1 | sed -e 's,.* \([0-9][0-9]*\)%.*,\1,' )
|
||||
MUTE=$(pactl list sinks | grep '^[[:space:]]Mute:'| head -n $SINK | tail -n 1 | awk -F ":" '{print $2}'| xargs)
|
||||
|
||||
if [ "$MUTE" = "yes" ]; then
|
||||
echo "Muted"
|
||||
else
|
||||
echo "$NOW%"
|
||||
fi
|
||||
|
||||
case $BLOCK_BUTTON in
|
||||
1) setsid -f st -c stpulse -n stpulse -e ncpamixer ;;
|
||||
esac
|
||||
Reference in New Issue
Block a user