1
0
mirror of https://github.com/XNM1/linux-nixos-hyprland-config-dotfiles.git synced 2025-09-15 09:45:58 +03:00

added microphone & webcam indicators to waybar

This commit is contained in:
xnm
2024-03-15 21:25:03 +02:00
parent 38779c2a32
commit e123495f64
4 changed files with 31 additions and 0 deletions

View File

@@ -0,0 +1,5 @@
function check_webcam
if test (lsof /dev/video0 | count) -gt 3
echo "{\"text\":\"󰖠\", \"tooltip\":\"webcam is used\", \"alt\":\"Webcam\"}"
end
end

View File

@@ -164,6 +164,8 @@
"group/misc": { "group/misc": {
"orientation": "horizontal", "orientation": "horizontal",
"modules": [ "modules": [
"pulseaudio#microphone_indicator",
"custom/webcam",
"custom/recording", "custom/recording",
"custom/geo", "custom/geo",
"custom/media", "custom/media",
@@ -174,6 +176,19 @@
], ],
}, },
"pulseaudio#microphone_indicator": {
"format": "{format_source}",
"format-source": "󰍬",
"format-source-muted": "",
"tooltip-format": "microphone on",
},
"custom/webcam": {
"interval": 1,
"exec": "fish -c check_webcam",
"return-type": "json",
},
"custom/recording": { "custom/recording": {
"interval": 1, "interval": 1,
"exec-if": "pgrep wf-recorder", "exec-if": "pgrep wf-recorder",

View File

@@ -208,6 +208,16 @@ window.top_bar .modules-center {
color: @subtext0; color: @subtext0;
} }
#pulseaudio.microphone_indicator {
color: @pink;
margin-right: 4;
}
#custom-webcam {
color: @maroon;
margin-right: 4;
}
#custom-recording { #custom-recording {
color: @red; color: @red;
margin-right: 4; margin-right: 4;

View File

@@ -40,6 +40,7 @@
mdcat mdcat
pandoc pandoc
lsd lsd
lsof
gping gping
viu viu
tre-command tre-command