feat: auto-mute audio on lock and unmute on unlock
This commit is contained in:
parent
6bab9ea200
commit
14a94a4ece
2 changed files with 4 additions and 2 deletions
|
|
@ -24,6 +24,7 @@ listener {
|
|||
listener {
|
||||
timeout = 120
|
||||
on-timeout = ~/.config/hypr/scripts/lock.sh
|
||||
on-resume = wpctl set-mute @DEFAULT_AUDIO_SINK@ 0
|
||||
}
|
||||
|
||||
# Step 3: Turn screen off at 5 min idle
|
||||
|
|
@ -38,7 +39,7 @@ listener {
|
|||
# Both together ensure the screen is fully off visually and electrically
|
||||
|
||||
# When the user becomes active again, restore display
|
||||
on-resume = hyprctl dispatch dpms on && ddcutil setvcp 10 100
|
||||
on-resume = hyprctl dispatch dpms on && ddcutil setvcp 10 100 && wpctl set-mute @DEFAULT_AUDIO_SINK@ 0
|
||||
|
||||
# Explanation:
|
||||
# - hyprctl dispatch dpms on → ensures the display is powered on by the compositor
|
||||
|
|
|
|||
|
|
@ -1,3 +1,4 @@
|
|||
#!/bin/bash
|
||||
hyprctl switchxkblayout all 0
|
||||
loginctl lock-session
|
||||
wpctl set-mute @DEFAULT_AUDIO_SINK@ 1
|
||||
hyprlock && wpctl set-mute @DEFAULT_AUDIO_SINK@ 0
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue