1
0
Fork 0

Add mic-checks to communication launchers

This commit is contained in:
Malte 2022-11-25 23:58:42 +01:00
parent f27fd90d5b
commit b656c7c9f4
2 changed files with 15 additions and 5 deletions

View file

@ -14,6 +14,15 @@
wrapProgram $out/bin/zoom --unset XDG_SESSION_TYPE wrapProgram $out/bin/zoom --unset XDG_SESSION_TYPE
''; '';
}); });
mic-check = pkgs.writeShellScriptBin "mic-check" ''
echo "Activating loopback!"
${pkgs.pulseaudio}/bin/pactl load-module module-loopback
echo "Can your hear yourself? Fix audio setup! Then press enter "
read
echo "Deactivating loopback!"
${pkgs.pulseaudio}/bin/pactl unload-module module-loopback
echo "Continuing "
'';
inherit (pkgs.gnome) nautilus; inherit (pkgs.gnome) nautilus;
inherit (pkgs.xorg) xbacklight; inherit (pkgs.xorg) xbacklight;

View file

@ -1,6 +1,7 @@
{pkgs, ...}: let {pkgs, ...}: let
fork = cmd: "fork ${cmd}"; fork = cmd: "fork ${cmd}";
edit_dir = dir: "sh -c 'cd ${dir}; hx ${dir}'"; edit_dir = dir: "sh -c 'cd ${dir}; hx ${dir}'";
with-mic-check = cmd: fork "sh -c 'footclient mic-check; ${cmd}'";
in [ in [
{ {
Orga = [ Orga = [
@ -67,7 +68,7 @@ in [
} }
{ {
Apps = { Apps = {
Editor = fork "codium"; Editor = fork "kitty";
Config = edit_dir "~/git/config"; Config = edit_dir "~/git/config";
Files = fork "nautilus"; Files = fork "nautilus";
DarkTerminal = fork "footclient -o 'color.background=000000' -o 'foreground=ffffff'"; DarkTerminal = fork "footclient -o 'color.background=000000' -o 'foreground=ffffff'";
@ -113,15 +114,15 @@ in [
} }
{ {
Mumble = { Mumble = {
CDA = fork "mumble mumble://maralorn@mumble.hax404.de"; CDA = with-mic-check "mumble mumble://maralorn@mumble.hax404.de";
Nixos = fork "mumble mumble://maralorn@lassul.us/nixos"; Nixos = with-mic-check "mumble mumble://maralorn@lassul.us/nixos";
}; };
} }
{Weechat = "weechat";} {Weechat = "weechat";}
{Signal = fork "signal-desktop";} {Signal = fork "signal-desktop";}
{Zoom = fork "zoom";} {Zoom = with-mic-check "zoom";}
{Telegram = fork "telegram-desktop";} {Telegram = fork "telegram-desktop";}
{Discord = fork "Discord";} {Discord = with-mic-check "Discord";}
{Tmate = "tmate";} {Tmate = "tmate";}
]; ];
} }