From c7ca9919f32e00848a78b768f110a03fd5a2f750 Mon Sep 17 00:00:00 2001 From: Oleg Broytman Date: Fri, 5 Dec 2025 00:42:18 +0300 Subject: [PATCH] .fvwmrc: Show current brightness and volume Show in separate sub-submenu pop-ups to avoid rebuilding the current submenu. --- .fvwm/main.m4 | 21 +++++++++++++++++++-- 1 file changed, 19 insertions(+), 2 deletions(-) diff --git a/.fvwm/main.m4 b/.fvwm/main.m4 index 9389ad3..130af67 100644 --- a/.fvwm/main.m4 +++ b/.fvwm/main.m4 @@ -889,15 +889,32 @@ AddToMenu Browsers "Choose one:" Title + "Chromium incognito + HTTPS proxy" ChromiumIncognito + "Chromium incognito + SOCKS5 proxy" ChromiumIncognito -s + +DestroyFunc CurrentBrightness +AddToFunc CurrentBrightness ++ I DestroyMenu recreate CurrentBrightness ++ I PipeRead 'echo AddToMenu CurrentBrightness Current:_"$(LCD% -s)" Title' + +DestroyMenu CurrentBrightness +AddToMenu CurrentBrightness DynamicPopupAction Function CurrentBrightness + DestroyMenu Brightness -AddToMenu Brightness "Choose one:" Title +AddToMenu Brightness "Current:" Popup CurrentBrightness + "Dim (32%)" Exec exec LCD% 32 + "Normal (40%)" Exec exec LCD% 40 + "Bright (60%)" Exec exec LCD% 60 + "Extra (80%)" Exec exec LCD% 80 +DestroyFunc CurrentVolume +AddToFunc CurrentVolume ++ I DestroyMenu recreate CurrentVolume ++ I PipeRead 'echo AddToMenu CurrentVolume Current:_"$($HOME/current/projects/audio-cdr-video/audio/pa-get-volume)%" Title' + +DestroyMenu CurrentVolume +AddToMenu CurrentVolume DynamicPopupAction Function CurrentVolume + DestroyMenu Volume -AddToMenu Volume "Choose one:" Title +AddToMenu Volume "Current:" Popup CurrentVolume + "Silent (10%)" Exec exec "$HOME"/current/projects/audio-cdr-video/audio/pa-volume set 6554 + "Quiet (32%)" Exec exec "$HOME"/current/projects/audio-cdr-video/audio/pa-volume set 20972 + "Low (40%)" Exec exec "$HOME"/current/projects/audio-cdr-video/audio/pa-volume set 26214 -- 2.39.5