fman icon indicating copy to clipboard operation
fman copied to clipboard

Command line flag for single instance

Open oskretc opened this issue 6 years ago • 9 comments

Maybe there is something already but couldn't find it.

Is there a way to use fman from cli and open the directories in a single instance, e.g. if not running open new fman instance, if running, change that instance to the directory specified in the argument(s)

oskretc avatar Aug 03 '18 17:08 oskretc

Funny, I was just working on single-instance mode in the past few days. It isn't yet implemented, and actually not easy to do correctly. Which OS did you say you were on?

mherrmann avatar Aug 03 '18 21:08 mherrmann

Win 7 at work and win 10 at home

oskretc avatar Aug 06 '18 11:08 oskretc

Did you manage to get around to implementing this? Or does someone have a workaround/ an idea on how to enforce a single instance on a Linux system?

puffitos avatar Dec 12 '21 10:12 puffitos

@puffitos couldn't you just write a relatively simple bash script?

mherrmann avatar Dec 12 '21 10:12 mherrmann

Ah ok, and then it would wrap the fman binary. My aim is to use only fman as the default file manager to handle "file-manager-related" MIME Types. I'll try that, thanks :+1:

puffitos avatar Dec 12 '21 11:12 puffitos

@puffitos couldn't you just write a relatively simple bash script?

How would the bash/batch script look like? I am not quite sure if that would be achievable with a bash script still you need to point to the fman.exe and as soon you do it it opens a new instance of fman.

@mherrmann I used TotalCommander, currently buying FreeCommander licenses but fman is really great that I would immediately jump over if I could pass the path to a folder that I want to open in fman. I use cli a lot and also in my case zim-desktop-wiki so that I work a lot with different folders so I need a quick way to open the folder I currently work in.

Something like this would be great: https://freecommander.com/fchelpxe/en/Commandlineparameters.html

Do you think it is possible to add the functionality with a custom plugin?

amarbota avatar Jan 23 '22 17:01 amarbota

@amarbota yes, I think you could write a plugin that listens on a port for commands that change the left or right pane. Then send commands to this port from the bash/batch script. Maybe it's not that simple. But it's certainly possible.

mherrmann avatar Jan 24 '22 13:01 mherrmann

@amarbota yes, I think you could write a plugin that listens on a port for commands that change the left or right pane. Then send commands to this port from the bash/batch script. Maybe it's not that simple. But it's certainly possible.

Hi @mherrmann

Can you please point tp the api or port which fman is using. I will give it a try.

Danke!

amarbota avatar Jan 24 '22 14:01 amarbota

fman is not using a port. You would need to open it from the plugin. The API can be googled with "fman api".

mherrmann avatar Jan 24 '22 14:01 mherrmann