feat(waybar): add a record module to track screen recording
This commit is contained in:
parent
ed79106342
commit
79d55b304c
2 changed files with 50 additions and 2 deletions
|
@ -1,4 +1,4 @@
|
|||
{lib, config, ...}:
|
||||
{lib, config, pkgs, ...}:
|
||||
with lib;
|
||||
let
|
||||
cfg = config.modules.desktop.sway;
|
||||
|
@ -16,7 +16,9 @@ in
|
|||
layer = "top";
|
||||
spacing = 6;
|
||||
disable-toolptips = true;
|
||||
modules-center = [];
|
||||
modules-center = [
|
||||
"custom/screenrecord"
|
||||
];
|
||||
modules-left = [
|
||||
"sway/workspaces"
|
||||
"sway/mode"
|
||||
|
@ -53,6 +55,7 @@ in
|
|||
"custom/sep"
|
||||
"clock"
|
||||
"custom/sep"
|
||||
"privacy"
|
||||
"tray"
|
||||
];
|
||||
"clock" = {
|
||||
|
@ -73,6 +76,14 @@ in
|
|||
"format" = "|";
|
||||
"tooltip" = false;
|
||||
};
|
||||
"custom/screenrecord" = {
|
||||
"format" = " [rec.] ";
|
||||
"interval" = 1;
|
||||
"exec" = "echo '{\"class\": \"recording\"}'";
|
||||
"exec-if" = "${pkgs.procps}/bin/pgrep wl-screenrec";
|
||||
"on-click" = "exec ${pkgs.coreutils}/bin/kill -s SIGINT $(${pkgs.procps}/bin/pgrep wl-screenrec)";
|
||||
"tooltype" = false;
|
||||
};
|
||||
"idle_inhibitor" = {
|
||||
"format" = "{icon}";
|
||||
"format-icons" = {
|
||||
|
@ -96,6 +107,29 @@ in
|
|||
"format-wifi" = "{essid} ({signalStrength}%) ";
|
||||
"tooltip" = false;
|
||||
};
|
||||
"privacy"= {
|
||||
"icon-spacing" = 4;
|
||||
"icon-size" = 10;
|
||||
"transition-duration" = 250;
|
||||
"modules"= [
|
||||
{
|
||||
"type" = "screenshare";
|
||||
"tooltip" = true;
|
||||
"tooltip-icon-size" = 16;
|
||||
}
|
||||
{
|
||||
"type" = "audio-out";
|
||||
"tooltip" = true;
|
||||
"tooltip-icon-size" = 24;
|
||||
}
|
||||
{
|
||||
"type" = "audio-in";
|
||||
"tooltip" = true;
|
||||
"tooltip-icon-size" = 24;
|
||||
}
|
||||
];
|
||||
"ignore-monitor" = true;
|
||||
};
|
||||
"pulseaudio#output" = {
|
||||
"format" = "{volume}% {icon} ";
|
||||
"format-bluetooth" = "{volume}% {icon}";
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue