MarkHedleyJones / dmenu-extended

An extension to dmenu for quickly opening files and folders.
MIT License
389 stars 33 forks source link

Question about passing argument to filebrowser application #97

Open rodrigomideac opened 4 years ago

rodrigomideac commented 4 years ago

Hey, before anything, thank you for your project! I use terminator and one way to make it open under a folder is to run as terminator --working-directory=/path/to/dir. However, dmenu-extended pass the dir as a last fixed argument:

self.execute(self.prefs['filebrowser'] + ' "' + path + '"')

and that space before opening quotes is preventing concatenation with my filebrowser config "filebrowser": "terminator --working-directory="

I thought about making a script to receive the arguments and then call terminator. Do you have any other suggestion about how can I make this work without an additional script?

Thank you!

MarkHedleyJones commented 4 years ago

Hi rodrigomideac, Thanks for creating an issue and I'm so sorry it has taken me so long to respond! After looking into this I think the best option long-term is for the "fileopener": "xdg-open" to be formatted as a substitution. This will require a modification to dmenu-extended. In the short term, a bash script that takes a path argument and reformats the command to have the --working-directory= argument would be the quickest way to get things working.

Reorking the execution of fileopener, filebrowser, webbrowser and terminal calls to be formatted as substitutions is likely to break backwards compatibility. So, before that happens I need to implement a proper versioning scheme.

Thanks!