-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add Oh New Window & Oh New Search Workflows;
- Loading branch information
Showing
6 changed files
with
98 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,49 @@ | ||
-- Open new application window within current workspace | ||
-- Script Version 0.0.1 | ||
-- Alfred Version 4.0.9 | ||
|
||
-- Applications current support: | ||
-- * Finder | ||
-- * Chrome | ||
-- * Safari | ||
-- * Firefox | ||
-- * iTerm2 | ||
-- * Alacritty(Only if "SpawnNewInstance" enabled and set keybindding CMD+N) | ||
|
||
|
||
on alfred_script(q) | ||
|
||
set q to name of (info for q) | ||
|
||
if q is equal to "Finder.app" | ||
tell application "Finder" to make new Finder window | ||
else if q is equal to "Google Chrome.app" | ||
tell application q to make new window | ||
else if q is equal to "Safari.app" | ||
tell application "Safari" to make new document | ||
else if q is equal to "Firefox.app" | ||
tell application "System Events" | ||
tell process "Firefox" | ||
click menu item "New Window" of menu "File" of menu bar 1 | ||
end tell | ||
end tell | ||
else if q is equal to "Alacritty.app" | ||
tell application "System Events" to keystroke "n" using command down | ||
else if q is equal to "iTerm.app" | ||
run script " | ||
on run {q} | ||
tell application \"iTerm\" | ||
create window with default profile | ||
end tell | ||
end run | ||
" with parameters {q} | ||
else | ||
tell application q | ||
reopen | ||
end tell | ||
end if | ||
|
||
|
||
tell application q to activate | ||
|
||
end alfred_script |
Binary file not shown.
Binary file not shown.