custom-window-title-baincd

Set your own template for Atom's title bar. This is a fork and continuation of pixilz's custom-window-title and postcasio's custom-title package

baincd

92

0

1.1.0

MIT

GitHub

This package consumes the following services:

Baincd's custom-window-title

package name: custom-window-title-baincd

This is a fork of pixilz's custom-window-title v1.0.4 with the following enhancements:

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:

In addition the following variables from os is available:

Plus the atom global, as usual.

Project and git variables always refer to the first path in your project.

Examples

These examples can all be tested by going to the package settings and setting the template field.

Filename and project path

<%= fileName %><% if (projectPath) { %> - <%= projectPath %><% } %>

With Atom version

<%= fileName %><% if (projectPath) { %> - <%= projectPath %><% } %> - Atom <%= atom.getVersion() %>

With the current git branch

<%= fileName %><% if (projectPath) { %> - <%= projectPath %><% if (gitHead) { %> [<%= gitHead %>]<% } %><% } %>

With project name and current git branch

<%= fileName %><% if (projectName) { %> - <%= projectName %><% if (gitHead) { %> [<%= gitHead %>]<% } %><% } %>

With hostname and username

<%= username %> @ <%= hostname %> : <%= fileName %><% if (projectPath) { %> - <%= projectPath %><% if (gitHead) { %> [<%= gitHead %>]<% } %><% } %>

Project name display

<% if (projectName) { %> <%= projectName %> <% } %><% if (gitHead) { %> [ ⛕<%= gitHead %> ] <% } %> <%= fileName %><% if (filePath) { %> - <%= filePath %> <% } %>