From 9af9974a09576f4b786eb038817fd34d89e250af Mon Sep 17 00:00:00 2001 From: BlackAngelTV Date: Wed, 30 Sep 2026 20:54:57 +0200 Subject: [PATCH] =?UTF-8?q?fix(powermenu):=20th=C3=A8me=20violet=20pour=20?= =?UTF-8?q?le=20menu=20d'alimentation=20Super+X?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Le script ne chargeait que /usr/local/share/fws/wofi-style.css, resté en Catppuccin bleu sur les machines déjà installées, alors que le style violet du thème vit dans ~/.config/wofi/style.css. Le style est désormais résolu par ordre de préférence, ce qui aligne le menu Super+X sur le menu d'applications Super+R sans dépendre d'un fichier système qui peut être obsolète. 🤖 Generated with Codebuff Co-Authored-By: Codebuff --- system/usr/local/bin/fws-powermenu | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) diff --git a/system/usr/local/bin/fws-powermenu b/system/usr/local/bin/fws-powermenu index 4002796..c63178e 100755 --- a/system/usr/local/bin/fws-powermenu +++ b/system/usr/local/bin/fws-powermenu @@ -9,7 +9,14 @@ import os import subprocess import sys -_WOFI_STYLE = "/usr/local/share/fws/wofi-style.css" +# Style passé à wofi, par ordre de préférence : d'abord le style violet +# installé par le thème dans le profil utilisateur (Super+X — alimentation — +# et Super+R — applications — partagent ainsi le même look), sinon le style +# système FWS s'il est présent. +_WOFI_STYLE_CANDIDATES = ( + os.path.expanduser("~/.config/wofi/style.css"), + "/usr/local/share/fws/wofi-style.css", +) _HYPR = bool(os.environ.get("HYPRLAND_INSTANCE_SIGNATURE")) # (libellé affiché, commande shell). L'icône Nerd Font aide au repérage. @@ -34,8 +41,10 @@ def _menu(entries): if _HYPR: cmd = ["wofi", "--dmenu", "--prompt", "Alimentation", "--width", "300", "--height", "260", "--cache-file", "/dev/null"] - if os.path.exists(_WOFI_STYLE): - cmd += ["--style", _WOFI_STYLE] + style = next((s for s in _WOFI_STYLE_CANDIDATES + if os.path.exists(s)), None) + if style: + cmd += ["--style", style] else: cmd = ["rofi", "-dmenu", "-i", "-p", "Alimentation", "-no-custom", "-theme-str", "window { width: 300px; } listview { lines: 5; }"]