From 4e00711338eccd2f7dad98d28a47a63194d8dba2 Mon Sep 17 00:00:00 2001 From: lickthecheese Date: Thu, 21 May 2020 11:39:08 -0400 Subject: [PATCH] graph lol --- .bashrc | 7 ++++++- bin/stalk | 8 ++++++++ 2 files changed, 14 insertions(+), 1 deletion(-) create mode 100755 bin/stalk diff --git a/.bashrc b/.bashrc index 141ceee..2ee583a 100755 --- a/.bashrc +++ b/.bashrc @@ -143,7 +143,12 @@ leetpic() { curl -F"file=@$1" http://lickthe.1337331.xyz/i/u.php ; } ltcpic() { curl -F"file=@$1" https://lickthecheese.fuckup.club/u.php ; } ltcpst() { curl -F"text=<-" https://lickthecheese.fuckup.club/p.php ; } ep() { curl -F"text=<-" https://i.ltcpas.tk/p.php ; } -plot() { cat /dev/stdin > /tmp/plotuwu; gnuplot -p -e 'set object rectangle from screen 0,0 to screen 1,1 behind fillcolor rgb "black" fillstyle solid noborder; set border lw 3 lc rgb "white"; set xtics textcolor rgb "white"; set xlabel "X" textcolor rgb "white"; set ylabel "Y" textcolor rgb "white"; set key textcolor rgb "white"; plot for [col=1:'$1'] "/tmp/plotuwu" using 0:col title "" with '$2' lw 2 pt 7' ; } + + +plot() { cat /dev/stdin > /tmp/plotuwu; gnuplot -p -e 'set object rectangle from screen 0,0 to screen 1,1 behind fillcolor rgb "black" fillstyle solid noborder; set border lw 3 lc rgb "white"; set xtics textcolor rgb "white"; set xlabel "X" textcolor rgb "white"; set ylabel "Y" textcolor rgb "white"; set key textcolor rgb "white"; plot for [col=1:'$1'] "/tmp/plotuwu" using 0:col title "'$3'" with '$2' lw 2 pt 7' ; } +smoothplot() { cat /dev/stdin > /tmp/plotuwu; gnuplot -p -e 'set object rectangle from screen 0,0 to screen 1,1 behind fillcolor rgb "black" fillstyle solid noborder; set border lw 3 lc rgb "white"; set xtics textcolor rgb "white"; set xlabel "X" textcolor rgb "white"; set ylabel "Y" textcolor rgb "white"; set key textcolor rgb "white"; plot for [col=1:'$1'] "/tmp/plotuwu" using 0:col smooth bezier title "'$3'" with '$2' lw 2 pt 7' ; } + + export PS1='$(tput setaf 34)[ $(tput bold; tput setaf 28)ltc$(tput setaf 40)@$(tput setaf 28)arch$(tput sgr0; tput setaf 34) ] $(tput setaf 46)[ $(tput bold; tput setaf 40)\w$(tput sgr0; tput setaf 46) ]$(DIRY="\w"; printf "%$(($COLUMNS - 9 - 3 - 5 - ${#DIRY} - 12))s")$(tput bold; tput setaf 34)[ \t ]\n$ $(tput sgr0)' diff --git a/bin/stalk b/bin/stalk new file mode 100755 index 0000000..aa29892 --- /dev/null +++ b/bin/stalk @@ -0,0 +1,8 @@ +#!/bin/bash + +awk '$3~"^[+%@&~]?'$1'$"{print $2}' ~/.weechat/logs/* | + awk -F ":" '{print $1}' | +cat - ~/Documents/nums | +sort | uniq -c | sort -k2 | +awk '{print $1-1}' +