My build of dmenu
Go to file
tarneo bab46f0c9f
Change font size to match nixos one
2024-01-30 21:09:21 +01:00
colors Update gruvbox colorscheme and center menu 2023-06-19 14:29:11 +02:00
patch New version of dmenu-distrotube based on flexipatch. 2022-03-08 13:56:53 -06:00
.gitignore Add gitignore 2023-06-19 14:16:42 +02:00
LICENSE Rebasing dmenu-distrotube on flexipatch. 2022-03-08 14:25:11 -06:00
Makefile Rebasing dmenu-distrotube on flexipatch. 2022-03-08 14:25:11 -06:00
PKGBUILD Updating build and README. 2021-05-13 19:22:20 -05:00
README.org Rebasing dmenu-distrotube on flexipatch. 2022-03-08 14:25:11 -06:00
arg.h Pushing my dmenu build to new repo. 2020-03-25 17:56:47 -05:00
config.def.h Rebasing dmenu-distrotube on flexipatch. 2022-03-08 14:25:11 -06:00
config.h Change font size to match nixos one 2024-01-30 21:09:21 +01:00
config.mk Rebasing dmenu-distrotube on flexipatch. 2022-03-08 14:25:11 -06:00
dmenu.1 Rebasing dmenu-distrotube on flexipatch. 2022-03-08 14:25:11 -06:00
dmenu.c Rebasing dmenu-distrotube on flexipatch. 2022-03-08 14:25:11 -06:00
dmenu_path Rebasing dmenu-distrotube on flexipatch. 2022-03-08 14:25:11 -06:00
dmenu_run Rebasing dmenu-distrotube on flexipatch. 2022-03-08 14:25:11 -06:00
drw.c Rebasing dmenu-distrotube on flexipatch. 2022-03-08 14:25:11 -06:00
drw.h Rebasing dmenu-distrotube on flexipatch. 2022-03-08 14:25:11 -06:00
patches.def.h New version of dmenu-distrotube based on flexipatch. 2022-03-08 13:56:53 -06:00
patches.h Enable patch: PASSWORD_PATCH 2023-11-22 15:45:57 +01:00
stest.1 Pushing my dmenu build to new repo. 2020-03-25 17:56:47 -05:00
stest.c Rebasing dmenu-distrotube on flexipatch. 2022-03-08 14:25:11 -06:00
util.c Pushing my dmenu build to new repo. 2020-03-25 17:56:47 -05:00
util.h Rebasing dmenu-distrotube on flexipatch. 2022-03-08 14:25:11 -06:00

README.org

dmenu-distrotube

What is dmenu?

dmenu-distrotube
dmenu-distrotube

dmenu is a dynamic menu for X, originally designed for dwm. It manages large numbers of user-defined menu items efficiently. It is a very powerful tool that allows you to pipe information into it. This makes dmenu a perfect utility to incorporate into your scripting.

What is dmenu-flexipatch?

Similar to dwm-flexipatch, the dmenu-flexipatch project has a unique take on patching. It uses preprocessor directives to decide whether or not to include a patch during build time. Patching with dmenu-flexipatch is much easier than the traditional patching methods, especially when using many patches (which I do!).

Patches can be added/removed using the patches.def.h file. For example to include the `alpha` patch then you would only need to flip this setting from 0 to 1:

#define ALPHA_PATCH 1

After you have decided on the patches that work for you, then run: sudo make install

What is dmenu-distrotube

dmenu-distroube is my personal build of dmenu that is very heavily patched to add more functionality and more customization options. I originally did this through traditional patching of the standard Suckless version of dmenu. The patches that I used were:

  • dmenu-alpha adds transparency as an option.
  • dmenu-border adds border around dmenu window
  • dmenu-center centers dmenu in the middle of screen (-c)
  • dmenu-fuzzyhighlight fuzzy matches gets highlighted
  • dmenu-fuzzymatch adds support for fuzzy-matching
  • dmenu-grid adds a flag (-g) to specify the number of grid columns
  • dmenu-lineheight adds a flag (-h) to set the minimum height of dmenu lines
  • dmenu-morecolor creates a color option for use the entries adjacent to the selection
  • dmenu-mousesupport basic mouse support
  • dmenu-numbers Displays number of matched and total items in top right corner
  • dmenu-xyw Allows setting X/Y coordinates as well as W (width).

Due to the tedious nature of applying so many patches, I now use dmenu-flexipatch for building dmenu-distrotube. After all, no need to reinvent the wheel!

Mouse functionality

Mouse actions supported:

  • Left-mouse click:

    • On prompt and input field: clear input text and selection.
    • In horizontal and vertical mode on item: select and output item (same as pressing enter).
    • In horizontal mode on arrows: change items to show left or right.
  • Ctrl-left-mouse click: multisel modifier.
  • Right-mouse click: close.
  • Middle-mouse click:

    • Paste current selection.
    • While holding shift: paste primary selection.
  • Scroll up:

    • In horizontal mode: same as left-clicking on left arrow.
    • In vertical mode: show items above.
  • Scroll down:

    • In horizontal mode: same as left-clicking on right arrow.
    • In vertical mode: show items below.

Available flags

  • [-bw borderwidth]
  • [-c] for centering
  • [-fn font]
  • [-g columns]
  • [-l lines]
  • [-m monitor]
  • [-nb color]
  • [-nf color]
  • [-nhb color]
  • [-nhf color]
  • [-p prompt]
  • [-sb color]
  • [-sf color]
  • [-shb color]
  • [-shf color]
  • [-w windowid]
  • [-X xoffset]
  • [-Y yoffset]
  • [-W width]

An example: dmenu_run -c -bw 2 -l 20 -g 4 -p 'Run: '

This launches dmenu_run with -c (centered), -bw (border width), -l (number of vertical lines) and -g (number of grid columns).

Installing dmenu-distrotube on Arch Linux

All you need to do is to download the PKGBUILD from this repository. Then run the following command:

makepkg -cf

This will create a file that ends in .pkg.tar.zst (for example, dmenu-distrotube-git-5.0-1-x86_64.pkg.tar.zst). Then run:

sudo pacman -U *.pkg.tar.zst

Alternatively, you could also install dmenu-distrotube from my own DTOS core repository. To do so, add the following to the end of /etc/pacman.conf :

[dtos-core-repo]
SigLevel = Required DatabaseOptional
Server = https://gitlab.com/dwt1/$repo/-/raw/main/$arch

Then, sync the repositories and update your system with: sudo pacman -Syyu

NOTE: Pacman will complain about importing a PGP key that is either invalid or corrupted. The problem can be fixed by locally signing the imported key:

sudo pacman-key --lsign-key C71486C31555B12E

And, then: sudo pacman -S dmenu-distrotube

NOTE: Installing dmenu-distrotube-git conflicts with the standard dmenu package. If you already have dmenu installed, you will be asked if you want to remove dmenu and install dmenu-distrotube-git instead.

Installing dmenu-distrotube on other Linux distributions

Download the source code from this repository or use a git clone:

NOTE: Installing dmenu-distrotube will overwrite your existing dmenu installation so make a backup of your current config if you need it.