koekeishiya / skhd

Simple hotkey daemon for macOS
MIT License
6.05k stars 204 forks source link

Finder shortcut stopped working after upgrading to Sonoma 14.2 #327

Open hamadahiro opened 8 months ago

hamadahiro commented 8 months ago

I have set a command to open a new Finder window using skhd:

fn + cmd - f : open -n -a "iCloud Drive"

In Finder Settings, I have set the "New Finder Window show" option to open iCloud Drive folder:

image

It worked well until I upgraded to Sonoma 14.2. All other app shortcuts that I have set with skhd work fine.

lokxii commented 7 months ago

Have you tried running the command alone or replacing the command with other commands to test if it is really skhd's problem?

hamadahiro commented 7 months ago

I use the same command with other apps and they all works except Finder.

Here are few examples:

fn + cmd - c : open -n -a "Calendar"
fn + cmd - d : open -n -a "Digital Color Meter"
fn + cmd - e : open -n -a "Mail"
fn + cmd - f : open -n -a "Finder"
fn + cmd - h : open -n -a "Adobe Photoshop 2024"
fn + cmd - k : open -n -a "Stickies"
fn + cmd - l : open -n -a "Adobe Lightroom Classic"
fn + cmd - m : open -n -a "Messages"
fn + cmd - n : open -n -a "Notes"

All other commands opens the app normally. Finder only opens the app, but not opening the window, meaning that I see that the Finder is currently active, but no Finder windows are opened until I click CMD+N to open new window. This worked normally like every other app, until I upgraded to Sonoma 14.2.

lokxii commented 7 months ago

Then I suspect this is a Mac / finder problem not an skhd problem

0bmxa commented 7 months ago

Well, technically open -n -a "iCloud Drive" means "open (a new instance of) the application called 'iCloud Drive'". But as iCloud Drive isn't really an app, maybe your setup just can't find any application with that name. You could try just opening the iCloud Drive file path directly:

open -R '/Users/USER_NAME/Library/Mobile Documents/com~apple~CloudDocs/'

The -R option is optional, but explicitly says "reveal in Finder" (see man open).