reworked Get_icon and some other fixes

This commit is contained in:
Kievits Rene
2022-04-19 18:35:56 +02:00
parent dbda6ffcb4
commit a7e4a1214f
11 changed files with 171 additions and 199 deletions

View File

@@ -7,6 +7,8 @@
"client", "client",
"screen", "screen",
"mouse", "mouse",
"double_click_timer" "double_click_timer",
"vim",
"lspSymbol"
] ]
} }

View File

@@ -10,61 +10,23 @@ local wibox = require("wibox")
return function(screen, programs) return function(screen, programs)
local function create_dock_element(program, name, is_steam, size) local function create_dock_element(class, program, name, is_steam, size)
if program == nil or class == nil then
return
end
is_steam = is_steam or false is_steam = is_steam or false
if program:match("com.*%a.Client") ~= nil then
program = program:gsub("com.", ""):gsub(".Client", ""):gsub("flatpak", ""):gsub("run", ""):gsub(" ", "")
end
local function create_indicator()
local col = "#fff"
local indicators = { layout = wibox.layout.flex.horizontal, spacing = dpi(5) }
for i, c in ipairs(client.get()) do
if string.lower(c.class):match(program or name) then
if c == client.focus then
col = color["YellowA200"]
elseif c.urgent then
col = color["RedA200"]
elseif c.maximized then
col = color["GreenA200"]
elseif c.minimized then
col = color["BlueA200"]
elseif c.fullscreen then
col = color["PinkA200"]
else
col = color["Grey600"]
end
local indicator = wibox.widget {
widget = wibox.container.background,
shape = gears.shape.rounded_rect,
forced_height = dpi(3),
spacing_widget = dpi(5),
spacing = dpi(5),
bg = col
}
indicators[i] = indicator
end
end
return indicators
end
local dock_element = wibox.widget { local dock_element = wibox.widget {
{ {
{
{ {
{ {
resize = true, resize = true,
forced_width = size, forced_width = size,
forced_height = size, forced_height = size,
image = Get_icon(user_vars.icon_theme, program, is_steam), image = Get_icon(user_vars.icon_theme, nil, program, class, is_steam),
widget = wibox.widget.imagebox, widget = wibox.widget.imagebox,
id = "icon" id = "icon"
}, },
create_indicator(),
layout = wibox.layout.align.vertical,
id = "dock_layout"
},
margins = dpi(5), margins = dpi(5),
widget = wibox.container.margin, widget = wibox.container.margin,
id = "margin" id = "margin"
@@ -76,7 +38,9 @@ return function(screen, programs)
widget = wibox.container.background, widget = wibox.container.background,
id = "background" id = "background"
}, },
margins = dpi(5), top = dpi(5),
left = dpi(5),
right = dpi(5),
widget = wibox.container.margin widget = wibox.container.margin
} }
@@ -140,12 +104,14 @@ return function(screen, programs)
local dock_elements = { layout = wibox.layout.fixed.horizontal } local dock_elements = { layout = wibox.layout.fixed.horizontal }
for i, p in ipairs(pr) do for i, p in ipairs(pr) do
dock_elements[i] = create_dock_element(p[1], p[2], p[3], user_vars.dock_icon_size) dock_elements[i] = create_dock_element(p[1], p[2], p[3], p[4], user_vars.dock_icon_size)
end end
return dock_elements return dock_elements
end end
local dock_elements = get_dock_elements(programs)
local function get_fake_elements(amount) local function get_fake_elements(amount)
local fake_elements = { layout = wibox.layout.fixed.horizontal } local fake_elements = { layout = wibox.layout.fixed.horizontal }
@@ -160,10 +126,52 @@ return function(screen, programs)
return fake_elements return fake_elements
end end
dock:setup { local function create_incicator_widget(prog)
get_dock_elements(programs), local container = { layout = wibox.layout.flex.horizontal }
layout = wibox.layout.fixed.vertical local clients = client.get()
for index, pr in ipairs(prog) do
local indicators = { layout = wibox.layout.flex.horizontal, spacing = dpi(5) }
local col = color["Grey600"]
for i, c in ipairs(clients) do
if string.lower(c.class or c.name):match(string.lower(pr[1]) or string.lower(pr[2])) then
if c == client.focus then
col = color["YellowA200"]
elseif c.urgent then
col = color["RedA200"]
elseif c.maximized then
col = color["GreenA200"]
elseif c.minimized then
col = color["BlueA200"]
elseif c.fullscreen then
col = color["PinkA200"]
else
col = color["Grey600"]
end
indicators[i] = wibox.widget {
widget = wibox.container.background,
shape = gears.shape.rounded_rect,
forced_height = dpi(3),
bg = col,
forced_width = dpi(5),
} }
end
end
container[index] = wibox.widget {
indicators,
forced_height = dpi(5),
forced_width = dpi(50),
left = dpi(5),
right = dpi(5),
widget = wibox.container.margin,
}
end
return wibox.widget {
container,
bottom = dpi(5),
widget = wibox.container.margin,
}
end
fakedock:setup { fakedock:setup {
get_fake_elements(#programs), get_fake_elements(#programs),
@@ -200,7 +208,8 @@ return function(screen, programs)
function() function()
check_for_dock_hide(screen) check_for_dock_hide(screen)
dock:setup { dock:setup {
get_dock_elements(programs), dock_elements,
create_incicator_widget(programs),
layout = wibox.layout.fixed.vertical layout = wibox.layout.fixed.vertical
} }
end end
@@ -211,7 +220,8 @@ return function(screen, programs)
function() function()
check_for_dock_hide(screen) check_for_dock_hide(screen)
dock:setup { dock:setup {
get_dock_elements(programs), dock_elements,
create_incicator_widget(programs),
layout = wibox.layout.fixed.vertical layout = wibox.layout.fixed.vertical
} }
end end
@@ -222,7 +232,8 @@ return function(screen, programs)
function() function()
check_for_dock_hide(screen) check_for_dock_hide(screen)
dock:setup { dock:setup {
get_dock_elements(programs), dock_elements,
create_incicator_widget(programs),
layout = wibox.layout.fixed.vertical layout = wibox.layout.fixed.vertical
} }
end end
@@ -250,4 +261,10 @@ return function(screen, programs)
dock_intelligent_hide:again() dock_intelligent_hide:again()
end end
) )
dock:setup {
get_dock_elements(programs),
create_incicator_widget(programs),
layout = wibox.layout.fixed.vertical
}
end end

View File

@@ -54,10 +54,10 @@ awful.screen.connect_for_each_screen(
require("crylia_bar.right_bar")(s, {s.battery, s.network, s.bluetooth, s.audio, s.kblayout, s.date, s.clock,s.powerbutton}) require("crylia_bar.right_bar")(s, {s.battery, s.network, s.bluetooth, s.audio, s.kblayout, s.date, s.clock,s.powerbutton})
end ]] end ]]
-- Bars -- Bars
require("crylia_bar.left_bar")(s, { s.layoutlist, s.systray, s.taglist }) require("crylia_bar.left_bar")(s, { s.layoutlist, s.systray, s.taglist })
require("crylia_bar.center_bar")(s, s.tasklist) require("crylia_bar.center_bar")(s, s.tasklist)
require("crylia_bar.right_bar")(s, { s.battery, s.network, s.bluetooth, s.audio, s.kblayout, s.date, s.clock, s.powerbutton }) require("crylia_bar.right_bar")(s, { s.battery, s.network, s.bluetooth, s.audio, s.kblayout, s.date, s.clock, s.powerbutton })
require("crylia_bar.dock")(s, user_vars.dock_programs) require("crylia_bar.dock")(s, user_vars.dock_programs)
end end
) )

View File

@@ -207,7 +207,7 @@ return gears.table.join(
{}, {},
"XF86AudioLowerVolume", "XF86AudioLowerVolume",
function(c) function(c)
awful.spawn("pactl set-sink-volume @DEFAULT_SINK@ -2%") awful.spawn.easy_async("pactl set-sink-volume @DEFAULT_SINK@ -2%")
awesome.emit_signal("widget::volume") awesome.emit_signal("widget::volume")
awesome.emit_signal("module::volume_osd:show", true) awesome.emit_signal("module::volume_osd:show", true)
awesome.emit_signal("module::slider:update") awesome.emit_signal("module::slider:update")
@@ -219,15 +219,7 @@ return gears.table.join(
{}, {},
"XF86AudioRaiseVolume", "XF86AudioRaiseVolume",
function(c) function(c)
awful.spawn.easy_async_with_shell( awful.spawn.easy_async("pactl set-sink-volume @DEFAULT_SINK@ +2%")
[[ pacmd list-sinks | grep "volume: front" | awk '{print $5}' ]],
function(stdout)
stdout = stdout:gsub("%%", "")
local volume = tonumber(stdout) or 0
if volume <= 98 then
awful.spawn("pactl set-sink-volume @DEFAULT_SINK@ +2%")
end
end)
awesome.emit_signal("widget::volume") awesome.emit_signal("widget::volume")
awesome.emit_signal("module::volume_osd:show", true) awesome.emit_signal("module::volume_osd:show", true)
awesome.emit_signal("module::slider:update") awesome.emit_signal("module::slider:update")

View File

@@ -6,7 +6,6 @@
-- ██║ ██║╚███╔███╔╝███████╗███████║╚██████╔╝██║ ╚═╝ ██║███████╗╚███╔███╔╝██║ ╚═╝ ██║ -- -- ██║ ██║╚███╔███╔╝███████╗███████║╚██████╔╝██║ ╚═╝ ██║███████╗╚███╔███╔╝██║ ╚═╝ ██║ --
-- ╚═╝ ╚═╝ ╚══╝╚══╝ ╚══════╝╚══════╝ ╚═════╝ ╚═╝ ╚═╝╚══════╝ ╚══╝╚══╝ ╚═╝ ╚═╝ -- -- ╚═╝ ╚═╝ ╚══╝╚══╝ ╚══════╝╚══════╝ ╚═════╝ ╚═╝ ╚═╝╚══════╝ ╚══╝╚══╝ ╚═╝ ╚═╝ --
----------------------------------------------------------------------------------------- -----------------------------------------------------------------------------------------
-- Initialising, order is important! -- Initialising, order is important!
require("src.theme.user_variables") require("src.theme.user_variables")
require("src.theme.init") require("src.theme.init")
@@ -16,4 +15,4 @@ require("src.core.signals")
require("mappings.global_buttons") require("mappings.global_buttons")
require("mappings.bind_to_tags") require("mappings.bind_to_tags")
require("crylia_bar.init") require("crylia_bar.init")
require("src.tools.auto_starter")(user_vars.autostart) --require("src.tools.auto_starter")(user_vars.autostart)

View File

@@ -304,10 +304,11 @@ return function(s)
awesome.connect_signal( awesome.connect_signal(
"module::powermenu:show", "module::powermenu:show",
function() function()
powermenu_container.visible = false if s == mouse.screen then
powermenu_container.visible = true powermenu_container.visible = true
powermenu_keygrabber:start() powermenu_keygrabber:start()
end end
end
) )
awesome.connect_signal( awesome.connect_signal(

View File

@@ -60,19 +60,6 @@ local create_click_events = function(c)
return buttons return buttons
end end
local createresize_click_events = function(c)
local buttons = gears.table.join(
awful.button(
{},
1,
function()
c:activate { context = 'titlebar', action = 'mouse_resize' }
end
)
)
return buttons
end
local create_titlebar = function(c, bg, size) local create_titlebar = function(c, bg, size)
local titlebar = awful.titlebar(c, { local titlebar = awful.titlebar(c, {
position = "left", position = "left",
@@ -191,55 +178,8 @@ local create_titlebar_dialog = function(c, bg, size)
Hover_signal(titlebar.main.margin.spacing.minimizebutton, color["Green200"]) Hover_signal(titlebar.main.margin.spacing.minimizebutton, color["Green200"])
end end
local create_titlebar_borderhack = function(c, bg, position)
local borderhack = awful.titlebar(c, {
position = position,
bg = bg,
size = "4"
})
borderhack:setup {
{
bg = bg,
widget = wibox.container.background
},
{
buttons = createresize_click_events(c),
layout = wibox.layout.flex.vertical
},
nil,
layout = wibox.layout.align.vertical
}
local old_wibox, old_cursor
borderhack:connect_signal(
"mouse::enter",
function()
local w = mouse.current_client
if w then
old_cursor, old_wibox = w.cursor, w
w.cursor = "hand1"
end
end
)
borderhack:connect_signal(
"mouse::leave",
function()
if old_wibox then
old_wibox.cursor = old_cursor
old_wibox = nil
end
end
)
end
local draw_titlebar = function(c) local draw_titlebar = function(c)
if c.type == 'normal' and not c.requests_no_titlebar then if c.type == 'normal' and not c.requests_no_titlebar then
create_titlebar_borderhack(c, "#121212AA", "right")
create_titlebar_borderhack(c, "#121212AA", "top")
create_titlebar_borderhack(c, "#121212AA", "bottom")
if c.class == 'Firefox' then if c.class == 'Firefox' then
create_titlebar(c, '#121212AA', 35) create_titlebar(c, '#121212AA', 35)
elseif c.name == "Steam" then elseif c.name == "Steam" then
@@ -253,15 +193,6 @@ local draw_titlebar = function(c)
end end
elseif c.type == 'dialog' then elseif c.type == 'dialog' then
create_titlebar_dialog(c, '#121212AA', 35) create_titlebar_dialog(c, '#121212AA', 35)
create_titlebar_borderhack(c, "#121212AA", "right")
create_titlebar_borderhack(c, "#121212AA", "top")
create_titlebar_borderhack(c, "#121212AA", "bottom")
elseif c.type == 'modal' then
else
create_titlebar_borderhack(c, "#121212AA", "right")
create_titlebar_borderhack(c, "#121212AA", "top")
create_titlebar_borderhack(c, "#121212AA", "bottom")
create_titlebar_borderhack(c, "#121212AA", "left")
end end
end end
@@ -313,9 +244,6 @@ client.connect_signal(
awful.titlebar.hide(c, 'bottom') awful.titlebar.hide(c, 'bottom')
else else
awful.titlebar.show(c, 'left') awful.titlebar.show(c, 'left')
awful.titlebar.show(c, 'right')
awful.titlebar.show(c, 'top')
awful.titlebar.show(c, 'bottom')
end end
else else
awful.titlebar.hide(c, 'left') awful.titlebar.hide(c, 'left')

View File

@@ -42,7 +42,7 @@ user_vars = {
}, },
-- This is your default Terminal -- This is your default Terminal
terminal = "alacritty -o font.size=14", terminal = "alacritty",
-- This is the modkey 'mod4' = Super/Mod/WindowsKey, 'mod3' = alt... -- This is the modkey 'mod4' = Super/Mod/WindowsKey, 'mod3' = alt...
modkey = "Mod4", modkey = "Mod4",
@@ -68,22 +68,24 @@ user_vars = {
-- Add your programs exactly like in this example. -- Add your programs exactly like in this example.
-- First entry has to be how you would start the program in the terminal (just try it if you dont know yahoo it) -- First entry has to be how you would start the program in the terminal (just try it if you dont know yahoo it)
-- Second can be what ever the fuck you want it to be (will be the displayed name if you hover over it) -- Second can be what ever the fuck you want it to be (will be the displayed name if you hover over it)
-- For steam games please use this format {"394360", "Name", true} true will tell the func that it's a steam game -- For steam games please use this format (look in .local/share/applications for the .desktop file, that will contain the number you need)
-- TODO: Add appimage support -- {"394360", "Name", true} true will tell the func that it's a steam game
-- Theoretically you can put the appimage path as the first argument and it *should* work -- Use xprop | grep WM_CLASS and use the *SECOND* string
-- { WM_CLASS, program, name, isSteam }
dock_programs = { dock_programs = {
{ "alacritty", "Alacritty" }, { "Alacritty", "alacritty", "Alacritty" },
{ "firefox", "Firefox" }, { "firefox", "firefox", "Firefox" },
{ "discord", "Discord" }, { "discord", "discord", "Discord" },
{ "flatpak run com.spotify.Client", "Spotify" }, { "Spotify", "flatpak run com.spotify.Client", "Spotify" },
{ "code", "Visual Studio Code" }, { "Code", "code", "Visual Studio Code" },
{ "arduino", "Arduino IDE" }, { "processing-app-Base", "arduino", "Arduino IDE" },
{ "zoom", "Zoom" }, { "zoom", "zoom", "Zoom" },
{ "thunderbird", "Thunderbird" }, { "Thunderbird", "thunderbird", "Thunderbird" },
{ "mattermost-desktop", "Mattermost" }, { "Mattermost", "mattermost-desktop", "Mattermost" },
{ "blender", "Blender" }, { "Blender", "blender", "Blender" },
{ "steam", "Steams" }, { "Steam", "steam", "Steams" },
{ "freecad", "Freecad" }, { "FreeCAD", "freecad", "Freecad" },
{ "nemo", "Dateien" } { "Nemo", "nemo", "Dateien" },
{ "Paradox Launcher", "394360", "Hearts of Iron 4", true }
} }
} }

View File

@@ -1,62 +1,95 @@
----------------------------------------------------- -----------------------------------------------------
-- Helper to get icons from a program/program name -- -- Helper to get icons from a program/program name --
----------------------------------------------------- -----------------------------------------------------
local naughty = require("naughty") local icon_cache = {}
-- tries to find a matching file name in /usr/share/icons/THEME/RESOLUTION/apps/ and if not found tried with first letter -- tries to find a matching file name in /usr/share/icons/THEME/RESOLUTION/apps/ and if not found tried with first letter
-- as uppercase, this should get almost all icons to work with the papirus theme atleast -- as uppercase, this should get almost all icons to work with the papirus theme atleast
-- TODO: try with more icon themes -- TODO: try with more icon themes
function Get_icon(theme, c, is_steam) function Get_icon(theme, client, program_string, class_string, is_steam)
if theme ~= nil and c ~= nil then
client = client or nil
program_string = program_string or nil
class_string = class_string or nil
is_steam = is_steam or nil
if theme and (client or program_string or class_string) then
local clientName local clientName
if type(c) == "string" then
if c:match("com.*%a") ~= nil then
c = c:gsub("com.", ""):gsub(".Client", ""):gsub("flatpak", ""):gsub("run", ""):gsub(" ", "")
end
end
if is_steam then if is_steam then
clientName = "steam_icon_" .. tostring(c) .. ".svg" clientName = "steam_icon_" .. tostring(client) .. ".svg"
elseif client then
if client.class then
clientName = string.lower(client.class) .. ".svg"
elseif client.name then
clientName = string.lower(client.name) .. ".svg"
elseif type(client) == "string" then
clientName = client .. ".svg"
else else
if c.class ~= nil then if client.icon == nil then
clientName = string.lower(c.class) .. ".svg" return "/usr/share/icons/Papirus-Dark/128x128/apps/application-default-icon.svg"
elseif c.name ~= nil then
clientName = string.lower(c.name) .. ".svg"
elseif type(c) == "string" then
clientName = c .. ".svg"
else else
return return client.icon
end end
end end
else
if program_string then
clientName = program_string .. ".svg"
else
clientName = class_string .. ".svg"
end
end
for index, icon in ipairs(icon_cache) do
if icon:match(clientName) then
return icon
end
end
local resolutions = { "128x128", "96x96", "64x64", "48x48", "42x42", "32x32", "24x24", "16x16" } local resolutions = { "128x128", "96x96", "64x64", "48x48", "42x42", "32x32", "24x24", "16x16" }
for i, res in ipairs(resolutions) do for i, res in ipairs(resolutions) do
local iconDir = "/usr/share/icons/" .. theme .. "/" .. res .. "/apps/" local iconDir = "/usr/share/icons/" .. theme .. "/" .. res .. "/apps/"
local ioStream = io.open(iconDir .. clientName, "r") local ioStream = io.open(iconDir .. clientName, "r")
if ioStream ~= nil then if ioStream ~= nil then
icon_cache[#icon_cache + 1] = iconDir .. clientName
return iconDir .. clientName return iconDir .. clientName
else else
clientName = clientName:gsub("^%l", string.upper) clientName = clientName:gsub("^%l", string.upper)
iconDir = "/usr/share/icons/" .. theme .. "/" .. res .. "/apps/" iconDir = "/usr/share/icons/" .. theme .. "/" .. res .. "/apps/"
ioStream = io.open(iconDir .. clientName, "r") ioStream = io.open(iconDir .. clientName, "r")
if ioStream ~= nil then if ioStream ~= nil then
icon_cache[#icon_cache + 1] = iconDir .. clientName
return iconDir .. clientName
else
clientName = class_string .. ".svg"
iconDir = "/usr/share/icons/" .. theme .. "/" .. res .. "/apps/"
ioStream = io.open(iconDir .. clientName, "r")
if ioStream ~= nil then
icon_cache[#icon_cache + 1] = iconDir .. clientName
return iconDir .. clientName return iconDir .. clientName
elseif type(c) ~= type("") then
if pcall(
function()
if c:Get_icon(1) then
error("icon error")
else else
return c:Get_icon(1)
end
end
) then
return nil
end
end
end
end
end
if c.icon == nil then
return "/usr/share/icons/Papirus-Dark/128x128/apps/application-default-icon.svg" return "/usr/share/icons/Papirus-Dark/128x128/apps/application-default-icon.svg"
else
return c.icon
end end
end end
end
end
if client then
return client:Get_icon(1)
end
end
end
--———————————No swiches?———————————
--⠀⣞⢽⢪⢣⢣⢣⢫⡺⡵⣝⡮⣗⢷⢽⢽⢽⣮⡷⡽⣜⣜⢮⢺⣜⢷⢽⢝⡽⣝
--⠸⡸⠜⠕⠕⠁⢁⢇⢏⢽⢺⣪⡳⡝⣎⣏⢯⢞⡿⣟⣷⣳⢯⡷⣽⢽⢯⣳⣫⠇
--⠀⠀⢀⢀⢄⢬⢪⡪⡎⣆⡈⠚⠜⠕⠇⠗⠝⢕⢯⢫⣞⣯⣿⣻⡽⣏⢗⣗⠏⠀
--⠀⠪⡪⡪⣪⢪⢺⢸⢢⢓⢆⢤⢀⠀⠀⠀⠀⠈⢊⢞⡾⣿⡯⣏⢮⠷⠁⠀⠀
--⠀⠀⠀⠈⠊⠆⡃⠕⢕⢇⢇⢇⢇⢇⢏⢎⢎⢆⢄⠀⢑⣽⣿⢝⠲⠉⠀⠀⠀⠀
--⠀⠀⠀⠀⠀⡿⠂⠠⠀⡇⢇⠕⢈⣀⠀⠁⠡⠣⡣⡫⣂⣿⠯⢪⠰⠂⠀⠀⠀⠀
--⠀⠀⠀⠀⡦⡙⡂⢀⢤⢣⠣⡈⣾⡃⠠⠄⠀⡄⢱⣌⣶⢏⢊⠂⠀⠀⠀⠀⠀⠀
--⠀⠀⠀⠀⢝⡲⣜⡮⡏⢎⢌⢂⠙⠢⠐⢀⢘⢵⣽⣿⡿⠁⠁⠀⠀⠀⠀⠀⠀⠀
--⠀⠀⠀⠀⠨⣺⡺⡕⡕⡱⡑⡆⡕⡅⡕⡜⡼⢽⡻⠏⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀
--⠀⠀⠀⠀⣼⣳⣫⣾⣵⣗⡵⡱⡡⢣⢑⢕⢜⢕⡝⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀
--⠀⠀⠀⣴⣿⣾⣿⣿⣿⡿⡽⡑⢌⠪⡢⡣⣣⡟⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀
--⠀⠀⠀⡟⡾⣿⢿⢿⢵⣽⣾⣼⣘⢸⢸⣞⡟⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀
--⠀⠀⠀⠀⠁⠇⠡⠩⡫⢿⣝⡻⡮⣒⢽⠋⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀
--—————————————————————————————

View File

@@ -60,7 +60,6 @@ return function()
awful.spawn.easy_async_with_shell( awful.spawn.easy_async_with_shell(
[[ [[
SINK="$(pacmd stat | awk -F": " '/^Default sink name: /{print $2}')" SINK="$(pacmd stat | awk -F": " '/^Default sink name: /{print $2}')"
echo $(pacmd list-sinks | awk '/^\s+name: /{indefault = $2 == "<'$SINK'>"} /^\s+volume: / && indefault {print $5; exit}') echo $(pacmd list-sinks | awk '/^\s+name: /{indefault = $2 == "<'$SINK'>"} /^\s+volume: / && indefault {print $5; exit}')
]], ]],
function(stdout) function(stdout)

View File

@@ -7,7 +7,6 @@ local awful = require("awful")
local color = require("src.theme.colors") local color = require("src.theme.colors")
local dpi = require("beautiful").xresources.apply_dpi local dpi = require("beautiful").xresources.apply_dpi
local gears = require("gears") local gears = require("gears")
local naughty = require("naughty")
local wibox = require("wibox") local wibox = require("wibox")
require("src.core.signals") require("src.core.signals")