Automatic mute for night mode
-
Now, i had issues with different servicies sending emails around 4AM waking me up, so I am currently playing with mute service, there are commands I am trying just muting the DEFAULT_SINK, not sure if correct way, since it is not toggle-able with the switch in ayatana indicators
nano ~/.config/systemd/user/mute-audio.service with
[Unit] Description=Mute Audio [Service] Type=oneshot ExecStart=/usr/bin/pactl set-sink-mute @DEFAULT_SINK@ 1
nano /.config/systemd/user/unmute-audio.service with
[Unit] Description=Unmute Audio [Service] Type=oneshot ExecStart=/usr/bin/pactl set-sink-mute @DEFAULT_SINK@ 0
nano /.config/systemd/user/mute-audio.timer with
[Unit] Description=Timer to mute audio at 8 PM [Timer] OnCalendar=*-*-* 20:00:00 Persistent=true [Install] WantedBy=timers.target
nano /.config/systemd/user/unmute-audio.timer with
[Unit] Description=Timer to unmute audio at 7 AM [Timer] OnCalendar=*-*-* 07:00:00 Persistent=true [Install] WantedBy=timers.target
systemctl --user daemon-reload
systemctl --user enable mute-audio.timer
systemctl --user enable unmute-audio.timer
systemctl --user start mute-audio.timer
systemctl --user start unmute-audio.timersystemctl --user list-timers