-
Notifications
You must be signed in to change notification settings - Fork 234
Open
Description
I am on MacOs. I want to create a keymap, that on press
- If firefox not running -> open it.
- If firefox running, but not active -> activate it.
- If firefox running, and active -> cycle through all the open firefox windows.
I've tried implementing this with applescript, but it is not working with skhd for some reason. Only 1 and 2 is working, but 3 is not working for some reason.
skhdrc
alt - f : $HOME/firefox.sh
firefox.sh
osascript -e '
tell application "System Events" to set appList to name of processes
if "Firefox" is not in appList then
do shell script "open -a Firefox"
else
tell application "Firefox"
if frontmost then
tell application "System Events"
keystroke "`" using {command down}
end tell
else
activate
end if
end tell
end if'
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels