Re: [dwm] [OT] minimalistic bbs/forum
hiro <[EMAIL PROTECTED]> writes: > > how about a web interface to a mailing list? you could tell them to > get a google account... > > I read this mailing list through Gmane's web interface. I don't know if it is what you're searching, but it works well enough for me.
Re: [dwm] Done Before: dwm stat scripts!
.xinitrc: #!/bin/sh fbsetbg -c /home/boily/Images/mallorca.jpg #exec startxfce4 exec dwmwrap -- dwmwrap: #!/bin/bash [ -p /home/boily/.dwm-status ] || mkfifo /home/boily/.dwm-status dwm <>/home/boily/.dwm-status & sleep 0.2 ruby /usr/local/bin/ligne.rb -- ligne.rb: #!/usr/bin/ruby PIPE = "/home/boily/.dwm-status" INTERFACE = "eth1" RXMAX = 600 TXMAX = 200 lithour = ['midnight', 'one', 'two', 'three', 'four', 'five', 'six', 'seven', 'eight', 'nine', 'ten', 'eleven', 'noon', 'thirteen', 'fourteen', 'fifteen', 'sixteen', 'seventeen', 'eighteen', 'nineteen', 'twenty', 'twenty-one', 'twenty-two', 'twenty-three'] litmin = ["%s o'clock", "Five past %s", "Ten past %s", "Quarter past %s", "Twenty past %s", "Twenty-five past %s", "Half past %s", "Twenty-five to %s", "Twenty to %s", "Quarter to %s", "Ten to %s", "Five to %s"] def probar(new, last, max) diff = ((new - last) / max * 10).round if diff > 10 then diff = 10 end return "[" + "=" * diff + " " * (10 - diff) + "]" end RXFILE = "/sys/class/net/#{INTERFACE}/statistics/rx_bytes" TXFILE = "/sys/class/net/#{INTERFACE}/statistics/tx_bytes" rx = File.read(RXFILE).to_f / 1024 tx = File.read(TXFILE).to_f / 1024 while not `pidof dwm`.chomp.empty? rxnew = File.read(RXFILE).to_f / 1024 txnew = File.read(TXFILE).to_f / 1024 battery_state, battery_percent = `acpitool`.split(/\s+/)[4..5] battery = "#{battery_percent.to_f.round}% (#{battery_state[0..0].tr('cd','+-')})" now = Time.now nummin = now.min numhour = (nummin > 32 ? (now.hour + 1) % 24 : now.hour) fivemin = case nummin when (0..2) 0 when (3..7) 1 when (8..12) 2 when (13..17) 3 when (18..22) 4 when (23..27) 5 when (28..32) 6 when (33..37) 7 when (28..42) 8 when (43..47) 9 when (48..52) 10 when (49..57) 11 when (58..59) 0 end datetime = now.strftime("%d.%m.%Y - ") + (litmin[fivemin] % lithour[numhour]).capitalize File.open(PIPE, 'w') do |ligne| ligne.print "<-%s ->%s - %s - %s\n" % [probar(rxnew, rx, RXMAX), probar(txnew, tx, TXMAX), battery, datetime] end sleep 1 rx = rxnew tx = txnew end
Re: [dwm] Applying fibonacci or golden ratio to tile()?
> After looking into the spiral thing I got the idea, that one > could distribute different heights to clients in the master and > stacking area as follows: > > ... What do you think > about this? Well, I often find myself using three terminals at the same time. I find this idea to be interesting because I'd like to have more screen estate for important information than what is now possible with equal division of the stacks. In my opinion, to distribute windows according to the golden ration (or any other proportion) is great if you only have a small number of opened windows at the same time. Otherwise, smaller windows would be unreadable. But still, I support this idea and like to experiment with it soon! Salut, Alexandre
Re: [dwm] Statusbar gadget: cpubar
Robert Manea <[EMAIL PROTECTED]> writes: > > Used with dzen it could looks like this: > http://omploader.org/file/xmonad-cpubar.png > Some days ago I hacked a ruby script to monitor my network connection. By a happy coincidence, I happen to use the same characters. Here is my script. It also displays CPU temperature and the date. #!/usr/bin/ruby PIPE = "/home/boily/.dwm-status" INTERFACE = "eth0" RXMAX = 600 TXMAX = 200 CPUTEMPFILE = "/sys/bus/i2c/devices/0-004c/temp2_input" DATETIME = "%d.%m.%Y - %H:%M" def probar(new, last, max) diff = ((new - last) / max * 10).round if diff > 10 then diff = 10 end return "[" + "=" * diff + " " * (10 - diff) + "]" end RXFILE = "/sys/class/net/#{INTERFACE}/statistics/rx_bytes" TXFILE = "/sys/class/net/#{INTERFACE}/statistics/tx_bytes" rx = File.read(RXFILE).to_f / 1024 tx = File.read(TXFILE).to_f / 1024 while not `pidof dwm`.chomp.empty? rxnew = File.read(RXFILE).to_f / 1024 txnew = File.read(TXFILE).to_f / 1024 cputemp = File.read(CPUTEMPFILE).to_f / 1000 datetime = Time.now.strftime(DATETIME) File.open(PIPE, 'w') do |ligne| ligne.print "<-%s ->%s - %.1f°C - %s\n" % [probar(rxnew, rx, RXMAX), probar(txnew, tx, TXMAX), cputemp, datetime] end sleep 1 rx = rxnew tx = txnew end
Re: [dwm] dzen-0.3
> > The bugfixed version can be found here: > > http://gotmor.googlepages.com/dzen-0.4.tar.gz Dzen works very well for me, except for the fact that it exits with a segmentation fault... By the way, you had a great idea by coding dzen. I look forward for further developments!