mirror of
https://github.com/0intro/wmii
synced 2025-01-18 16:19:23 +03:00
implemented cmd 'sendto <page>' in /x/x/x/ctl
This commit is contained in:
parent
33ffed7293
commit
b3e54e3ae0
@ -584,3 +584,23 @@ select_client(Client *c, char *arg)
|
||||
}
|
||||
focus_client(a->client[i], True);
|
||||
}
|
||||
|
||||
void
|
||||
send_client(Client *c, char *arg) {
|
||||
const char *errstr;
|
||||
Page *p;
|
||||
int i;
|
||||
|
||||
|
||||
if(!strncmp(arg, "new", 4))
|
||||
p = alloc_page();
|
||||
else {
|
||||
i = cext_strtonum(arg, 1, npage, &errstr);
|
||||
if(errstr)
|
||||
return;
|
||||
p = page[i - 1];
|
||||
}
|
||||
detach_client(c, False);
|
||||
focus_page(p);
|
||||
attach_client(c);
|
||||
}
|
||||
|
@ -1075,8 +1075,8 @@ xwrite(IXPConn *c, Fcall *fcall)
|
||||
cl = page[i1]->area[i2]->client[i3];
|
||||
if(!strncmp(buf, "kill", 5))
|
||||
kill_client(cl);
|
||||
if(!strncmp(buf, "detach", 7))
|
||||
detach_client(cl, False);
|
||||
if(!strncmp(buf, "sendto ", 7))
|
||||
send_client(cl, &buf[7]);
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
|
@ -224,6 +224,7 @@ unsigned int bar_height(Client *c);
|
||||
int cid_to_index(Area *a, unsigned short id);
|
||||
int client_to_index(Client *c);
|
||||
void select_client(Client *c, char *arg);
|
||||
void send_client(Client *c, char *arg);
|
||||
|
||||
/* event.c */
|
||||
void init_x_event_handler();
|
||||
|
Loading…
Reference in New Issue
Block a user