Skip to content

Commit

Permalink
Add an option for URL entries icon into the config
Browse files Browse the repository at this point in the history
  • Loading branch information
yamnikov-oleg committed Feb 4, 2017
1 parent 763ef7f commit 29cd48e
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 2 deletions.
6 changes: 6 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -108,6 +108,12 @@ enabledcategories:
history:
# How many last used items should Projektor remember for history?
capacity: 40
# URL category configuration
url:
# Icon for URL entries. Use a name of some gtk icon installed on your system,
# e.g. `firefox`. You can specify absolute path to an image file as well,
# e.g. `/home/me/.projektor/url-icon.png`
icon: web-browser
# Web searching category configuration
websearch:
# Template for search url. `%s` marker denotes, where the search query
Expand Down
7 changes: 6 additions & 1 deletion config.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import (
)

type ProjektorConfig struct {
KeyBind string
KeyBind string
EnabledCategories struct {
Calc bool
History bool
Expand All @@ -21,6 +21,9 @@ type ProjektorConfig struct {
History struct {
Capacity int
}
URL struct {
Icon string
}
WebSearch struct {
Engine string
Icon string
Expand All @@ -47,6 +50,8 @@ func DefaultConfig() *ProjektorConfig {

c.History.Capacity = 40

c.URL.Icon = "web-browser"

c.WebSearch.Engine = "https://google.com/search?q=%s"
c.WebSearch.Icon = "web-browser"

Expand Down
2 changes: 1 addition & 1 deletion launch_entry.go
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,7 @@ func NewEntryForFile(path string, displayName string, tabName string) (*LaunchEn
func NewUrlLaunchEntry(url string) *LaunchEntry {
return &LaunchEntry{
Type: UrlEntry,
Icon: "web-browser",
Icon: Config.URL.Icon,
Name: url,
MarkupName: EscapeAmpersand(url),
TabName: url,
Expand Down

0 comments on commit 29cd48e

Please sign in to comment.