bruh
This commit is contained in:
@@ -2,11 +2,13 @@
|
||||
-- This is the audio widget --
|
||||
------------------------------
|
||||
local naughty = require("naughty")
|
||||
local awful = require("awful")
|
||||
|
||||
function Get_icon(theme, c)
|
||||
if theme and c then
|
||||
local clientName = string.lower(c.class) .. ".svg"
|
||||
local clientName
|
||||
clientName = string.lower(c.class) .. ".svg"
|
||||
local resolutions = {"128x128", "96x96", "64x64", "48x48", "42x42", "32x32", "24x24", "16x16"}
|
||||
local home = os.getenv("HOME")
|
||||
for i, res in ipairs(resolutions) do
|
||||
local iconDir = "/usr/share/icons/" .. theme .. "/" .. res .."/apps/"
|
||||
local ioStream = io.open(iconDir .. clientName, "r")
|
||||
@@ -18,4 +20,22 @@ function Get_icon(theme, c)
|
||||
end
|
||||
end
|
||||
return c:Get_icon(1)
|
||||
end
|
||||
|
||||
function Get_icon_by_class_name(theme, c)
|
||||
if theme and c then
|
||||
local c_name = string.lower(c) .. ".svg"
|
||||
local resolutions = {"128x128", "96x96", "64x64", "48x48", "42x42", "32x32", "24x24", "16x16"}
|
||||
for i, res in ipairs(resolutions) do
|
||||
local iconDir = "/usr/share/icons/" .. theme .. "/" .. res .."/apps/"
|
||||
local ioStream = io.open(iconDir .. c_name, "r")
|
||||
if ioStream ~= nil then
|
||||
return iconDir .. c_name
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
function Get_icon_by_desktop(theme, c)
|
||||
|
||||
end
|
||||
Reference in New Issue
Block a user