wmii: problems with keybindings
I started to replace Xmonad with wmii and I really love wmii, fast and easy to configure. And no need for ghc.
I works very good, I have only two minor problems with the keybindings. 1. It was no problem to setup keybindings to start my favorite applications. But I have serious problems to control the backlight of my laptop and the volume. I use xbacklight for the former and amixer for the latter. Both programs work fine from the command line, but they won't work if I bind the to key-combinations. Here is the part for this in my ~/.wmii-hg/wmiirc Code:
Key $MODKEY-, # Decrease backlight 5% 2. I want to resize the tiles with key-combinations and luckily the wmii-website offers a solution for that under the point "Resize windows with the keyboard". Unluckily it doesn't work. I pasted that code-snippet in my configuration file into the part with the other keybindings. I restarted X, tried it and it didn't work. All I get is "cat: s/^ /: No such file or directory" on the virtual terminal where I launched startx. Sadly I don't know how to fix that. I hope some one can help me here. Those are rather minor problems, but for me they are showstoppers. Thanks in advance. |
Update: I could solve the second issue with switching from the developing version (wmii-hg) to the stable version (3.9.2 from the Arch repositories) and use the Python configuration file instead of Dash.
But the first issue still is not solved, I just can't get it to work. The commands work from the command-line, but not from the configuration file. This is what is looking like now: Code:
# MY Key-Bindings Any suggestions? |
The reason the call does not work is because call works like execvp() in C. What you need to do is:
Code:
lambda k: call('amixer', 'sset', 'Master', '3%+', background=True) If you wanted to be lazy, you might do something like Code:
lambda k: call('amixer sset Master 3%+'.split(), background=True) |
Thanks for your answer, I really need a refresh on my (rather poor) Python skills.
I tried your suggestions, but it still doesn't work. If I only would get any error-message, that would be very helpful, but si I don't even have a clue for what I have to search to fix that. |
If you want output somewhere, you might need to set background to False.
|
Quote:
'%(mod)s-Shift-,' should work I guess but I can guess that trying to map '%(mod)s-Shift--', '%(mod)s-Shift-#', and '%(mod)s-Shift-+' will not work. Most likely in the first case, the interpreter is reading it as the modkey and shift and some illegal combination. It may accept %(mod)s-Shift-# but it's probably receiving it as modkey-shift-3, same for + except it's probably seeing it as =. I'm not 100% certain but that's my best guess. Edit: The best way to check the first one is to press %(modkey)-a and then run showkeys. It'll show yours as they appear to have been interpreted by wmii from your wmiirc. |
Quote:
Will try the suggestion to set background to false. |
Quote:
Code:
u'unicode string' |
I changed the bindings to some unused letters (not symbols, like before) and it works.
Hadn't thought that wmii can't parse those symbols. Thanks for your help, all problems solved (besides a conky problem that is unsolvable), so I can totally ditch Xmonad and have fun with wmii. |
Quote:
Now all I have to do is get you to switch from Vimperator to Pentadactyl :P |
Quote:
|
Quote:
There are also some more logical keybindings and less "add-ons" required to accomplish some things I wanted in Vimperator (like using the homerow for hints instead of numbers). |
Thanks for clarification. I think I will try that a little bit more and see if I like it.
|
Quote:
|
Switched to it this evening. Let's see how it works for me, but currently I can't see any differences to vimperator, but I was fairly new to that, too.
|
All times are GMT -5. The time now is 09:06 AM. |