Add colors to Bar Widgets

This commit is contained in:
Linux User 2022-08-16 10:50:49 +00:00
parent 3a35a95ce9
commit 85d64f0ac7
13 changed files with 55 additions and 23 deletions

View File

@ -1,6 +1,6 @@
#!/bin/bash
DELIM=" | "
DELIM=" "
status() {
for FILE in $(ls ~/.local/scripts)

View File

@ -1,6 +1,8 @@
#!/bin/bash
DEVICE=wlan0
COLOR1="#FF9B00"
COLOR2="#A16200"
good=0
for gooddev in `grep \: /proc/net/dev | awk -F: '{print $1}'`
@ -67,4 +69,5 @@ else
outb=$(printf "%i B/s" $outbound)
fi
echo "In: $inb  Out: $outb"
echo "^c$COLOR1^^b$COLOR2^ In: $inb ^b$COLOR1^^c$COLOR2^  ^c$COLOR1^^b$COLOR2^ Out: $outb ^d^"

8
.local/scripts/9993_ram Executable file
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^"

5
.local/scripts/9995_cpu → .local/scripts/9994_cpu Normal file → Executable file
View File

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

View File

@ -1,5 +0,0 @@
#!/bin/bash
mem="$(free -h | awk '/Mem:/ {print $3 "/" $2}')"
echo " $mem"

7
.local/scripts/9996_wifi → .local/scripts/9995_wifi Normal file → Executable file
View File

@ -1,11 +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 "  "
echo "^b$COLOR1^^c$COLOR2^  ^c$COLOR1^^b$COLOR2^  ^d^"
else
echo " $name $power"
echo "^b$COLOR1^^c$COLOR2^ ^c$COLOR1^^b$COLOR2^ $name $power ^d^"
fi

5
.local/scripts/9997_disk → .local/scripts/9996_disk Normal file → Executable file
View File

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

8
.local/scripts/9997_lang Executable file
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^"

8
.local/scripts/9998_date Executable file
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

@ -1,5 +0,0 @@
#!/bin/bash
lang=$(xkblayout-state print %s)
echo " $lang"

View File

@ -1,6 +0,0 @@
#!/bin/bash
date=$(date +"%d.%m.%y")
time=$(date +"%H:%M:%S")
echo " $date  $time"

8
.local/scripts/9999_time Executable file
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^"

View File

@ -4,8 +4,12 @@ export _JAVA_AWT_WM_NONREPARENTING=1
xscreensaver &
setxkbmap "us,ru" "" "grp:win_space_toggle" &
setxkbmap -option caps:none &
xset s off &
xset -dpms &
sh ~/wallpapers/cyber1.sh &
sh ~/.local/bin/dwmbar &
picom --experimental-backend &
exec dwm
dbus-run-session -- dwm