diff --git a/config.h b/config.h index 12f9b1f..a441b2a 100755 --- a/config.h +++ b/config.h @@ -13,6 +13,7 @@ #define SMENUBGCOL 0x1f9b92 // #define SHOWSTICK +// #define VIRTNOTIFY #define SHORTCUTMOD Mod4Mask #define MODBITS (1<<6) diff --git a/menu.c b/menu.c index f9b58be..395f1e4 100755 --- a/menu.c +++ b/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 } }