You are not logged in.
Hahah, ok. It's a little ridiculous for me to think I'll get credit for things I have all ready posted as public, but thanks for being honest
Sometimes I get pissy. I sent him an email.
Offline
@codemac: I saw in the Screenshots thread you're back on Ion; mind posting your config or some pointers? I wanted to try out Ion just to compare, but it seems the learning curve is a little steeper (or maybe I just dove into wmii on account of tasty ruby goodness, and the curve is just as steep); I would like to give Ion a shot, though. Maybe we need a "The Ion thread", at least for comparison's sake . I don't think I'll be forsaking wmii, since it really is KISS and ruby-licious (did I mention I like ruby yet? ), but I know Ion's supposed to be able to do quite a bit more, while still staying out of my way.
-nogoma
---
Code Happy, Code Ruby!
http://www.last.fm/user/nogoma/
Offline
Hahah, ok. It's a little ridiculous for me to think I'll get credit for things I have all ready posted as public, but thanks for being honest
Oh it's ok man, it's not like I'm saying i did it or something lol, i'm not that kind of man, I just forgot to say `codemac' did the code, I changed the battery applet to do a defined action on low/critical and i sent it to him as a darcs patch, my fault again to forget mentioning it, really sorry, i guess i got so excited discovering wmii, learning ruby and stuff lol
Glad you mailed mfp though
[My Blog] | [My Repo] | [My AUR Packages]
Offline
def to_hash(str)
x = str.split("n").map { |x| x.split(':') }.map { |x| [x.first.gsub(' ','_').to_sym, x.last.strip] }.flatten
Hash[*x]
end
I wrote that function when I was working on the battery bar because I found the use of line numbers, etc. a bit annoying. Passing the contents of files in /proc/acpi to that function generates a hash that maps the name of the field to its value. For my battery bar, it looks like this:
batt = IO.readlines(statefile).join
battinfo = IO.readlines(infofile).join
battery = {}.merge(to_hash(batt)).merge(to_hash(battinfo)) # combine state and info for convenience
batt_percent = [battery[:remaining_capacity].to_f / battery[:last_full_capacity].to_f * 100.0, 100].min.truncate
batt_state = battery[:charging_state]
Also, I have modded the volume applet to control multiple mixers--on my computer, Master, Master Mono, and Headphone. The reason is that Master doesn't adjust the subwoofer speaker's volume (Master Mono), and I don't want a second control just for the headphone jack. I'll be submitting that back to the author, but I can post it if that's bugging anyone right now...
Offline
a quick question about wmii, is it possible to make a program load borderless (gmplayer).
Offline
No
Offline
Azureus makes its notifications pop up borderless because it manages them itself, but wmii reacts by making it impossible to click or type into them...
Offline
That's an azureus bug, and exists in all WM's, not just wmii.
Offline
That's an azureus bug, and exists in all WM's, not just wmii.
I wasn't reporting a bug...
Offline
[....blah blah...] but wmii reacts by making it impossible to click or type into them...
Note the bold. You said wmii was doing it. I said Azureus was doing it.
No one was talking about bug reporting.
Offline
I have a question about volume shortcuts
I came up with this but its not right...
$MODKEY-Control-$DOWN)
PATH="$OLD_PATH" amixer sset Master,0 10%- &;;
$MODKEY-Control-$UP)
PATH="$OLD_PATH" amixer sset Master,0 10%+ &;;
Could you help me out?
Btw, would the wmii gurus mind setting up a wmii wiki page with your great scripts and configs?[/list]
Offline
I have a question about volume shortcuts
I came up with this but its not right...$MODKEY-Control-$DOWN)
PATH="$OLD_PATH" amixer sset Master,0 10%- &;;
$MODKEY-Control-$UP)
PATH="$OLD_PATH" amixer sset Master,0 10%+ &;;
it's "amixer set" not "amixer sset" unless it's a post typo, and BTW you use bash configs or ruby-wmii ??
Could you help me out?
Btw, would the wmii gurus mind setting up a wmii wiki page with your great scripts and configs?
I'd love to but am not very good at wiki syntax :oops:
[My Blog] | [My Repo] | [My AUR Packages]
Offline
Gandalf: I'm using bash
Hmm, turns out my UP and DOWN keys aren't registering...? changing them to "j" and "k" fixed it.
Another question, how do I shutdown the computer from wmii? Is the only way via the terminal (like halt)?
Also, can mpc play radio streams?
Thanks!
Offline
Would someone be so kind and explain (briefly is good) what the differnce is between wmii and ruby-wmii. Thanks.
Offline
wmii is the window manager itself; it can be controlled via pretty much any programming language. It ships w/ a bash shell control script. Any such script can be used; whatever is in ~/.wmii-3/wmiirc will be sourced as the controlling script. The ruby-wmii script is a project over at mfp's site that performs the control using the programming language Ruby. That means the key bindings, bar applets, everything are controlled via ruby. It's a pretty elegant project/solution, and seems to be a fav among wmii users here on the forums (some users mentioned writing a python wmiirc, but I don't know how/if that's progressing). HTH
-nogoma
---
Code Happy, Code Ruby!
http://www.last.fm/user/nogoma/
Offline
Gandalf: I'm using bash
Hmm, turns out my UP and DOWN keys aren't registering...? changing them to "j" and "k" fixed it.
Another question, how do I shutdown the computer from wmii? Is the only way via the terminal (like halt)?
Also, can mpc play radio streams?
Thanks!
Not sure why the UP/DOWN keys wouldn't be working (the others work fine?); unfortunately, I think most people on here are using the ruby-wmii project, instead of the bash script wmii ships with. So, I don't know if this advice applies to the bash version; with ruby-wmii, hitting alt-p to activate the program menu, and then typing "quit<enter>" causes wmii to quit.
As for mpc (assuming you have MPD running), yes, you can use it to play streams; I do it all the time. The usual procedure is to download the .pls file of whatever stream you want, extract the actual url of the stream (usually the line "File1=..." indicates the URL), then pass that url using "mpc add <URL>", which will add it to MPD's playlist.
-nogoma
---
Code Happy, Code Ruby!
http://www.last.fm/user/nogoma/
Offline
nogma:
I'm not getting any sound from the stream (I can from local mp3's): did i do this correctly?
$ mpc add http://di.fm/mp3/chillout.pls
adding: http://di.fm/mp3/chillout.pls
$ mpc play
http://di.fm/mp3/chillout.pls
[playing] #1/1 0:00 (100%)
volume:100% repeat: off random: off
$
"quit<enter>" causes wmii to quit.
So the only way to shutdown the computer is to exit wmii and then "halt"?
Offline
Sorry, my mpc commands perhaps weren't clear. Here we go:
[tambooki@komadori:~/docs/radio]% wget http://kexp-mp3-128k.cac.washington.edu:8000/listen.pls
00:20:11 (5.94 MB/s) - `listen.pls' saved [81]
[tambooki@komadori:~/docs/radio]% cat listen.pls
[playlist]
NumberOfEntries=1
File1=http://kexp-mp3-128k.cac.washington.edu:8000/
[tambooki@komadori:~/docs/radio]% mpc add http://kexp-mp3-128k.cac.washington.edu:8000/
adding: http://kexp-mp3-128k.cac.washington.edu:8000/
[tambooki@komadori:~/docs/radio]% mpc play
http://kexp-mp3-128k.cac.washington.edu:8000/
[playing] #1/1 0:00 (100%)
volume: 0% repeat: off random: off
[tambooki@komadori:~/docs/radio]%
(Note: it isn't always the case that the stream url inside in the .pls file will just be the same host as you download the .pls file from! That just happned to be the case here)
So, basically, my steps were:
1) Download the .pls file (using wget, in my case).
2) Read the .pls file for the url. Doing `cat listen.pls | grep "File.="` works great to quickly grab the URLs
3) Pass the result of the grep to mpc w/ mpc add <url>
That should do it.
As for the shutdown question: Sorry, I totally misread your question the first time! If your user can invoke the shutdown (or halt) command w/o entering a password (via the 'sudo' command or what have you), you could create a keybinding for it. How to do this depends on what scripts you're using to control wmii; are you using the default shell script wmii comes with, or the ruby-wmii project?
---
Edit: I added a preliminary wiki page on using wmii, primarily focused on using ruby-wmii with it. Configuring_wmii. New users and old users alike are invited to check it out and edit! I'm not sure if I covered all the right bases (or if the ones I covered are clear at all), so if there are newbies out there feeling that something's missing, speak up and somebody will try their best to add it. There is currently a (small) section at the end for users to post their own snippets and such.[/url]
-nogoma
---
Code Happy, Code Ruby!
http://www.last.fm/user/nogoma/
Offline
Hey nogma, thanks for your help, I really appreciate it. My mpd is now playing streams thanks to you!
I am using the default script but I see that all the popular kids are using the ruby script. Is the ruby script a drop in replacement for the default?
Offline
wmii is the window manager itself; it can be controlled via pretty much any programming language. It ships w/ a bash shell control script. Any such script can be used; whatever is in ~/.wmii-3/wmiirc will be sourced as the controlling script. The ruby-wmii script is a project over at mfp's site that performs the control using the programming language Ruby. That means the key bindings, bar applets, everything are controlled via ruby. It's a pretty elegant project/solution, and seems to be a fav among wmii users here on the forums (some users mentioned writing a python wmiirc, but I don't know how/if that's progressing). HTH
Great reply...thanks.
Offline
I added a preliminary wiki page on using wmii, primarily focused on using ruby-wmii with it.
Nogma for the win!
Offline
Hey nogma, thanks for your help, I really appreciate it. My mpd is now playing streams thanks to you!
np; you can of course also cook up (or probably locate via google) some simple shell script to do the fetch/parse/mpc add for you.
I am using the default script but I see that all the popular kids are using the ruby script. Is the ruby script a drop in replacement for the default?
It is; the only caveat is you'll need ruby installed on your machine (available via pacman from [current]). After that, simply download the project from mfp's site, install ('ruby install.rb' in the unpacked directory), and it places itself at ~/.wmii-3/wmiirc. From there, you can re-load the wmiirc (or restart wmii), and you're good to start customizing and enjoying.
-nogoma
---
Code Happy, Code Ruby!
http://www.last.fm/user/nogoma/
Offline
_why (everybody's favorite insane rubyist) posted a little mailbox checker. I didn't post it to the wikipage, as obviously I didn't author it, but thought people would find it useful.
Edit: Just realized the plugin supports POP and IMAP mailboxes 8) .
-nogoma
---
Code Happy, Code Ruby!
http://www.last.fm/user/nogoma/
Offline
Edit: Just realized the plugin supports POP and IMAP mailboxes 8) .
With SSL!
nogoma & Paul: The MPD plugin requires the Ruby bindings for mpd, or it will do bad things if you try to enable it. The package is in community, ruby-mpd I think.
Offline
Is there a way to show titiles in wmii? (I am using the bash version)
Offline