From ce931c8be1aaf115febefd017c26a1fb73043b26 Mon Sep 17 00:00:00 2001 From: Xinhao Yuan Date: Sat, 13 Jul 2019 08:30:38 -0400 Subject: [PATCH] put icon into the theme --- init.lua | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/init.lua b/init.lua index 4c01aa4..5407401 100644 --- a/init.lua +++ b/init.lua @@ -3,6 +3,16 @@ local editor = require(... .. ".editor") local switcher = require(... .. ".switcher") local default_editor = editor.create() local default_layout = layout.create("default", default_editor) +local gcolor = require("gears.color") + +local beautiful = require("beautiful") +local source = debug.getinfo(1, "S").source +if source:sub(1, 1) == "@" then + base = source:match("^@(.-)[^/]+$") + beautiful.layout_machi = gcolor.recolor_image( + base .. "icon.png", beautiful.fg_normal) + print(beautiful.layout_machi) +end return { layout = layout,