Add auto headphone sink switcher
parent
535e8c5a72
commit
ad6a0b4cd2
@ -0,0 +1,21 @@
|
||||
#!/bin/bash
|
||||
|
||||
SCRIPT_DIR="$(cd -- "$(dirname -- "${BASH_SOURCE[0]}")" && pwd)"
|
||||
echo $SCRIPT_DIR
|
||||
|
||||
sudo tee /home/kuba/.config/systemd/user/g435-sink-switch.service <<EOF
|
||||
[Unit]
|
||||
Description=Switch audio sink to G435 when its volume rocker is pressed
|
||||
After=pipewire-pulse.service
|
||||
Wants=pipewire-pulse.service
|
||||
|
||||
[Service]
|
||||
Type=simple
|
||||
ExecStart=$SCRIPT_DIR/auto-switch-to-headphones.sh
|
||||
Restart=always
|
||||
RestartSec=5
|
||||
Environment=XDG_RUNTIME_DIR=%t
|
||||
|
||||
[Install]
|
||||
WantedBy=default.target
|
||||
EOF
|
||||
@ -0,0 +1,21 @@
|
||||
#!/bin/bash
|
||||
|
||||
SCRIPT_DIR="$(cd -- "$(dirname -- "${BASH_SOURCE[0]}")" && pwd)"
|
||||
echo $SCRIPT_DIR
|
||||
|
||||
cat | sudo tee /etc/systemd/system/cec-remote.service <<EOF
|
||||
[Unit]
|
||||
Description=CEC Receiver Service
|
||||
After=network.target
|
||||
|
||||
[Service]
|
||||
ExecStart=/usr/bin/python3 $SCRIPT_DIR/cec_receiver.py
|
||||
WorkingDirectory=/home/kuba/cec-remote
|
||||
Restart=on-failure
|
||||
RestartSec=5
|
||||
User=kuba
|
||||
Environment=PYTHONUNBUFFERED=1
|
||||
|
||||
[Install]
|
||||
WantedBy=multi-user.target
|
||||
EOF
|
||||
Loading…
Reference in New Issue