New files. Updated dwmbar
This commit is contained in:
parent
f23656f6f2
commit
c9216a9ae9
|
@ -7,13 +7,49 @@ DELIM_START=0
|
||||||
mkdir -p ~/.local/tmp/
|
mkdir -p ~/.local/tmp/
|
||||||
|
|
||||||
run() {
|
run() {
|
||||||
for FILE in $(ls ~/.local/scripts)
|
chmod +x -R ~/.local/scripts/
|
||||||
|
|
||||||
|
for FILE in $(ls ~/.local/scripts/status)
|
||||||
do
|
do
|
||||||
touch "$HOME/.local/tmp/.tmp_$(echo $FILE | cut -d'_' -f3)_BIT"
|
touch "$HOME/.local/tmp/.tmpSTATUS_$(echo $FILE | cut -d'_' -f3)_BIT"
|
||||||
{
|
{
|
||||||
while true
|
while true
|
||||||
do
|
do
|
||||||
echo "$(sh ~/.local/scripts/$FILE)" > "$HOME/.local/tmp/.tmp_$(echo $FILE | cut -d'_' -f3)_BIT"
|
echo "$(. ~/.local/scripts/status/$FILE)" > "$HOME/.local/tmp/.tmpSTATUS_$(echo $FILE | cut -d'_' -f3)_BIT"
|
||||||
|
sleep=$(echo $FILE | cut -d'_' -f2)
|
||||||
|
if [ $sleep -eq 0 ]
|
||||||
|
then
|
||||||
|
sleep=0.1
|
||||||
|
fi
|
||||||
|
sleep $sleep
|
||||||
|
done
|
||||||
|
} &
|
||||||
|
done
|
||||||
|
|
||||||
|
for FILE in $(ls ~/.local/scripts/bbl)
|
||||||
|
do
|
||||||
|
touch "$HOME/.local/tmp/.tmpBBL_$(echo $FILE | cut -d'_' -f3)_BIT"
|
||||||
|
{
|
||||||
|
while true
|
||||||
|
do
|
||||||
|
echo "$(. ~/.local/scripts/bbl/$FILE)" > "$HOME/.local/tmp/.tmpBBL_$(echo $FILE | cut -d'_' -f3)_BIT"
|
||||||
|
sleep=$(echo $FILE | cut -d'_' -f2)
|
||||||
|
if [ $sleep -eq 0 ]
|
||||||
|
then
|
||||||
|
sleep=0.1
|
||||||
|
fi
|
||||||
|
sleep $sleep
|
||||||
|
done
|
||||||
|
} &
|
||||||
|
done
|
||||||
|
|
||||||
|
for FILE in $(ls ~/.local/scripts/bbr)
|
||||||
|
do
|
||||||
|
touch "$HOME/.local/tmp/.tmpBBR_$(echo $FILE | cut -d'_' -f3)_BIT"
|
||||||
|
{
|
||||||
|
while true
|
||||||
|
do
|
||||||
|
echo "$(. ~/.local/scripts/bbr/$FILE)" > "$HOME/.local/tmp/.tmpBBR_$(echo $FILE | cut -d'_' -f3)_BIT"
|
||||||
sleep=$(echo $FILE | cut -d'_' -f2)
|
sleep=$(echo $FILE | cut -d'_' -f2)
|
||||||
if [ $sleep -eq 0 ]
|
if [ $sleep -eq 0 ]
|
||||||
then
|
then
|
||||||
|
@ -29,9 +65,45 @@ status() {
|
||||||
strt=0
|
strt=0
|
||||||
[ $DELIM_START -eq 1 ] && strt=1
|
[ $DELIM_START -eq 1 ] && strt=1
|
||||||
|
|
||||||
for FILE in $(ls ~/.local/scripts)
|
for FILE in $(ls ~/.local/scripts/status)
|
||||||
do
|
do
|
||||||
res=$(cat "$HOME/.local/tmp/.tmp_$(echo $FILE | cut -d'_' -f3)_BIT")
|
res=$(cat "$HOME/.local/tmp/.tmpSTATUS_$(echo $FILE | cut -d'_' -f3)_BIT")
|
||||||
|
|
||||||
|
if [ $strt -eq 0 ]
|
||||||
|
then
|
||||||
|
strt=1
|
||||||
|
echo "$res"
|
||||||
|
else
|
||||||
|
echo "$DELIM$res"
|
||||||
|
fi
|
||||||
|
done
|
||||||
|
}
|
||||||
|
|
||||||
|
barbl() {
|
||||||
|
strt=0
|
||||||
|
[ $DELIM_START -eq 1 ] && strt=1
|
||||||
|
|
||||||
|
for FILE in $(ls ~/.local/scripts/bbl)
|
||||||
|
do
|
||||||
|
res=$(cat "$HOME/.local/tmp/.tmpBBL_$(echo $FILE | cut -d'_' -f3)_BIT")
|
||||||
|
|
||||||
|
if [ $strt -eq 0 ]
|
||||||
|
then
|
||||||
|
strt=1
|
||||||
|
echo "$res"
|
||||||
|
else
|
||||||
|
echo "$DELIM$res"
|
||||||
|
fi
|
||||||
|
done
|
||||||
|
}
|
||||||
|
|
||||||
|
barbr() {
|
||||||
|
strt=0
|
||||||
|
[ $DELIM_START -eq 1 ] && strt=1
|
||||||
|
|
||||||
|
for FILE in $(ls ~/.local/scripts/bbr)
|
||||||
|
do
|
||||||
|
res=$(cat "$HOME/.local/tmp/.tmpBBR_$(echo $FILE | cut -d'_' -f3)_BIT")
|
||||||
|
|
||||||
if [ $strt -eq 0 ]
|
if [ $strt -eq 0 ]
|
||||||
then
|
then
|
||||||
|
@ -47,10 +119,9 @@ run
|
||||||
|
|
||||||
while :
|
while :
|
||||||
do
|
do
|
||||||
stat=$(status | tr -d '\n')
|
statmain=$(status | tr -d '\n')
|
||||||
extrabarleft="^b#440044^Status^d^ ^c#ff0000^bar 2^d^"
|
statbl=$(barbl | tr -d '\n')
|
||||||
extrabarright="^b#444400^Right ^b#00ff00^text^d^ ^c#ff0000^pisec ^b#000044^dlinee3bu^d^"
|
statbr=$(barbr | tr -d '\n')
|
||||||
xprop -root -set WM_NAME "$stat$DD$extrabarleft$DD$extrabarright"
|
xprop -root -set WM_NAME "$statmain$DD$statbl$DD$statbr"
|
||||||
sleep 0.1
|
sleep 0.1
|
||||||
done
|
done
|
||||||
|
|
||||||
|
|
|
@ -0,0 +1,9 @@
|
||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
COLOR1="#AAAAAA"
|
||||||
|
COLOR2="#444444"
|
||||||
|
|
||||||
|
|
||||||
|
price=$(curl -s 'https://api.binance.com/api/v3/ticker/24hr?symbol=XMRUSDT' -H 'accept: application/json' | grep -o 'lastPrice":"[^"]*' | cut -d\" -f3 | sed 's/.\{6\}$//')
|
||||||
|
|
||||||
|
echo "^b$COLOR1^^c$COLOR2^ ^c$COLOR1^^b$COLOR2^ \$$price ^d^"
|
|
@ -0,0 +1,9 @@
|
||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
COLOR1="#AAAAAA"
|
||||||
|
COLOR2="#444444"
|
||||||
|
|
||||||
|
|
||||||
|
price=$(curl -s 'https://api.binance.com/api/v3/ticker/24hr?symbol=BTCUSDT' -H 'accept: application/json' | grep -o 'lastPrice":"[^"]*' | cut -d\" -f3 | sed 's/.\{6\}$//')
|
||||||
|
|
||||||
|
echo "^b$COLOR1^^c$COLOR2^ ^c$COLOR1^^b$COLOR2^ \$$price ^d^"
|
|
@ -0,0 +1,9 @@
|
||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
COLOR1="#AAAAAA"
|
||||||
|
COLOR2="#444444"
|
||||||
|
|
||||||
|
|
||||||
|
price=$(curl -s 'https://api.binance.com/api/v3/ticker/24hr?symbol=ETHUSDT' -H 'accept: application/json' | grep -o 'lastPrice":"[^"]*' | cut -d\" -f3 | sed 's/.\{6\}$//')
|
||||||
|
|
||||||
|
echo "^b$COLOR1^^c$COLOR2^ ^c$COLOR1^^b$COLOR2^ \$$price ^d^"
|
|
@ -0,0 +1,9 @@
|
||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
COLOR1="#AAAAAA"
|
||||||
|
COLOR2="#444444"
|
||||||
|
|
||||||
|
|
||||||
|
price=$(curl -s 'https://api.binance.com/api/v3/ticker/24hr?symbol=LTCUSDT' -H 'accept: application/json' | grep -o 'lastPrice":"[^"]*' | cut -d\" -f3 | sed 's/.\{6\}$//')
|
||||||
|
|
||||||
|
echo "^b$COLOR1^^c$COLOR2^ ^c$COLOR1^^b$COLOR2^ \$$price ^d^"
|
|
@ -0,0 +1,9 @@
|
||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
COLOR1="#AAAAAA"
|
||||||
|
COLOR2="#444444"
|
||||||
|
|
||||||
|
|
||||||
|
price=$(curl -s 'https://api.binance.com/api/v3/ticker/24hr?symbol=DOGEUSDT' -H 'accept: application/json' | grep -o 'lastPrice":"[^"]*' | cut -d\" -f3 | sed 's/.\{6\}$//')
|
||||||
|
|
||||||
|
echo "^b$COLOR1^^c$COLOR2^ DOGE ^c$COLOR1^^b$COLOR2^ \$$price ^d^"
|
|
@ -0,0 +1,9 @@
|
||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
COLOR1="#AAAAAA"
|
||||||
|
COLOR2="#444444"
|
||||||
|
|
||||||
|
|
||||||
|
price=$(curl -s 'https://api.binance.com/api/v3/ticker/24hr?symbol=ETCUSDT' -H 'accept: application/json' | grep -o 'lastPrice":"[^"]*' | cut -d\" -f3 | sed 's/.\{6\}$//')
|
||||||
|
|
||||||
|
echo "^b$COLOR1^^c$COLOR2^ ETC ^c$COLOR1^^b$COLOR2^ \$$price ^d^"
|
|
@ -0,0 +1,9 @@
|
||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
COLOR1="#AAAAAA"
|
||||||
|
COLOR2="#444444"
|
||||||
|
|
||||||
|
|
||||||
|
price=$(curl -s 'https://api.binance.com/api/v3/ticker/24hr?symbol=USDTRUB' -H 'accept: application/json' | grep -o 'lastPrice":"[^"]*' | cut -d\" -f3 | sed 's/.\{6\}$//')
|
||||||
|
|
||||||
|
echo "^b$COLOR1^^c$COLOR2^ USDT ^c$COLOR1^^b$COLOR2^ $price RUB ^d^"
|
|
@ -0,0 +1,12 @@
|
||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
COLOR1="#AAAAAA"
|
||||||
|
COLOR2="#444444"
|
||||||
|
|
||||||
|
|
||||||
|
ut=$(curl -s 'https://api.binance.com/api/v3/ticker/24hr?symbol=USDTTRY' -H 'accept: application/json' | grep -o 'lastPrice":"[^"]*' | cut -d\" -f3 | sed 's/.\{6\}$//')
|
||||||
|
ur=$(curl -s 'https://api.binance.com/api/v3/ticker/24hr?symbol=USDTRUB' -H 'accept: application/json' | grep -o 'lastPrice":"[^"]*' | cut -d\" -f3 | sed 's/.\{6\}$//')
|
||||||
|
price=$(awk "BEGIN{print $ur/$ut}")
|
||||||
|
price=$(printf %.2f "$price")
|
||||||
|
|
||||||
|
echo "^b$COLOR1^^c$COLOR2^ ^c$COLOR1^^b$COLOR2^ $price RUB ^d^"
|
|
@ -0,0 +1,12 @@
|
||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
COLOR1="#AAAAAA"
|
||||||
|
COLOR2="#444444"
|
||||||
|
|
||||||
|
|
||||||
|
uu=$(curl -s 'https://api.binance.com/api/v3/ticker/24hr?symbol=USDTUAH' -H 'accept: application/json' | grep -o 'lastPrice":"[^"]*' | cut -d\" -f3 | sed 's/.\{6\}$//')
|
||||||
|
ur=$(curl -s 'https://api.binance.com/api/v3/ticker/24hr?symbol=USDTRUB' -H 'accept: application/json' | grep -o 'lastPrice":"[^"]*' | cut -d\" -f3 | sed 's/.\{6\}$//')
|
||||||
|
price=$(awk "BEGIN{print $ur/$uu}")
|
||||||
|
price=$(printf %.2f "$price")
|
||||||
|
|
||||||
|
echo "^b$COLOR1^^c$COLOR2^ ₴ ^c$COLOR1^^b$COLOR2^ $price RUB ^d^"
|
|
@ -0,0 +1,17 @@
|
||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
CITY="Tyumen"
|
||||||
|
|
||||||
|
COLOR1="#AAAAAA"
|
||||||
|
COLOR2="#444444"
|
||||||
|
|
||||||
|
|
||||||
|
icon=$(curl -s "wttr.in/$CITY?format=%c")
|
||||||
|
icon=$(echo $icon | tr -d ' ')
|
||||||
|
|
||||||
|
temp=$(curl -s "wttr.in/$CITY?format=%t")
|
||||||
|
|
||||||
|
wind=$(curl -s "wttr.in/$CITY?format=%w")
|
||||||
|
|
||||||
|
|
||||||
|
echo "^b$COLOR2^^c$COLOR1^ $wind ^b$COLOR1^^c$COLOR2^ $icon ^c$COLOR1^^b$COLOR2^ $temp ^d^"
|
Loading…
Reference in New Issue