This repository has been archived by the owner on Jan 10, 2020. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 16
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add support for cloud tabs on High Sierra closes #2
- Loading branch information
Showing
15 changed files
with
639 additions
and
240 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
./icons/cloud.png |
Large diffs are not rendered by default.
Oops, something went wrong.
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
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
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
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,47 @@ | ||
// Copyright (c) 2018 Dean Jackson <deanishe@deanishe.net> | ||
// MIT Licence applies http://opensource.org/licenses/MIT | ||
|
||
package main | ||
|
||
import ( | ||
"log" | ||
|
||
aw "github.com/deanishe/awgo" | ||
"github.com/deanishe/go-safari/cloud" | ||
) | ||
|
||
func doFilterCloudTabs() error { | ||
|
||
showUpdateStatus() | ||
|
||
if err := LoadScripts(scriptDirs...); err != nil { | ||
return err | ||
} | ||
|
||
tabs, err := cloud.Tabs() | ||
if err != nil { | ||
return err | ||
} | ||
|
||
log.Printf("%d cloud tab(s)", len(tabs)) | ||
|
||
for _, t := range tabs { | ||
URLerItem(&cloudTabURLer{t}) | ||
} | ||
|
||
wf.WarnEmpty("No matching tabs found", "Try a different query?") | ||
wf.SendFeedback() | ||
|
||
return nil | ||
} | ||
|
||
type cloudTabURLer struct { | ||
tab *cloud.Tab | ||
} | ||
|
||
func (u *cloudTabURLer) Title() string { return u.tab.Title } | ||
func (u *cloudTabURLer) URL() string { return u.tab.URL } | ||
func (u *cloudTabURLer) UID() string { return u.tab.URL } | ||
func (u *cloudTabURLer) Copytext() string { return u.tab.URL } | ||
func (u *cloudTabURLer) Largetype() string { return u.tab.URL } | ||
func (u *cloudTabURLer) Icon() *aw.Icon { return IconCloud } |
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
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.
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
Oops, something went wrong.