Skip to content

Commit

Permalink
add plex shortcut
Browse files Browse the repository at this point in the history
  • Loading branch information
brettinternet committed Apr 2, 2024
1 parent 7764224 commit d612c77
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions mac/.hammerspoon/http.lua
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,19 @@ local actions = {
getLaunchFocusOrHideAndSwitchBackFn("io.robbie.HomeAssistant")()
end
end,
["/plex"] = function()
local plex = hs.application.get("tv.plex.desktop")
if plex and plex:isRunning() then
getLaunchFocusOrHideAndSwitchBackFn("tv.plex.desktop")()
else
local success, windowId = openBrowserTab("com.google.Chrome", "plex.gardiner")
if success and windowId then
hs.application.get("com.google.Chrome"):activate()
else
getLaunchFocusOrHideAndSwitchBackFn("tv.plex.desktop")()
end
end
end,
["/slack"] = getLaunchFocusOrHideAndSwitchBackFn("com.tinyspeck.slackmacgap"),
["/discord"] = getLaunchFocusOrHideAndSwitchBackFn("com.hnc.Discord"),
["/messages"] = getLaunchFocusOrHideAndSwitchBackFn("com.apple.MobileSMS"),
Expand Down

0 comments on commit d612c77

Please sign in to comment.