summaryrefslogtreecommitdiff
path: root/volume-widget
diff options
context:
space:
mode:
authorPavel Makhov <pavel.makhov@savoirfairelinux.com>2017-06-09 15:45:44 -0400
committerPavel Makhov <pavel.makhov@savoirfairelinux.com>2017-06-09 15:45:44 -0400
commit685b1fd595050d934261ead086718c5c008f931e (patch)
tree0ebe07e9b64df7b65bb4540718cfe46068696e7d /volume-widget
parent2ee0cff703e3aa6b644788712b311501cf0a6046 (diff)
show red icon when volume is muted
Diffstat (limited to 'volume-widget')
-rw-r--r--volume-widget/volume.lua8
1 files changed, 4 insertions, 4 deletions
diff --git a/volume-widget/volume.lua b/volume-widget/volume.lua
index c10e464..c7983c3 100644
--- a/volume-widget/volume.lua
+++ b/volume-widget/volume.lua
@@ -24,11 +24,11 @@ local update_graphic = function(widget, stdout, _, _, _)
local volume = string.match(stdout, "(%d?%d?%d)%%")
volume = tonumber(string.format("% 3d", volume))
local volume_icon_name
- if mute == "off" then volume_icon_name="audio-volume-muted-symbolic"
+ if mute == "off" then volume_icon_name="audio-volume-muted-symbolic_red"
elseif (volume >= 0 and volume < 25) then volume_icon_name="audio-volume-muted-symbolic"
- elseif (volume < 50) then volume_icon_name="audio-volume-low-symbolic"
- elseif (volume < 75) then volume_icon_name="audio-volume-medium-symbolic"
- elseif (volume <= 100) then volume_icon_name="audio-volume-high-symbolic"
+ elseif (volume < 50) then volume_icon_name="audio-volume-low-symbolic"
+ elseif (volume < 75) then volume_icon_name="audio-volume-medium-symbolic"
+ elseif (volume <= 100) then volume_icon_name="audio-volume-high-symbolic"
end
widget.image = path_to_icons .. volume_icon_name .. ".svg"
end