Compare commits

..

No commits in common. "f5090b506288d64d19f7170b79581fd7b561d66a" and "cf0f9b7279de0e2ee4fefb9598b30f2890696eb4" have entirely different histories.

28 changed files with 54 additions and 300 deletions

View File

@ -88,9 +88,6 @@ __mkps1() {
echo "$ps1"; echo "$ps1";
} }
transfer(){ if [ $# -eq 0 ];then echo "No arguments specified.\nUsage:\n transfer <file|directory>\n ... | transfer <file_name>">&2;return 1;fi;if tty -s;then file="$1";file_name=$(basename "$file");if [ ! -e "$file" ];then echo "$file: No such file or directory">&2;return 1;fi;if [ -d "$file" ];then file_name="$file_name.zip" ,;(cd "$file"&&zip -r -q - .)|curl --progress-bar --upload-file "-" "https://transfer.sh/$file_name"|tee /dev/null,;else cat "$file"|curl --progress-bar --upload-file "-" "https://transfer.sh/$file_name"|tee /dev/null;fi;else file_name=$1;curl --progress-bar --upload-file "-" "https://transfer.sh/$file_name"|tee /dev/null;fi;}
alias transfer=transfer
# If not running interactively, don't do anything # If not running interactively, don't do anything
case $- in case $- in
*i*) ;; *i*) ;;

View File

@ -7,49 +7,13 @@ DELIM_START=0
mkdir -p ~/.local/tmp/ mkdir -p ~/.local/tmp/
run() { run() {
chmod +x -R ~/.local/scripts/ for FILE in $(ls ~/.local/scripts)
for FILE in $(ls ~/.local/scripts/status)
do do
touch "$HOME/.local/tmp/.tmpSTATUS_$(echo $FILE | cut -d'_' -f3)_BIT" touch "$HOME/.local/tmp/.tmp_$(echo $FILE | cut -d'_' -f3)_BIT"
{ {
while true while true
do do
echo "$(. ~/.local/scripts/status/$FILE)" > "$HOME/.local/tmp/.tmpSTATUS_$(echo $FILE | cut -d'_' -f3)_BIT" echo "$(sh ~/.local/scripts/$FILE)" > "$HOME/.local/tmp/.tmp_$(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
@ -65,45 +29,9 @@ status() {
strt=0 strt=0
[ $DELIM_START -eq 1 ] && strt=1 [ $DELIM_START -eq 1 ] && strt=1
for FILE in $(ls ~/.local/scripts/status) for FILE in $(ls ~/.local/scripts)
do do
res=$(cat "$HOME/.local/tmp/.tmpSTATUS_$(echo $FILE | cut -d'_' -f3)_BIT") res=$(cat "$HOME/.local/tmp/.tmp_$(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
@ -119,9 +47,10 @@ run
while : while :
do do
statmain=$(status | tr -d '\n') stat=$(status | tr -d '\n')
statbl=$(barbl | tr -d '\n') extrabarleft="^b#440044^Status^d^ ^c#ff0000^bar 2^d^"
statbr=$(barbr | tr -d '\n') extrabarright="^b#444400^Right ^b#00ff00^text^d^ ^c#ff0000^pisec ^b#000044^dlinee3bu^d^"
xprop -root -set WM_NAME "$statmain$DD$statbl$DD$statbr" xprop -root -set WM_NAME "$stat$DD$extrabarleft$DD$extrabarright"
sleep 0.1 sleep 0.1
done done

View File

@ -1,6 +1,6 @@
#!/bin/bash #!/bin/bash
DEVICE=wlp2s0 DEVICE=wlan0
COLOR1="#FF9B00" COLOR1="#FF9B00"
COLOR2="#A16200" COLOR2="#A16200"
@ -16,7 +16,8 @@ done
if [ $good -eq 0 ] if [ $good -eq 0 ]
then then
echo "0010" echo "Change DEVICE in ~/.local/scripts/0010_1_network"
grep ":" /proc/net/dev | awk -F: '{print $1}' | sed s@\ @@g
exit 1 exit 1
fi fi
@ -46,8 +47,25 @@ TXNET_BIT=`echo $line | awk '{print $9}'`
echo $RXNET_BIT > $HOME/.local/tmp/.tmp_RXNET_BIT echo $RXNET_BIT > $HOME/.local/tmp/.tmp_RXNET_BIT
echo $TXNET_BIT > $HOME/.local/tmp/.tmp_TXNET_BIT echo $TXNET_BIT > $HOME/.local/tmp/.tmp_TXNET_BIT
inb=$(printf "%.0f MB/s" $(echo "scale=2; $inbound / 1024 / 1024" | bc)) 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
outb=$(printf "%.0f MB/s" $(echo "scale=2; $outbound / 1024 / 1024" | bc)) 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^ $inb ^b$COLOR1^^c$COLOR2^  ^c$COLOR1^^b$COLOR2^ $outb ^d^"
echo "^c$COLOR1^^b$COLOR2^ In: $inb ^b$COLOR1^^c$COLOR2^  ^c$COLOR1^^b$COLOR2^ Out: $outb ^d^"

8
.local/scripts/0030_0_cpu Executable file
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

@ -6,7 +6,7 @@ COLOR2="#005083"
power=$(nmcli -f IN-USE,SIGNAL,SSID device wifi | grep "*" | cut -d' ' -f8) 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) name=$(nmcli -f IN-USE,SIGNAL,SSID device wifi | grep "*" | cut -d' ' -f14)
if [ ! $name ] if [[ ! $name ]]
then then
echo "^b$COLOR1^^c$COLOR2^  ^c$COLOR1^^b$COLOR2^  ^d^" echo "^b$COLOR1^^c$COLOR2^  ^c$COLOR1^^b$COLOR2^  ^d^"
else else

View File

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

View File

@ -1,9 +0,0 @@
#!/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^"

View File

@ -1,9 +0,0 @@
#!/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^"

View File

@ -1,9 +0,0 @@
#!/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^"

View File

@ -1,9 +0,0 @@
#!/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^"

View File

@ -1,9 +0,0 @@
#!/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^"

View File

@ -1,9 +0,0 @@
#!/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^"

View File

@ -1,9 +0,0 @@
#!/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^"

View File

@ -1,12 +0,0 @@
#!/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^"

View File

@ -1,12 +0,0 @@
#!/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^"

View File

@ -1,22 +0,0 @@
#!/bin/bash
CITY="auto"
COLOR1="#AAAAAA"
COLOR2="#444444"
if [ $CITY = "auto" ]
then
CITY="@$(curl -s zx2c4.com/ip | head -1)"
fi
icon=$(curl -s "wttr.in/$CITY?format=%C")
icon=$(echo $icon | tr -d ' ')
temp=$(curl -s "wttr.in/$CITY?format=%t")
wind=$(curl -s https://wttr.in/@178.23.190.182?format=j2 | python3 -c "import sys, json; print(json.load(sys.stdin)['current_condition'][0]['windspeedKmph'])")
echo "^b$COLOR2^^c$COLOR1^ $wind km/h ^b$COLOR1^^c$COLOR2^ $icon ^c$COLOR1^^b$COLOR2^ $temp ^d^"

View File

@ -1,18 +0,0 @@
#!/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

@ -1,10 +0,0 @@
#!/bin/bash
COLOR1="#990057"
COLOR2="#FF00B2"
load1="$(grep 'cpu ' /proc/stat)"
load2="$(sleep 1 && grep 'cpu ' /proc/stat)"
usage=$(echo "$load1 \n $load2" | 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

@ -1,24 +0,0 @@
#!/bin/bash
COLOR1="#AE8BF9"
COLOR2="#773DF5"
cputemp=$(($(cat /sys/class/thermal/thermal_zone0/temp) / 1000))
if [ $cputemp -ge 90 ]
then
tempicon=""
elif [ $cputemp -ge 75 ]
then
tempicon=""
elif [ $cputemp -ge 60 ]
then
tempicon=""
elif [ $cputemp -ge 45 ]
then
tempicon=""
else
tempicon=""
fi
echo "^b$COLOR1^^c$COLOR2^ $tempicon ^c$COLOR1^^b$COLOR2^ $cputemp ^d^"

View File

@ -1,19 +1,4 @@
if [ -z $DISPLAY ] && [ $(tty) = /dev/tty1 ]; then if [ -z $DISPLAY ] && [ $(tty) = /dev/tty1 ]; then
echo "Select:"
echo "0. DWM (default)"
echo "1. Onlyfox"
echo "2. Pohui, idem v tty"
read USER_CHOISE
USER_CHOISE=$(($USER_CHOISE + 0))
if [[ $USER_CHOISE -eq 1 ]]
then
startx firefox
elif [[ $USER_CHOISE -eq 2 ]]
then
echo "Nice choise)"
else
startx
fi
startx startx
fi fi

View File

@ -2,37 +2,16 @@
export _JAVA_AWT_WM_NONREPARENTING=1 export _JAVA_AWT_WM_NONREPARENTING=1
#xscreensaver & xscreensaver &
setxkbmap "us,ru" "" "grp:win_space_toggle" -option caps:none & setxkbmap "us,ru" "" "grp:win_space_toggle" -option caps:none &
xset s off & xset s off &
xset -dpms & xset -dpms &
#sh ~/wallpapers/cyber1.sh & #sh ~/wallpapers/cyber1.sh &
twmnd &
picom --experimental-backend & picom --experimental-backend &
sh ~/.local/bin/dwmbar & sh ~/.local/bin/dwmbar &
#sh ~/.local/bin/randwallpaper & sh ~/.local/bin/randwallpaper &
# attraction atunnel barcode binaryring cloudlife compass coral cubegrid deepstars fadeplot flurry glmatrix grav headroom intermomentary lament noof providence pyro rorschach
xwinwrap -g 3840x2160 -ni -s -nf -b -un -ov -fdt -argb -- /usr/libexec/xscreensaver/fadeplot -window-id WID &
# ----- 1 -----
st &
# ----- 2 -----
code &
# ----- 3 -----
QT_SCALE_FACTOR=1.0000001 keepassxc &
# ----- 4 -----
discord &
/home/bitheaven/Documents/Telegram/Telegram &
# ----- 7 -----
qjackctl &
corectrl &
patchmatrix &
blueman-manager &
# ----- 9 -----
firefox &
dbus-launch --exit-with-session dwm dbus-launch --exit-with-session dwm
#dbus-run-session -- dwm #dbus-run-session -- dwm