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:
5
home/.config/fish/functions/check_webcam.fish
Normal file
5
home/.config/fish/functions/check_webcam.fish
Normal 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
|
@@ -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",
|
||||||
|
@@ -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;
|
||||||
|
@@ -40,6 +40,7 @@
|
|||||||
mdcat
|
mdcat
|
||||||
pandoc
|
pandoc
|
||||||
lsd
|
lsd
|
||||||
|
lsof
|
||||||
gping
|
gping
|
||||||
viu
|
viu
|
||||||
tre-command
|
tre-command
|
||||||
|
Reference in New Issue
Block a user