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:
16
awesome/src/tools/icon_theme.lua
Normal file
16
awesome/src/tools/icon_theme.lua
Normal 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
|
||||
Reference in New Issue
Block a user