diff --git a/configs/baseline/airootfs/usr/local/share/fws/system-translations.toml b/configs/baseline/airootfs/usr/local/share/fws/system-translations.toml index 2e5f4e7..5283768 100644 --- a/configs/baseline/airootfs/usr/local/share/fws/system-translations.toml +++ b/configs/baseline/airootfs/usr/local/share/fws/system-translations.toml @@ -15156,7 +15156,7 @@ zh_TW = "錯誤:{error}" zu = "Iphutha: {error}" -# ==== Hyprland shortcut descriptions (hyprland.conf.tmpl, shown by fws-keys) ==== +# ==== Hyprland shortcut descriptions (hyprland.lua.tmpl, shown by fws-keys) ==== [binds.open_terminal] fr = "Ouvrir un terminal (kitty)" diff --git a/configs/releng/airootfs/usr/local/share/fws/hyprland.conf.tmpl b/configs/releng/airootfs/usr/local/share/fws/hyprland.conf.tmpl deleted file mode 100644 index 5fc7e43..0000000 --- a/configs/releng/airootfs/usr/local/share/fws/hyprland.conf.tmpl +++ /dev/null @@ -1,193 +0,0 @@ -# FWS — configuration Hyprland par défaut. -# Le clavier (__KB_LAYOUT__ / __KB_VARIANT__) est injecté à l'installation, -# depuis le choix fait dans Anaconda. Édite ce fichier librement. -# -# Raccourcis : transposition de la config i3/sway FWS (mêmes touches). -# Couleurs : nuances de bleu (palette Catppuccin Mocha). -# -# Shortcuts are declared with « bindd » (bind + description): the description -# feeds the « Keyboard shortcuts » screen (⌨ button of the bar or SUPER+K → -# fws-keys, which reads the binds actually loaded, through hyprctl). The FWS -# descriptions below are keys (binds.*) that fws-keys shows in the language of -# the session. Add your own bindd with a description in plain text: it shows -# up in the list as written. -# ⚠ No comma in descriptions (Hyprland's field separator). - -monitor = , preferred, auto, 1 - -input { - kb_layout = __KB_LAYOUT__ - kb_variant = __KB_VARIANT__ - kb_options = __KB_OPTIONS__ - follow_mouse = 1 - numlock_by_default = true - touchpad { - natural_scroll = true - tap-to-click = true - } -} - -general { - gaps_in = 4 - gaps_out = 8 - border_size = 2 - # Nuances de bleu : bleu → sapphire en dégradé sur la fenêtre active. - col.active_border = rgb(89b4fa) rgb(74c7ec) 45deg - col.inactive_border = rgb(313244) - layout = dwindle -} - -decoration { - rounding = 8 - # Flou et ombres COUPÉS : rendu logiciel (llvmpipe) en VM — cf. le - # wrapper fws-hyprland écrit par l'installateur. Sur un vrai GPU tu - # peux les réactiver (enabled = true). - blur { - enabled = false - } - shadow { - enabled = false - } -} - -animations { - enabled = true - bezier = fws, 0.22, 1.0, 0.36, 1.0 - animation = windows, 1, 3, fws - animation = workspaces, 1, 3, fws - animation = fade, 1, 2, default -} - -misc { - disable_hyprland_logo = true - disable_splash_rendering = true # pas de « Thanks xxx! » en bas d'écran - force_default_wallpaper = 0 - background_color = 0x1a1a2e # bleu nuit FWS (aucun fond requis) -} - -# Démarrage de session : barre d'état, notifications, réseau dans le tray, -# agent d'authentification GUI (indispensable pour les apps qui demandent -# les droits admin : gestionnaire de disques, blueman…). -# Fond d'écran FWS : image EMBARQUÉE dans l'ISO (aucun réseau requis) — swaybg -# la repose à chaque session, Hyprland n'ayant pas de réglage de fond persistant -# hors config. « background_color » ci-dessus reste le repli si swaybg manque. -exec-once = fws-wallpaper --session -exec-once = waybar -exec-once = mako -exec-once = nm-applet -# Applet Bluetooth : seulement si un adaptateur existe (en VM il n'y en a -# pas → blueman afficherait une erreur « Connection to BlueZ failed »). -exec-once = sh -c '[ -n "$(ls -A /sys/class/bluetooth 2>/dev/null)" ] && exec blueman-applet' -exec-once = /usr/lib/polkit-gnome/polkit-gnome-authentication-agent-1 -# Fenêtre de bienvenue (1er démarrage seulement — se retire ensuite). -exec-once = fws-hello --autostart -# Mise en route du matériel : ne s'ouvre que si elle n'a pas abouti à -# l'installation (pilotes, son, Bluetooth, VR…). -exec-once = fws-drivers --autostart - -$mod = SUPER - -# --- Applications --------------------------------------------------------- -bindd = $mod, Return, binds.open_terminal, exec, kitty -bindd = $mod SHIFT, Return, binds.floating_terminal, exec, kitty --class floating-term -bindd = $mod, R, binds.app_menu, exec, wofi --show drun -bindd = $mod, E, binds.file_manager, exec, dolphin -bindd = $mod, B, binds.open_firefox, exec, firefox -bindd = $mod, P, binds.package_manager, exec, PacManager -bindd = $mod, K, binds.show_shortcuts, exec, fws-keys -bindd = $mod, X, binds.power_menu, exec, fws-powermenu - -# --- Fenêtres --------------------------------------------------------------- -bindd = $mod, Q, binds.close_window, killactive, -bindd = $mod, V, binds.toggle_floating, togglefloating, -bindd = $mod, F, binds.fullscreen, fullscreen, -bindd = $mod, J, binds.toggle_split, layoutmsg, togglesplit -bindd = $mod, L, binds.lock_screen, exec, hyprlock -bindd = $mod SHIFT, E, binds.exit_session, exit, -bindd = $mod SHIFT, C, binds.reload_config, exec, hyprctl reload - -# --- Focus (flèches) --------------------------------------------------------- -bindd = $mod, left, binds.focus_left, movefocus, l -bindd = $mod, right, binds.focus_right, movefocus, r -bindd = $mod, up, binds.focus_up, movefocus, u -bindd = $mod, down, binds.focus_down, movefocus, d - -# --- Déplacer la fenêtre (Maj + flèches) --------------------------------------- -bindd = $mod SHIFT, left, binds.move_window_left, movewindow, l -bindd = $mod SHIFT, right, binds.move_window_right, movewindow, r -bindd = $mod SHIFT, up, binds.move_window_up, movewindow, u -bindd = $mod SHIFT, down, binds.move_window_down, movewindow, d - -# --- Redimensionner (Ctrl + flèches, maintien possible) ------------------------ -binde = $mod CTRL, left, resizeactive, -30 0 -binde = $mod CTRL, right, resizeactive, 30 0 -binde = $mod CTRL, up, resizeactive, 0 -30 -binde = $mod CTRL, down, resizeactive, 0 30 - -# --- Espaces de travail 1-10 (0 = espace 10, comme i3) -------------------------- -bindd = $mod, 1, binds.go_to_workspace, workspace, 1 -bindd = $mod, 2, binds.go_to_workspace, workspace, 2 -bindd = $mod, 3, binds.go_to_workspace, workspace, 3 -bindd = $mod, 4, binds.go_to_workspace, workspace, 4 -bindd = $mod, 5, binds.go_to_workspace, workspace, 5 -bindd = $mod, 6, binds.go_to_workspace, workspace, 6 -bindd = $mod, 7, binds.go_to_workspace, workspace, 7 -bindd = $mod, 8, binds.go_to_workspace, workspace, 8 -bindd = $mod, 9, binds.go_to_workspace, workspace, 9 -bindd = $mod, 0, binds.go_to_workspace, workspace, 10 -bindd = $mod SHIFT, 1, binds.send_window_to_workspace, movetoworkspace, 1 -bindd = $mod SHIFT, 2, binds.send_window_to_workspace, movetoworkspace, 2 -bindd = $mod SHIFT, 3, binds.send_window_to_workspace, movetoworkspace, 3 -bindd = $mod SHIFT, 4, binds.send_window_to_workspace, movetoworkspace, 4 -bindd = $mod SHIFT, 5, binds.send_window_to_workspace, movetoworkspace, 5 -bindd = $mod SHIFT, 6, binds.send_window_to_workspace, movetoworkspace, 6 -bindd = $mod SHIFT, 7, binds.send_window_to_workspace, movetoworkspace, 7 -bindd = $mod SHIFT, 8, binds.send_window_to_workspace, movetoworkspace, 8 -bindd = $mod SHIFT, 9, binds.send_window_to_workspace, movetoworkspace, 9 -bindd = $mod SHIFT, 0, binds.send_window_to_workspace, movetoworkspace, 10 - -# --- Multi-écrans (comme i3 : Super+Ctrl+1/2 = écran gauche/droit) ------------- -bindd = $mod CTRL, 1, binds.send_window_to_left_screen, movewindow, mon:l -bindd = $mod CTRL, 2, binds.send_window_to_right_screen, movewindow, mon:r - -# --- Molette = changer d'espace de travail -------------------------------------- -bindd = $mod, mouse_up, binds.previous_workspace, workspace, e-1 -bindd = $mod, mouse_down, binds.next_workspace, workspace, e+1 - -# --- Scratchpad (espace spécial) ------------------------------------------------- -bindd = $mod, S, binds.show_scratchpad, togglespecialworkspace, magic -bindd = $mod SHIFT, S, binds.send_window_to_scratchpad, movetoworkspace, special:magic - -# --- Captures d'écran (grim/slurp → presse-papier ou ~/Images) ------------------- -bindd = , Print, binds.screenshot_screen_to_clipboard, exec, grim - | wl-copy -bindd = $mod, Print, binds.screenshot_area_to_clipboard, exec, grim -g "$(slurp)" - | wl-copy -bindd = $mod SHIFT, Print, binds.screenshot_area_to_pictures, exec, sh -c 'mkdir -p ~/Images && grim -g "$(slurp)" ~/Images/capture_$(date +%Y-%m-%d_%H-%M-%S).png' - -# --- Multimédia (touches XF86 : volume via PipeWire, lecture via playerctl) ------ -bindel = , XF86AudioRaiseVolume, exec, wpctl set-volume -l 1 @DEFAULT_AUDIO_SINK@ 5%+ -bindel = , XF86AudioLowerVolume, exec, wpctl set-volume @DEFAULT_AUDIO_SINK@ 5%- -bindl = , XF86AudioMute, exec, wpctl set-mute @DEFAULT_AUDIO_SINK@ toggle -bindl = , XF86AudioPlay, exec, playerctl play-pause -bindl = , XF86AudioNext, exec, playerctl next -bindl = , XF86AudioPrev, exec, playerctl previous - -# --- Luminosité de l'écran (portables : touches Fn) ------------------------------ -bindel = , XF86MonBrightnessUp, exec, brightnessctl set +5% -bindel = , XF86MonBrightnessDown, exec, brightnessctl set 5%- - -# --- Souris : déplacer / redimensionner les fenêtres ----------------------------- -bindm = $mod, mouse:272, movewindow -bindm = $mod, mouse:273, resizewindow - -# --- Règles de fenêtres (comme i3) ------------------------------------------------ -# Syntaxe Hyprland ≥ 0.55 : champs « » + cibles « match:… » -# (validé contre le binaire avec --verify-config). -windowrule = float on, match:class ^(floating-term)$ -windowrule = size 900 550, match:class ^(floating-term)$ -windowrule = float on, match:class ^([Pp]avucontrol|org.pulseaudio.pavucontrol)$ -windowrule = float on, match:class ^(.?[Bb]lueman-manager.*)$ -windowrule = float on, match:class ^([Ff]ws-hello)$ -windowrule = float on, match:class ^([Ff]ws-drivers)$ -windowrule = float on, match:class ^([Ff]ws-about)$ -windowrule = float on, match:class ^([Ff]ws-bugreport)$ -windowrule = float on, match:title ^(Picture-in-Picture)$ diff --git a/configs/releng/airootfs/usr/local/share/fws/hyprland.lua.tmpl b/configs/releng/airootfs/usr/local/share/fws/hyprland.lua.tmpl new file mode 100644 index 0000000..842e994 --- /dev/null +++ b/configs/releng/airootfs/usr/local/share/fws/hyprland.lua.tmpl @@ -0,0 +1,195 @@ +-- FWS — configuration Hyprland par défaut (format Lua, Hyprland ≥ 0.55). +-- +-- Depuis Hyprland 0.57 le fichier hyprland.conf (syntaxe « hyprlang ») n'est +-- PLUS lu : seul hyprland.lua est chargé (0.55/0.56 le préfèrent aussi). C'est +-- donc le seul format que FWS livre. +-- +-- Le clavier (__KB_LAYOUT__ / __KB_VARIANT__ / __KB_OPTIONS__) est injecté à +-- l'installation, depuis le choix fait dans Anaconda. Édite ce fichier +-- librement. +-- +-- Raccourcis : transposition de la config i3/sway FWS (mêmes touches). +-- Couleurs : nuances de bleu (palette Catppuccin Mocha). +-- +-- Les raccourcis sont décrits par des clés (binds.*) dans hl.bind() : la +-- description alimente l'écran « Raccourcis clavier » (bouton ⌨ de la barre +-- ou SUPER+K → fws-keys, qui lit les binds RÉELLEMENT chargés via hyprctl). +-- fws-keys affiche ces clés dans la langue de la session ; un texte en clair +-- s'affiche tel quel, sans virgule (séparateur de champs de Hyprland). + +hl.monitor({ + output = "", + mode = "preferred", + position = "auto", + scale = 1, +}) + +hl.config({ + input = { + kb_layout = "__KB_LAYOUT__", + kb_variant = "__KB_VARIANT__", + kb_options = "__KB_OPTIONS__", + follow_mouse = 1, + numlock_by_default = true, + touchpad = { + natural_scroll = true, + tap_to_click = true, + }, + }, + + general = { + gaps_in = 4, + gaps_out = 8, + border_size = 2, + -- Nuances de bleu : bleu → sapphire en dégradé sur la fenêtre active. + col = { + active_border = { + colors = { "rgba(89b4faff)", "rgba(74c7ecff)" }, + angle = 45, + }, + inactive_border = "rgba(313244ff)", + }, + layout = "dwindle", + }, + + decoration = { + rounding = 8, + -- Flou et ombres COUPÉS : rendu logiciel (llvmpipe) en VM — cf. le + -- wrapper fws-hyprland écrit par l'installateur. Sur un vrai GPU tu + -- peux les réactiver (enabled = true). + blur = { + enabled = false, + }, + shadow = { + enabled = false, + }, + }, + + animations = { + enabled = true, + }, + + misc = { + disable_hyprland_logo = true, + disable_splash_rendering = true, -- pas de « Thanks xxx! » en bas d'écran + force_default_wallpaper = 0, + background_color = "0x1a1a2e", -- bleu nuit FWS (aucun fond requis) + }, +}) + +hl.curve("fws", { type = "bezier", points = { { 0.22, 1.0 }, { 0.36, 1.0 } } }) +hl.animation({ leaf = "windows", enabled = true, speed = 3, bezier = "fws" }) +hl.animation({ leaf = "workspaces", enabled = true, speed = 3, bezier = "fws" }) +hl.animation({ leaf = "fade", enabled = true, speed = 2, bezier = "default" }) + +-- Démarrage de session : barre d'état, notifications, réseau dans le tray, +-- agent d'authentification GUI (indispensable pour les apps qui demandent +-- les droits admin : gestionnaire de disques, blueman…). +-- Fond d'écran FWS : image EMBARQUÉE dans l'ISO (aucun réseau requis) — swaybg +-- la repose à chaque session, Hyprland n'ayant pas de réglage de fond persistant +-- hors config. « background_color » ci-dessus reste le repli si swaybg manque. +hl.on("hyprland.start", function() + hl.exec_cmd("fws-wallpaper --session") + hl.exec_cmd("waybar") + hl.exec_cmd("mako") + hl.exec_cmd("nm-applet") + -- Applet Bluetooth : seulement si un adaptateur existe (en VM il n'y en a + -- pas → blueman afficherait une erreur « Connection to BlueZ failed »). + hl.exec_cmd('[ -n "$(ls -A /sys/class/bluetooth 2>/dev/null)" ] && exec blueman-applet') + hl.exec_cmd("/usr/lib/polkit-gnome/polkit-gnome-authentication-agent-1") + -- Fenêtre de bienvenue (1er démarrage seulement — se retire ensuite). + hl.exec_cmd("fws-hello --autostart") + -- Mise en route du matériel : ne s'ouvre que si elle n'a pas abouti à + -- l'installation (pilotes, son, Bluetooth, VR…). + hl.exec_cmd("fws-drivers --autostart") +end) + +local mod = "SUPER" + +-- --- Applications --------------------------------------------------------- +hl.bind(mod .. " + Return", hl.dsp.exec_cmd("kitty"), { description = "binds.open_terminal" }) +hl.bind(mod .. " + SHIFT + Return", hl.dsp.exec_cmd("kitty --class floating-term"), { description = "binds.floating_terminal" }) +hl.bind(mod .. " + R", hl.dsp.exec_cmd("wofi --show drun"), { description = "binds.app_menu" }) +hl.bind(mod .. " + E", hl.dsp.exec_cmd("dolphin"), { description = "binds.file_manager" }) +hl.bind(mod .. " + B", hl.dsp.exec_cmd("firefox"), { description = "binds.open_firefox" }) +hl.bind(mod .. " + P", hl.dsp.exec_cmd("PacManager"), { description = "binds.package_manager" }) +hl.bind(mod .. " + K", hl.dsp.exec_cmd("fws-keys"), { description = "binds.show_shortcuts" }) +hl.bind(mod .. " + X", hl.dsp.exec_cmd("fws-powermenu"), { description = "binds.power_menu" }) + +-- --- Fenêtres --------------------------------------------------------------- +hl.bind(mod .. " + Q", hl.dsp.window.close(), { description = "binds.close_window" }) +hl.bind(mod .. " + V", hl.dsp.window.float(), { description = "binds.toggle_floating" }) +hl.bind(mod .. " + F", hl.dsp.window.fullscreen(), { description = "binds.fullscreen" }) +hl.bind(mod .. " + J", hl.dsp.layout("togglesplit"), { description = "binds.toggle_split" }) +hl.bind(mod .. " + L", hl.dsp.exec_cmd("hyprlock"), { description = "binds.lock_screen" }) +hl.bind(mod .. " + SHIFT + E", hl.dsp.exit(), { description = "binds.exit_session" }) +hl.bind(mod .. " + SHIFT + C", hl.dsp.reload_config(), { description = "binds.reload_config" }) + +-- --- Focus (flèches) --------------------------------------------------------- +hl.bind(mod .. " + left", hl.dsp.focus({ direction = "left" }), { description = "binds.focus_left" }) +hl.bind(mod .. " + right", hl.dsp.focus({ direction = "right" }), { description = "binds.focus_right" }) +hl.bind(mod .. " + up", hl.dsp.focus({ direction = "up" }), { description = "binds.focus_up" }) +hl.bind(mod .. " + down", hl.dsp.focus({ direction = "down" }), { description = "binds.focus_down" }) + +-- --- Déplacer la fenêtre (Maj + flèches) --------------------------------------- +hl.bind(mod .. " + SHIFT + left", hl.dsp.window.move({ direction = "left" }), { description = "binds.move_window_left" }) +hl.bind(mod .. " + SHIFT + right", hl.dsp.window.move({ direction = "right" }), { description = "binds.move_window_right" }) +hl.bind(mod .. " + SHIFT + up", hl.dsp.window.move({ direction = "up" }), { description = "binds.move_window_up" }) +hl.bind(mod .. " + SHIFT + down", hl.dsp.window.move({ direction = "down" }), { description = "binds.move_window_down" }) + +-- --- Redimensionner (Ctrl + flèches, maintien possible) ------------------------ +hl.bind(mod .. " + CTRL + left", hl.dsp.window.resize({ x = -30, y = 0, relative = true }), { repeating = true }) +hl.bind(mod .. " + CTRL + right", hl.dsp.window.resize({ x = 30, y = 0, relative = true }), { repeating = true }) +hl.bind(mod .. " + CTRL + up", hl.dsp.window.resize({ x = 0, y = -30, relative = true }), { repeating = true }) +hl.bind(mod .. " + CTRL + down", hl.dsp.window.resize({ x = 0, y = 30, relative = true }), { repeating = true }) + +-- --- Espaces de travail 1-10 (0 = espace 10, comme i3) -------------------------- +for i = 1, 10 do + local key = i % 10 -- 10 s'écrit 0, comme sur le pavé numérique + hl.bind(mod .. " + " .. key, hl.dsp.focus({ workspace = i }), { description = "binds.go_to_workspace" }) + hl.bind(mod .. " + SHIFT + " .. key, hl.dsp.window.move({ workspace = i }), { description = "binds.send_window_to_workspace" }) +end + +-- --- Multi-écrans (comme i3 : Super+Ctrl+1/2 = écran gauche/droit) ------------- +hl.bind(mod .. " + CTRL + 1", hl.dsp.window.move({ monitor = "l" }), { description = "binds.send_window_to_left_screen" }) +hl.bind(mod .. " + CTRL + 2", hl.dsp.window.move({ monitor = "r" }), { description = "binds.send_window_to_right_screen" }) + +-- --- Molette = changer d'espace de travail -------------------------------------- +hl.bind(mod .. " + mouse_up", hl.dsp.focus({ workspace = "e-1" }), { description = "binds.previous_workspace" }) +hl.bind(mod .. " + mouse_down", hl.dsp.focus({ workspace = "e+1" }), { description = "binds.next_workspace" }) + +-- --- Scratchpad (espace spécial) ------------------------------------------------- +hl.bind(mod .. " + S", hl.dsp.workspace.toggle_special("magic"), { description = "binds.show_scratchpad" }) +hl.bind(mod .. " + SHIFT + S", hl.dsp.window.move({ workspace = "special:magic" }), { description = "binds.send_window_to_scratchpad" }) + +-- --- Captures d'écran (grim/slurp → presse-papier ou ~/Images) ------------------- +hl.bind("Print", hl.dsp.exec_cmd("grim - | wl-copy"), { description = "binds.screenshot_screen_to_clipboard" }) +hl.bind(mod .. " + Print", hl.dsp.exec_cmd('grim -g "$(slurp)" - | wl-copy'), { description = "binds.screenshot_area_to_clipboard" }) +hl.bind(mod .. " + SHIFT + Print", hl.dsp.exec_cmd('mkdir -p ~/Images && grim -g "$(slurp)" ~/Images/capture_$(date +%Y-%m-%d_%H-%M-%S).png'), { description = "binds.screenshot_area_to_pictures" }) + +-- --- Multimédia (touches XF86 : volume via PipeWire, lecture via playerctl) ------ +hl.bind("XF86AudioRaiseVolume", hl.dsp.exec_cmd("wpctl set-volume -l 1 @DEFAULT_AUDIO_SINK@ 5%+"), { locked = true, repeating = true }) +hl.bind("XF86AudioLowerVolume", hl.dsp.exec_cmd("wpctl set-volume @DEFAULT_AUDIO_SINK@ 5%-"), { locked = true, repeating = true }) +hl.bind("XF86AudioMute", hl.dsp.exec_cmd("wpctl set-mute @DEFAULT_AUDIO_SINK@ toggle"), { locked = true }) +hl.bind("XF86AudioPlay", hl.dsp.exec_cmd("playerctl play-pause"), { locked = true }) +hl.bind("XF86AudioNext", hl.dsp.exec_cmd("playerctl next"), { locked = true }) +hl.bind("XF86AudioPrev", hl.dsp.exec_cmd("playerctl previous"), { locked = true }) + +-- --- Luminosité de l'écran (portables : touches Fn) ------------------------------ +hl.bind("XF86MonBrightnessUp", hl.dsp.exec_cmd("brightnessctl set +5%"), { locked = true, repeating = true }) +hl.bind("XF86MonBrightnessDown", hl.dsp.exec_cmd("brightnessctl set 5%-"), { locked = true, repeating = true }) + +-- --- Souris : déplacer / redimensionner les fenêtres ----------------------------- +hl.bind(mod .. " + mouse:272", hl.dsp.window.drag(), { mouse = true }) +hl.bind(mod .. " + mouse:273", hl.dsp.window.resize(), { mouse = true }) + +-- --- Règles de fenêtres (comme i3) ------------------------------------------------ +hl.window_rule({ name = "fws-floating-term-float", match = { class = "^(floating-term)$" }, float = true }) +hl.window_rule({ name = "fws-floating-term-size", match = { class = "^(floating-term)$" }, size = "900 550" }) +hl.window_rule({ name = "fws-pavucontrol", match = { class = "^([Pp]avucontrol|org.pulseaudio.pavucontrol)$" }, float = true }) +hl.window_rule({ name = "fws-blueman", match = { class = "^.?[Bb]lueman-manager.*$" }, float = true }) +hl.window_rule({ name = "fws-hello", match = { class = "^[Ff]ws-hello$" }, float = true }) +hl.window_rule({ name = "fws-drivers", match = { class = "^[Ff]ws-drivers$" }, float = true }) +hl.window_rule({ name = "fws-about", match = { class = "^[Ff]ws-about$" }, float = true }) +hl.window_rule({ name = "fws-bugreport", match = { class = "^[Ff]ws-bugreport$" }, float = true }) +hl.window_rule({ name = "fws-picture-in-picture", match = { title = "^(Picture-in-Picture)$" }, float = true }) diff --git a/configs/releng/airootfs/usr/share/anaconda/interactive-defaults.ks b/configs/releng/airootfs/usr/share/anaconda/interactive-defaults.ks index e634965..7def6c5 100644 --- a/configs/releng/airootfs/usr/share/anaconda/interactive-defaults.ks +++ b/configs/releng/airootfs/usr/share/anaconda/interactive-defaults.ks @@ -566,6 +566,9 @@ print("XV=" + shlex.quote(",".join(variant for _, variant in pairs))) print("XO=" + shlex.quote(",".join(options))) KBPY )" +# Two layouts without variants give XV="," — XKB then has no usable variant +# list, so "no variant" stays empty. +[ -n "${XV//,/}" ] || XV="" if [ -n "$XL" ]; then install -d /etc/X11/xorg.conf.d { @@ -892,16 +895,19 @@ done # --- Config Hyprland (si choisi) : clavier + apps + waybar ------------------- # Hyprland (Wayland) NE lit PAS /etc/X11/xorg.conf.d/00-keyboard.conf : sa # disposition est dans SA config (input { kb_layout }). Sans config il démarre nu -# (QWERTY US, aucune touche utile). On déploie une config FWS (template + +# (QWERTY US, aucune touche utile). On déploie la config FWS (template Lua + # clavier XL/XV injecté) dans /etc/skel ET le home de chaque utilisateur déjà # créé par Anaconda (le %post tourne APRÈS la création de l'utilisateur). -if [ "$DESK" = "hyprland" ] && [ -f /usr/local/share/fws/hyprland.conf.tmpl ]; then +if [ "$DESK" = "hyprland" ]; then + # Hyprland ≥ 0.57 ne lit plus hyprland.conf (syntaxe hyprlang supprimée) : + # seul hyprland.lua est chargé. Le template est rendu avec le clavier + # XL/XV/XO du choix Anaconda, puis posé dans le skel et chaque home. sed -e "s/__KB_LAYOUT__/${XL:-us}/" -e "s/__KB_VARIANT__/${XV}/" -e "s/__KB_OPTIONS__/${XO}/" \ - /usr/local/share/fws/hyprland.conf.tmpl > /tmp/fws-hyprland.conf - install -Dm644 /tmp/fws-hyprland.conf /etc/skel/.config/hypr/hyprland.conf + /usr/local/share/fws/hyprland.lua.tmpl > /tmp/fws-hyprland.lua + install -Dm644 /tmp/fws-hyprland.lua /etc/skel/.config/hypr/hyprland.lua # Waybar FWS : barre assortie + bouton « ⌨ Raccourcis » (fws-keys, # aussi sur SUPER+K) qui liste les binds RÉELS chargés par Hyprland - # (hyprctl binds -j) — les descriptions viennent des bindd de la config. + # (hyprctl binds -j) — les descriptions viennent des hl.bind de la config. install -Dm644 /usr/local/share/fws/waybar-config.json /etc/skel/.config/waybar/config install -Dm644 /usr/local/share/fws/waybar-style.css /etc/skel/.config/waybar/style.css # wofi : style du menu d'applications (Super+R) — le panneau « Raccourcis » @@ -910,7 +916,7 @@ if [ "$DESK" = "hyprland" ] && [ -f /usr/local/share/fws/hyprland.conf.tmpl ]; t install -Dm644 /usr/local/share/fws/wofi-style.css /etc/skel/.config/wofi/style.css while IFS=: read -r _u _x _uid _g _gec _home _sh; do [ "$_uid" -ge 1000 ] && [ "$_uid" -le 60000 ] && [ -d "$_home" ] || continue - install -Dm644 /tmp/fws-hyprland.conf "$_home/.config/hypr/hyprland.conf" + install -Dm644 /tmp/fws-hyprland.lua "$_home/.config/hypr/hyprland.lua" install -Dm644 /usr/local/share/fws/waybar-config.json "$_home/.config/waybar/config" install -Dm644 /usr/local/share/fws/waybar-style.css "$_home/.config/waybar/style.css" install -Dm644 /usr/local/share/fws/wofi-config "$_home/.config/wofi/config" @@ -919,7 +925,7 @@ if [ "$DESK" = "hyprland" ] && [ -f /usr/local/share/fws/hyprland.conf.tmpl ]; t chown -R "$_u": "$_home/.config/hypr" "$_home/.config/waybar" \ "$_home/.config/wofi" 2>/dev/null || true done < /etc/passwd - rm -f /tmp/fws-hyprland.conf + rm -f /tmp/fws-hyprland.lua fi # --- Config i3 (si choisi) : raccourcis FWS + barre + autostart -------------