Comments (3)
Hi again,
Again, so sorry for the long delay.
I'm currently in the process of moving country but will hopefully be settled soon and be more responsive.
Well I've recreated the issue and you were correct with your initial edit suggestion, nice spotting!
This bug only shows up when you modify the "alias_display_format" parameter in the settings which I'm guessing most people aren't doing.
I made the change as you suggested and pushed that to the master branch.
Thank you for your detective work!
from dmenu-extended.
Hi fat-fighter,
Thanks for your support, and for creating an issue.
Sorry it has taken me so long to respond.
I'm having trouble recreating the issue that you're having.
I wonder if it's the way in which you're entering you aliases into dmenu_extended...
You mention that "if I store them as #alias (command)" then they don't do anything...
By this do you mean that you're typing #Youtube (https://youtube.com)
into dmenu_extended?
I'm interested to know exactly what you're entering to create the aliases.
If you enter +https://youtube.com#YouTube
into dmenu_extended, what happens then?
from dmenu-extended.
Hi Mark,
I am so sorry for replying so late. I have recreated the issue and am briefing the steps below.
- Started with a clean clone of dmenu_extended from your official repo (master)
- Ran dmenu_extended from the folder using python[2] dmenu_extended. This is running smoothly for the commands the program reads from the folders in $PATH or the files it reads from the folders specified in the config file. At this step, my config file looks like this [Note: There is no indicator_alias for now]
{
"alias_applications": false,
"alias_display_format": "{name} ({command})",
"exclude_items": [],
"filebrowser": "xdg-open",
"fileopener": "xdg-open",
"filter_binaries": false,
"follow_symlinks": false,
"frequently_used": 0,
"global_ignore_folders": [],
"ignore_folders": [],
"include_applications": true,
"include_binaries": false,
"include_hidden_files": false,
"include_hidden_folders": false,
"include_items": [],
"indicator_alias": "",
"indicator_edit": "*",
"indicator_submenu": ">",
"menu": "rofi",
"menu_arguments": [
"-dmenu",
"-theme",
"fatmenu"
],
"password_helper": [
"zenity",
"--password",
"--title={prompt}"
],
"path_aliasFile": "/home/fat-fighter/.zsh_aliases",
"path_shellCommand": "~/.dmenuEextended_shellCommand.sh",
"prompt": "Open:",
"scan_hidden_folders": false,
"terminal": "terminology",
"valid_extensions": [
"sh",
"py",
"svg",
"pdf",
...........
"html",
"sublime-project"
],
"watch_folders": [
"~/iitk",
"~/books"
],
"webbrowser": "xdg-open"
}
- Now, I ran two commands from within dmenu_extended ->
+htop;#View running processes
+https://youtube.com#YouTube
- The config file is programmatically changed to include this
"include_items": [
[
"View running processes",
"htop;"
],
[
"YouTube",
"https://youtube.com"
]
],
- This much looks fine. However, if I run dmenu_extended again, and actually run this aliased command (by searching for 'View running ... ' and pressing enter), I get this error printed to the console
> python dmenu_extended.py --debug
Debugging enabled
Launch arguments: []
Frequently used items cache does not exist, will return nothing
Opening cache at /home/fat-fighter/.config/dmenu-extended/cache/dmenuExtended_plugins.txt
Opening cache at /home/fat-fighter/.config/dmenu-extended/cache/dmenuExtended_all.txt
First menu closed with user input: View running processes (htop;)
Loading plugins
This command is not related to a plugin
Converting 'View running processes (htop;)' into its aliased command
View running processes (htop;)
No suitable candidate was found
Executing user input as a command
Executing: View running processes (htop;)
Command converted into:
[u'View', u'running', u'processes', u'(htop;)']
Traceback (most recent call last):
File "dmenu_extended.py", line 1895, in <module>
run(*sys.argv)
File "dmenu_extended.py", line 1890, in run
handle_command(d, out)
File "dmenu_extended.py", line 1529, in handle_command
d.execute(out)
File "dmenu_extended.py", line 664, in execute
return subprocess.call(command)
File "/home/fat-fighter/softwares/conda/lib/python2.7/subprocess.py", line 172, in call
return Popen(*popenargs, **kwargs).wait()
File "/home/fat-fighter/softwares/conda/lib/python2.7/subprocess.py", line 394, in __init__
errread, errwrite)
File "/home/fat-fighter/softwares/conda/lib/python2.7/subprocess.py", line 1047, in _execute_child
raise child_exception
OSError: [Errno 2] No such file or directory
- As you can see, the command was converted into [u'View', u'running', u'processes', u'(htop;)']. Therefore, there isn't proper refactoring of the command passed. This is because the cache building does not do proper mapping of such commands. Now I realize my original claim was incorrect, however, the solution I proposed in the original comment does fix this (after implementing the change in the code, and rebuilding the cache). Post to doing this, the command with the link to youtube works as well
I am still wondering why you did not come accross this problem and there was no prior issue raised for this. Is there something which I am doing incorrectly?
from dmenu-extended.
Related Issues (20)
- Apply Black formatting to code
- Add uninstall method to README.md
- Split cache_build logic into separate script
- systemd timer interval not being set correctly by install script
- Plugin systemPackageManager failing
- Merge requirements and dependencies fields in plugins_index
- Be consistent with naming of dmenu-extended
- Enable continuious integration testing HOT 1
- BUG: dmenu-extended-git-r358.16bde81-2 won't build from the AUR HOT 7
- Add BLACK formatting check into CI tests
- Automatically tag and release on merge
- Fix code causing flake8 exception E722 (do not use bare 'except')
- Remove import statement from __init__.py
- Aliases with function improvement HOT 3
- Menu shows with noticeable delay HOT 4
- Error while building cache
- Advanced key bindings HOT 2
- Can no longer rebuild cache HOT 3
- Tag-based release generation (upload to PyPi) HOT 1
- Cache build error
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from dmenu-extended.