nirish

config files for niri window manager
Log | Files | Refs | README | LICENSE

keybind.lua (1259B)


      1 ---@meta _
      2 
      3 ---@class KeybindFlags
      4 ---@field repeatable boolean?
      5 ---@field scalable boolean?
      6 ---@field complex boolean?
      7 
      8 
      9 ---@class KeybindCommandTable
     10 
     11 
     12 ---@class Keybind
     13 ---@field key string
     14 ---@field command KeybindCommand
     15 ---@field api_version string?
     16 ---
     17 ---@field name string?
     18 ---@field condition string?
     19 ---@field flags KeybindFlags?
     20 ---@field filter ('file'|'dir')?
     21 ---@field parser string?
     22 ---@field multiselect boolean?
     23 ---@field multi-type ('repeat'|'concat')?
     24 ---@field delay number?
     25 ---@field concat-string string?
     26 ---@field passthrough boolean?
     27 ---
     28 ---@field prev_key Keybind?     The keybind that was previously set to the same key.
     29 ---@field codes Set<string>?     Any substituation codes used by the command table.
     30 ---@field condition_codes Set<string>?   Any substitution codes used by the condition string.
     31 ---@field addon boolean?    Whether the keybind was created by an addon.
     32 
     33 
     34 ---@alias KeybindFunctionCallback async fun(keybind: Keybind, state: State, co: thread)
     35 
     36 ---@alias KeybindCommand KeybindFunctionCallback|KeybindCommandTable[]
     37 ---@alias KeybindTuple [string,string,KeybindCommand,KeybindFlags?]
     38 ---@alias KeybindTupleStrict [string,string,KeybindFunctionCallback,KeybindFlags?]
     39 ---@alias KeybindList (Keybind|KeybindTuple)[]