catwm: remove tiling
This commit is contained in:
parent
6e5fd1f3dd
commit
9198ebff29
39
catwm.c
39
catwm.c
|
@ -84,10 +84,7 @@ static void grabkeys();
|
|||
static void keypress(XEvent *e);
|
||||
static void kill_client();
|
||||
static void maprequest(XEvent *e);
|
||||
static void move_down();
|
||||
static void move_up();
|
||||
static void next_win();
|
||||
static void prev_win();
|
||||
static void remove_window(Window w);
|
||||
static void save_desktop(int i);
|
||||
static void select_desktop(int i);
|
||||
|
@ -284,29 +281,6 @@ void maprequest(XEvent *e) {
|
|||
XMapWindow(dis,ev->window);
|
||||
}
|
||||
|
||||
void move_down() {
|
||||
Window tmp;
|
||||
if(current == NULL || current->next == NULL || current->win == head->win || current->prev == NULL) {
|
||||
return;
|
||||
}
|
||||
tmp = current->win;
|
||||
current->win = current->next->win;
|
||||
current->next->win = tmp;
|
||||
//keep the moved window activated
|
||||
next_win();
|
||||
}
|
||||
|
||||
void move_up() {
|
||||
Window tmp;
|
||||
if(current == NULL || current->prev == head || current->win == head->win) {
|
||||
return;
|
||||
}
|
||||
tmp = current->win;
|
||||
current->win = current->prev->win;
|
||||
current->prev->win = tmp;
|
||||
prev_win();
|
||||
}
|
||||
|
||||
void next_win() {
|
||||
client *c;
|
||||
|
||||
|
@ -320,19 +294,6 @@ void next_win() {
|
|||
}
|
||||
}
|
||||
|
||||
void prev_win() {
|
||||
client *c;
|
||||
|
||||
if(current != NULL && head != NULL) {
|
||||
if(current->prev == NULL)
|
||||
for(c=head;c->next;c=c->next);
|
||||
else
|
||||
c = current->prev;
|
||||
|
||||
current = c;
|
||||
}
|
||||
}
|
||||
|
||||
void remove_window(Window w) {
|
||||
client *c;
|
||||
|
||||
|
|
8
config.h
8
config.h
|
@ -53,16 +53,8 @@ const char* volup[] = {"amixer","sset","Master","5\%+",NULL};
|
|||
// Shortcuts
|
||||
static struct key keys[] = {
|
||||
// MOD KEY FUNCTION ARGS
|
||||
{ MOD, XK_h, decrease, {NULL}},
|
||||
{ MOD, XK_l, increase, {NULL}},
|
||||
{ MOD, XK_q, kill_client, {NULL}},
|
||||
{ MOD, XK_j, next_win, {NULL}},
|
||||
{ Mod1Mask, XK_Tab, next_win, {NULL}},
|
||||
{ MOD, XK_k, prev_win, {NULL}},
|
||||
{ MOD|ShiftMask, XK_j, move_up, {NULL}},
|
||||
{ MOD|ShiftMask, XK_k, move_down, {NULL}},
|
||||
{ MOD|ShiftMask, XK_Return, swap_master, {NULL}},
|
||||
{ MOD, XK_space, switch_mode, {NULL}},
|
||||
{ 0, XF86XK_AudioLowerVolume, spawn, {.com = voldown}},
|
||||
{ 0, XF86XK_AudioRaiseVolume, spawn, {.com = volup}},
|
||||
{ MOD, XK_d, spawn, {.com = dmenucmd}},
|
||||
|
|
Reference in New Issue