@@ -6,27 +6,6 @@ A dmenu replacement plugin for [Noctalia Shell](https://github.com/noctalia-dev/
66
77Everything is driven by Noctalia's IPC system. A script calls ` showItems ` or ` showJson ` to open the panel with a list of choices. When the user selects one, the plugin writes the result to a file and optionally runs a callback command. The included ` noctalia-dmenu ` helper script wraps this into a familiar pipe interface — under the hood it sends the IPC call, waits for the result file, and prints the selection to stdout.
88
9- ## Install
10-
11- ``` bash
12- cd ~ /.config/noctalia/plugins/
13- git clone https://github.com/DaBenjle/noctalia-plugin-dmenu dmenu
14- ```
15-
16- Add to ` ~/.config/noctalia/plugins.json ` :
17-
18- ``` json
19- { "states" : { "dmenu" : { "enabled" : true } } }
20- ```
21-
22- Restart Noctalia, enable in Settings → Plugins.
23-
24- For pipe-style usage:
25-
26- ``` bash
27- ln -s ~ /.config/noctalia/plugins/dmenu/noctalia-dmenu ~ /.local/bin/noctalia-dmenu
28- ```
29-
309## API
3110
3211All commands go through ` noctalia-shell ipc call plugin:dmenu <method> [args] ` .
@@ -74,36 +53,36 @@ noctalia-shell ipc call plugin:dmenu showFromFile /tmp/items.txt '{"separator":"
7453
7554### Item fields
7655
77- | Field | Type | Description |
78- | -------| ------| -------------|
79- | ` name ` | string | Display text |
80- | ` value ` | string | Return value (defaults to ` name ` ) |
81- | ` description ` | string | Subtitle |
82- | ` icon ` | string | [ Tabler icon] ( https://tabler.io/icons ) name |
83- | ` image ` | string | Absolute path to image (overrides ` icon ` ) |
56+ | Field | Type | Description |
57+ | ------------- | ------ | ------------------------------------------- |
58+ | ` name ` | string | Display text |
59+ | ` value ` | string | Return value (defaults to ` name ` ) |
60+ | ` description ` | string | Subtitle |
61+ | ` icon ` | string | [ Tabler icon] ( https://tabler.io/icons ) name |
62+ | ` image ` | string | Absolute path to image (overrides ` icon ` ) |
8463
8564### Options
8665
8766For ` showItems ` / ` showFromFile ` , pass as second arg. For ` showJson ` , include in the same object.
8867
89- | Field | Type | Default | Description |
90- | -------| ------| ---------| -------------|
91- | ` separator ` | string | ` "\n" ` | Item delimiter (` showItems ` / ` showFromFile ` text mode) |
92- | ` prompt ` | string | ` "" ` | Search bar placeholder |
93- | ` callbackCmd ` | string | ` "" ` | Run on selection. ` {} ` = value, ` {index} ` = index, ` {name} ` = name |
94- | ` resultFile ` | string | ` /tmp/noctalia-dmenu-result ` | Where to write the result |
95- | ` resultFormat ` | string | ` "plain" ` | ` "plain" ` , ` "json" ` , or ` "index" ` |
96- | ` allowCustomInput ` | bool | ` false ` | Allow typing values not in the list |
97- | ` closeOnSelect ` | bool | ` true ` | Close after selection |
98- | ` maxResults ` | int | ` 200 ` | Max displayed items |
68+ | Field | Type | Default | Description |
69+ | ------------------ | ------ | ---------------------------- | ------------------------------------------------------------------ |
70+ | ` separator ` | string | ` "\n" ` | Item delimiter (` showItems ` / ` showFromFile ` text mode) |
71+ | ` prompt ` | string | ` "" ` | Search bar placeholder |
72+ | ` callbackCmd ` | string | ` "" ` | Run on selection. ` {} ` = value, ` {index} ` = index, ` {name} ` = name |
73+ | ` resultFile ` | string | ` /tmp/noctalia-dmenu-result ` | Where to write the result |
74+ | ` resultFormat ` | string | ` "plain" ` | ` "plain" ` , ` "json" ` , or ` "index" ` |
75+ | ` allowCustomInput ` | bool | ` false ` | Allow typing values not in the list |
76+ | ` closeOnSelect ` | bool | ` true ` | Close after selection |
77+ | ` maxResults ` | int | ` 200 ` | Max displayed items |
9978
10079### Other commands
10180
102- | Command | Description |
103- | --------- | -------------|
81+ | Command | Description |
82+ | -------- | ------------------------ |
10483| ` toggle ` | Toggle panel open/closed |
105- | ` close ` | Cancel and close |
106- | ` clear ` | Reset state |
84+ | ` close ` | Cancel and close |
85+ | ` clear ` | Reset state |
10786
10887## Helper script
10988
@@ -121,17 +100,17 @@ noctalia-dmenu -f /tmp/items.txt -p "Select:"
121100echo -e " Firefox\nChromium" | noctalia-dmenu -cb " gtk-launch {}"
122101```
123102
124- | Flag | Description |
125- | ------| -------------|
126- | ` -p ` , ` --prompt ` | Search bar placeholder |
127- | ` -cb ` , ` --callback ` | Command on selection |
128- | ` -c ` , ` --custom ` | Allow custom input |
129- | ` -s ` , ` --separator ` | Delimiter (default: newline) |
130- | ` -t ` , ` --timeout ` | Wait timeout (default: 30s) |
131- | ` -r ` , ` --result-file ` | Override result path |
132- | ` -f ` , ` --file ` | Read from file |
133- | ` -F ` , ` --format ` | Output: plain, json, index |
134- | ` -no-close ` | Keep panel open |
103+ | Flag | Description |
104+ | --------------------- | ---------------------------- |
105+ | ` -p ` , ` --prompt ` | Search bar placeholder |
106+ | ` -cb ` , ` --callback ` | Command on selection |
107+ | ` -c ` , ` --custom ` | Allow custom input |
108+ | ` -s ` , ` --separator ` | Delimiter (default: newline) |
109+ | ` -t ` , ` --timeout ` | Wait timeout (default: 30s) |
110+ | ` -r ` , ` --result-file ` | Override result path |
111+ | ` -f ` , ` --file ` | Read from file |
112+ | ` -F ` , ` --format ` | Output: plain, json, index |
113+ | ` -no-close ` | Keep panel open |
135114
136115Exit: ` 0 ` selected, ` 1 ` timeout/cancelled, ` 2 ` error.
137116
@@ -157,14 +136,14 @@ esac
157136
158137Settings → Plugins → Dmenu Provider → Configure.
159138
160- | Setting | Default | Description |
161- | ---------| ---------| -------------|
162- | Panel position | Follow launcher | Where the panel appears |
163- | Show match count | On | Filtered/total in footer |
164- | Show footer | On | Result count bar |
165- | Show toast | Off | Notification on selection |
166- | Result file | ` /tmp/noctalia-dmenu-result ` | Default path |
167- | Max results | 200 | Display cap |
139+ | Setting | Default | Description |
140+ | ---------------- | ---------------------------- | ------------------------- |
141+ | Panel position | Follow launcher | Where the panel appears |
142+ | Show match count | On | Filtered/total in footer |
143+ | Show footer | On | Result count bar |
144+ | Show toast | Off | Notification on selection |
145+ | Result file | ` /tmp/noctalia-dmenu-result ` | Default path |
146+ | Max results | 200 | Display cap |
168147
169148## Testing
170149
0 commit comments