Remove mute-indicator
This commit is contained in:
parent
f405280724
commit
ee01378e9c
13 changed files with 0 additions and 191 deletions
|
|
@ -33,7 +33,6 @@
|
|||
./mailserver
|
||||
./matrix
|
||||
./mobile-network.nix
|
||||
./mute-indicator.nix
|
||||
./neo.nix
|
||||
./networking
|
||||
./nix.nix
|
||||
|
|
|
|||
|
|
@ -1,5 +0,0 @@
|
|||
{
|
||||
services.udev.extraRules = ''
|
||||
SUBSYSTEM=="tty", ATTRS{idVendor}=="1eaf", ATTRS{idProduct}=="6d75", SYMLINK+="mute-indicator"
|
||||
'';
|
||||
}
|
||||
|
|
@ -17,7 +17,6 @@ in
|
|||
};
|
||||
fpvout = callPackage ./fpvout { };
|
||||
illuminanced = callPackage ./illuminanced { };
|
||||
mute-indicator = callPackage ./mute-indicator { };
|
||||
myintercom-doorbell = callPackage ./myintercom-doorbell {
|
||||
inherit poetry2nix;
|
||||
};
|
||||
|
|
|
|||
3
pkgs/mute-indicator/.gitignore
vendored
3
pkgs/mute-indicator/.gitignore
vendored
|
|
@ -1,3 +0,0 @@
|
|||
.pio
|
||||
.pioenvs
|
||||
.piolibdeps
|
||||
|
|
@ -1,8 +0,0 @@
|
|||
|
||||
I recommend setting up a udev rule, so that the python script knows which serial port it should connect to:
|
||||
```bash
|
||||
echo 'SUBSYSTEM=="tty", ATTRS{idVendor}=="1eaf", ATTRS{idProduct}=="6d75", SYMLINK+="mute-indicator"' | sudo tee /etc/udev/rules.d/99-mute-indicator.rules
|
||||
```
|
||||
|
||||
### Google Meet
|
||||
[Greasemonkey user script to automatically unmute](https://gist.github.com/jalr/ba132ed4a7133cf4fdbc98c97bf1a9e4)
|
||||
|
|
@ -1,21 +0,0 @@
|
|||
{ python310Packages }:
|
||||
|
||||
python310Packages.buildPythonApplication rec {
|
||||
pname = "mute-indicator";
|
||||
version = "0.0.1";
|
||||
|
||||
src = ./.;
|
||||
|
||||
propagatedBuildInputs = with python310Packages; [
|
||||
python
|
||||
pulsectl
|
||||
pyserial
|
||||
];
|
||||
|
||||
# installPhase = ''
|
||||
# echo $src
|
||||
# mkdir -p $out/bin
|
||||
# cp pulseaudio-mute-indicator.py $out/bin/pulseaudio-mute-indicator
|
||||
# chmod +x $out/bin/pulseaudio-mute-indicator
|
||||
# '';
|
||||
}
|
||||
|
|
@ -1,24 +0,0 @@
|
|||
[env:bluepill]
|
||||
framework = arduino
|
||||
platform = ststm32
|
||||
board = genericSTM32F103C8
|
||||
|
||||
board_build.mcu = stm32f103c8t6
|
||||
board_build.f_cpu = 72000000L
|
||||
|
||||
upload_protocol = dfu
|
||||
upload_port = anything
|
||||
|
||||
lib_deps =
|
||||
Adafruit NeoPixel
|
||||
|
||||
build_flags =
|
||||
-D USBCON
|
||||
-D PIO_FRAMEWORK_ARDUINO_ENABLE_CDC
|
||||
-D USBD_VID=0x1EAF
|
||||
-D USBD_PID=0x6d75
|
||||
-D USB_MANUFACTURER_STRING="\"github.com/jalr\""
|
||||
-D USB_PRODUCT_STRING="\"mute-indicator\""
|
||||
|
||||
# -D HAL_PCD_MODULE_ENABLED
|
||||
# -D USB_PRODUCT=bluepill
|
||||
|
|
@ -1 +0,0 @@
|
|||
|
||||
|
|
@ -1,28 +0,0 @@
|
|||
import pulsectl
|
||||
import serial
|
||||
|
||||
|
||||
def run():
|
||||
with pulsectl.Pulse("event-printer") as pulse:
|
||||
|
||||
def print_events(ev):
|
||||
with pulsectl.Pulse("event-source-info") as pulse2:
|
||||
source = pulse2.source_info(ev.index)
|
||||
if source.name in [
|
||||
"alsa_input.usb-BEHRINGER_UMC202HD_192k-00.analog-stereo",
|
||||
"alsa_input.usb-BEHRINGER_UMC202HD_192k-00.analog-stereo-input",
|
||||
]:
|
||||
muted = bool(source.mute)
|
||||
with serial.Serial(port="/dev/mute-indicator", baudrate=115200) as ser:
|
||||
if muted:
|
||||
ser.write("L0:32,0,0\n".encode())
|
||||
ser.write("L1:32,0,0\n".encode())
|
||||
ser.write("S\n".encode())
|
||||
else:
|
||||
ser.write("L0:0,32,0\n".encode())
|
||||
ser.write("L1:0,32,0\n".encode())
|
||||
ser.write("S\n".encode())
|
||||
|
||||
pulse.event_mask_set("source")
|
||||
pulse.event_callback_set(print_events)
|
||||
pulse.event_listen(timeout=0)
|
||||
|
|
@ -1,20 +0,0 @@
|
|||
from setuptools import setup, find_packages
|
||||
|
||||
setup(
|
||||
name="pulseaudio_mute_indicator",
|
||||
version="0.0.1",
|
||||
url="https://github.com/jalr/mute-indicator.git",
|
||||
author="jalr",
|
||||
author_email="mail@jalr.de",
|
||||
description="Microphone mute LED indicator",
|
||||
packages=find_packages(),
|
||||
install_requires=[
|
||||
"pulsectl",
|
||||
"pyserial",
|
||||
],
|
||||
entry_points={
|
||||
"console_scripts": [
|
||||
"mute-indicator-service = pulseaudio_mute_indicator.service:run",
|
||||
],
|
||||
},
|
||||
)
|
||||
|
|
@ -1,60 +0,0 @@
|
|||
#include <Arduino.h>
|
||||
#include <Adafruit_NeoPixel.h>
|
||||
|
||||
#define NUM_LEDS 2
|
||||
#define DATA_PIN PB8
|
||||
|
||||
Adafruit_NeoPixel pixels(NUM_LEDS, DATA_PIN, NEO_GRB + NEO_KHZ800);
|
||||
|
||||
void setup() {
|
||||
Serial.begin(115200);
|
||||
delay(500);
|
||||
pixels.begin();
|
||||
Serial.println("Serial Neopixel interface ready.");
|
||||
pixels.clear();
|
||||
}
|
||||
|
||||
void loop() {
|
||||
if (Serial.available() > 0) {
|
||||
Serial.println("Received command");
|
||||
char command = Serial.read();
|
||||
switch(command) {
|
||||
case 'L':
|
||||
{
|
||||
Serial.println("got L");
|
||||
String ledStr = Serial.readStringUntil(':');
|
||||
if (ledStr.length() > 0) {
|
||||
long led = ledStr.toInt();
|
||||
Serial.print("got led:");
|
||||
Serial.println(led);
|
||||
long red = Serial.readStringUntil(',').toInt();
|
||||
Serial.print("got red:");
|
||||
Serial.println(red);
|
||||
long green = Serial.readStringUntil(',').toInt();
|
||||
Serial.print("got green:");
|
||||
Serial.println(green);
|
||||
long blue = Serial.readStringUntil('\n').toInt();
|
||||
Serial.print("got blue:");
|
||||
Serial.println(blue);
|
||||
pixels.setPixelColor(led, pixels.Color(red, green, blue));
|
||||
Serial.println("pixel set.");
|
||||
}
|
||||
break;
|
||||
}
|
||||
case 'S':
|
||||
{
|
||||
Serial.readStringUntil('\n');
|
||||
pixels.show();
|
||||
Serial.println("pixel shown.");
|
||||
break;
|
||||
}
|
||||
case 'C':
|
||||
{
|
||||
Serial.readStringUntil('\n');
|
||||
pixels.clear();
|
||||
Serial.println("pixels cleared.");
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -24,7 +24,6 @@
|
|||
./lsd
|
||||
./mixxc
|
||||
./mpv.nix
|
||||
./mute-indicator.nix
|
||||
./mycli
|
||||
./neovim
|
||||
./nix-index.nix
|
||||
|
|
|
|||
|
|
@ -1,18 +0,0 @@
|
|||
{ nixosConfig, lib, pkgs, ... }:
|
||||
|
||||
lib.mkIf nixosConfig.jalr.gui.enable {
|
||||
home.packages = with pkgs; [
|
||||
mute-indicator
|
||||
];
|
||||
|
||||
systemd.user.services.mute-indicator = {
|
||||
Unit.Description = "Mute Indicator";
|
||||
Service = {
|
||||
Type = "simple";
|
||||
ExecStart = "${pkgs.mute-indicator}/bin/mute-indicator-service";
|
||||
RestartSec = 5;
|
||||
Restart = "on-failure";
|
||||
};
|
||||
Install.WantedBy = [ "default.target" ];
|
||||
};
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue