You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

shaggystatus 2.4KB

5 lat temu
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106
  1. #! /bin/sh
  2. dat(){
  3. echo -n $(date "+%a/%b/%d %I:%M %p")
  4. }
  5. mus(){
  6. echo -n $(test -z "$(mpc current)" || mpc current -f "[[%title% - ]%artist%]" )
  7. #echo -n $(ps aux | grep -v "grep" | if grep -q "cmus"; then echo $(cmus-remote -Q | sed -n 's/tag title //p'); else echo "n/a"; fi)
  8. }
  9. vol(){
  10. #echo -n $(amixer get PCM | grep "Front Left:" | awk '{print $5}')
  11. echo "`/bin/sh /home/shaggy/bin/pulsevolumecheck.sh`"
  12. }
  13. gmail(){
  14. #echo -n $(python2 weather-cli/weathercli.py bicknell,in -u celsius --iconify)
  15. #echo -n $(python2 weather-cli/weathercli.py bicknell,in -u celsius | grep "It's" | awk '{print $2,$4,$5,$6}')
  16. echo "`/bin/sh /home/shaggy/bin/gmailmail.sh`"
  17. }
  18. teknik(){
  19. #echo -n $(python2 weather-cli/weathercli.py bicknell,in -u celsius --iconify)
  20. #echo -n $(python2 weather-cli/weathercli.py bicknell,in -u celsius | grep "It's" | awk '{print $2,$4,$5,$6}')
  21. echo "`/bin/sh /home/shaggy/bin/teknikmail.sh`"
  22. }
  23. pac(){
  24. echo "`cat /home/shaggy/.config/bspwm/pacstatus`"
  25. }
  26. aur(){
  27. echo "`cat /home/shaggy/.config/bspwm/aurstatus`"
  28. }
  29. rss(){
  30. echo "`cat /home/shaggy/.config/bspwm/rss`"
  31. }
  32. home(){
  33. home="$(df -h|grep sda1|awk '{print $5}')"
  34. echo "$home"
  35. }
  36. riddle(){
  37. root="$(df -h|grep sdb2|awk '{print $5}')"
  38. echo "$root"
  39. }
  40. # mem section
  41. memu(){
  42. #memux="$(free -m | sed -n 's|^-.*:[ \t]*\([0-9]*\) .*|\1|gp')"
  43. memu="$(free -t -m | grep "Total" | awk '{ print ""$3 ""}')"
  44. echo "$memu"
  45. }
  46. memt(){
  47. memt="$(free -m | sed -n 's|^M.*:[ \t]*\([0-9]*\) .*|\1|gp')"
  48. echo "$memt"
  49. }
  50. # cpu section
  51. cpu(){
  52. cpu="$(eval $(awk '/^cpu /{print "previdle=" $5 "; prevtotal=" $2+$3+$4+$5 }' /proc/stat); sleep 0.4;
  53. eval $(awk '/^cpu /{print "idle=" $5 "; total=" $2+$3+$4+$5 }' /proc/stat);
  54. intervaltotal=$((total-${prevtotal:-0}));
  55. echo "$((100*( (intervaltotal) - ($idle-${previdle:-0}) ) / (intervaltotal) ))")"
  56. if (( $cpu >= 70 ));then
  57. color="$red"
  58. else
  59. color="$grey"
  60. fi
  61. echo "$cpu%"
  62. }
  63. netup(){
  64. netup="$("$HOME/.config/wmfs/scripts/speed-wmfs.sh")"
  65. echo "${netup}"
  66. }
  67. pause(){
  68. echo -n $(mpc | if grep -q "paused"; then echo -n "⮔"; else echo -n "⮕"; fi)
  69. }
  70. while :; do
  71. printf "%s\n" "[MPD] $(pause) $(mus) [vol] $(vol) [pac] $(pac)[aur] $(aur) [net] $(netup) [cpu]$(cpu) [mem]$(memu)/$(memt) [home]$(home) [riddle] $(riddle) [gmail]$(gmail) [teknik]$(teknik) [rss]$(rss) [date] $(dat)"
  72. sleep 1
  73. done