From ca1247358464a0591aceced464de5d69526a5240 Mon Sep 17 00:00:00 2001 From: Uli Schlachter Date: Tue, 20 Jun 2017 10:05:32 +0200 Subject: [PATCH] Make beautiful.foo = bar work properly Without this, users would modify the beautiful table directly instead of the theme. This made a difference for code using beautiful.get() to get the theme. Reference: https://github.com/awesomeWM/awesome/pull/1854 Signed-off-by: Uli Schlachter --- lib/beautiful/init.lua | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/lib/beautiful/init.lua b/lib/beautiful/init.lua index 3a39d662..0cc38087 100644 --- a/lib/beautiful/init.lua +++ b/lib/beautiful/init.lua @@ -227,6 +227,10 @@ function beautiful.mt:__index(k) return theme[k] end +function beautiful.mt:__newindex(k, v) + theme[k] = v +end + -- Set the default font set_font("sans 8")