Added audio device selector, new notification theme and much more. Rewritten some files and made a new README
This commit is contained in:
@@ -14,7 +14,7 @@ require("src.core.signals")
|
||||
local icondir = awful.util.getdir("config") .. "src/assets/icons/audio/"
|
||||
|
||||
-- Returns the audio widget
|
||||
return function()
|
||||
return function(s)
|
||||
|
||||
local audio_widget = wibox.widget {
|
||||
{
|
||||
@@ -78,6 +78,7 @@ return function()
|
||||
end
|
||||
audio_widget.container.audio_layout.label:set_text(volume .. "%")
|
||||
audio_widget.container.audio_layout.icon_margin.icon_layout.icon:set_image(gears.color.recolor_image(icon .. ".svg", color["Grey900"]))
|
||||
awesome.emit_signal("get::volume", volume)
|
||||
end
|
||||
)
|
||||
end
|
||||
@@ -90,8 +91,10 @@ return function()
|
||||
audio_widget.container.audio_layout.label.visible = false
|
||||
audio_widget.container:set_right(0)
|
||||
audio_widget.container.audio_layout.icon_margin.icon_layout.icon:set_image(gears.color.recolor_image(icondir .. "volume-mute" .. ".svg", color["Grey900"]))
|
||||
awesome.emit_signal("get::volume_mute", true)
|
||||
else
|
||||
audio_widget.container:set_right(10)
|
||||
awesome.emit_signal("get::volume_mute", false)
|
||||
get_volume()
|
||||
end
|
||||
end
|
||||
@@ -104,20 +107,18 @@ return function()
|
||||
audio_widget:connect_signal(
|
||||
"button::press",
|
||||
function()
|
||||
awesome.emit_signal("widget::volume")
|
||||
--awesome.emit_signal("module::volume_osd:show", true)
|
||||
awesome.emit_signal("module::slider:update")
|
||||
awesome.emit_signal("widget::volume_osd:rerun")
|
||||
awesome.emit_signal("volume_controller::toggle")
|
||||
awesome.emit_signal("volume_controller::toggle", s)
|
||||
end
|
||||
)
|
||||
|
||||
awesome.connect_signal(
|
||||
"widget::volume",
|
||||
function(c)
|
||||
check_muted()
|
||||
end
|
||||
)
|
||||
gears.timer {
|
||||
timeout = 0.5,
|
||||
call_now = true,
|
||||
autostart = true,
|
||||
callback = check_muted
|
||||
}
|
||||
|
||||
check_muted()
|
||||
return audio_widget
|
||||
|
||||
Reference in New Issue
Block a user