Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ The following variables are available:
- `projectName`
- `filePath`
- `fileInProject`
- `fileIsModified`
- `relativeFilePath`
- `fileName`
- `gitHead`
Expand Down
4 changes: 3 additions & 1 deletion lib/custom-title.coffee
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,7 @@ module.exports =
fileName = item?.getTitle?() ? 'untitled'
filePath = item?.getPath?()
fileInProject = false
fileIsModified = item?.isModified?()

repo = atom.project.getRepositories()[0]
gitHead = repo?.getShortHead()
Expand Down Expand Up @@ -81,7 +82,7 @@ module.exports =
projectPath, projectName, fileInProject,
filePath, relativeFilePath, fileName,
gitHead, gitAdded, gitDeleted
devMode, safeMode
devMode, safeMode, fileIsModified
}

if filePath or projectPath
Expand All @@ -97,6 +98,7 @@ module.exports =
@subscriptions.add atom.workspace.observeTextEditors (editor) =>
editorSubscriptions = new CompositeDisposable
editorSubscriptions.add editor.onDidSave -> atom.workspace.updateWindowTitle()
editorSubscriptions.add editor.onDidChangeModified -> atom.workspace.updateWindowTitle()
editorSubscriptions.add editor.onDidDestroy -> editorSubscriptions.dispose()

@subscriptions.add editorSubscriptions
Expand Down