sites

public wiki contents of suckless.org
git clone git://git.suckless.org/sites
Log | Files | Refs

dmenu-topbar-d78ff08.patch (943B)


      1 From 3451db9c35ec812f5e063a48773b1761f0d18071 Mon Sep 17 00:00:00 2001
      2 From: NRK <nrk@disroot.org>
      3 Date: Wed, 27 Oct 2021 07:45:00 +0600
      4 Subject: [PATCH] patch: add -t for topbar
      5 
      6 currently config.h allows users to set the value of topbar to 0.
      7 however if one does that, there's no way for him to get a topbar again.
      8 this adds a new flag -t which will force a topbar.
      9 ---
     10  dmenu.c | 2 ++
     11  1 file changed, 2 insertions(+)
     12 
     13 diff --git a/dmenu.c b/dmenu.c
     14 index 98507d9..bf5d786 100644
     15 --- a/dmenu.c
     16 +++ b/dmenu.c
     17 @@ -718,6 +718,8 @@ main(int argc, char *argv[])
     18  			exit(0);
     19  		} else if (!strcmp(argv[i], "-b")) /* appears at the bottom of the screen */
     20  			topbar = 0;
     21 +		else if (!strcmp(argv[i], "-t"))   /* appears at the top of the screen */
     22 +			topbar = 1;
     23  		else if (!strcmp(argv[i], "-f"))   /* grabs keyboard before reading stdin */
     24  			fast = 1;
     25  		else if (!strcmp(argv[i], "-i")) { /* case-insensitive item matching */
     26 -- 
     27 2.33.1
     28