Skip to content
This repository was archived by the owner on May 3, 2023. It is now read-only.

Start supporting more specific window title detection#75

Merged
beyang merged 4 commits intosourcegraph:masterfrom
Olreich:granular-titles
Sep 12, 2016
Merged

Start supporting more specific window title detection#75
beyang merged 4 commits intosourcegraph:masterfrom
Olreich:granular-titles

Conversation

@Olreich
Copy link
Copy Markdown
Contributor

@Olreich Olreich commented Sep 12, 2016

This should help fix some of the windows in #73. On Win32, it handles every program I have. More detail and structure can continue to be added to support other conventions on other platforms.

This will leave the special cases for Google Chrome and Slack, but start getting granularity for free on windows that follow the general convention of ` - ` to separate out the application name at the end of the window title.
This will make it very easy to continue adding special cases for other applications
data.go Outdated
return w.IsSticky() || w.Desktop == desktop
}

const DefaultWindowTitleSeparator = " - "
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

can you unexport these and use the following syntax:

const (
  defaultWindowTitleSeparator = " - "
  microsoftEdgeWindowTitleSeparator = "\u200e- "
)

@beyang
Copy link
Copy Markdown
Member

beyang commented Sep 12, 2016

Thanks for submitting this, just one minor comment. Otherwise LGTM!

@beyang beyang merged commit b19b30d into sourcegraph:master Sep 12, 2016
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants