Page 1 of 1
Linking to a specific folder from the toolbar?
Posted: Mon Jan 13, 2025 2:49 pm
by laurent45654
I often check the same folders on my computer from XnView, and I would like to create shortcuts to some of these in the toolbar. Do you know if it can be done? I know I can add favorites, but it requires me to click on the small favorite arrow, then to the folder. I'd just like to make that quicker if possible.
Re: Linking to a specific folder from the toolbar?
Posted: Mon Jan 13, 2025 10:49 pm
by laurent45654
ChatGPT suggests modifying the toolbar configuration file directly - can it really be done this way or is it making things up?
Re: Linking to a specific folder from the toolbar?
Posted: Wed Jan 15, 2025 9:08 am
by xnview
you create a .bat and add it in your toolbar
Re: Linking to a specific folder from the toolbar?
Posted: Wed Jan 15, 2025 11:59 am
by laurent45654
Thank you, I should have mentioned I'm on macOS so a .bat is probably not going to work? I just tried with a .sh but that didn't work either. Any idea if it can be done on macOS too?
Re: Linking to a specific folder from the toolbar?
Posted: Thu Jan 16, 2025 7:16 am
by xnview
for example if you use
Code: Select all
#!/bin/bash
if [ $# -eq 0 ]; then
echo "Usage: $0 filename"
exit 1
fi
file_path=$(realpath "$1")
dir_path=$(dirname "$file_path")
open "$dir_path"
does it works?
Re: Linking to a specific folder from the toolbar?
Posted: Thu Jan 16, 2025 2:52 pm
by laurent45654
Yes it kind of work, but it opens the folder in a new Finder window, instead of opening it in XnView.
I've also tried
Code: Select all
open -a /Applications/XnViewMP.app --args /path/to/dir
but that doesn't work if XnView is already open (it does it isn't).
Is there maybe a specific XnView command line argument I could use to open the folder within the currently opened instance?
Re: Linking to a specific folder from the toolbar?
Posted: Fri Jan 17, 2025 10:45 am
by xnview
you would like to add a button in toolbar of XnView to open the selected file in XnView?
Re: Linking to a specific folder from the toolbar?
Posted: Fri Jan 17, 2025 2:10 pm
by user0
another option - add functionality to assign Shortcuts to Favorites
the same way it works for Categories and 'Open with external program'
Re: Linking to a specific folder from the toolbar?
Posted: Sat Jan 18, 2025 11:49 am
by laurent45654
xnview wrote: Fri Jan 17, 2025 10:45 am
you would like to add a button in toolbar of XnView to open the selected file in XnView?
Yes, I would click on that button in the toolbar, and it would go to, for example /path/to/dir
I know favourites already offer this functionality but it's in a sub-menu and I frequently go to a certain number of folders so it would be easier if that could be done in a click or even keyboard shortcut.