add option to enable/disable virtual switch notifications, remove diagnostic print statements from stick()
This commit is contained in:
parent
dd9e049a8c
commit
f144036b01
2 changed files with 5 additions and 6 deletions
1
config.h
1
config.h
|
@ -13,6 +13,7 @@
|
|||
#define SMENUBGCOL 0x1f9b92
|
||||
|
||||
// #define SHOWSTICK
|
||||
// #define VIRTNOTIFY
|
||||
|
||||
#define SHORTCUTMOD Mod4Mask
|
||||
#define MODBITS (1<<6)
|
||||
|
|
10
menu.c
10
menu.c
|
@ -362,15 +362,9 @@ unhidec(Client *c, int map)
|
|||
void
|
||||
stick(Client *c)
|
||||
{
|
||||
printf("BEFORE STICK:\n");
|
||||
printf("virtual on client: %d\n", c->virt);
|
||||
printf("virtual: %d\n", virt);
|
||||
if (numvirtuals > 1 && c->virt >= 0 )
|
||||
c->virt = -1;
|
||||
else c->virt = virt;
|
||||
printf("AFTER STICK:\n");
|
||||
printf("virtual on client: %d\n", c->virt);
|
||||
printf("virtual: %d\n", virt);
|
||||
}
|
||||
|
||||
void
|
||||
|
@ -436,7 +430,9 @@ switch_to_c(int n, Client *c)
|
|||
void
|
||||
switch_to(int n)
|
||||
{
|
||||
#ifdef VIRTNOTIFY
|
||||
static char virtmsg[32];
|
||||
#endif
|
||||
if(n == virt)
|
||||
return;
|
||||
currents[virt] = current;
|
||||
|
@ -457,8 +453,10 @@ switch_to(int n)
|
|||
signal(SIGINT, SIG_DFL);
|
||||
signal(SIGTERM, SIG_DFL);
|
||||
signal(SIGHUP, SIG_DFL);
|
||||
#ifdef VIRTNOTIFY
|
||||
sprintf(virtmsg, "virtual: switched to %s", b2items[virt]);
|
||||
execlp("notify-send", "notify-send", "-c", "virtual", virtmsg, (char*)0);
|
||||
#endif
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue