diff --git a/README.md b/README.md index 85870e0..3a94a97 100644 --- a/README.md +++ b/README.md @@ -31,13 +31,40 @@ sudo ultrafocus ## Default blacklist -- facebook.com -- instagram.com -- tiktok.com -- twitter.com -- youtube.com -- netflix.com -- reddit.com +### Social Media +* facebook.com +* instagram.com +* twitter.com +* tiktok.com +* snapchat.com +* pinterest.com +* linkedin.com +* reddit.com +* imgur.com +* youtube.com +* whatsapp.com +* telegram.org +* discord.com + +### News +* bbc.com +* cnn.com +* aljazeera.com +* theguardian.com +* nytimes.com +* google.com/news +* apple.news + +### Games +* steampowered.com +* origin.com +* epicgames.com +* battle.net +* playstation.com +* xbox.com +* miniclip.com +* armorgames.com +* kongregate.com ## Run tests diff --git a/cli/model.go b/cli/model.go index cf1ff83..9565796 100644 --- a/cli/model.go +++ b/cli/model.go @@ -30,13 +30,9 @@ func NewModel() model { state := menuView ti := textarea.New() + ti.Blur() if len(domains) == 0 { - state = blacklistView - ti.SetValue(strings.Join(hosts.DefaultDomains, "\n")) - ti.Focus() - ti.CursorEnd() - } else { - ti.Blur() + domains = hosts.DefaultDomains } return model{ diff --git a/hosts/domains.go b/hosts/domains.go new file mode 100644 index 0000000..652818f --- /dev/null +++ b/hosts/domains.go @@ -0,0 +1,12 @@ +package hosts + +var DefaultDomains = []string{ + // Social media + "facebook.com", "instagram.com", "twitter.com", "tiktok.com", "snapchat.com", "pinterest.com", "linkedin.com", "reddit.com", "imgur.com", "youtube.com", "whatsapp.com", "telegram.org", "discord.com", + + // News + "bbc.com", "cnn.com", "aljazeera.com", "theguardian.com", "nytimes.com", "google.com/news", "apple.news", + + // Games + "steampowered.com", "origin.com", "epicgames.com", "battle.net", "playstation.com", "xbox.com", "miniclip.com", "armorgames.com", "kongregate.com", +} diff --git a/hosts/hosts.go b/hosts/hosts.go index d46bfdf..bc876e3 100644 --- a/hosts/hosts.go +++ b/hosts/hosts.go @@ -20,8 +20,6 @@ const ( CommentStatusOff = "#ultrafocus:off" ) -var DefaultDomains = []string{"facebook.com", "instagram.com", "tiktok.com", "twitter.com", "youtube.com", "netflix.com", "reddit.com"} - func ExtractDomainsFromHostsFile() ([]string, FocusStatus, error) { domains := []string{} status := FocusStatusOff