package name: custom-window-title-baincd
This is a fork of pixilz's custom-window-title v1.0.4 with the following enhancements:
projectPath
(Path to project of open file)projectName
(Directory name of project of open file)projectManagerTitle
(Title from Project Manager)fileIsModified
pixilz's custom-window-title was forked from the postcasio's custom-title package as the owner has stopped updating for quite some time while there are stale bugs.
Set your own template for Atom's title bar. Uses underscore.js templates.
The following variables are available:
projectPath
(Path to project of open file)projectName
(Directory name of project of open file)projectManagerTitle
(Title from Project Manager)filePath
(Path to current file)fileInProject
(Boolean)fileIsModified
relativeFilePath
(Path to file relative to current project)fileName
(File name)gitHead
gitAdded
gitDeleted
devMode
safeMode
(always false, since the package will not be loaded in safe mode!)In addition the following variables from os
is available:
username
hostname
Plus the atom
global, as usual.
Project and git variables always refer to the first path in your project.
These examples can all be tested by going to the package settings and setting the template field.
<%= fileName %><% if (projectPath) { %> - <%= projectPath %><% } %>
<%= fileName %><% if (projectPath) { %> - <%= projectPath %><% } %> - Atom <%= atom.getVersion() %>
<%= fileName %><% if (projectPath) { %> - <%= projectPath %><% if (gitHead) { %> [<%= gitHead %>]<% } %><% } %>
<%= fileName %><% if (projectName) { %> - <%= projectName %><% if (gitHead) { %> [<%= gitHead %>]<% } %><% } %>
<%= username %> @ <%= hostname %> : <%= fileName %><% if (projectPath) { %> - <%= projectPath %><% if (gitHead) { %> [<%= gitHead %>]<% } %><% } %>
<% if (projectName) { %> <%= projectName %> <% } %><% if (gitHead) { %> [ ⛕<%= gitHead %> ] <% } %> <%= fileName %><% if (filePath) { %> - <%= filePath %> <% } %>
Good catch. Let us know what about this package looks wrong to you, and we'll investigate right away.