Commits

Thomas Dahms committed 6be6a85

that was stupid

  • Participants
  • Parent commits 220d88b

Comments (0)

Files changed (1)

 
 diff -r 40bff70c312f config.def.h
 --- a/config.def.h	Tue Nov 15 20:16:58 2011 +0100
-+++ b/config.def.h	Tue Dec 13 19:05:10 2011 +0100
++++ b/config.def.h	Wed Dec 14 00:52:48 2011 +0100
 @@ -14,7 +14,8 @@
  static const Bool topbar            = True;     /* False means bottom bar */
  
  	TAGKEYS(                        XK_3,                      2)
 diff -r 40bff70c312f config.mk
 --- a/config.mk	Tue Nov 15 20:16:58 2011 +0100
-+++ b/config.mk	Tue Dec 13 19:05:10 2011 +0100
++++ b/config.mk	Wed Dec 14 00:52:48 2011 +0100
 @@ -19,7 +19,7 @@
  LIBS = -L/usr/lib -lc -L${X11LIB} -lX11 ${XINERAMALIBS}
  
  #LDFLAGS = -g ${LIBS}
 diff -r 40bff70c312f dwm.c
 --- a/dwm.c	Tue Nov 15 20:16:58 2011 +0100
-+++ b/dwm.c	Tue Dec 13 19:05:10 2011 +0100
++++ b/dwm.c	Wed Dec 14 00:52:48 2011 +0100
 @@ -202,6 +202,7 @@
  static void monocle(Monitor *m);
  static void motionnotify(XEvent *e);
  static Client *nexttiled(Client *c);
  static void pop(Client *);
  static void propertynotify(XEvent *e);
-@@ -1273,6 +1274,34 @@
+@@ -1273,6 +1274,28 @@
  	}
  }
  
 +void
 +nametag(const Arg *arg) {
 +	char *cp, name[MAX_TAGLEN];
-+	char command[200];
++	char command[256];
 +	FILE *fp;
 +	int i;
 +
-+	strcpy(command, "echo -n | dmenu -p 'name tag:' -fn '");
-+	strcat(command, font);
-+	strcat(command, "' -nb '"); strcat(command, normbgcolor);
-+	strcat(command, "' -nf '"); strcat(command, normfgcolor);
-+	strcat(command, "' -sb '"); strcat(command, selbgcolor);
-+	strcat(command, "' -sf '"); strcat(command, selfgcolor);
-+	strcat(command, "' | tr -d '\n'");
++	sprintf(command, "echo -n | dmenu -p 'name tag:' -fn '%s' -nb '%s' -nf '%s' -sb '%s' -sf '%s' | tr -d '\n'", font, normbgcolor, normfgcolor, selbgcolor, selfgcolor);
 +
 +	if(!(fp = (FILE*)popen(command, "r")))
 +		fprintf(stderr, "dwm: Could not popen 'echo -n | dmenu'\n");