Skip to content

Commit 72e8f46

Browse files
committed
final changes for new release
1 parent 3569b62 commit 72e8f46

File tree

3 files changed

+67
-36
lines changed

3 files changed

+67
-36
lines changed

README.md

Lines changed: 28 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -181,15 +181,17 @@ Icons are only currently supported for the JWM and IceWM window managers. Icons
181181
Config File
182182
-----------
183183

184-
The config file has three types of entry
184+
The config file has the following types of entry
185185

186186
1) app entries
187-
App entries describe programs that can be added to menus. They have the form:
187+
App entries describe programs that lack .desktop files. They have the form:
188188

189189
```
190-
app [programfile] group=[group] icons=[icon names] title=[title] invoke=[invocation]
190+
app [name] group=[group] icons=[icon names] title=[title] invoke=[invocation]
191191
```
192192

193+
'name' will be the filename on disk for this program.
194+
193195
'group' is the application group, or submenu that this item belongs in. 'title' is the name that will be displayed in the menu. 'icons' is a comma-separated list of icon names that could be used as an icon for this app (menubuilder will search for files matching [icon name].png, [icon name].jpg etc). 'invocation' is the full command-line used to run the app. The icons, title and invoke arguments are optional.
194196

195197
For example:
@@ -228,6 +230,13 @@ Override entries are app entries that mostly apply to apps discovered via .deskt
228230
override DesktopDungeons group=Roguelike icons=skull,sword,goblin
229231
```
230232

233+
Override entries have a special feature where multiple apps can be specified as a comma-separated list, and the same config applied to them, like so:
234+
235+
```
236+
override Helm,PHASEX,IanniX,QMidiArp,Qtractor,drumkv1,samplv1,padthv1,synthv1,amsynth group=Music
237+
```
238+
239+
231240
3) group entries
232241

233242
group entries apply settings to a menu subgroup, for example:
@@ -237,3 +246,19 @@ group entries apply settings to a menu subgroup, for example:
237246
```
238247

239248
The 'parent' option specifies that this is not a top-level group, but is a subgroup of the group 'games'
249+
250+
Some groups are discovered from the "Categories" entry in .desktop files. Such entries are normally a list of groups seperated by semi-colons. menubuilder.lua picks the first of these groups, but this is not always useful. You can ignore groups with the 'ignore' qualifier:
251+
252+
```
253+
group KDE ignore
254+
```
255+
256+
This will have the effect that this group will not be added to the menu, and that applications belonging to this group will be booked against the first group in their "Categories" entry that isn't ignored.
257+
258+
4) 'ignore' entries
259+
260+
'ignore-groups' and 'ignore-apps' can be used to more conviniently list items to be ignored, like so:
261+
262+
```
263+
ignore-groups GTK,Gtk,Qt,Application,ConsoleOnly,GNOME,SDL
264+
```

menubuilder.conf

Lines changed: 14 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,6 @@
1-
iconset CrystalRemix https://github.com/dangvd/crystal_remix/archive/v1.0.tar.gz
2-
iconset Delft https://github.com/madmaxms/iconpack-delft/releases/download/v1.11/delft-iconpack.tar.xz
3-
iconset Oxygen https://github.com/KDE/oxygen-icons/archive/master.zip
4-
iconset FatCow https://www.fatcow.com/images/fatcow-icons/fatcow-hosting-icons-3.9.2-all.zip
51

62
#a list of group names to ignore if they occur in .desktop files
7-
ignore-groups GTK,Gtk,Qt,Application,ConsoleOnly,GNOME
8-
ignore-apps Arcade
3+
ignore-groups GTK,Gtk,Qt,Application,ConsoleOnly,GNOME,SDL
94

105
group Audio icons=Speaker,sound,audio-speaker,Music
116
group AudioVideo icons=television,film
@@ -45,18 +40,20 @@ override DesktopDungeons group=Roguelike
4540
override GemSwap group=Puzzle
4641
override SegaSwirl group=Puzzle
4742
override Invaders95 group=ArcadeClassics
48-
override Helm group=Music
49-
override PHASEX group=Music
50-
override IanniX group=Music
51-
override QMidiArp group=Music
52-
override Qtractor group=Music
53-
override QtFM group=FileManager
43+
44+
override Helm,PHASEX,IanniX,QMidiArp,Qtractor,drumkv1,samplv1,padthv1,synthv1,amsynth group=Music
45+
override Cutegram,Quaternion,nheko,KVIrc group=Chat
46+
override QtFM,worker group=FileManager
47+
override Vim,GVim,FeatherPad group=TextEditor
48+
override Evilvte,LilyTerm,LXTerminal group=TerminalEmulator icons=terminal,xterm
49+
5450
override HTop group=System termapp
5551
override Galculator group=Calculator
56-
override Cutegram group=Chat
57-
override Quaternion group=Chat
5852
override QupZilla group=WebBrowser
59-
override Evilvte group=TerminalEmulator icon=terminal,xterm
53+
54+
#this app is triggered off a shortcut key, not by being run as normal, but it has a .desktop file
55+
#so we ignore it
56+
override Stjerm ignore
6057

6158
# These are special apps used to query information for apps that expect to have it passed to them
6259
# on the command-line
@@ -66,15 +63,12 @@ app xdialog group=DialogApp
6663

6764
app aterm group=TerminalEmulator icon=xterm,terminal title="aterm"
6865
app xterm group=TerminalEmulator icon=xterm,terminal title="Xterm"
69-
app lxterminal group=TerminalEmulator icon=xterm,terminal title="LXterminal"
7066
app mrxvt group=TerminalEmulator icon=urxvt,terminal,xterm
7167
app urxvt group=TerminalEmulator icon=terminal,xterm
7268
app st group=TerminalEmulator icon=xterm,terminal title="Suckless Terminal"
7369
app qterminal group=TerminalEmulator icon=terminal,xterm title="Qterminal"
7470
app gnome-terminal group=TerminalEmulator icon=terminal,xterm title="GNOME Term"
7571
app konsole group=TerminalEmulator icon=terminal,xterm title="Konsole"
76-
app lilyterm group=TerminalEmulator icon=terminal,xterm
77-
app stjerm group=TerminalEmulator icon=terminal,xterm
7872
app gtkterm group=TerminalEmulator icon=terminal,xterm
7973
app gtkterm2 group=TerminalEmulator icon=terminal,xterm
8074
app vte group=TerminalEmulator icon=terminal,xterm
@@ -165,7 +159,6 @@ app krayon group=Graphics icon=art,picture
165159
app tuxpaint group=Graphics icon=art,picture title="Tux Paint"
166160
app mtpaint group=Graphics icon=art,picture title="Mt Paint"
167161
app qiv group=Graphics icon=pencil,art,picture title="Quick Image Viewer"
168-
app phototonic group=Graphics icon=pencil,art,picture title="Phototonic Viewer"
169162
app tuxpaint group=Graphics icon=pencil,art,picture
170163
app SimplePaint group=Graphics icon=pencil,art,picture title="Simple Paint"
171164
app grafx2 group=Graphics icon=pencil,art,picture title="GraFX2 Pixel Editor"
@@ -247,8 +240,7 @@ app jed group=TextEditor icon=editor,pencil
247240

248241
app bluefish group=TextEditor icon=editor,pencil
249242
app leafpad group=TextEditor icon=editor,pencil
250-
app featherpad group=TextEditor icon=feather,editor,pencil title="Feather Pad"
251-
app geany group=TextEditor icon=feather,editor,pencil
243+
app geany group=TextEditor icon=editor,pencil
252244
app kwrite group=TextEditor icon=editor,pencil
253245
app gedit group=TextEditor icon=editor,pencil
254246
app kedit group=TextEditor icon=editor,pencil
@@ -286,12 +278,10 @@ app dischord group=Chat icon=chat
286278
app qTox group=Chat icon=chat title="qTox"
287279
app utox group=Chat icon=chat title="uTox" invoke='LD_PRELOAD="" utox'
288280
app LuxIRC group=Chat icon=chat title="Lux IRC"
289-
app kvirc group=Chat icon=chat title="KV IRC"
290281
app tensor group=Chat icon=chat title="Tensor Matrix Chat"
291282
app Slacken group=Chat icon=chat
292283

293-
app cherrytree group=Notes icons=note,stickynote,feather,notepad
294-
app feathernotes group=Notes icons=note,stickynote,feather,notepad title="Feather Notes"
284+
app cherrytree group=Notes icons=note,stickynote,notepad
295285
app notes group=Notes icons=note,stickynote,notepad title="Qt Notes"
296286
app noblenote group=Notes icons=note,stickynote,notepad title="Noble Note"
297287

@@ -331,8 +321,6 @@ app dvbcut group=AudioVideo icons=media,video title="DVB cut"
331321
app kaffine group=AudioVideo icons=media,video
332322
app llms group=AudioVideo icons=media,video title="LLMS"
333323
app ogmrip group=AudioVideo icons=media,video title="OGM rip"
334-
app smtube group=AudioVideo icons=media,video title="SM Tube"
335-
app smplayer group=AudioVideo icons=media,video title="SM Player"
336324
app sinek group=AudioVideo icons=media,video title="Sinek Player"
337325
app realplay group=AudioVideo icons=media,video title="RealPlayer"
338326
app vlc group=AudioVideo icons=wmplayer,media,video title="VLC"

menubuilder.lua

Lines changed: 25 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -28,22 +28,22 @@ end
2828
function ProcessAppOverrides(app)
2929
local name, config
3030

31-
config=overrides_config[app.exec]
31+
config=overrides_config[app.name]
32+
if config == nil then config=overrides_config[app.exec] end
3233
if config ~= nil
3334
then
3435
if strutil.strlen(config.group) > 0 then app.group=config.group end
35-
if strutil.strlen(config.name) > 0 then app.name=config.name end
3636
if strutil.strlen(config.icon) > 0 then app.icon=config.icon end
37-
if strutil.strlen(config.query) > 0 then app.query=config.query end
3837
if config.termapp == true then app.termapp=true end
39-
if config.ignore == true then app.igore=true end
38+
if config.ignore == true then app.ignore=true end
39+
if config.query == true then app.query=true end
4040
end
4141

4242
end
4343

4444

4545

46-
function NewApp(source, name, exec )
46+
function NewApp(source, name, exec)
4747
local app={}
4848

4949
app.type="app"
@@ -416,6 +416,25 @@ end
416416
end
417417

418418

419+
function LoadOverrides(app_config)
420+
local app, toks
421+
422+
app=LoadAppConfig(app_config)
423+
if app ~= nil
424+
then
425+
--Overrides have one difference from normal app configs, that multiple app names
426+
--can be specified seperated by commas. Thus we can apply the same override to many apps
427+
toks=strutil.TOKENIZER(app.exec, ",")
428+
str=toks:next()
429+
while str ~= nil
430+
do
431+
overrides_config[str]=app
432+
str=toks:next()
433+
end
434+
435+
end
436+
end
437+
419438

420439
function LoadConfig()
421440
local S, str, app, entry_type
@@ -455,8 +474,7 @@ then
455474
LoadIgnoreApps(toks:remaining())
456475
elseif entry_type=="override"
457476
then
458-
app=LoadAppConfig(toks)
459-
if app ~= nil then overrides_config[app.exec]=app end
477+
LoadOverrides(toks)
460478
elseif entry_type=="app"
461479
then
462480
app=LoadAppConfig(toks)

0 commit comments

Comments
 (0)