Linking to a specific folder from the toolbar?
Moderators: XnTriq, helmut, xnview
-
- Posts: 14
- Joined: Sat Dec 21, 2024 6:54 pm
Linking to a specific folder from the toolbar?
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.
-
- Posts: 14
- Joined: Sat Dec 21, 2024 6:54 pm
Re: Linking to a specific folder from the toolbar?
ChatGPT suggests modifying the toolbar configuration file directly - can it really be done this way or is it making things up?
-
- Author of XnView
- Posts: 45337
- Joined: Mon Oct 13, 2003 7:31 am
- Location: France
Re: Linking to a specific folder from the toolbar?
you create a .bat and add it in your toolbar
Pierre.
-
- Posts: 14
- Joined: Sat Dec 21, 2024 6:54 pm
Re: Linking to a specific folder from the toolbar?
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?
-
- Author of XnView
- Posts: 45337
- Joined: Mon Oct 13, 2003 7:31 am
- Location: France
Re: Linking to a specific folder from the toolbar?
for example if you use
does it works?
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"
Pierre.
-
- Posts: 14
- Joined: Sat Dec 21, 2024 6:54 pm
Re: Linking to a specific folder from the toolbar?
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 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?
I've also tried
Code: Select all
open -a /Applications/XnViewMP.app --args /path/to/dir
Is there maybe a specific XnView command line argument I could use to open the folder within the currently opened instance?
-
- Author of XnView
- Posts: 45337
- Joined: Mon Oct 13, 2003 7:31 am
- Location: France
Re: Linking to a specific folder from the toolbar?
you would like to add a button in toolbar of XnView to open the selected file in XnView?
Pierre.
-
- XnThusiast
- Posts: 2144
- Joined: Sat May 09, 2015 9:37 am
Re: Linking to a specific folder from the toolbar?
another option - add functionality to assign Shortcuts to Favorites
the same way it works for Categories and 'Open with external program'
the same way it works for Categories and 'Open with external program'
-
- Posts: 14
- Joined: Sat Dec 21, 2024 6:54 pm
Re: Linking to a specific folder from the toolbar?
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.