I am trying to improve my rc.lua for an awesome window manager . By default, rc.lua sets up a menu with the following code:
myawesomemenu = { { "manual", terminal .. " -e man awesome" }, { "edit config", editor_cmd .. " " .. awesome.conffile }, { "restart", awesome.restart }, { "quit", awesome.quit } }
I use Awesome as the window manager for the GNOME desktop environment, so I want to use Awesome for the gnome-session-quit awesome.quit instead of awesome.quit , but only if the environment variable "DE" is set to "gnome". So I replaced the fifth line with
{ "quit", if os.getenv("DE") == "gnome" then os.execute("/usr/bin/gnome-session-quit") else awesome.quit end }
But when I reload the file, I get an "unexpected character next to". How can I fix this and what causes it?
source share