Feature request: Deactivate sound in the night


is it possible to deactivate the sound when I’m sleeping?

For example that the phone turns off the sound at 9 pm and activates it again at 7 am.

Thank you!

I need to test this on PureOS but it should be pretty simple
you can set up a cron job that runs at 9pm “pactl set-sink-mute @DEFAULT_SINK@ true” and then another one that runs at 7am that reverses this “pactl set-sink-mute @DEFAULT_SINK@ false”

1 Like

Be aware that you might get a range of funnies if that setting is not persistent and a reboot occurs at “night” - and if it is persistent, funnies are probably still possible under various reboot scenarios.

(If the setting is not persistent, you can probably fix that with a cron job to run at @reboot which examines the local time, computes the desired setting, and sets it. However that may not be ideal because it is not synchronised with any services i.e. may fail because a needed service is not yet running. That can of course be fixed properly by using a service rather than a cron job, at the expense of more effort.)

1 Like