Skip to content

giiska/set-iterm2-badge

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

set iterm2 badge

Thanks to @sel-fish

Usage

Use it in your Webpack config, Gulpfile.js, Express app or other Node project to set a distinct infomation on the right up corner of Iterm2.

pure nodejs integration

var setIterm2Badge = require('set-iterm2-badge');
var port = '8088';
setIterm2Badge(port);

browser-sync integration

var setIterm2Badge = require('set-iterm2-badge');
var bs = require('browser-sync').create();
bs.init({
    port: "8080"
}, function(err, bs) {
    // The actual port may not be the passed in "8080"
    //  as bs ensures listen a empty port inside
    setIterm2Badge(bs.options.getIn(['port']));
})

Result Preview

result