update
This commit is contained in:
parent
66945b37e4
commit
d15f3ea237
@ -1,4 +1,4 @@
|
||||
#!/bin/sh
|
||||
#!/bin/bash
|
||||
|
||||
prct=$(upower -d | grep percentage | sed -n "1p" | sed -e 's/^.* //')
|
||||
prctonly=$(upower -d | grep percentage | sed -n "1p" | sed -e 's/^.* //' | sed 's/%//')
|
||||
@ -7,10 +7,10 @@ stat=$(upower -d | grep -m1 state | sed -e 's/^.* //')
|
||||
## if any argument
|
||||
if [ $# -gt 0 ]; then
|
||||
if [[ $stat == "charging" ]]; then
|
||||
echo "BAT +$prct"
|
||||
echo "BAT $prct +"
|
||||
exit
|
||||
fi
|
||||
echo "BAT -$prct"
|
||||
echo "BAT $prct -"
|
||||
exit
|
||||
fi
|
||||
|
||||
|
@ -1,4 +1,4 @@
|
||||
#!/bin/sh
|
||||
#!/bin/bash
|
||||
eth="$(ip -4 addr show enp8s0 | grep -oP '(?<=inet\s)\d+(\.\d+){3}')"
|
||||
wlp="$(ip -4 addr show wlp7s0 | grep -oP '(?<=inet\s)\d+(\.\d+){3}')"
|
||||
|
||||
|
@ -1,5 +1,5 @@
|
||||
#!/bin/sh
|
||||
|
||||
mem="$(free -h | awk '/^Mem:/ {print $3 "/" $2}')"
|
||||
echo -e "$mem"
|
||||
echo "$mem"
|
||||
|
||||
|
@ -1,19 +1,5 @@
|
||||
#!/bin/sh
|
||||
#!/bin/bash
|
||||
|
||||
vol="$(amixer get Master | tail -n1 | sed -r 's/.*\[(.*)%\].*/\1/')"
|
||||
vol="$(pamixer --get-volume-human)"
|
||||
echo "VOL $vol"
|
||||
|
||||
## if any argument
|
||||
if [ $# -gt 0 ]; then
|
||||
stat="$(amixer get Master | tail -n1 | sed -r 's/.*\[(.*)].*/\1/')"
|
||||
if [[ $(echo $stat) == "on" ]]; then
|
||||
echo "VOL $vol%"
|
||||
exit
|
||||
fi
|
||||
echo "MUT $vol%"
|
||||
exit
|
||||
fi
|
||||
|
||||
|
||||
## just returns volume %
|
||||
vol="$(amixer get Master | tail -n1 | sed -r 's/.*\[(.*)%\].*/\1/')"
|
||||
echo -e "$vol"
|
||||
|
19
dwmblocks_scripts/dwm_volume_amixer.old
Executable file
19
dwmblocks_scripts/dwm_volume_amixer.old
Executable file
@ -0,0 +1,19 @@
|
||||
#!/bin/sh
|
||||
|
||||
vol="$(amixer get Master | tail -n1 | sed -r 's/.*\[(.*)%\].*/\1/')"
|
||||
|
||||
## if any argument
|
||||
if [ $# -gt 0 ]; then
|
||||
stat="$(amixer get Master | tail -n1 | sed -r 's/.*\[(.*)].*/\1/')"
|
||||
if [[ $(echo $stat) == "on" ]]; then
|
||||
echo "VOL $vol%"
|
||||
exit
|
||||
fi
|
||||
echo "MUT $vol%"
|
||||
exit
|
||||
fi
|
||||
|
||||
|
||||
## just returns volume %
|
||||
vol="$(amixer get Master | tail -n1 | sed -r 's/.*\[(.*)%\].*/\1/')"
|
||||
echo -e "$vol"
|
Loading…
Reference in New Issue
Block a user