Another copy of my dotfiles. Because I don't completely trust GitHub.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

88 lines
2.9 KiB

  1. diff -up dmenu-4.9/dmenu.1 dmenu-4.9-orig/dmenu.1
  2. --- dmenu-4.9/dmenu.1 2019-09-25 12:55:42.666319316 -0600
  3. +++ dmenu-4.9-orig/dmenu.1 2019-09-25 12:48:38.848249931 -0600
  4. @@ -3,7 +3,7 @@
  5. dmenu \- dynamic menu
  6. .SH SYNOPSIS
  7. .B dmenu
  8. -.RB [ \-bfivP ]
  9. +.RB [ \-bfiv ]
  10. .RB [ \-l
  11. .IR lines ]
  12. .RB [ \-m
  13. @@ -47,9 +47,6 @@ is faster, but will lock up X until stdi
  14. .B \-i
  15. dmenu matches menu items case insensitively.
  16. .TP
  17. -.B \-P
  18. -dmenu will not directly display the keyboard input, but instead replace it with dots. All data from stdin will be ignored.
  19. -.TP
  20. .BI \-l " lines"
  21. dmenu lists items vertically, with the given number of lines.
  22. .TP
  23. diff -up dmenu-4.9/dmenu.c dmenu-4.9-orig/dmenu.c
  24. --- dmenu-4.9/dmenu.c 2019-09-25 12:48:55.756173240 -0600
  25. +++ dmenu-4.9-orig/dmenu.c 2019-09-25 12:48:38.848249931 -0600
  26. @@ -37,7 +37,7 @@ struct item {
  27. static char text[BUFSIZ] = "";
  28. static char *embed;
  29. static int bh, mw, mh;
  30. -static int inputw = 0, promptw, passwd = 0;
  31. +static int inputw = 0, promptw;
  32. static int lrpad; /* sum of left and right padding */
  33. static size_t cursor;
  34. static struct item *items = NULL;
  35. @@ -132,7 +132,6 @@ drawmenu(void)
  36. unsigned int curpos;
  37. struct item *item;
  38. int x = 0, y = 0, w;
  39. - char *censort;
  40. drw_setscheme(drw, scheme[SchemeNorm]);
  41. drw_rect(drw, 0, 0, mw, mh, 1, 1);
  42. @@ -144,12 +143,7 @@ drawmenu(void)
  43. /* draw input field */
  44. w = (lines > 0 || !matches) ? mw - x : inputw;
  45. drw_setscheme(drw, scheme[SchemeNorm]);
  46. - if (passwd) {
  47. - censort = ecalloc(1, sizeof(text));
  48. - memset(censort, '.', strlen(text));
  49. - drw_text(drw, x, 0, w, bh, lrpad / 2, censort, 0);
  50. - free(censort);
  51. - } else drw_text(drw, x, 0, w, bh, lrpad / 2, text, 0);
  52. + drw_text(drw, x, 0, w, bh, lrpad / 2, text, 0);
  53. curpos = TEXTW(text) - TEXTW(&text[cursor]);
  54. if ((curpos += lrpad / 2 - 1) < w) {
  55. @@ -531,11 +525,6 @@ readstdin(void)
  56. size_t i, imax = 0, size = 0;
  57. unsigned int tmpmax = 0;
  58. - if(passwd){
  59. - inputw = lines = 0;
  60. - return;
  61. - }
  62. -
  63. /* read each line from stdin and add it to the item list */
  64. for (i = 0; fgets(buf, sizeof buf, stdin); i++) {
  65. if (i + 1 >= size / sizeof *items)
  66. @@ -693,7 +682,7 @@ setup(void)
  67. static void
  68. usage(void)
  69. {
  70. - fputs("usage: dmenu [-bfiPv] [-l lines] [-p prompt] [-fn font] [-m monitor]\n"
  71. + fputs("usage: dmenu [-bfiv] [-l lines] [-p prompt] [-fn font] [-m monitor]\n"
  72. " [-nb color] [-nf color] [-sb color] [-sf color] [-w windowid]\n", stderr);
  73. exit(1);
  74. }
  75. @@ -716,9 +705,7 @@ main(int argc, char *argv[])
  76. else if (!strcmp(argv[i], "-i")) { /* case-insensitive item matching */
  77. fstrncmp = strncasecmp;
  78. fstrstr = cistrstr;
  79. - } else if (!strcmp(argv[i], "-P")) /* is the input a password */
  80. - passwd = 1;
  81. - else if (i + 1 == argc)
  82. + } else if (i + 1 == argc)
  83. usage();
  84. /* these options take one argument */
  85. else if (!strcmp(argv[i], "-l")) /* number of lines in vertical list */