Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- --- statistics_system.rb.orig 2012-09-14 10:59:40.000000000 +0200
- +++ statistics_system.rb 2012-09-14 11:02:52.000000000 +0200
- @@ -280,18 +280,27 @@
- puts; puts
- +miss = []
- +
- # -------------------------
- # --- system disk usage ---
- # -------------------------
- if which("pydf")
- system("pydf")
- puts
- +elsif which("df")
- + puts blue("Disk usage")
- + system("df -h")
- + puts
- +else
- + miss << "pydf"
- end
- # ---------------
- # --- battery ---
- # ---------------
- -#if which("acpi")
- +if which("acpi")
- + # pass
- # bar = 40
- # out = `acpi -V 2>/dev/null`
- # if out.match(/^Battery.*[0-9]+/).to_s != "" then
- @@ -307,18 +316,11 @@
- # end
- # puts out
- # puts
- -#end
- +else
- + miss << "acpi"
- +end
- -# ------------------------------
- -# --- check for dependencies ---
- -# ------------------------------
- -miss = []
- -#comm = %w[ pydf acpi ]
- -comm = %w[ pydf ]
- -comm.each do |c|
- - if not which(c) then miss += [c] end
- -end
- # print warning message about missing dependencies
- if miss.length > 0
- print "warning: the following commands missing: "
Advertisement
Add Comment
Please, Sign In to add comment