-- 💜 FWS — configuration Hyprland (format Lua, Hyprland ≄ 0.56). -- Depuis Hyprland 0.57, le format lu est hyprland.lua : si ce fichier existe, -- hyprland.conf est ignorĂ©. MĂȘme contenu, mĂȘmes raccourcis, mĂȘmes couleurs. -- Raccourcis : transposition de la config i3/sway FWS (mĂȘmes touches). -- ⚠ Pas de virgule dans les descriptions (sĂ©parateur de champs Hyprland). local mod = "SUPER" --------------------- ---- MONITEURS ---- --------------------- hl.monitor({ output = "", mode = "preferred", position = "auto", scale = 1 }) -------------------------- ---- RÉGLAGES GÉNÉRAUX ---- -------------------------- hl.config({ input = { kb_layout = "ch", kb_variant = "fr", 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, -- Palette de l'image : mauve #cba6f7 → lavande #c3b6f6 en dĂ©gradĂ©. col = { active_border = { colors = { "rgba(cba6f7ff)", "rgba(c3b6f6ff)" }, angle = 45 }, inactive_border = "rgba(313244ff)", }, layout = "dwindle", }, decoration = { rounding = 8, -- Flou et ombres COUPÉS : rendu logiciel (llvmpipe) en VM. -- Sur un vrai GPU : 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 = "rgba(1f1a2eff)", -- violet profond }, }) -- Courbes et animations (Ă©quivalent de « bezier = fws, 0.22, 1.0, 0.36, 1.0 ») 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 ---- -------------------- -- Barre d'Ă©tat, notifications, rĂ©seau dans le tray, agent d'authentification -- GUI (indispensable aux apps qui demandent les droits admin), fond d'Ă©cran. hl.on("hyprland.start", function() hl.exec_cmd("hyprpaper") hl.exec_cmd("waybar") hl.exec_cmd("mako") -- playerctld suit le LECTEUR ACTIF (les modules mĂ©dia restent Ă  jour). hl.exec_cmd("playerctld daemon") hl.exec_cmd("nm-applet") -- Applet Bluetooth : seulement si un adaptateur existe (en VM il n'y en a -- pas → blueman afficherait « Connection to BlueZ failed »). hl.exec_cmd('sh -c \'[ -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") end) -------------------- ---- RACCOURCIS ---- -------------------- -- Applications hl.bind(mod .. " + Return", hl.dsp.exec_cmd("kitty"), { description = "Ouvrir un terminal (kitty)" }) hl.bind(mod .. " + SHIFT + Return", hl.dsp.exec_cmd("kitty --class floating-term"), { description = "Terminal flottant" }) hl.bind(mod .. " + R", hl.dsp.exec_cmd("wofi --show drun"), { description = "Menu des applications" }) hl.bind(mod .. " + E", hl.dsp.exec_cmd("dolphin"), { description = "Gestionnaire de fichiers" }) hl.bind(mod .. " + B", hl.dsp.exec_cmd("firefox"), { description = "Ouvrir Firefox" }) hl.bind(mod .. " + K", hl.dsp.exec_cmd("fws-keys"), { description = "Afficher les raccourcis clavier" }) hl.bind(mod .. " + X", hl.dsp.exec_cmd("fws-powermenu"), { description = "Menu d'alimentation (arrĂȘt/redĂ©marrage
)" }) -- Panneau multimĂ©dia (mĂȘme fenĂȘtre que le clic sur la pochette de la barre). hl.bind(mod .. " + M", hl.dsp.exec_cmd(os.getenv("HOME") .. "/.config/waybar/scripts/media-panel"), { description = "Panneau multimĂ©dia (lecture en cours)" }) -- FenĂȘtres hl.bind(mod .. " + Q", hl.dsp.window.close(), { description = "Fermer la fenĂȘtre" }) hl.bind(mod .. " + V", hl.dsp.window.float({ action = "toggle" }), { description = "FenĂȘtre flottante ou ancrĂ©e" }) hl.bind(mod .. " + F", hl.dsp.window.fullscreen({ mode = "fullscreen", action = "toggle" }), { description = "Plein Ă©cran" }) hl.bind(mod .. " + J", hl.dsp.layout("togglesplit"), { description = "Basculer la dĂ©coupe horizontale/verticale" }) hl.bind(mod .. " + L", hl.dsp.exec_cmd("hyprlock"), { description = "Verrouiller l'Ă©cran" }) hl.bind(mod .. " + SHIFT + E", hl.dsp.exit(), { description = "Quitter la session (retour Ă  SDDM)" }) hl.bind(mod .. " + SHIFT + C", hl.dsp.reload_config(), { description = "Recharger la configuration Hyprland" }) -- Focus (flĂšches) hl.bind(mod .. " + left", hl.dsp.focus({ direction = "left" }), { description = "Focus Ă  gauche" }) hl.bind(mod .. " + right", hl.dsp.focus({ direction = "right" }), { description = "Focus Ă  droite" }) hl.bind(mod .. " + up", hl.dsp.focus({ direction = "up" }), { description = "Focus en haut" }) hl.bind(mod .. " + down", hl.dsp.focus({ direction = "down" }), { description = "Focus en bas" }) -- DĂ©placer la fenĂȘtre (Maj + flĂšches) hl.bind(mod .. " + SHIFT + left", hl.dsp.window.move({ direction = "left" }), { description = "DĂ©placer la fenĂȘtre Ă  gauche" }) hl.bind(mod .. " + SHIFT + right", hl.dsp.window.move({ direction = "right" }), { description = "DĂ©placer la fenĂȘtre Ă  droite" }) hl.bind(mod .. " + SHIFT + up", hl.dsp.window.move({ direction = "up" }), { description = "DĂ©placer la fenĂȘtre en haut" }) hl.bind(mod .. " + SHIFT + down", hl.dsp.window.move({ direction = "down" }), { description = "DĂ©placer la fenĂȘtre en bas" }) -- Redimensionner (Ctrl + flĂšches, maintien possible) hl.bind(mod .. " + CTRL + left", hl.dsp.window.resize({ x = -30, y = 0 }), { repeating = true }) hl.bind(mod .. " + CTRL + right", hl.dsp.window.resize({ x = 30, y = 0 }), { repeating = true }) hl.bind(mod .. " + CTRL + up", hl.dsp.window.resize({ x = 0, y = -30 }), { repeating = true }) hl.bind(mod .. " + CTRL + down", hl.dsp.window.resize({ x = 0, y = 30 }), { repeating = true }) -- Espaces de travail 1-10 (0 = espace 10, comme i3) for i = 1, 10 do local key = i % 10 hl.bind(mod .. " + " .. key, hl.dsp.focus({ workspace = i }), { description = "Aller Ă  l'espace " .. i }) hl.bind(mod .. " + SHIFT + " .. key, hl.dsp.window.move({ workspace = i }), { description = "Envoyer la fenĂȘtre vers l'espace " .. i }) end -- Multi-Ă©crans (comme i3 : Super+Ctrl+1/2 = Ă©cran gauche/droit) hl.bind(mod .. " + CTRL + 1", hl.dsp.window.move({ monitor = "l" }), { description = "Envoyer la fenĂȘtre vers l'Ă©cran de gauche" }) hl.bind(mod .. " + CTRL + 2", hl.dsp.window.move({ monitor = "r" }), { description = "Envoyer la fenĂȘtre vers l'Ă©cran de droite" }) -- Molette = changer d'espace de travail hl.bind(mod .. " + mouse_up", hl.dsp.focus({ workspace = "e-1" }), { description = "Espace de travail prĂ©cĂ©dent" }) hl.bind(mod .. " + mouse_down", hl.dsp.focus({ workspace = "e+1" }), { description = "Espace de travail suivant" }) -- Scratchpad (espace spĂ©cial) hl.bind(mod .. " + S", hl.dsp.workspace.toggle_special("magic"), { description = "Afficher le scratchpad" }) hl.bind(mod .. " + SHIFT + S", hl.dsp.window.move({ workspace = "special:magic" }), { description = "Envoyer la fenĂȘtre au scratchpad" }) -- Captures d'Ă©cran (grim/slurp → presse-papier ou ~/Images) hl.bind("Print", hl.dsp.exec_cmd("grim - | wl-copy"), { description = "Capture plein Ă©cran vers le presse-papier" }) hl.bind(mod .. " + Print", hl.dsp.exec_cmd('grim -g "$(slurp)" - | wl-copy'), { description = "Capture d'une zone vers le presse-papier" }) hl.bind(mod .. " + SHIFT + Print", hl.dsp.exec_cmd('sh -c \'mkdir -p ~/Images && grim -g "$(slurp)" ~/Images/capture_$(date +%Y-%m-%d_%H-%M-%S).png\''), { description = "Capture d'une zone vers ~/Images" }) -- 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("fws-brightness up"), { locked = true, repeating = true }) hl.bind("XF86MonBrightnessDown", hl.dsp.exec_cmd("fws-brightness down"), { 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ÊTRE --- -------------------------- hl.window_rule({ name = "floating-term", match = { class = "^(floating-term)$" }, float = true, size = "900 550" }) hl.window_rule({ name = "pavucontrol", match = { class = "^([Pp]avucontrol|org.pulseaudio.pavucontrol)$" }, float = true }) hl.window_rule({ name = "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-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 = "pip", match = { title = "^(Picture-in-Picture)$" }, float = true }) -- Panneau multimĂ©dia (script media-panel) : flottant, Ă  sa taille, au-dessus. hl.window_rule({ name = "fws-media", match = { class = "^(fws[.]media)$" }, float = true, size = "460 214" })