mirror of
git://git.9front.org/plan9front/plan9front
synced 2025-01-12 11:10:06 +00:00
riow: add mod4+shift+q (delete current window)
This commit is contained in:
parent
970710ce92
commit
cc7a274d01
2 changed files with 19 additions and 0 deletions
|
@ -66,6 +66,9 @@ option.
|
|||
Spawn a new
|
||||
.IR window (1).
|
||||
.TP
|
||||
.B Kmod4+shift+q
|
||||
Delete the current window.
|
||||
.TP
|
||||
.B Kmod4+h/j/k/l
|
||||
Focus left/down/up/right.
|
||||
.TP
|
||||
|
|
|
@ -261,6 +261,18 @@ arrowaction(int x, int y)
|
|||
close(f);
|
||||
}
|
||||
|
||||
static void
|
||||
delete(void)
|
||||
{
|
||||
int f;
|
||||
|
||||
wsupdate();
|
||||
if(wcur == nil || (f = wwctl(wcur->id, OWRITE)) < 0)
|
||||
return;
|
||||
fprint(f, "delete");
|
||||
close(f);
|
||||
}
|
||||
|
||||
static struct {
|
||||
int x, y;
|
||||
}cyclectx;
|
||||
|
@ -356,6 +368,10 @@ keyevent(char c, Rune r)
|
|||
cycleaction(0, -1);
|
||||
return 0;
|
||||
}
|
||||
if(r == 'Q' && mod == (Mmod4|Mshift)){
|
||||
delete();
|
||||
return 0;
|
||||
}
|
||||
if(r >= '0' && r <= '9' && (mod & Mctl) == 0){
|
||||
vdaction(r - '0');
|
||||
return 0;
|
||||
|
|
Loading…
Reference in a new issue