gtkmenuplus - release 1.1.10 2019-11-28
Release 1.1.5 - 02-Mar-2017
Recommended upgrade.
Downloads and change log in first post.
Changes since release 1.1.4 03-Jan-2017:
New:
- Automatically add menu label mnemonic (choice of first character or round-the-clock character sequence)
Fixed:
- Non-comment '#' wasn't allowed in cmd=, if=, elseif=, variable==.
- Dealing with oversized input lines.
- Memory leak.
- Missing initialization.
Other minor improvements, fixes and documentation updates.
Recommended upgrade.
Downloads and change log in first post.
Changes since release 1.1.4 03-Jan-2017:
New:
- Automatically add menu label mnemonic (choice of first character or round-the-clock character sequence)
Fixed:
- Non-comment '#' wasn't allowed in cmd=, if=, elseif=, variable==.
- Dealing with oversized input lines.
- Memory leak.
- Missing initialization.
Other minor improvements, fixes and documentation updates.
[url=http://murga-linux.com/puppy/viewtopic.php?t=117546]Fatdog64-810[/url]|[url=http://goo.gl/hqZtiB]+Packages[/url]|[url=http://goo.gl/6dbEzT]Kodi[/url]|[url=http://goo.gl/JQC4Vz]gtkmenuplus[/url]
New application script "tray-radio" added. See the second post in this thread.
Tray-radio: your Internet radio stations and media files in a tray icon menu.
Tray-radio: your Internet radio stations and media files in a tray icon menu.
- Attachments
-
- tray-radio.gif
- (225.47 KiB) Downloaded 584 times
[url=http://murga-linux.com/puppy/viewtopic.php?t=117546]Fatdog64-810[/url]|[url=http://goo.gl/hqZtiB]+Packages[/url]|[url=http://goo.gl/6dbEzT]Kodi[/url]|[url=http://goo.gl/JQC4Vz]gtkmenuplus[/url]
Release 1.1.6 - 06-Sep-2017
Recommended upgrade.
Downloads and change log in first post.
Changes since release 1.1.5 02-Mar-2017:
New:
- launcher=link -> ... -> app.desktop works. Before one could only do
launcher=app.desktop
- Assign quoted values to variables.
Improved:
- Handle more cases where '#' isn't a comment.
- Documentation and tests.
Fixed:
- Infinite loop (legacy).
- Unassigned parameter means FALSE (regression).
Other minor improvements, fixes and documentation updates.
Recommended upgrade.
Downloads and change log in first post.
Changes since release 1.1.5 02-Mar-2017:
New:
- launcher=link -> ... -> app.desktop works. Before one could only do
launcher=app.desktop
- Assign quoted values to variables.
Improved:
- Handle more cases where '#' isn't a comment.
- Documentation and tests.
Fixed:
- Infinite loop (legacy).
- Unassigned parameter means FALSE (regression).
Other minor improvements, fixes and documentation updates.
[url=http://murga-linux.com/puppy/viewtopic.php?t=117546]Fatdog64-810[/url]|[url=http://goo.gl/hqZtiB]+Packages[/url]|[url=http://goo.gl/6dbEzT]Kodi[/url]|[url=http://goo.gl/JQC4Vz]gtkmenuplus[/url]
Release 1.1.8 - 16-Sep-2018
Recommended upgrade.
Downloads and change log in the first post.
Changes since release 1.1.6 06-Sep-2017:
New:
- Add option -q(uiet) to keep stdout uncluttered.
- Markdown and Unix-style manuals: usage(1), menu format(5).
Changed:
- The GTK3 version is compiled to force displaying menu icons because by default GTK3 hides menu icons.
- Improved documentation and error/help messages.
Fixed:
- legacy bug: cmd=doc displays an error icon
- issue #3
Dev New:
- Added build files for GNU autotools; both GTK2 and GTK3 builds.
- INSTALL and AUTHORS files.
Dev fixed:
- GTK3 builds again (it broke many versions ago).
Recommended upgrade.
Downloads and change log in the first post.
Changes since release 1.1.6 06-Sep-2017:
New:
- Add option -q(uiet) to keep stdout uncluttered.
- Markdown and Unix-style manuals: usage(1), menu format(5).
Changed:
- The GTK3 version is compiled to force displaying menu icons because by default GTK3 hides menu icons.
- Improved documentation and error/help messages.
Fixed:
- legacy bug: cmd=doc displays an error icon
- issue #3
Dev New:
- Added build files for GNU autotools; both GTK2 and GTK3 builds.
- INSTALL and AUTHORS files.
Dev fixed:
- GTK3 builds again (it broke many versions ago).
[url=http://murga-linux.com/puppy/viewtopic.php?t=117546]Fatdog64-810[/url]|[url=http://goo.gl/hqZtiB]+Packages[/url]|[url=http://goo.gl/6dbEzT]Kodi[/url]|[url=http://goo.gl/JQC4Vz]gtkmenuplus[/url]
Hi step.
Sorry for being late discovering your thread.
Good work!
A few questions if I may:
-- How does your take on gtkmenu compare with / differ from aragon's at:
http://www.murga-linux.com/puppy/viewto ... 20&t=84166
aside from including vovchik's cairo capacity for variable fonts and such?
-- Why is a ready-made parsed menu file replacing jwm's menu NOT
included? I ask because as it is, your gtkmenuplus is just a skeleton...
IMO, i do not see the point -- sorry for being so frank -- in having a menu
"motor" with no parsed menu. If the user wants a one-column listing of
available apps, like in yourexample, (s)he might as well install and run dwmenu?
-- Would you consider somehow integrating mikesLr's XML work
http://www.murga-linux.com/puppy/viewto ... 426#961426
on the xfce menu as a parsing tool? Here's why:
One can use aragon's menu creator part of his spm3 for parsing the menu
in sub-categories if one
-- downloads his work (obvious, sorry!)
-- types (and waits a couple of seconds) and then
-- types
Except aragon's spm3 is 6 years old and misses a few apps, IMO because
new Puppies may have a few "Categories=" in their *.desktop files which
did not exist 5 years ago?
Which is why I am asking about integration of mikesLr's recent work,
which covers 300 plus categories, including PuppyLinux' headache-
inducing "X"-categories. (These "X"-categories may save the user a
few headaches, but not to the devs!)
(Forum member mikesLr has an additional comment about menus here:
http://www.murga-linux.com/puppy/viewto ... st#1004801)
I hope that the above will be perceived as a constructive contribution.
BFN.
Sorry for being late discovering your thread.
Good work!
A few questions if I may:
-- How does your take on gtkmenu compare with / differ from aragon's at:
http://www.murga-linux.com/puppy/viewto ... 20&t=84166
aside from including vovchik's cairo capacity for variable fonts and such?
-- Why is a ready-made parsed menu file replacing jwm's menu NOT
included? I ask because as it is, your gtkmenuplus is just a skeleton...
IMO, i do not see the point -- sorry for being so frank -- in having a menu
"motor" with no parsed menu. If the user wants a one-column listing of
available apps, like in your
Code: Select all
gtkmenuplus launchersub=/usr/share/applications
-- Would you consider somehow integrating mikesLr's XML work
http://www.murga-linux.com/puppy/viewto ... 426#961426
on the xfce menu as a parsing tool? Here's why:
One can use aragon's menu creator part of his spm3 for parsing the menu
in sub-categories if one
-- downloads his work (obvious, sorry!)
-- types
Code: Select all
spm3 -c
-- types
One will get a menu somewhat like in the attached screen cap.gtkmenuplus /tmp/spm3rc
Except aragon's spm3 is 6 years old and misses a few apps, IMO because
new Puppies may have a few "Categories=" in their *.desktop files which
did not exist 5 years ago?
Which is why I am asking about integration of mikesLr's recent work,
which covers 300 plus categories, including PuppyLinux' headache-
inducing "X"-categories. (These "X"-categories may save the user a
few headaches, but not to the devs!)
(Forum member mikesLr has an additional comment about menus here:
http://www.murga-linux.com/puppy/viewto ... st#1004801)
I hope that the above will be perceived as a constructive contribution.
BFN.
- Attachments
-
- gtkmenu+-calling-spm3-generated-menu.jpg
- Works pretty well, except spm3's menu creator has missed some apps --
because of its age? - (149.29 KiB) Downloaded 423 times
musher0
~~~~~~~~~~
"You want it darker? We kill the flame." (L. Cohen)
~~~~~~~~~~
"You want it darker? We kill the flame." (L. Cohen)
Thank you.musher0 wrote:Hi step.
Sorry for being late discovering your thread.
Good work!
I don't know, sorry. I noticed aragon's thread maybe a year ago, when someone revived it with a post. I was planning to, but never did find the time, to play with that menu and find the differences.-- How does your take on gtkmenu compare with / differ from aragon's at:
http://www.murga-linux.com/puppy/viewto ... 20&t=84166
aside from including vovchik's cairo capacity for variable fonts and such?
vovchik's cairo capacity applies to that menu only. This menu has it's own cairo capacity, and I don't know how the two differ in detail. With this menu you can style font size, bold/italics, and fg and bg color for each menu item individually or for a given menu level or globally for the whole menu.
Because I don't use jwm and I'm not interested. I use openbox.-- Why is a ready-made parsed menu file replacing jwm's menu NOT
included?
Indeed, the gtkmenu packages do not include fully worked out, useful examples of anything. They include the documentation necessary to learn creating new menus. Several complete examples are given at the links listed in the first post.I ask because as it is, your gtkmenuplus is just a skeleton...
Ok.IMO, i do not see the point -- sorry for being so frank -- in having a menu
"motor" with no parsed menu. If the user wants a one-column listing of
available apps, like in yourexample, (s)he might as well install and run dwmenu?Code: Select all
gtkmenuplus launchersub=/usr/share/applications
Short answer no sorry because I don't use xfce. But let me add some hopefully helpful comments. The commands you listed above look like:-- Would you consider somehow integrating mikesLr's XML work
http://www.murga-linux.com/puppy/viewto ... 426#961426
on the xfce menu as a parsing tool? Here's why:
One can use aragon's menu creator part of his spm3 for parsing the menu
in sub-categories if one
-- downloads his work (obvious, sorry!)
-- types(and waits a couple of seconds) and thenCode: Select all
spm3 -c
-- typesOne will get a menu somewhat like in the attached screen cap.gtkmenuplus /tmp/spm3rc
Except aragon's spm3 is 6 years old and misses a few apps, IMO because
new Puppies may have a few "Categories=" in their *.desktop files which
did not exist 5 years ago?
Which is why I am asking about integration of mikesLr's recent work,
which covers 300 plus categories, including PuppyLinux' headache-
inducing "X"-categories. (These "X"-categories may save the user a
few headaches, but not to the devs!)
(Forum member mikesLr has an additional comment about menus here:
http://www.murga-linux.com/puppy/viewto ... st#1004801)
Code: Select all
# spm3 -c
# gtkmenuplus /tmp/spm3rc
Yes! Thank you for your feedback.I hope that the above will be perceived as a constructive contribution.
BFN.
[url=http://murga-linux.com/puppy/viewtopic.php?t=117546]Fatdog64-810[/url]|[url=http://goo.gl/hqZtiB]+Packages[/url]|[url=http://goo.gl/6dbEzT]Kodi[/url]|[url=http://goo.gl/JQC4Vz]gtkmenuplus[/url]
release 1.1.10 - 28-Nov-2019
Release 1.1.10 - 28-Nov-2019
Recommended upgrade.
Downloads and change log in the first post.
Recommended upgrade.
Downloads and change log in the first post.
[url=http://murga-linux.com/puppy/viewtopic.php?t=117546]Fatdog64-810[/url]|[url=http://goo.gl/hqZtiB]+Packages[/url]|[url=http://goo.gl/6dbEzT]Kodi[/url]|[url=http://goo.gl/JQC4Vz]gtkmenuplus[/url]
# Tutorial - Personalized typing macros with gtkmenuplus
## Overview
In this tutorial you will learn how to create, use and update your own menu of typing macros.
A typing macro is a combination of keypresses that can be repeated at will by selecting its label in a menu.
Gtkdialog draws the menu and executes the macro via one of the supported tools.
You invoke the menu from the command line or an icon or, preferably, from a system hotkey.
You create the menu entries using the simple template attached to this tutorial.
When the macro is executed its text content is inserted at the text cursor position in the active window.
## Prerequisites - What you will need
* GTK+ 2 (*)
* Gtkmenuplus[:1] for your distribution
* xdotool[:2]
* Optional: some way to assign a global hotkey to invoke the menu.
(*) For GTK+ 3 you can download gtkmenuplus source files and compile with GTK+ 3 as a dependency.
You need to install gtkmenuplus and xdotool in your system, and confirm they work correctly.
For Fatdog64 users
Gtkmenuplus is already included in the base system.
Xdotool can be installed from Gslapt Package Manager.
Optional: Sven Multimedia Keyboard daemon runs in the icon tray and provides global hotkey assignment. Instructions for Sven are given at the end of this tutorial.
For Puppy Linux users
Gtkmenuplus pets are attached to the first post in this thread.
Look for xdotool in your package manager.
Optional: There are many ways to assign a global hotkey but I can't be specific. Feel free to add your instructions for your favorite method to this thread.
For The Dogs users
I'm not sure if fredx181 has gtkmenuplus in his repos. If not, you should be able to extract the ".txz" archive attached to the first post under "/". You only need the "usr" folder, leave "install" out.
Xdotool should be in the repo, if not already in the base *Dog system.
Optional: I don't know much about defining global hotkeys in The Dogs. One way is through the Openbox configuration file.
## The template file
The attached template is a gtkmenuplus definition file with string ".tar.gz" appended to befriend the forum software.
Download the template file, save it to a directory somewhere in your $PATH, rename it to remove the trailing ".tar.gz", and make it executable.
You will edit this file to add your own typing macros.
As is the template includes just one macro named "edit this menu".
## First run
Start the template file, either by clicking its icon in the file manager or by typing its name in a terminal window or by pressing its associated hotkey (if you did associate a hotkey to the menu).
Select "edit this menu": your default editor (defaulttexteditor) will open the template file. Write your changes, save the file, quit the editor.
## All runs
When you need to add a new text item or modify an existing one follow the steps listed for the first run.
When you need to use a text item, start the template file with the text cursor positioned in the active window where the text should appear, and select the item label. If you change your mind, press the Escape key or click anywhere outside the menu to dismiss it.
Note that a global hotkey is the only practical way to start the template file to target a graphical window, such as Geany's.
## What items can be added
Essentially, for each text item you need to write "item=" (no quotes) followed by the item label, and "cmd=" followed by either "$TYPE" (no quotes) and the text to be typed or a command that outputs such text. See the examples below. Optionally, you can add a tooltip, format the menu with larger fonts, colors, icons, predefine variables, conditionals, and so on -- all of which is beyond the scope of this tutorial but you can read the fine manual[:3].
If an item label includes an underscore, the character following the underscore can be pressed to quickly select that label. If no other item could be selected by that same letter the selection will also be executed immediately.
### Examples
Item= and cmd= are required. $TYPE invokes xdotool.
Your e-mail address
Quoting
Submenu
Divider
Current date formatted as YYYYMMDD
$DATETIME expands to, e.g., "20200418 235959".
Current time formatted as HHMMSS
Press enter
$PRESS_ENTER types the Return (Enter) key.
Target a terminal window to see the immediate execution of the echo command.
This works in rox filer's command prompt, too.
## Troubleshooting
Invalid gtkmenuplus item syntax aside (user error), each keyboard is a little bit different from all others, especially as regards key modifiers (Ctrl, Alt, etc.) and key timing. Xdotool allows modifying the timing between keypresses (default 12 ms) with the "--delay <milliseconds>" option. To apply a custom timing modify the definition of $TYPE near the top of the template file.
## Links
[:1] gtkmenuplus
* https://github.com/step-/gtkmenuplus
* http://www.murga-linux.com/puppy/viewtopic.php?t=107982
[:2] xdotool
* http://www.semicomplete.com/projects/xdotool/
* https://github.com/jordansissel/xdotool/
[:3] gtkmenuplus configuration directives
* https://github.com/step-/gtkmenuplus/bl ... _format.md
## Hotkey with Sven Multimedia Keyboard Daemon (Fatdog64 Linux)
Since I use Sven I'm going to describe how to associate a global hotkey for the template file with Sven.
These instructions assume that key Windows+q isn't already assigned as a hotkey.
If it is assigned, you need to disable the assignment in Sven's configuration before re-assigning it.
* Right-click the keyboard icon -- located in the desktop panel icon tray --to open Sven's menu, and select Preferences.
* Click Keyboard > New > Description and type "Typing macros Win+q" without quotes.
* Click inside input field Key Code with your mouse, then press keys "Windows" and "q" together, don't press other keys.
* Click inside input field Text Display with your mouse, then type "Win+Q typing macros".
* Click the Program radio button, and type: /<path-where-you-put>/keyboard-macros.gtkmenuplus
(Change path "<path-where-you-put>/" according to the actual location of keyboard-macros.gtkmenuplus).
* Click OK and close Sven.
Press Win+q to test the global hotkey.
## Overview
In this tutorial you will learn how to create, use and update your own menu of typing macros.
A typing macro is a combination of keypresses that can be repeated at will by selecting its label in a menu.
Gtkdialog draws the menu and executes the macro via one of the supported tools.
You invoke the menu from the command line or an icon or, preferably, from a system hotkey.
You create the menu entries using the simple template attached to this tutorial.
When the macro is executed its text content is inserted at the text cursor position in the active window.
## Prerequisites - What you will need
* GTK+ 2 (*)
* Gtkmenuplus[:1] for your distribution
* xdotool[:2]
* Optional: some way to assign a global hotkey to invoke the menu.
(*) For GTK+ 3 you can download gtkmenuplus source files and compile with GTK+ 3 as a dependency.
You need to install gtkmenuplus and xdotool in your system, and confirm they work correctly.
For Fatdog64 users
Gtkmenuplus is already included in the base system.
Xdotool can be installed from Gslapt Package Manager.
Optional: Sven Multimedia Keyboard daemon runs in the icon tray and provides global hotkey assignment. Instructions for Sven are given at the end of this tutorial.
For Puppy Linux users
Gtkmenuplus pets are attached to the first post in this thread.
Look for xdotool in your package manager.
Optional: There are many ways to assign a global hotkey but I can't be specific. Feel free to add your instructions for your favorite method to this thread.
For The Dogs users
I'm not sure if fredx181 has gtkmenuplus in his repos. If not, you should be able to extract the ".txz" archive attached to the first post under "/". You only need the "usr" folder, leave "install" out.
Xdotool should be in the repo, if not already in the base *Dog system.
Optional: I don't know much about defining global hotkeys in The Dogs. One way is through the Openbox configuration file.
## The template file
The attached template is a gtkmenuplus definition file with string ".tar.gz" appended to befriend the forum software.
Download the template file, save it to a directory somewhere in your $PATH, rename it to remove the trailing ".tar.gz", and make it executable.
You will edit this file to add your own typing macros.
As is the template includes just one macro named "edit this menu".
## First run
Start the template file, either by clicking its icon in the file manager or by typing its name in a terminal window or by pressing its associated hotkey (if you did associate a hotkey to the menu).
Select "edit this menu": your default editor (defaulttexteditor) will open the template file. Write your changes, save the file, quit the editor.
## All runs
When you need to add a new text item or modify an existing one follow the steps listed for the first run.
When you need to use a text item, start the template file with the text cursor positioned in the active window where the text should appear, and select the item label. If you change your mind, press the Escape key or click anywhere outside the menu to dismiss it.
Note that a global hotkey is the only practical way to start the template file to target a graphical window, such as Geany's.
## What items can be added
Essentially, for each text item you need to write "item=" (no quotes) followed by the item label, and "cmd=" followed by either "$TYPE" (no quotes) and the text to be typed or a command that outputs such text. See the examples below. Optionally, you can add a tooltip, format the menu with larger fonts, colors, icons, predefine variables, conditionals, and so on -- all of which is beyond the scope of this tutorial but you can read the fine manual[:3].
If an item label includes an underscore, the character following the underscore can be pressed to quickly select that label. If no other item could be selected by that same letter the selection will also be executed immediately.
### Examples
Item= and cmd= are required. $TYPE invokes xdotool.
Your e-mail address
Code: Select all
item=me@example.com
cmd=$TYPE me@example.com
Code: Select all
item=spaces and quotes
cmd=$TYPE "Is the last word in \"quotes\"?"
Code: Select all
submenu=My submenu
item=One
cmd=$TYPE One
item=Two
cmd=$TYPE Two
endsubmenu
Code: Select all
separator
$DATETIME expands to, e.g., "20200418 235959".
Code: Select all
item=yyyymmdd
cmd=sh -c 'set -- $DATETIME; $TYPE "${1//[-:]}"'
tooltip=$DATETIME
Code: Select all
item=hhmmss
cmd=sh -c 'set -- $DATETIME; $TYPE "${2//[-:]}"'
tooltip=$DATETIME
$PRESS_ENTER types the Return (Enter) key.
Target a terminal window to see the immediate execution of the echo command.
This works in rox filer's command prompt, too.
Code: Select all
item=hello world
cmd=sh -c "$TYPE echo 'hello world' && $PRESS_ENTER"
Invalid gtkmenuplus item syntax aside (user error), each keyboard is a little bit different from all others, especially as regards key modifiers (Ctrl, Alt, etc.) and key timing. Xdotool allows modifying the timing between keypresses (default 12 ms) with the "--delay <milliseconds>" option. To apply a custom timing modify the definition of $TYPE near the top of the template file.
## Links
[:1] gtkmenuplus
* https://github.com/step-/gtkmenuplus
* http://www.murga-linux.com/puppy/viewtopic.php?t=107982
[:2] xdotool
* http://www.semicomplete.com/projects/xdotool/
* https://github.com/jordansissel/xdotool/
[:3] gtkmenuplus configuration directives
* https://github.com/step-/gtkmenuplus/bl ... _format.md
## Hotkey with Sven Multimedia Keyboard Daemon (Fatdog64 Linux)
Since I use Sven I'm going to describe how to associate a global hotkey for the template file with Sven.
These instructions assume that key Windows+q isn't already assigned as a hotkey.
If it is assigned, you need to disable the assignment in Sven's configuration before re-assigning it.
* Right-click the keyboard icon -- located in the desktop panel icon tray --to open Sven's menu, and select Preferences.
* Click Keyboard > New > Description and type "Typing macros Win+q" without quotes.
* Click inside input field Key Code with your mouse, then press keys "Windows" and "q" together, don't press other keys.
* Click inside input field Text Display with your mouse, then type "Win+Q typing macros".
* Click the Program radio button, and type: /<path-where-you-put>/keyboard-macros.gtkmenuplus
(Change path "<path-where-you-put>/" according to the actual location of keyboard-macros.gtkmenuplus).
* Click OK and close Sven.
Press Win+q to test the global hotkey.
- Attachments
-
- keyboard-macros.gtkmenuplus.tar.gz
- template file - last update 20200418
- (572 Bytes) Downloaded 172 times
[url=http://murga-linux.com/puppy/viewtopic.php?t=117546]Fatdog64-810[/url]|[url=http://goo.gl/hqZtiB]+Packages[/url]|[url=http://goo.gl/6dbEzT]Kodi[/url]|[url=http://goo.gl/JQC4Vz]gtkmenuplus[/url]