Add prompt to tag name menu

This commit is contained in:
Alex Kotov 2021-11-16 21:40:37 +05:00
parent c86ad740f0
commit 7c717ee221
Signed by: kotovalexarian
GPG key ID: 553C0EBBEB5D5F08

4
dwm.c
View file

@ -1248,8 +1248,8 @@ nametag(const Arg *arg) {
int i; int i;
errno = 0; // popen(3p) says on failure it "may" set errno errno = 0; // popen(3p) says on failure it "may" set errno
if(!(f = popen("rofi -dmenu", "r"))) { if(!(f = popen("rofi -dmenu -p \"Tag name\"", "r"))) {
fprintf(stderr, "polytreewm: popen 'rofi -dmenu' failed%s%s\n", errno ? ": " : "", errno ? strerror(errno) : ""); fprintf(stderr, "polytreewm: popen 'rofi -dmenu -p \"Tag name\"' failed%s%s\n", errno ? ": " : "", errno ? strerror(errno) : "");
return; return;
} }
if (!(p = fgets(name, TAGS_CUSTOM_NAME_SIZE, f)) && (i = errno) && ferror(f)) if (!(p = fgets(name, TAGS_CUSTOM_NAME_SIZE, f)) && (i = errno) && ferror(f))