move files

This commit is contained in:
Linux User
2022-10-02 15:44:44 +00:00
parent cf0f9b7279
commit f23656f6f2
11 changed files with 0 additions and 0 deletions

View File

@ -0,0 +1,71 @@
#!/bin/bash
DEVICE=wlan0
COLOR1="#FF9B00"
COLOR2="#A16200"
good=0
for gooddev in `grep \: /proc/net/dev | awk -F: '{print $1}'`
do
if [ "$DEVICE" = $gooddev ]
then
good=1
break
fi
done
if [ $good -eq 0 ]
then
echo "Change DEVICE in ~/.local/scripts/0010_1_network"
grep ":" /proc/net/dev | awk -F: '{print $1}' | sed s@\ @@g
exit 1
fi
if [ ! -f $HOME/.local/tmp/.tmp_RXNET_BIT ]
then
RXNET_BIT=0
TXNET_BIT=0
echo $RXNET_BIT > $HOME/.local/tmp/.tmp_RXNET_BIT
echo $TXNET_BIT > $HOME/.local/tmp/.tmp_TXNET_BIT
fi
RXNET_BIT=$(cat $HOME/.local/tmp/.tmp_RXNET_BIT)
TXNET_BIT=$(cat $HOME/.local/tmp/.tmp_TXNET_BIT)
line=`grep $DEVICE /proc/net/dev | sed s/.*://`
rx=`echo $line | awk '{print $1}'`
tx=`echo $line | awk '{print $9}'`
inbound=$(($rx-$RXNET_BIT))
outbound=$(($tx-$TXNET_BIT))
line=`grep $DEVICE /proc/net/dev | sed s/.*://`
RXNET_BIT=`echo $line | awk '{print $1}'`
TXNET_BIT=`echo $line | awk '{print $9}'`
echo $RXNET_BIT > $HOME/.local/tmp/.tmp_RXNET_BIT
echo $TXNET_BIT > $HOME/.local/tmp/.tmp_TXNET_BIT
if [ $inbound -gt $((1024*1024)) ]
then
inb=$(printf "%.2f MB/s" $(echo "scale=2; $inbound / 1024 / 1024" | bc))
elif [ $inbound -gt 1024 ]
then
inb=$(printf "%.2f KB/s" $(echo "scale=2; $inbound / 1024" | bc))
else
inb=$(printf "%i B/s" $inbound)
fi
if [ $outbound -gt $((1024*1024)) ]
then
outb=$(printf "%.2f MB/s" $(echo "scale=2; $outbound / 1024 / 1024" | bc))
elif [ $outbound -gt 1024 ]
then
outb=$(printf "%.2f KB/s" $(echo "scale=2; $outbound / 1024" | bc))
else
outb=$(printf "%i B/s" $outbound)
fi
echo "^c$COLOR1^^b$COLOR2^ In: $inb ^b$COLOR1^^c$COLOR2^  ^c$COLOR1^^b$COLOR2^ Out: $outb ^d^"

View File

@ -0,0 +1,8 @@
#!/bin/bash
COLOR1="#C700FF"
COLOR2="#590073"
mem="$(free -h | awk '/Mem:/ {print $3 "/" $2}')"
echo "^b$COLOR1^^c$COLOR2^  ^c$COLOR1^^b$COLOR2^ $mem ^d^"

View File

@ -0,0 +1,8 @@
#!/bin/bash
COLOR1="#990057"
COLOR2="#FF00B2"
usage=$(cat <(grep 'cpu ' /proc/stat) <(sleep 1 && grep 'cpu ' /proc/stat) | awk -v RS="" '{print ($13-$2+$15-$4)*100/($13-$2+$15-$4+$16-$5)}' | cut -d'.' -f1)"%"
echo "^c$COLOR1^^b$COLOR2^  ^b$COLOR1^^c$COLOR2^ $usage ^d^"

View File

@ -0,0 +1,14 @@
#!/bin/bash
COLOR1="#009CFF"
COLOR2="#005083"
power=$(nmcli -f IN-USE,SIGNAL,SSID device wifi | grep "*" | cut -d' ' -f8)
name=$(nmcli -f IN-USE,SIGNAL,SSID device wifi | grep "*" | cut -d' ' -f14)
if [[ ! $name ]]
then
echo "^b$COLOR1^^c$COLOR2^  ^c$COLOR1^^b$COLOR2^  ^d^"
else
echo "^b$COLOR1^^c$COLOR2^  ^c$COLOR1^^b$COLOR2^ $name $power ^d^"
fi

View File

@ -0,0 +1,9 @@
#!/bin/bash
COLOR1="#00FF90"
COLOR2="#00A45D"
used=$(echo $(df -h / | sed -n '1!p') | cut -d' ' -f3)
total=$(echo $(df -h / | sed -n '1!p') | cut -d' ' -f2)
echo "^b$COLOR1^^c$COLOR2^  ^c$COLOR1^^b$COLOR2^ $used/$total ^d^"

View File

@ -0,0 +1,21 @@
#!/bin/bash
COLOR1="#FF0000"
COLOR2="#700000"
SND=$( pactl list sinks | grep '^[[:space:]]Volume:' | head -n $(( $SINK + 1 )) | tail -n 1 | sed -e 's,.* \([0-9][0-9]*\)%.*,\1,' )
if [ $SND -ge 67 ]
then
glyph=""
elif [ $SND -ge 34 ]
then
glyph=""
elif [ $SND -ge 1 ]
then
glyph=""
else
glyph=""
fi
echo "^b$COLOR1^^c$COLOR2^ $glyph ^c$COLOR1^^b$COLOR2^ $SND% ^d^"

View File

@ -0,0 +1,18 @@
#!/bin/bash
DEVICE="amdgpu_bl0"
COLOR1="#FFF400"
COLOR2="#A39C00"
if [ ! -f "$FILE" ]
then
DEVICE="$(ls /sys/class/backlight/ -1 -t | head -1)"
fi
curr="$(cat /sys/class/backlight/$DEVICE/brightness)"
max="$(cat /sys/class/backlight/$DEVICE/max_brightness)"
echo "^b$COLOR1^^c$COLOR2^  ^c$COLOR1^^b$COLOR2^ $curr/$max ^d^"

View File

@ -0,0 +1,44 @@
#!/bin/bash
DEVICE="BAT1"
COLOR1="#FF00F4"
COLOR2="#83007D"
if [ ! -f "$FILE" ]
then
DEVICE="$(ls /sys/class/power_supply/ -1 -t | head -1)"
fi
batpercent="$(cat /sys/class/power_supply/$DEVICE/capacity)"
if [[ $((batpercent + 0)) -ge 80 ]]
then
icon=""
elif [[ $((batpercent + 0)) -ge 60 ]]
then
icon=""
elif [[ $((batpercent + 0)) -ge 40 ]]
then
icon=""
elif [[ $((batpercent + 0)) -ge 20 ]]
then
icon=""
else
icon=""
fi
chrg=$(cat /sys/class/power_supply/$DEVICE/status)
if [[ "$chrg" == "Charging" ]]
then
icon=""
elif [[ "$chrg" == "Full" ]]
then
icon=""
fi
batpercent="$(echo $batpercent)%"
echo "^b$COLOR1^^c$COLOR2^ $icon ^c$COLOR1^^b$COLOR2^ $batpercent ^d^"

View File

@ -0,0 +1,8 @@
#!/bin/bash
COLOR1="#FF5800"
COLOR2="#973400"
lang=$(xkblayout-state print %s)
echo "^b$COLOR1^^c$COLOR2^  ^c$COLOR1^^b$COLOR2^ $lang ^d^"

View File

@ -0,0 +1,8 @@
#!/bin/bash
COLOR1="#17FF00"
COLOR2="#0EA100"
date=$(date +"%d.%m.%y")
echo "^b$COLOR1^^c$COLOR2^  ^c$COLOR1^^b$COLOR2^ $date ^d^"

View File

@ -0,0 +1,8 @@
#!/bin/bash
COLOR1="#00E9FF"
COLOR2="#008592"
time=$(date +"%H:%M:%S")
echo "^b$COLOR1^^c$COLOR2^  ^c$COLOR1^^b$COLOR2^ $time ^d^"