make noisetorch autostart
This commit is contained in:
parent
3f2d77b862
commit
f876db6695
2 changed files with 25 additions and 1 deletions
16
home/.config/systemd/user/noisetorch.service
Normal file
16
home/.config/systemd/user/noisetorch.service
Normal file
|
@ -0,0 +1,16 @@
|
|||
[Unit]
|
||||
Description=Noisetorch
|
||||
Requires=sys-devices-pci0000:00-0000:00:14.0-usb1-1\x2d2-1\x2d2.1-1\x2d2.1:1.0-sound-card1-controlC1.device
|
||||
After=sys-devices-pci0000:00-0000:00:14.0-usb1-1\x2d2-1\x2d2.1-1\x2d2.1:1.0-sound-card1-controlC1.device
|
||||
After=pipewire.service
|
||||
|
||||
[Service]
|
||||
Type=simple
|
||||
RemainAfterExit=yes
|
||||
ExecStart=/usr/bin/noisetorch -i -s alsa_input.usb-GeneralPlus_USB_Audio_Device-00.mono-fallback -t 25
|
||||
ExecStop=/usr/bin/noisetorch -u
|
||||
Restart=on-failure
|
||||
RestartSec=3
|
||||
|
||||
[Install]
|
||||
WantedBy=default.target
|
|
@ -1,4 +1,4 @@
|
|||
from src.util import paru_install
|
||||
from src.util import paru_install, run, copy_file
|
||||
|
||||
name = "NoiseTorch"
|
||||
|
||||
|
@ -9,3 +9,11 @@ def setup():
|
|||
# temporarily using noisetorch-git over noisetorch-bin due to this:
|
||||
# https://github.com/noisetorch/NoiseTorch/issues/274
|
||||
paru_install("noisetorch-git")
|
||||
|
||||
# Start NoiseTorch on boot
|
||||
# https://github.com/noisetorch/NoiseTorch/wiki/Start-automatically-with-Systemd
|
||||
|
||||
copy_file("home/.config/systemd/user/noisetorch.service")
|
||||
run("systemctl --user daemon-reload")
|
||||
run("systemctl --user start noisetorch")
|
||||
run("systemctl --user enable noisetorch")
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue