From afd56f98a318cac9754d39a9a41b8304c8f95bdc Mon Sep 17 00:00:00 2001 From: Micah Gorrell Date: Fri, 19 May 2023 09:51:02 -0600 Subject: [PATCH 1/2] Added a section in the README to show an example for integrating this with waybar --- README.md | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) diff --git a/README.md b/README.md index f971c30..61f6731 100644 --- a/README.md +++ b/README.md @@ -48,3 +48,25 @@ Monitor sinks: will print `RUNNING` or `NOT RUNNING` ```zsh sway-audio-idle-inhibit --dry-print-sink ``` + +## Waybar Integration + +A custom waybar module can be used to display an icon when any application is +using your mic or playing any audio. + +Add the follow section to your `~/.config/waybar/config` file and add +`custom/audio_idle_inhibitor` to either the `modules-left`, `modules-center` +or `modules-right` list. + +``` + "custom/audio_idle_inhibitor": { + "format": "{icon}", + "exec": "sway-audio-idle-inhibit --dry-print-both-waybar", + "return-type": "json", + "format-icons": { + "output": "󰅶", + "none": "󰾪" + } + }, +``` + From 42808a8593202c1d0e954dd311db59765afb1a39 Mon Sep 17 00:00:00 2001 From: Erik Reider <35975961+ErikReider@users.noreply.github.com> Date: Sun, 21 May 2023 16:10:40 +0200 Subject: [PATCH 2/2] Update README.md --- README.md | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index 61f6731..d35b7d4 100644 --- a/README.md +++ b/README.md @@ -54,18 +54,23 @@ sway-audio-idle-inhibit --dry-print-sink A custom waybar module can be used to display an icon when any application is using your mic or playing any audio. -Add the follow section to your `~/.config/waybar/config` file and add +Add the following section to your `~/.config/waybar/config` file and add `custom/audio_idle_inhibitor` to either the `modules-left`, `modules-center` or `modules-right` list. +*Note: The FontAwesome font is used for the icons below* + ``` "custom/audio_idle_inhibitor": { "format": "{icon}", "exec": "sway-audio-idle-inhibit --dry-print-both-waybar", + "exec-if": "which sway-audio-idle-inhibit", "return-type": "json", "format-icons": { - "output": "󰅶", - "none": "󰾪" + "output": "", + "input": "", + "output-input": " ", + "none": "" } }, ```