Re: [dev] hotkey (1) - a suckless global keybinder

2014-02-11 Thread Kurt Van Dijck
Although taking a different approach (conf file parsed at start-up, additional features), the sxhkd/shkd might be of interest. The former is for X and the latter for the console. The two have compatible configuration files formats. https://github.com/baskerville/sxhkd

Re: [dev] hotkey (1) - a suckless global keybinder

2014-02-11 Thread Calvin Morrison
I added hotkey config file support. It is so ugly, and requires much more code. I am ashamed of it to be honest, but it works. except when it segfaults if your config isn't written pefectly. i'm working on that. On 11 February 2014 06:07, Kurt Van Dijck dev.k...@vandijck-laurijssen.be wrote:

Re: [dev] hotkey (1) - a suckless global keybinder

2014-02-10 Thread Michael Hauser
Thank you for this little gem! A humble feature request: add the ability to have modal keybindings / modes as in vim(1), etc… Maybe someone with more experience could combine the superb keymodes patch with this? After hacking the code myself a little I am struck at implementing it myself, as

Re: [dev] hotkey (1) - a suckless global keybinder

2014-02-10 Thread Calvin Morrison
I'm not sure what you mean by modal bindings. Do you mean like executing a hotkey like Ctrl+: to jump the hotkey program, then pressing another key to execute a command? Sorry I'm not sure what you are saying. Calvin On 10 February 2014 17:02, Michael Hauser awarewa...@gmail.com wrote: Thank

Re: [dev] hotkey (1) - a suckless global keybinder

2014-02-10 Thread Michael Hauser
Calvin Morrison writes: I'm not sure what you mean by modal bindings. Do you mean like executing a hotkey like Ctrl+: to jump the hotkey program, then pressing another key to execute a command? Sorry I'm not sure what you are saying. Calvin Exactly! Use case: one hotkey (in my case: the

Re: [dev] hotkey (1) - a suckless global keybinder

2014-02-10 Thread Calvin Morrison
make a hidden window, and set the window focus to it? that'd be my guess. I don't think you can grab two non modifier keys though, and for example probably wouldn't work with the way I am grabbing it. I'd love too see some code. A visual hint could be nice. I definitely see the advantage of a

Re: [dev] hotkey (1) - a suckless global keybinder

2014-02-10 Thread Calvin Morrison
On 10 February 2014 18:31, Calvin Morrison mutanttur...@gmail.com wrote: make a hidden window, and set the window focus to it? that'd be my guess. I don't think you can grab two non modifier keys though, and for example probably wouldn't work with the way I am grabbing it. I'd love too see

Re: [dev] hotkey (1) - a suckless global keybinder

2014-02-10 Thread Michael Hauser
Calvin Morrison writes: make a hidden window, and set the window focus to it? that'd be my guess. I don't think you can grab two non modifier keys though, and for example probably wouldn't work with the way I am grabbing it. I'd love too see some code. Yes, I tried to load/unload the grabs

Re: [dev] hotkey (1) - a suckless global keybinder

2014-02-10 Thread Michael Hauser
Calvin Morrison writes: 8--8-- and here it is: $ cat modal.sh list=firefox chromium xterm xterm -e mocp v=0 `for i in $list; do echo $v $i; v=$(($v+1)); done | dmenu -l 5 | sed 's/^[0-9] //g'` now it has some kinks, the whole for i in whatever in

Re: [dev] hotkey (1) - a suckless global keybinder

2014-02-09 Thread Chris Down
On 2014-02-09 01:43:55 -0500, Calvin Morrison wrote: Surely the user knows what shell they are using? Sure it's a valid point, but almost irrelevant at the same time. Who cares about their shell behavior? If they think it's an issue, then they need not run any commands. I assume people are

Re: [dev] hotkey (1) - a suckless global keybinder

2014-02-09 Thread Bastien Dejean
Calvin Morrison: On 9 February 2014 01:07, Chris Down ch...@chrisdown.name wrote: - You are using system(), which is highly unportable and extremely fragile; I'm not so sure. What's a better solution? http://lubutu.com/code/spawning-in-unix

Re: [dev] hotkey (1) - a suckless global keybinder

2014-02-09 Thread Raphaël Proust
Although taking a different approach (conf file parsed at start-up, additional features), the sxhkd/shkd might be of interest. The former is for X and the latter for the console. The two have compatible configuration files formats. https://github.com/baskerville/sxhkd

Re: [dev] hotkey (1) - a suckless global keybinder

2014-02-09 Thread Rob
On 09/02/14, Chris Down wrote: On 2014-02-09 01:43:55 -0500, Calvin Morrison wrote: Surely the user knows what shell they are using? Sure it's a valid point, but almost irrelevant at the same time. Who cares about their shell behavior? If they think it's an issue, then they need not run any

Re: [dev] hotkey (1) - a suckless global keybinder

2014-02-09 Thread Jens Staal
On Sunday 09 February 2014 01:22:00 Calvin Morrison wrote: I h8 licensing schemes which make me read the text... somebody call their lawyer and sue, looks like mit is not 4 me. have a look at the poetic license http://www.genaud.net/2005/10/poetic-license/ ... its cute while still saying

Re: [dev] hotkey (1) - a suckless global keybinder

2014-02-09 Thread Chris Down
On 2014-02-09 14:18:01 +0100, Jens Staal wrote: have a look at the poetic license http://www.genaud.net/2005/10/poetic-license/ ... its cute while still saying everything that is needed. ...and almost certainly not legally tested. pgpb36Q16Si39.pgp Description: PGP signature

Re: [dev] hotkey (1) - a suckless global keybinder

2014-02-09 Thread Calvin Morrison
This is great! I was just having a discussion about someone for a non-x11 keyboard binding system! Thanks for the link Calvin Morrison On 9 February 2014 05:32, Raphaël Proust raphla...@gmail.com wrote: Although taking a different approach (conf file parsed at start-up, additional features),

[dev] hotkey (1) - a suckless global keybinder

2014-02-08 Thread Calvin Morrison
Comrades - I have had a love affair with dwm's config.h. Unfortunately I also love i3, and also deal with a plethora of other desktops on my day to day work. so I created hotkey (1). Why wasn't there a simple way to have hotkeys, dealt with properly, in a suckless manner? I don't want inane

Re: [dev] hotkey (1) - a suckless global keybinder

2014-02-08 Thread Chris Down
On 2014-02-08 18:37:19 -0500, Calvin Morrison wrote: I have had a love affair with dwm's config.h. Unfortunately I also love i3, and also deal with a plethora of other desktops on my day to day work. so I created hotkey (1). Why wasn't there a simple way to have hotkeys, dealt with properly,

Re: [dev] hotkey (1) - a suckless global keybinder

2014-02-08 Thread Calvin Morrison
On 9 February 2014 01:07, Chris Down ch...@chrisdown.name wrote: On 2014-02-08 18:37:19 -0500, Calvin Morrison wrote: I have had a love affair with dwm's config.h. Unfortunately I also love i3, and also deal with a plethora of other desktops on my day to day work. so I created hotkey (1).

Re: [dev] hotkey (1) - a suckless global keybinder

2014-02-08 Thread Chris Down
On 2014-02-09 01:22:00 -0500, Calvin Morrison wrote: - You are using system(), which is highly unportable and extremely fragile; I'm not so sure. What's a better solution? system() seems like a very standard function. Portability is also not a real concern for me. mos everybody uses

Re: [dev] hotkey (1) - a suckless global keybinder

2014-02-08 Thread Calvin Morrison
On 9 February 2014 01:36, Chris Down ch...@chrisdown.name wrote: On 2014-02-09 01:22:00 -0500, Calvin Morrison wrote: - You are using system(), which is highly unportable and extremely fragile; I'm not so sure. What's a better solution? system() seems like a very standard function.