Change to Gtk icon lookup for the application launcher, this cuts loading times to basically 0, notifications now only appear on primary screen

This commit is contained in:
Rene
2022-07-30 05:13:07 +02:00
parent e727015e81
commit 978a8580c8
9 changed files with 66 additions and 53 deletions

View File

@@ -0,0 +1,16 @@
local lgi = require("lgi")
local Gtk = lgi.require("Gtk", "3.0")
local gtk_theme = Gtk.IconTheme.new()
Gtk.IconTheme.set_custom_theme(gtk_theme, User_config.icon_theme)
function Get_gicon_path(app)
local icon_info = gtk_theme:lookup_by_gicon(app, 64, 0)
if icon_info then
local path = icon_info:get_filename()
if path then
return path
end
end
return ""
end