fix(powermenu): thème violet pour le menu d'alimentation Super+X

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 <noreply@codebuff.com>
This commit is contained in:
BlackAngelTV committed 2026-09-30 20:54:57 +02:00
1 parent e07b3c8753
commit 9af9974a09
1 file changed
+12 -3
+12 -3
View File
@@ -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; }"]