Set your own template for IntelliJ's based IDE title bar. Uses underscore.js templates.
You have to specify both "Project Title Template" and "File Title Template", it falls back to default templates if any field is missed or corrupted.
The following variables are available for "Project Title Template":
projectDefaultTitle
projectName
projectPath
The following variables are available for "File Title Template":
projectDefaultTitle
projectName
projectPath
fileDefaultTitle
fileName
filePath
fileExt
moduleName
(if no modules used it returnsprojectName
instead)modulePath
More variables going to be added on upcoming releases.
After the plugin has been installed into IntelliJ, go to menu
File
--> Settings
--> Appearance
& Behaviour
--> Custom Title
and adjust the both parameters Project Title Template
and File Title Template
accordingly.
The default templates matches the regular IntelliJ titlebar:
Project Title Template:
<% if (projectDefaultTitle) { %><%= projectDefaultTitle %><% } %>
File Title Template:
<% if (fileDefaultTitle) { %><%= fileDefaultTitle %><% } %>
Project Title Template:
<% if (projectDefaultTitle) { %><%= projectDefaultTitle %><% } %>
File Title Template (empty):
<% %>
Project Title Template:
<% if (projectDefaultTitle) { %><%= projectDefaultTitle %><% } %>
File Title Template (empty):
<% if (fileDefaultTitle) { %><%= fileDefaultTitle %><% } %><% if (moduleName && moduleName !== projectName) { %> (<%= moduleName %>)<% } %>
Project Title Template (add week number):
<% Date.prototype.getWeek = function() {var onejan = new Date(this.getFullYear(),0,1); var today = new Date(this.getFullYear(),this.getMonth(),this.getDate()); var dayOfYear = ((today - onejan +1)/86400000); return Math.ceil(dayOfYear/7)}; if (projectDefaultTitle) { %><%= projectDefaultTitle %><% } %> W: <%= new Date().getWeek() %>
File Title Template (random):
<%= _.sample(["Class01.java", "Class02.java", "Class03.java", "Class04.java", "Class05.java", "Class06.java", "Class07.java", "Class08.java", "Class09.java", "Class10.java"]) %>
- Version 0.0.3 - Module info added to available variables for "File Title Template"
- Version 0.0.2 - Propagate Settings without restarts
- Version 0.0.1 - First release
- Add git variables (i.e. gitHead, gitAdded, gitDeleted, etc.)
Got a question or an idea? I'd love your input! Check out contributing guidelines for ways to offer feedback and contribute.
- Atom custom-title package (Original Idea)
- IntelliJ simple-titles plugin (Base Project Structure)
- IntelliJ backgroundImagePlus (How To Add Plugin Settings)
Copyright (c) Mahmoud Abdurrahman 2017. All Rights Reserved.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.