Skip to content

Configuration

hitokage is configured with lua and css1. hitokage by default looks for your configuration in %USERPROFILE%/.config/hitokage and it looks for init.lua and styles.css.

The minimal configuration might look something like this:

init.lua

local monitors = hitokage.monitor.get_all()

for _, monitor in ipairs(monitors) do
  monitor:attach({
    children = {
      { Workspace = { halign = "Start", item_height = 24, item_width = 24 } },
      { Box = {} },
      { Clock = { format = "%a %b %u %r", halign = "End" } },
    },
  })
end

styles.css

.bar {
  background-color: rgba(29, 32, 33, 0.0);
  color: #f2e5bc;

  font-family: 'MesloLGS NF', 'Courier New', 'Bars', 'Font Awesome 5 Free';
  font-size: 12px;
  line-height: 12px;
  min-height: 24px;
}

.workspace {
  padding: 0px 0px 0px 0px;
  /* border: 1px solid rgba(255, 0, 0, 0.4); */
}

.workspacechild {
  /* distance between workspace children */
  /* margin-left: 8px; */
  border: 1px solid rgba(168, 153, 132, 0.4);

  color: #f2e5bc;
  background-color: rgba(60, 56, 54, 0.4);

  font-size: 11px;
  /* border-radius: 11px; */

  transition: all 500ms;
  transition-property: min-width, background-color;
}

.workspacechild:first-child {
  margin-left: 0px;
}

.workspacechild:selected {
  /* min-width: 32px; */
  border: 1px solid #f2e5bc;
  background-color: #f2e5bc;
  color: #333333;
  font-weight: bold;
}

Setting up Lua Language Server

🚧In progress🚧

This feature is not matured. It will require a clone of the repository.

hitokage comes with type definitions for lua using lua-language-server (LuaLS). It is located at hitokage-lua-lib.

Once installed, you can configure LuaLS to add the type annotations for hitokage. You can follow LuaLS's Configuration Guide, or an abridged version for configuring the addition of hitokage's type definitions is below:

You will have to clone the entire repo, then point your workspace.library at .\hitokage-lua-lib

LuaLS addon system

LuaLS comes with support for addons. Once hitokage reaches v0.1.0 an addon will be published that will be available through LuaLS's addon system for hitokage's type definitions. This is best suited for VSCode users who have installed the sumneko.lua addon.


  1. More details can be found here: about/features