[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[PATCH] Edge Wrapping



Hi!

I implimented [optional] edge wrapping (cyclical shifting and focusing). This means, when no neighbor is found, movement goes all the way to the direction opposite the DIRECTION argument.

This is currently used by specifying '-w' as the argument to shift and focus, assuming '-i' regardless of the setting. Hopefully, I intend to change the way shift and focus parse flags, and add a setting for always_wrap that way '-i'|'-e' & '-w'|'-nw??' can be used together. 

In order to do this, I added command focus_edge which behaves just like shift_edge. 

I also divided up frame_focus_command into two functions, frame_focus and frame_focus_command. Frame_focus_command simply parses input flags and checks settings, while frame_focus performs the action. Note, I did this also so that focus_edge NEVER recursively calls frame_focus with wrapping, so that infinite loops are ALWAYS avoided, regardless of flags or settings.

I did the same modifications to frame_focus_window_command, frame_focus_window and focus_edge.

Let me know if I missed anything. I'll impliment always_wrap setting and better flag parsing ASAP.

Thanks!
Tylo

Attachment: 0001-Add-support-for-edge-wrapping.-Add-command-focus_edg.patch
Description: Binary data