Guest User

Untitled

a guest
Sep 14th, 2012
85
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Diff 1.07 KB | None | 0 0
  1. --- statistics_system.rb.orig   2012-09-14 10:59:40.000000000 +0200
  2. +++ statistics_system.rb    2012-09-14 11:02:52.000000000 +0200
  3. @@ -280,18 +280,27 @@
  4.  puts; puts
  5.  
  6.  
  7. +miss = []
  8. +
  9.  # -------------------------
  10.  # --- system disk usage ---
  11.  # -------------------------
  12.  if which("pydf")
  13.     system("pydf")
  14.     puts
  15. +elsif which("df")
  16. +  puts blue("Disk usage")
  17. +  system("df -h")
  18. +  puts
  19. +else
  20. +  miss << "pydf"
  21.  end
  22.  
  23.  # ---------------
  24.  # --- battery ---
  25.  # ---------------
  26. -#if which("acpi")
  27. +if which("acpi")
  28. +  # pass
  29.  #  bar = 40
  30.  #  out = `acpi -V 2>/dev/null`
  31.  #  if out.match(/^Battery.*[0-9]+/).to_s != "" then
  32. @@ -307,18 +316,11 @@
  33.  #  end
  34.  #  puts out
  35.  #  puts
  36. -#end
  37. +else
  38. +  miss << "acpi"
  39. +end
  40.  
  41.  
  42. -# ------------------------------
  43. -# --- check for dependencies ---
  44. -# ------------------------------
  45. -miss = []
  46. -#comm = %w[ pydf acpi ]
  47. -comm = %w[ pydf ]
  48. -comm.each do |c|
  49. -   if not which(c) then miss += [c] end
  50. -end
  51.  # print warning message about missing dependencies
  52.  if miss.length > 0
  53.     print "warning: the following commands missing: "
Advertisement
Add Comment
Please, Sign In to add comment