-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathREADME.org
More file actions
89 lines (77 loc) · 3.6 KB
/
Copy pathREADME.org
File metadata and controls
89 lines (77 loc) · 3.6 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
#+TITLE: dmenu-configs
* What is dmenu?
dmenu is a dynamic menu for X, originally designed for dwm, now working for major of Window/Tiling Managers out there. 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 [[https://github.com/bakkeby/dwm-flexipatch][dwm-flexipatch]], the [[https://github.com/bakkeby/dmenu-flexipatch][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:
#+begin_example
#define ALPHA_PATCH 1
#+end_example
After you have decided on the patches that work for you, then run:
=sudo make install=
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).
+ dmenu-password -- Enables custom input as Password.
Due to the tedious nature of applying so many patches, I now use [[https://github.com/bakkeby/dmenu-flexipatch][dmenu-flexipatch]]. 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
+ [-P for hidden input]
+ [-Pcb for hidden clipboard injection]
+ [-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: ls | dmenu -c -bw 2 -l 20 -g 2
This launches default dmenu with -c (centered), -bw (border width), -l (number of vertical lines) and -g (number of grid columns).
* Installing on Arch Linux
All you need to do is to download the PKGBUILD from this repository. Then run the following command:
#+begin_src sh
makepkg -cf= && sudo pacman -U *.pkg.tar.zst=
#+end_src
* Installing on other Linux distro's
#+begin_src sh
git clone https://github.com/MGSousa/dmenu-configs && cd dmenu-configs
sudo make clean install
#+end_src