diff --git a/index.js b/index.js index de61f6e..557bc5c 100755 --- a/index.js +++ b/index.js @@ -100,6 +100,16 @@ WpManager.prototype.getCmd = function( swayWorkspace, dir, isMove ){ return out.join('; '); }; +function helpStr(){/* +sway-wp-switch +Usage: + sway-wp-switch [ -m ] + +Options: + -m move current window to new workspace while switching. + If currently focused windows in output-2, it will be placed in output-two itself without losing focus +*/} + function main(){ var dir = process.argv[2], @@ -116,13 +126,7 @@ function main(){ dir = process.argv[3]; } if( [ 'up', 'down', 'right', 'left' ].indexOf( dir ) === -1 ){ - console.log([ - 'Usage:', - '\tsway-wp-switch [ -m ] ', - '\n', - 'Options:', - '\t-m\t move current window to new workspace while switching' - ].join('\n')); + console.log( helpStr.toString().slice(22,-3) +'' ); return; } diff --git a/package.json b/package.json index cab3966..52c092f 100644 --- a/package.json +++ b/package.json @@ -3,7 +3,7 @@ "version": "0.0.1", "description": "A simple utility to organize sway workspaces as M x N grid with multi-monitor support Edit", "main": "index.js", - "bin":{ + "bin": { "sway-wp-switch": "./index.js" }, "scripts": {