-
-
Notifications
You must be signed in to change notification settings - Fork 278
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix(docker-widget): Fixed issue with indexing nil [#360] and button #368
base: master
Are you sure you want to change the base?
fix(docker-widget): Fixed issue with indexing nil [#360] and button #368
Conversation
…and issues preventing button rendering
This looks big - I'll need some time to test it. Thanks! 👍 |
Any news on this ? :) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Other than the bad require this seems to work flawlessly after my local fix
local WIDGET_DIR = script_path() | ||
local ICONS_DIR = WIDGET_DIR .. "/icons/" | ||
|
||
local clickable_container = require(WIDGET_DIR .. "clickable-container") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is not a reliable method of requiring relative to the local script
error: ...nfig/awesome/awesome-wm-widgets/docker-widget/docker.lua:27: module '/home/ryex/.config/awesome/awesome-wm-widgets/docker-widget/clickable-container' not found:
no field package.preload['/home/ryex/.config/awesome/awesome-wm-widgets/docker-widget/clickable-container']
no file '/usr/share/lua/5.4//home/ryex//config/awesome/awesome-wm-widgets/docker-widget/clickable-container.lua'
no file '/usr/share/lua/5.4//home/ryex//config/awesome/awesome-wm-widgets/docker-widget/clickable-container/init.lua'
no file '/usr/lib/lua/5.4//home/ryex//config/awesome/awesome-wm-widgets/docker-widget/clickable-container.lua'
no file '/usr/lib/lua/5.4//home/ryex//config/awesome/awesome-wm-widgets/docker-widget/clickable-container/init.lua'
no file './/home/ryex//config/awesome/awesome-wm-widgets/docker-widget/clickable-container.lua'
no file './/home/ryex//config/awesome/awesome-wm-widgets/docker-widget/clickable-container/init.lua'
no file '/home/ryex/.config/awesome//home/ryex//config/awesome/awesome-wm-widgets/docker-widget/clickable-container.lua'
no file '/home/ryex/.config/awesome//home/ryex//config/awesome/awesome-wm-widgets/docker-widget/clickable-container/init.lua'
no file '/etc/xdg/awesome//home/ryex//config/awesome/awesome-wm-widgets/docker-widget/clickable-container.lua'
no file '/etc/xdg/awesome//home/ryex//config/awesome/awesome-wm-widgets/docker-widget/clickable-container/init.lua'
no file '/usr/share/awesome/lib//home/ryex//config/awesome/awesome-wm-widgets/docker-widget/clickable-container.lua'
no file '/usr/share/awesome/lib//home/ryex//config/awesome/awesome-wm-widgets/docker-widget/clickable-container/init.lua'
no file '/usr/lib/lua/5.4//home/ryex//config/awesome/awesome-wm-widgets/docker-widget/clickable-container.so'
no file '/usr/lib/lua/5.4/loadall.so'
no file './/home/ryex//config/awesome/awesome-wm-widgets/docker-widget/clickable-container.so'
no file '/home/ryex/.config/awesome//home/ryex//config/awesome/awesome-wm-widgets/docker-widget/clickable-container.so'
no file '/etc/xdg/awesome//home/ryex//config/awesome/awesome-wm-widgets/docker-widget/clickable-container.so'
no file '/usr/share/awesome/lib//home/ryex//config/awesome/awesome-wm-widgets/docker-widget/clickable-container.so'
no file '/home/ryex/.config/awesome/modules/lockscreen/lib//home/ryex//config/awesome/awesome-wm-widgets/docker-widget/clickable-container.so'
no file ''
no file '/usr/lib/lua/5.4//home/ryex/.so'
no file '/usr/lib/lua/5.4/loadall.so'
no file './/home/ryex/.so'
no file '/home/ryex/.config/awesome//home/ryex/.so'
no file '/etc/xdg/awesome//home/ryex/.so'
no file '/usr/share/awesome/lib//home/ryex/.so'
no file '/home/ryex/.config/awesome/modules/lockscreen/lib//home/ryex/.so'
no file ''
perhaps try
local clickable_container = require((...):match("(.-)[^%.]+$") .. "clickable-container")
The main fix was on line 77
There were also a few other issues I was getting around icon location/the same error I had in PR #357 and resolved it the same way.
Feel free to take anything needed from this