Git Product home page Git Product logo

hyperterm-visor's Introduction

Note: This repository is no longer maintained. Feel free to fork. Probably doesn't work with the latest version of Hyper 1, and certainly unlikely to work with Hyper 2.

HyperTerm Visor

Join the chat at https://gitter.im/CWSpear/hyperterm-visor

Open your Hyper terminal from anywhere with a global hotkey.

HyperTerm Visor

Installation

In your ~/.hyper.js, add hyperterm-visor to the list of plugins.

Note: I know I need to change the name, but I can't well and call it hyper-visor...

Config

In your ~/.hyper.js, you can define your hotkey (required) and the position (optional) you want your visor to be. It automatically will open on the screen where your mouse is.

modules.exports = {
  config: {
    // other config...
    visor: {
      hotkey: 'CommandOrControl+Shift+Z',
      position: 'top', // or left, right, bottom
      width: 200, // Optional, defaults to half of viewable area for horizontal positions, 100% for vertical
      height: 900, // Optional, defaults to half of viewable area for vertical positions, 100% for horizontal
    },
  },
  // ...
};

You can define hotkeys as specified in the Electron Accelerator docs.

Roadmap

  • Better customization of where you can make the terminal appear.
  • Option to always open on a specific monitor, etc.
  • Double press mod keys to activate (i.e. hit Ctrl twice to activate).
  • Create window if all windows have been closed.

Caveats

  • It always uses the most recently open window as your visor window.
  • If all windows have been closed, it won't do anything until you manually open a new window.

This is pretty basic in its current form, and I'm labeling it as a beta as I use it and patch up edge cases, etc. I will build out more functionality and beef up this README as we go.

Changelog

Starting with version 0.3.0, I have been documenting changes via GitHub's release tab.

hyperterm-visor's People

Contributors

cwspear avatar dcalhoun avatar gitter-badger avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

hyperterm-visor's Issues

Do not move from current workspace when showing opened hyperterm

In iTerm if you open a window in, for example, second workspace then move focus to first one and then again call show hotkey, it will move terminal in the first workspace.

Visor, in contrast, will move focus back to the second workspace again.

Is it possible to implement similar behaviour?

Stay on same screen

Hey, thanks so much for the great plugin! One thing I'd love to see (And might try to code up soon to help out!):

I'm almost always on two screens at work, and want to always keep my terminal on my smaller screen in full screen mode. As of right now, if my big monitor is focused, Visor will open the terminal on that window.

It'd be great if there was an option to always open on the screen where the window was last used.

Thanks again!

Not working

Hello,

I can't get this plugin to work and that's the final blocking point to use hyper.is to me :(

I'm up-to-date

plugins: [
    "hyperline",
    "hypercwd",
    "hyperterm-visor",
    "hyper-alt-click",
    "hyperterm-safepaste",
    "hypertheme",
    "hyperterm-tab-icons",
    "hyperlinks",
    "hyperterm-alternatescroll"
  ],
  visor: {
    hotkey: 'Alt+Space',
    position: 'top', // or left, right, bottom
    width: 200, // Optional, defaults to half of viewable area for horizontal positions, 100% for vertical
    height: 900, // Optional, defaults to half of viewable area for vertical positions, 100% for horizontal
  },

Tried a lot of hotkey (CommandOrControl+Space...) combinaisons, but none of them are working even with a full hyper.is restart between conf changes.

I have 3 screens and i'm running on OSX 10.12.4

Any idea of what's happening ?

Visor shortcut doesn't cause hyperterm to appear

Installed as per documentation.

My config file:

module.exports = {
  config: {
    visor: {
        hotkey: 'CommandOrControl+Shift+Z',
        position: 'top', // or left, right, bottom
    },
    // Other config 

  },

  // a list of plugins to fetch and install from npm
  // format: [@org/]project[#version]
  // examples:
  //   `hyperpower`
  //   `@company/project`
  //   `project#1.0.1`
  plugins: ['hyperterm-blink', 'hyperterm-visor'],

  // in development, you can create a directory under
  // `~/.hyperterm_plugins/local/` and include it here
  // to load it and avoid it being `npm install`ed
  localPlugins: []
};

Fullscreen option

Great work on this! I use iTerm2 in Fullscreen mode and that is the one thing missing about Hyperterm that would make me consider using it daily (among other oddities that I'm still trying to get around). Let me know if this is on the roadmap or I can just submit a PR.

Cheers!

Does not work at all

does not work at all
Using ubuntu 16.04

module.exports = {
  config: {
    // default font size in pixels for all tabs
    fontSize: 12,

    // font family with optional fallbacks
    fontFamily: 'Menlo, "DejaVu Sans Mono", "Lucida Console", monospace',

    // terminal cursor background color and opacity (hex, rgb, hsl, hsv, hwb or cmyk)
    cursorColor: 'rgba(248,28,229,0.8)',

    // `BEAM` for |, `UNDERLINE` for _, `BLOCK` for █
    cursorShape: 'BLOCK',

    // color of the text
    foregroundColor: '#fff',

    // terminal background color
    backgroundColor: '#000',

    // border color (window, tabs)
    borderColor: '#333',

    // custom css to embed in the main window
    css: '',

    // custom css to embed in the terminal window
    termCSS: '',

    // custom padding (css format, i.e.: `top right bottom left`)
    padding: '12px 14px',

    // the full list. if you're going to provide the full color palette,
    // including the 6 x 6 color cubes and the grayscale map, just provide
    // an array here instead of a color map object
    colors: {
      black: '#000000',
      red: '#ff0000',
      green: '#33ff00',
      yellow: '#ffff00',
      blue: '#0066ff',
      magenta: '#cc00ff',
      cyan: '#00ffff',
      white: '#d0d0d0',
      lightBlack: '#808080',
      lightRed: '#ff0000',
      lightGreen: '#33ff00',
      lightYellow: '#ffff00',
      lightBlue: '#0066ff',
      lightMagenta: '#cc00ff',
      lightCyan: '#00ffff',
      lightWhite: '#ffffff'
    },

    // the shell to run when spawning a new session (i.e. /usr/local/bin/fish)
    // if left empty, your system's login shell will be used by default
    shell: '',

    // for setting shell arguments (i.e. for using interactive shellArgs: ['-i'])
    // by default ['--login'] will be used
    shellArgs: ['--login'],

    // for environment variables
    env: {},

    // set to false for no bell
    bell: 'SOUND',

    // if true, selected text will automatically be copied to the clipboard
    copyOnSelect: false

    // URL to custom bell
    // bellSoundURL: 'http://example.com/bell.mp3',

    // for advanced config flags please refer to https://hyper.is/#cfg
  },

  // a list of plugins to fetch and install from npm
  // format: [@org/]project[#version]
  // examples:
  //   `hyperpower`
  //   `@company/project`
  //   `project#1.0.1`
  plugins: ["hyperterm-visor"],

  // in development, you can create a directory under
  // `~/.hyper_plugins/local/` and include it here
  // to load it and avoid it being `npm install`ed
  localPlugins: [],
  visor: {
      hotkey: 'CommandOrControl+Shift+Z',
      position: 'top' // or left, right, bottom
  }
};

hotkey not working anymore, instead it creates a new hyperterm window

instead of showing the existent window, it creates a new blank hyper, it used to work.

[UPDATE]: something i noticed, is that i have multiple tabs opened, i'm able to reproduce issue like that. On new hyper window with 1 tab it works fine looks like

Info:
OS X Capitan, 10.11,.6
Hyper 1.3.3.1754

Opens and closes once, then de-focusses and stops

I'm on Windows. I hit my hotkey (Control+F1), it appears - again - it disappears - again- nothing happens.
I need to re-focus another window on my desktop to have the shortcut work again.
I think the fix would be to manually restore focus to the previous window when closing with the shortcut?

Multi monitor support

Previously, with multiple monitors, I was able to hide my terminal on one then open it on another by moving my mouse. Introduced sometime around the switch to hyperterm-register-shortcut.

Probably not high priority, but something to look into.

Does not work in Hyper 1.4.8

Using the official example config, [email protected] does not appear to work with [email protected] on macOS 10.13. As an alternative, hyperterm-summon is working

Issue: Attempting to use the cmd+shift+z hotkey does not appear to have any effect.
Expected Behavior: The cmd+shift+z shortcut should toggle visibility of the hyper terminal

Here is my .hyper.js:

// Future versions of Hyper may add additional config options,
// which will not automatically be merged into this file.
// See https://hyper.is#cfg for all currently supported options.

module.exports = {
  config: {
    // Choose either "stable" for receiving highly polished,
    // or "canary" for less polished but more frequent updates
    updateChannel: 'stable',

    // default font size in pixels for all tabs
    fontSize: 12,

    // font family with optional fallbacks
    fontFamily: 'Menlo, "DejaVu Sans Mono", Consolas, "Lucida Console", monospace',

    // terminal cursor background color and opacity (hex, rgb, hsl, hsv, hwb or cmyk)
    cursorColor: 'rgba(248,28,229,0.8)',

    // `BEAM` for |, `UNDERLINE` for _, `BLOCK` for █
    cursorShape: 'BLOCK',

    // set to true for blinking cursor
    cursorBlink: false,

    // color of the text
    foregroundColor: '#fff',

    // terminal background color
    backgroundColor: '#000',

    // border color (window, tabs)
    borderColor: '#333',

    // custom css to embed in the main window
    css: '',

    // custom css to embed in the terminal window
    termCSS: '',

    // set to `true` (without backticks) if you're using a Linux setup that doesn't show native menus
    // default: `false` on Linux, `true` on Windows (ignored on macOS)
    showHamburgerMenu: '',

    // set to `false` if you want to hide the minimize, maximize and close buttons
    // additionally, set to `'left'` if you want them on the left, like in Ubuntu
    // default: `true` on windows and Linux (ignored on macOS)
    showWindowControls: '',

    // custom padding (css format, i.e.: `top right bottom left`)
    padding: '12px 14px',

    // the full list. if you're going to provide the full color palette,
    // including the 6 x 6 color cubes and the grayscale map, just provide
    // an array here instead of a color map object
    colors: {
      black: '#000000',
      red: '#ff0000',
      green: '#33ff00',
      yellow: '#ffff00',
      blue: '#0066ff',
      magenta: '#cc00ff',
      cyan: '#00ffff',
      white: '#d0d0d0',
      lightBlack: '#808080',
      lightRed: '#ff0000',
      lightGreen: '#33ff00',
      lightYellow: '#ffff00',
      lightBlue: '#0066ff',
      lightMagenta: '#cc00ff',
      lightCyan: '#00ffff',
      lightWhite: '#ffffff'
    },

    // the shell to run when spawning a new session (i.e. /usr/local/bin/fish)
    // if left empty, your system's login shell will be used by default
    //
    // Windows
    // - Make sure to use a full path if the binary name doesn't work
    // - Remove `--login` in shellArgs
    //
    // Bash on Windows
    // - Example: `C:\\Windows\\System32\\bash.exe`
    //
    // Powershell on Windows
    // - Example: `C:\\WINDOWS\\System32\\WindowsPowerShell\\v1.0\\powershell.exe`
    shell: '',

    // for setting shell arguments (i.e. for using interactive shellArgs: ['-i'])
    // by default ['--login'] will be used
    shellArgs: ['--login'],

    // for environment variables
    env: {},

    // set to false for no bell
    bell: 'SOUND',

    // if true, selected text will automatically be copied to the clipboard
    copyOnSelect: false

    // if true, on right click selected text will be copied or pasted if no
    // selection is present (true by default on Windows)
    // quickEdit: true

    // URL to custom bell
    // bellSoundURL: 'http://example.com/bell.mp3',

    // for advanced config flags please refer to https://hyper.is/#cfg
  },

  // a list of plugins to fetch and install from npm
  // format: [@org/]project[#version]
  // examples:
  //   `hyperpower`
  //   `@company/project`
  //   `project#1.0.1`
  plugins: [
    'hyperpower',
    'hyperterm-visor'
  ],

  // in development, you can create a directory under
  // `~/.hyper_plugins/local/` and include it here
  // to load it and avoid it being `npm install`ed
  localPlugins: [],

  keymaps: {
    // Example
    // 'window:devtools': 'cmd+alt+o',
  }
};

Return focus to prev active window

Will this plugin return the focus back to the previous window, in the future?

That feature could bring hyperterm shell to iTerm heights combined with this plugin.

Add more position options

I want to support full, topleft, topright, bottomleft, bottomright and possibly custom dimensions on top of that. i.e. you specify top, but you want it 600 x 400px, so it puts it at that size in the center top.

Return focus to previous window when hiding visor.

If possible, I'd like the focus to return to the window which was active before invoking the visor hotkey when I invoke it to close the visor. Additionally, I would expect an option to close the visor when removing focus from the terminal window.

Option to always open on a specific monitor

I personally like that it opens on the monitor where my mouse is, but I'd like to add support for always opening on a specific monitor.

I'd also like to look into opening on the active monitor on macOS (which is not always where the mouse is), and adding an option for that if it's possible.

Only one instance of visor window.

Each additional terminal window I create beyond the first behaves as a visor. I would expect that only one terminal window behaves as a visor.

Option to hide window buttons and/or title.

I prefer to have a "windowless" aesthetic to my visor, as it is in iTerm2. The window buttons break down the visor aesthetic (as well as the rounded window corners). Not sure if this can be controlled in a plugin or in Electron, but an option would be nice.

Make window take 100% of available height.

Is there a way to get the window to take 100% of the available height when I activate the hotkey? Currently if I set height: 100% the plugin is unable to load properly. On a multi-monitor system its not plausible to use a hard coded number.

Is this plugin still active ?

Is this plugin still active ? so maybe can be noted down in the README to ask for help so other developers can address issues as well

Double tap mod key hotkeys

I am a little wary of performance implications, but I definitely want to support double-tap mod keys as hotkeys (i.e. double tap ctrl to open the terminal).

Hotkey doesn't work after waking from sleep

I've noticed that the hotkey seems to not work anymore after waking OSX from sleep. The other hotkeys in hyperterm for stuff like interacting with tabs still work, so I think it has something to do with how hyperterm-visor is setting up the hotkey bindings.

Does not work in Hyper 2.0.4

This error gets thrown:

bundle.js:4 Uncaught TypeError: Cannot read property '_pendingForceUpdate' of undefined
    at setPendingForceUpdate (bundle.js:4)
    at traverseRenderedChildren (bundle.js:4)
    at t.default (bundle.js:4)
    at EventEmitter.c.a.on (bundle.js:4)
    at emitOne (events.js:96)
    at EventEmitter.emit (events.js:191)
    at t.a.ipcListener (bundle.js:4)
    at emitTwo (events.js:106)
    at EventEmitter.emit (events.js:194)

Height setting doesn't update?

When I change the 'height' setting to try something out, it doesn't seem to update without a restart. Not sure if this is intended?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.