Skip to content
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

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

HamishFleming
Copy link
Contributor

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

@streetturtle
Copy link
Owner

This looks big - I'll need some time to test it. Thanks! 👍

@jffz
Copy link

jffz commented Aug 29, 2022

Any news on this ? :)

Copy link

@Ryex Ryex left a 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")
Copy link

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")

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants