×
Home Download Community Recipes Screenshots Doc Bugs/Issues

Microphone state widget/watcher

This widget can be used to display the current microphone status.

Requirements

Usage

lua local widgets = { mic = require("widgets/mic"), } theme.mic = widgets.mic({ timeout = 10, settings = function(self) if self.state == "muted" then self.widget:set_image(theme.widget_micMuted) else self.widget:set_image(theme.widget_micUnmuted) end end }) local widget_mic = wibox.widget { theme.mic.widget, layout = wibox.layout.align.horizontal }

lua -- Toggle microphone state awful.key({ modkey, "Shift" }, "m", function () beautiful.mic:toggle() end, {description = "Toggle microphone (amixer)", group = "Hotkeys"} ),

lua -- Mute microphone on boot beautiful.mic:mute()