Skip to content

Switch ZSA keyboard colors when Neovim switches modes

License

Notifications You must be signed in to change notification settings

lukewiebe/kontroll.nvim

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

13 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Kontroll.nvim

Sync the LEDs on your ZSA keyboard to your mode in Neovim!

This plugin hooks into ZSA keyboards using Kontroll, a utility made by ZSA.

From ZSA's announcement post:

Kontroll is an open-source command-line tool available for Windows, macOS and Linux. It plugs into Keymapp (version 1.3.0 and above) and allows you to control your keyboard using the command line or scripts.

Requirements

  • A ZSA Moonlander or Voyager keyboard (tested on Voyager)
  • An up-to-date version of Keymapp that supports Kontroll
  • Kontroll
  • Neovim 0.10+ (this plugin uses vim.system to call Kontroll asynchronously)

Features

  • Per-mode colors that are easily customizable
  • Releases control of keyboard lighting when Neovim loses focus

Installation

Kontroll.nvim supports any plugin manager.

Lazy

{
    'lukewiebe/kontroll.nvim',
    opts = {},
}

Packer

require('packer').startup(function()
    use 'lukewiebe/kontroll.nvim'
end)

Paq

require("paq").setup({
    'lukewiebe/kontroll.nvim',
})

vim-plug

Plug 'lukewiebe/kontroll.nvim'

Setup

To initialize the plugin, put this in your init.lua.

require("kontroll").setup()

Configuration

You can customize the colors of your keyboard by passing options to setup. Here are the defaults:

require("kontroll").setup({
	colors = {
		["Normal"] = "#FFFFFF",
		["Insert"] = "#780000",
		["Command"] = "#007200",
		["Visual"] = "#0D00A4",
	},
})

About

Switch ZSA keyboard colors when Neovim switches modes

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages