alot of random crap

This commit is contained in:
Chris Cochrun 2021-08-25 05:13:34 -05:00
parent 4f4bf30170
commit e75be2bdfa
9 changed files with 34 additions and 38 deletions

View file

@ -1,7 +0,0 @@
#!/bin/sh
# awk '{u=$2+$4; t=$2+$4+$5; if (NR==1){u1=u; t1=t;} else print ($2+$4-u1) * 100 / (t-t1) "%"; }' \
# <(rg 'cpu ' /proc/stat) <(sleep 1;rg 'cpu ' /proc/stat)
# echo 100 - $(mpstat | rg all | cut -d \ -f43) | bc
cpu="$(mpstat 1 1 | rg Average | awk '{print $3+$4+$5}' | sed 's/\(.*\)/\1%/g')"
echo "$cpu | color=#5af78e"

View file

@ -1,4 +1,4 @@
#!/bin/sh
#!/bin/bash
# Get the percentage of used memory and print it
read used total <<< $(free -m | awk '/Mem/{printf $2" "$3}')

View file

@ -1,10 +0,0 @@
#!/bin/sh
# Get the percentage of used memory and print it
read used total <<< $(free -m | awk '/Mem/{printf $2" "$3}')
percent=$(bc -l <<< "100 * $total / $used")
mem=$(awk -v u=$used -v t=$total -v p=$percent 'BEGIN {printf "%sMi/%sMi %.1f% ", t, u, p}'| awk '{printf $2}')
echo "$mem | color=#ff9f43"

View file

@ -1,4 +1,4 @@
#!/bin/sh
muunread="$(mu find flag:unread AND NOT flag:trashed AND NOT maildir:\"/outlook/Junk\" AND NOT maildir:\"/office/Junk Email\" AND NOT maildir:\"/outlook/Deleted\" AND NOT maildir:\"/office/Deleted Items\" | wc -l)"
echo "$muunread | color=#f3f99d"
echo "$muunread | color=#f3f99d font='VictorMono Nerd Font' size=11"

View file

@ -10,6 +10,8 @@ list_passwords() {
rbw list
}
passwords=$(rbw list)
prompt='search for passwords...'
SECRET=$(list_passwords | rofi -i -p="${prompt}" -dmenu)