Skip to content

Commit a94e3d8

Browse files
committed
refactor: use XStringToKeysym instead of map of all keys
1 parent eea2602 commit a94e3d8

File tree

3 files changed

+4
-2119
lines changed

3 files changed

+4
-2119
lines changed

lua/nxwm/c/gen_lib.lua

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -187,13 +187,7 @@ To regenerate this file, run `nvim -l gen_lib.lua`
187187
if s.source then table.insert(source,s.source..';') end
188188
end
189189
for _,i in ipairs(symbols) do
190-
if type(i)=='table' then
191-
for k,_ in vim.spairs(symbol) do
192-
if k:match(unpack(i)) then simplify(k) end
193-
end
194-
else
195-
simplify(i)
196-
end
190+
simplify(i)
197191
end
198192
table.insert(source,']=]')
199193
table.insert(source,('return ffi.load"%s" --[[@as table]]'):format(libname))
@@ -284,11 +278,11 @@ gen_lib('xlib.lua',{
284278
'XSelectInput',
285279
'XSendEvent',
286280
'XSetInputFocus',
281+
'XStringToKeysym',
287282
'XSync',
288283
'XUnmapWindow',
289284
'XWindowAttributes',
290285
'XWindowChanges',
291-
{'^XK_'}
292286
})
293287
gen_lib('clib.lua',{
294288
'/usr/include/sys/ioctl.h',

0 commit comments

Comments
 (0)