Split/Conf: Add split_move_direction function
This commit is contained in:
parent
7d754f71d4
commit
af0ddeda3f
@ -109,7 +109,11 @@ const func_name_list_t func_list[] =
|
||||
{"toggle_tagautohide", uicb_toggle_tagautohide },
|
||||
{"toggle_tag_expose", uicb_tag_toggle_expose},
|
||||
{"split_toggle", uicb_split_toggle },
|
||||
/*{"split_client_vertical", uicb_split_client_vertical },
|
||||
{"split_move_right", uicb_split_move_Right },
|
||||
{"split_move_left", uicb_split_move_Left },
|
||||
{"split_move_top", uicb_split_move_Top },
|
||||
{"split_move_bottom", uicb_split_move_Bottom },
|
||||
/*{"split_client_vertical" uicb_split_client_vertical },
|
||||
{"split_client_horizontal", uicb_split_client_horizontal }, */
|
||||
{NULL, NULL}
|
||||
};
|
||||
|
||||
33
src/split.c
33
src/split.c
@ -32,6 +32,20 @@
|
||||
|
||||
#include "wmfs.h"
|
||||
|
||||
#define SPLIT_MOVE_DIR(d) \
|
||||
void \
|
||||
uicb_split_move_##d(uicb_t cmd) \
|
||||
{ \
|
||||
CHECK(sel); \
|
||||
split_move_dir(sel, d); \
|
||||
}
|
||||
|
||||
/* uicb_split_move_dir() */
|
||||
SPLIT_MOVE_DIR(Right);
|
||||
SPLIT_MOVE_DIR(Left);
|
||||
SPLIT_MOVE_DIR(Top);
|
||||
SPLIT_MOVE_DIR(Bottom);
|
||||
|
||||
/** Arrange size of parent client of last closed client
|
||||
*/
|
||||
static void
|
||||
@ -320,6 +334,25 @@ split_client_integrate(Client *c, Client *sc, int screen, int tag)
|
||||
return;
|
||||
}
|
||||
|
||||
/** Move splitted client by re-arranging it in next by direction client
|
||||
*/
|
||||
void
|
||||
split_move_dir(Client *c, Position p)
|
||||
{
|
||||
Client *sc;
|
||||
|
||||
if(!c || !(tags[c->screen][c->tag].flags & SplitFlag))
|
||||
return;
|
||||
|
||||
if((sc = client_get_next_with_direction(c, p)))
|
||||
{
|
||||
split_arrange_closed(c);
|
||||
split_client_integrate(c, sc, sc->screen, sc->tag);
|
||||
}
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
/** Toggle split mode
|
||||
*/
|
||||
void
|
||||
|
||||
@ -405,7 +405,15 @@ void split_arrange_closed(Client *ghost);
|
||||
XRectangle split_client(Client *c, Bool p);
|
||||
void split_client_fill(Client *c, XRectangle geo);
|
||||
void split_client_integrate(Client *c, Client *sc, int screen, int tag);
|
||||
void split_move_dir(Client *c, Position p);
|
||||
void uicb_split_toggle(uicb_t cmd);
|
||||
/* Generated with macro {{{ */
|
||||
void uicb_split_move_Right(uicb_t);
|
||||
void uicb_split_move_Left(uicb_t);
|
||||
void uicb_split_move_Top(uicb_t);
|
||||
void uicb_split_move_Bottom(uicb_t);
|
||||
/* }}} */
|
||||
|
||||
|
||||
/* viwmfs.c */
|
||||
void viwmfs(int argc, char **argv);
|
||||
|
||||
6
wmfsrc
6
wmfsrc
@ -450,6 +450,12 @@
|
||||
[key] mod = {"Control"} key = "k" func = "client_swap_top" [/key]
|
||||
[key] mod = {"Control"} key = "j" func = "client_swap_bottom" [/key]
|
||||
|
||||
# Move next splitted client with direction
|
||||
[key] mod = {"Control", "Shift"} key = "h" func = "split_move_left" [/key]
|
||||
[key] mod = {"Control", "Shift"} key = "l" func = "split_move_right" [/key]
|
||||
[key] mod = {"Control", "Shift"} key = "k" func = "split_move_top" [/key]
|
||||
[key] mod = {"Control", "Shift"} key = "j" func = "split_move_bottom" [/key]
|
||||
|
||||
# Resize selected tiled client with direction
|
||||
[key] mod = {"Super"} key = "h" func = "client_resize_left" cmd = "20" [/key]
|
||||
[key] mod = {"Super"} key = "l" func = "client_resize_right" cmd = "20" [/key]
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user