amio / hyper-blink

Let Hyper's cursor blink.
42 stars 7 forks source link

The background color flashes #6

Open nerdpad opened 7 years ago

nerdpad commented 7 years ago

When I have this plugin active typing causes the background color to flash. It changes to lighter tone when I type, and goes back to dark when I stop typing.

Check the following video for demonstration. https://youtu.be/PZcLpfZRN50

amio commented 7 years ago

It looks weird, could you post your plugins list?

nerdpad commented 7 years ago

Content of my ~/.hyper.js

/*jshint node:true*/
module.exports = {
  config: {
    // default font size in pixels for all tabs
    fontSize: 16,

    // font family with optional fallbacks
    fontFamily: '"Operator Mono", "Droid Sans Mono for Powerline Plus Nerd File Types", Menlo, "DejaVu Sans Mono", "Lucida Console", monospace',
    // fontFamily: '',

    // terminal cursor background color (hex)
    cursorColor: '#F81CE5',

    // default opening terminal size
    windowSize: [1280, 720],

    // 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 padding (css format, i.e.: `top right bottom left`)
    termCSS: '',

    // custom padding
    padding: '0',

    // some color overrides. see http://bit.ly/29k1iU2 for
    // the full list
    colors: [
      '#000000',
      '#ff0000',
      '#33ff00',
      '#ffff00',
      '#0066ff',
      '#cc00ff',
      '#00ffff',
      '#d0d0d0',
      '#808080',
      '#ff0000',
      '#33ff00',
      '#ffff00',
      '#0066ff',
      '#cc00ff',
      '#00ffff',
      '#ffffff'
    ]
  },

  // a list of plugins to fetch and install from npm
  // format: [@org/]project[#version]
  // examples:
  //   `hypersolar`
  //   `@company/project`
  //   `project#1.0.1`
  plugins: [
    'hyper-dracula',
    "hyperterm-paste",
    "hyperterm-cursor",
    "hyperterm-blink"
  ],

  // 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: []
};

If I comment out hyperterm-blink it stops flashing.

amio commented 7 years ago

I still cannot reproduce the problem with exactly the same .hyper.js 🤔

amio commented 7 years ago

I guess it might be related to attribute naming conflict with other plugins, I'm not sure if this ( cb0962e04069a3f04b7e2ced7eb8c6a6506a6357 ) would work, but you may have a try (update plugin).

BTW, the package has been renamed to hyper-blink.

juanpedrojose commented 7 years ago

I have the same behavior which is very annoying, see video - https://vimeo.com/194325317.

Here is my config:

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

    // font family with optional fallbacks
    fontFamily: '"Fira Code", 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: "x-screen x-row {font-variant-ligatures:i initial}",
    termCSS: `
      x-screen x-row {
        font-variant-ligatures: initial;
      }
    `,

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

    // 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: 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: [
    "hyperline",
    "hyperterm-monokai",
    "hyperterm-mactabs",
    "hyper-blink",
    "hyperlinks",
    "hyperterm-paste",
    "hyperterm-tab-icons",
    "hyperterm-tabs",
  ],

  // 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: []
};
amio commented 7 years ago

Thanks @juanpedrojose

A further question, if you keep pressing a button (eg, a), is it flashing at the beginning and the end? or on every character input?

nerdpad commented 7 years ago

It happens on every key press. Thanks for looking into this.

On Dec 6, 2016 2:05 AM, "˗ˏˋ Amio ˎˊ˗" notifications@github.com wrote:

Thanks @juanpedrojose https://github.com/juanpedrojose

If you keep pressing a button (eg, a), is it flashing at the begin and end? or on every character?

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/amio/hyper-blink/issues/6#issuecomment-265076946, or mute the thread https://github.com/notifications/unsubscribe-auth/AAFXWLwPJYKgrK_V8fVZG-Bw0jBDIUQpks5rFQlLgaJpZM4Kxuue .

wheredoesyourmindgo commented 7 years ago

Not sure if this info is helpful but I'll throw it out there; I have the same macOS and Hyper configuration on my Macbook pro and my iMac. My Macbook Pro does not change/flash background color, while the iMac does flash a different background color.

cdes commented 7 years ago

I've found the culprit.

It's your chosen color profile. huh?

this one: image

Just choose the appropriate color profile for your monitor and it will be fixed.