added hacky exit feature

This commit is contained in:
randomuser 2020-12-13 08:48:01 -06:00
parent b47ca1fbbe
commit e57182299a
3 changed files with 6 additions and 0 deletions

View File

@ -15,6 +15,7 @@ static struct key keys[] = {
{MOD, XK_q, win_kill, {0}},
{MOD, XK_c, win_center, {0}},
{MOD, XK_f, win_fs, {0}},
{MOD, XK_e, wm_exit, {0}},
{MOD, XK_k, win_move, {.com = (const char*[]){"move", "n"}, .i = 10}},
{MOD, XK_j, win_move, {.com = (const char*[]){"move", "s"}, .i = 10}},

4
sowm.c
View File

@ -40,6 +40,10 @@ unsigned long getcolor(const char *col) {
return (!XAllocNamedColor(d, m, col, &c, &c))?0:c.pixel;
}
void wm_exit(void) {
exit(0);
}
void win_move(const Arg arg) {
int r = arg.com[0][0] == 'r';
char m = arg.com[1][0];

1
sowm.h
View File

@ -60,5 +60,6 @@ void win_half(const Arg arg);
void win_to_ws(const Arg arg);
void ws_go(const Arg arg);
bool exists_win(Window w);
void wm_exit(void);
static int xerror() { return 0; }