You are not logged in.

#101 2013-06-19 12:05:28

zeltak
Member
From: New England
Registered: 2010-08-07
Posts: 168

Re: sxhkd — Simple X HotKey Daemon

hya

im trying the new Chain cords feature using latest git from today but cant get it to work. im using the example from the github readme:

super + o ; {a,2,q}
    {gvim,firefox,spacefm}


with no sucess, am i missing something. is the above command correspond to pressing super+o letting to and then pressing 'a' to launch gvim?

best

Z

Offline

#102 2013-06-19 12:21:14

bloom
Member
Registered: 2010-08-18
Posts: 749
Website

Re: sxhkd — Simple X HotKey Daemon

zeltak wrote:
super + o ; {a,2,q}
    {gvim,firefox,spacefm}

Is the above command correspond to pressing super + o letting to and then pressing a to launch gvim?

It works for me.

In the context of your example, to launch gvim, you should press super + o, release both super and o, and finally, press and release a.

You might also want to make sure that super + o is not already grabbed.

Last edited by bloom (2013-06-19 15:21:36)


gh · da · ds

Offline

#103 2013-06-19 21:39:01

VCoolio
Member
From: Netherlands
Registered: 2010-01-05
Posts: 120

Re: sxhkd — Simple X HotKey Daemon

I already expressed my appreciation for sxhkd, but this chaining stuff makes it super awesome! Thanks again.

Offline

#104 2013-06-20 00:16:31

zeltak
Member
From: New England
Registered: 2010-08-07
Posts: 168

Re: sxhkd — Simple X HotKey Daemon

Hya Bloom

thx for the answer but no matter what i do it dosent work for me. i updated to latest git, tried different key combos, nothing works. any idea what could casue this? the rest of the functions work just not the chaining

best

Z

Offline

#105 2013-06-20 09:09:24

bloom
Member
Registered: 2010-08-18
Posts: 749
Website

Re: sxhkd — Simple X HotKey Daemon

zeltak wrote:

Tried different key combos, nothing works.

Create a configuration file with the following content:

a ; b ; c
    echo abc

Then create a debug binary with:

make clean debug

Then run (supposing the aforementioned configuration file exists at ~/foorc):

./sxhkd -c ~/foorc

And finally, paste the output of the above command produced after performing the a, b, c chain.


gh · da · ds

Offline

#106 2013-06-20 12:15:31

zeltak
Member
From: New England
Registered: 2010-08-07
Posts: 168

Re: sxhkd — Simple X HotKey Daemon

bloom wrote:

Then create a debug binary with:

make clean debug

thx bloom, but im really not technical at all, i created a config and launched the make clean debug in the same folder as config and got an error:

make: *** No rule to make target `clean'.  Stop.


i assume i need to run in while compiling (i installed it through AUR), is that correct or am i missing something?

best

Z

Offline

#107 2013-06-20 12:33:01

progandy
Member
Registered: 2012-05-17
Posts: 5,264

Re: sxhkd — Simple X HotKey Daemon

i assume i need to run in while compiling (i installed it through AUR), is that correct or am i missing something?

Right. While you are testing it, just pull the git, open a terminal there, compile and run it without installing (only duplicate the build() function manually, not package())


| alias CUTF='LANG=en_XX.UTF-8@POSIX ' |

Online

#108 2013-06-20 13:45:30

bloom
Member
Registered: 2010-08-18
Posts: 749
Website

Re: sxhkd — Simple X HotKey Daemon

zeltak wrote:

thx bloom, but im really not technical at all, i created a config and launched the make clean debug in the same folder as config

Here's the step by step instructions:

git clone https://github.com/baskerville/sxhkd
cd sxhkd
make clean debug
printf "a;b;c\n\techo abc" > foorc
./sxhkd -c foorc

After pressing a, b and c, you shall press ctrl + c to kill the process.

Last edited by bloom (2013-06-20 13:49:26)


gh · da · ds

Offline

#109 2013-06-20 16:26:00

cippaciong
Member
Registered: 2010-06-21
Posts: 104
Website

Re: sxhkd — Simple X HotKey Daemon

This new chain feature is really useful, thanks for implementing it.
Anyway I noticed that sxhkd is not reloading the config file after receiving a  SIGUSR1 signal (it used to do it); I had to kill the process and relaunch it to be able to use the new chain keybindings. Is it the same for you?

Offline

#110 2013-06-20 17:23:14

bloom
Member
Registered: 2010-08-18
Posts: 749
Website

Re: sxhkd — Simple X HotKey Daemon

cippaciong wrote:

Anyway I noticed that sxhkd is not reloading the config file after receiving a  SIGUSR1 signal (it used to do it); I had to kill the process and relaunch it to be able to use the new chain keybindings.

Reload on SIGUSR1 still works fine: what happened is that you sent a SIGUSR1 signal to the current running instance of sxhkd, but that instance did not know how to handle chord chains because it had been instantiated from the previous version of sxhkd. Quod erat demonstrandum.

Last edited by bloom (2013-06-20 17:34:33)


gh · da · ds

Offline

#111 2013-06-20 17:57:57

zeltak
Member
From: New England
Registered: 2010-08-07
Posts: 168

Re: sxhkd — Simple X HotKey Daemon

bloom wrote:

what happened is that you sent a SIGUSR1 signal to the current running instance of sxhkd, but that instance did not know how to handle chord chains because it had been instantiated from the previous version of sxhkd. Quod erat demonstrandum.

hehe ok thats why i wasnt getting the chain command to work....once i killed and restarted then it finally works smile

thx alot bloom, really loving sxhkd, such a great little app, was fed up with xbindkeys!

best

Z

Offline

#112 2013-06-20 20:02:28

cippaciong
Member
Registered: 2010-06-21
Posts: 104
Website

Re: sxhkd — Simple X HotKey Daemon

bloom wrote:
cippaciong wrote:

Anyway I noticed that sxhkd is not reloading the config file after receiving a  SIGUSR1 signal (it used to do it); I had to kill the process and relaunch it to be able to use the new chain keybindings.

Reload on SIGUSR1 still works fine: what happened is that you sent a SIGUSR1 signal to the current running instance of sxhkd, but that instance did not know how to handle chord chains because it had been instantiated from the previous version of sxhkd. Quod erat demonstrandum.

You are totally right, thanks again! smile

Offline

#113 2013-06-22 08:05:01

Supplantr
Member
From: a state of sunshine
Registered: 2011-12-12
Posts: 149
Website

Re: sxhkd — Simple X HotKey Daemon

While using love I discovered that in the case of chords such as:

super + o ; {e,w,m}
    {gvim,firefox,thunderbird}

the e, w, and m keys are only detected by the love window upon being released. However, xev reports both KeyPress and KeyRelease events for these keys.


I use linux and I dont understand nothing in this post.

Offline

#114 2013-06-22 13:14:56

bloom
Member
Registered: 2010-08-18
Posts: 749
Website

Re: sxhkd — Simple X HotKey Daemon

Supplantr wrote:

The e, w, and m keys are only detected by the love window upon being released. However, xev reports both KeyPress and KeyRelease events for these keys.

With the following:

:button1
    echo hello

love gets both button press and release events and yet the event replaying mechanism is the same for key and button events!

I also noticed I only get key press events on the daemon's side with your example chain : I can get release events if I grab in asynchronous mode, but then I can't replay the events...

So... it would seem to indicate that X was not conceived at Bell Labs wink


gh · da · ds

Offline

#115 2013-06-22 17:18:28

bloom
Member
Registered: 2010-08-18
Posts: 749
Website

Re: sxhkd — Simple X HotKey Daemon

As of 710f69d, the following is handled:

super + alt + control + {h,j,k,l} ; {0-9}
    bspc fence_ratio {left,down,up,right} 0.{0-9}

The above notation generates 40 bindings: sequences on the same line are nested, and parallel otherwise.


gh · da · ds

Offline

#116 2013-06-22 22:43:34

zeltak
Member
From: New England
Registered: 2010-08-07
Posts: 168

Re: sxhkd — Simple X HotKey Daemon

Hya again

cant thank you enough and tell you how much i enjoy using sxhkd!

i have a suggestion, would it be possible to add some kind of on screen visual clue for button pressed (especially when chaining keys). this could either be done via send to notify-osd or maybe dzen2? thx alot for your work!!

Z

Offline

#117 2013-06-23 00:05:14

Supplantr
Member
From: a state of sunshine
Registered: 2011-12-12
Posts: 149
Website

Re: sxhkd — Simple X HotKey Daemon

bloom wrote:

So... it would seem to indicate that X was not conceived at Bell Labs wink

This went over my head. Are you saying it's a problem with love, a problem with X, or maybe a third case?
Just to clarify, I only mentioned this here because the issue occurs when the keys are merely bound, i.e. as per this example:

super + alt + control + {h,j,k,l} ; {0-9}
    bspc fence_ratio {left,down,up,right} 0.{0-9}

none of the number keys' press events will be picked up by love, even when pressed independent of the rest of the keybinding.

Also, using the above example, after the super + alt + control + {h,j,k,l} chord is pressed, if another keybinding is pressed (such as super + Return, which launches a terminal), sxhkd seems to "jam." A terminal isn't launched, pressing the number keys doesn't complete the above keybinding, and no other keybindings are executed until the above keybinding "times out."


I use linux and I dont understand nothing in this post.

Offline

#118 2013-06-23 09:53:49

bloom
Member
Registered: 2010-08-18
Posts: 749
Website

Re: sxhkd — Simple X HotKey Daemon

Supplantr wrote:

Are you saying it's a problem with love, a problem with X, or maybe a third case?

Probably X.Org.

Supplantr wrote:

Also, using the above example, after the super + alt + control + {h,j,k,l} chord is pressed, if another keybinding is pressed (such as super + Return, which launches a terminal), sxhkd seems to "jam." A terminal isn't launched, pressing the number keys doesn't complete the above keybinding, and no other keybindings are executed until the above keybinding "times out."

The issue is partially fixed by 7c4c42e: when there's no active chord in chain mode we shall exit the chain mode.

If I read you correctly, you'd also like for the chord that (intentionally?) broke the chain to be retested for matches at level 0 ?

Supplantr wrote:

None of the number keys' press events will be picked up by love, even when pressed independent of the rest of the keybinding.

Yes, I was able to reproduce.

One possible workaround would be to grab only when needed.

But it requires to be very careful:

d
a → b → c
a → c
a → d
a → e

Initially only d and a are grabbed. If a is pressed b, c and e are grabbed. If b is pressed: only e and b are ungrabbed because d is required at level 0 and c must be grabbed to complete the longest chain.

Last edited by bloom (2013-06-23 09:59:36)


gh · da · ds

Offline

#119 2013-06-23 13:10:21

bloom
Member
Registered: 2010-08-18
Posts: 749
Website

Re: sxhkd — Simple X HotKey Daemon

I've a introduced a notation for empty sequence elements: the underscore.

Example:

super + {_,shift + }{h,j,k,l}
    bspc {focus,shift} {left,down,up,right}

gh · da · ds

Offline

#120 2013-06-24 08:13:26

bloom
Member
Registered: 2010-08-18
Posts: 749
Website

Re: sxhkd — Simple X HotKey Daemon

zeltak wrote:

I have a suggestion, would it be possible to add some kind of on screen visual clue for button pressed (especially when chaining keys).

Yes, it will.


gh · da · ds

Offline

#121 2013-06-24 09:46:53

Supplantr
Member
From: a state of sunshine
Registered: 2011-12-12
Posts: 149
Website

Re: sxhkd — Simple X HotKey Daemon

bloom wrote:

Probably X.Org.

This is the second shortcoming of X we've discovered. wink

bloom wrote:

If I read you correctly, you'd also like for the chord that (intentionally?) broke the chain to be retested for matches at level 0 ?

I think this would make the most sense.


I use linux and I dont understand nothing in this post.

Offline

#122 2013-06-24 15:00:52

bloom
Member
Registered: 2010-08-18
Posts: 749
Website

Re: sxhkd — Simple X HotKey Daemon

Supplantr wrote:

I think this would make the most sense.

It should be happening as of 6610d42.


gh · da · ds

Offline

#123 2013-06-25 07:11:50

Supplantr
Member
From: a state of sunshine
Registered: 2011-12-12
Posts: 149
Website

Re: sxhkd — Simple X HotKey Daemon

bloom wrote:

It should be happening as of 6610d42.

It works as expected.

With the latest updates to vim-sxhkdrc the syntax highlighting breaks in this case.


I use linux and I dont understand nothing in this post.

Offline

#124 2013-06-25 08:19:36

bloom
Member
Registered: 2010-08-18
Posts: 749
Website

Re: sxhkd — Simple X HotKey Daemon

Supplantr wrote:

With the latest updates to vim-sxhkdrc the syntax highlighting breaks in this case.

You shall insert a space between --keep-focus and }.

This quirk comes from the underlying sh syntax.

On a side note: you can split long lines into multiple lines by ending each partial line with a backslash.


gh · da · ds

Offline

#125 2013-06-25 20:33:48

Supplantr
Member
From: a state of sunshine
Registered: 2011-12-12
Posts: 149
Website

Re: sxhkd — Simple X HotKey Daemon

bloom wrote:

You shall insert a space between --keep-focus and }.

That was easy! Thanks.


I use linux and I dont understand nothing in this post.

Offline

Board footer

Powered by FluxBB