Mofiqul/awesome-shell

noti-center.lua:340 nil value error

Bad3r opened this issue · 5 comments

Bad3r commented

Hi,
Thanks for sharing your config. Your post made want to give Awesome WM a try. I am trying to replicate your setup and ran into an error that I can't figure out how to solve
image
the related code block

naughty.connect_signal("added", function(n)

	if notifbox_layout.children == 1 and remove_notifbox_empty then
		notifbox_layout:reset(notifbox_layout)
		remove_notifbox_empty = false
	end

	local notifbox_color = beautiful.bg_normal
	if n.urgency == 'critical' then
		notifbox_color = beautiful.bg_urgent
	end

	notifbox_layout:insert(1,create_notifbox(n))
end)

rc.lua:229 is just a call to noti-center.lua

			require("widgets.noti-center"),

in your original code there is an extra # character in if #notifbox_layout.children and I am not sure why. I am new to lua. I tried with and without and both produced the same error

naughty.connect_signal("added", function(n)

	if #notifbox_layout.children == 1 and remove_notifbox_empty then
		notifbox_layout:reset(notifbox_layout)
		remove_notifbox_empty = false
	end

	local notifbox_color = beautiful.bg_normal
	if n.urgency == 'critical' then
		notifbox_color = beautiful.bg_urgent
	end

	notifbox_layout:insert(1,create_notifbox(n))
end)

If you have any idea what could be the cause of this error I would appreciate any help

It's look like you have not require naughty
local naughty = require('naighty')
add this on top of noti-center.lua

Screenshot from 2021-04-18 18-06-32
im getting this error now. I have local naughty = require('naighty') on top of my noti-center.lua config

Screenshot from 2021-04-18 18-06-32
im getting this error now. I have local naughty = require('naighty') on top of my noti-center.lua config

local naughty = require('naughty') i mean*

In order for it to work for me, I had to install the latest version of awesomewm directly from the source code. After that, it started to work as it should.

I was getting the same error message because I was lazy and chose to install it directly from my terminal, as @Mofiqul had specified, awesomewm has to be installed directly from the repository.

@GustavoPrietoP @Bad3r

If you are interested in building from source code. I will be leaving the links for you to follow the instructions.

Awesome Github Repository
List of dependencies

After installing it, I was unable to see awesomewm on the xfce login screen. To solve this, I had to create an awesome.desktop file inside the xsessions folder (usr/share/xsessions)

Put the following code inside the awesome.desktop file:

[Desktop Entry]
Encoding=UTF-8
Name=awesome
Comment=Highly configurable framework window manager
TryExec=awesome
Type=Application
Exec=awesome

Then logout or restart your computer, and you should be ready to go.

Bad3r commented

@cinget @GustavoPrietoP

Thank you! I was able to solve the issue by using the git version of the package i.e awesome-git from the aur

closed.