[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: UPDATE: command: shift_edge
- To: Thorsten Wißmann <edu _at_ thorsten _minus_ wissmann _dot_ de>
- Subject: Re: UPDATE: command: shift_edge
- From: Tyler Thomas Hart <tylerthomashart _at_ gmail _dot_ com>
- Date: Sat, 8 Dec 2012 22:11:47 -0800
Thorsten,
Your changes, including the autocompletion changes and the locking/unlocking look great (I didn't notice any flickering on my machine, but It's still a good idea to impliment). Thanks for getting rid of the empty declaration too.
You have a valid point about 'shift' changing. Note, though, that cyclical-shifting (edge-wrapping) is the MAIN reason why I wrote shift-edge:
(shift right || shift_edge left)
herbstclient keybind $foo or , shift -i right , shift_edge left
... so if the return status for 'shift' ever changes, then shift_edge could probably be depreciated (or repurposed for whatever else people are using it for).
Also, please note my response to a comment in your reply to 'query':
>An alternative solution would be writing a command that takes any other command, and repeats it (until a
>nonzero). This would take only a few lines of code, and have greater scope and more uses than my command.
>But it would also contribute to my yet-another scripting language paradigm, and it would also be DANGEROUS
>without safeguards like a max_repeat or something similar. So your call.
bearing that in mind, (I, personally, think that adding a more general command would be a BAD idea), if you don't want to impliment the more general solution, I acknowledge your changes to my patch and wish for them to be commited to master.
Thanks!
Tylo
On Sat, Dec 8, 2012 at 2:24 PM, Thorsten Wißmann
<edu _at_ thorsten _minus_ wissmann _dot_ de> wrote:
Hi Tyler,
Sorry for the spam. I accidentally wrote the answer to shift_edge as a
reply to shift_cycle_monitor. So here's the correct answer:
On Wed, Nov 28, 2012 at 04:30:54PM -0800, Tyler Thomas Hart wrote:
> shift_edge DIRECTION
> Shifts the focused window to the the edge of a tag in the
> specified DIRECTION. The DIRECTIONS behave as specified at
> the focus command.
I had to modify your patch heavily — I actually changed everything
except the function signature:
- There was no parameter completion
- There was a useless variable called "check"
- The command produced flickering, if the loop was executed twice, so
I added monitor locking/unlocking.
- I added your full name in the author field of the commit.
But I have a bad feeling about this patch anyway, because it assumes
that frame_move_window() doesn't behave in a cyclic way. (Which may
change in the future...).
If you still need this feature, then please acknowledge the attached
patch.
Regards,
Thorsten