]> git.phdru.name Git - dotfiles.git/commitdiff
.fvwmrc: Show current brightness and volume master
authorOleg Broytman <phd@phdru.name>
Thu, 4 Dec 2025 21:42:18 +0000 (00:42 +0300)
committerOleg Broytman <phd@phdru.name>
Thu, 4 Dec 2025 21:42:18 +0000 (00:42 +0300)
Show in separate sub-submenu pop-ups to avoid rebuilding the current submenu.

.fvwm/main.m4

index 9389ad3fc1d325d32989a83d8282fc723b89b6bd..130af67129ffdf739e7e05da94eb9f682bd6dfc8 100644 (file)
@@ -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