diff --git a/README.md b/README.md index 9f36eff..ea487c4 100644 --- a/README.md +++ b/README.md @@ -24,6 +24,8 @@ Toute la config visuelle « édition violette » : **Hyprland**, **Waybar**, **w violet-dotfiles/ ├── install.sh ← script d'installation (recommandé) ├── README.md ← ce fichier +│ +│ ── le thème, prêt à installer (modèles avec chemins à substituer) ── ├── hypr/ ← Hyprland : hyprland.conf, hyprlock, hyprpaper ├── waybar/ ← barre du haut : config, style.css, icons/logo.png │ └── scripts/ ← modules média : media-cover, media-panel @@ -40,12 +42,108 @@ violet-dotfiles/ ├── sddm/ │ ├── catppuccin-mocha-mauve/ ← thème de l'écran de connexion │ └── 10-fws.conf ← config SDDM -└── wallpapers/ - └── Banner.png ← fond d'écran (3440×1440) +├── wallpapers/ +│ └── Banner.png ← fond d'écran (3440×1440) +│ +│ ── copie intégrale de la machine (rien à installer : sauvegarde brute) ── +├── system/ ← miroir des fichiers système (voir § Copie intégrale) +│ ├── etc/{default/grub, grub.d/42_fws-recovery, sddm.conf.d/10-fws.conf} +│ ├── boot/grub/themes/catppuccin-mocha-grub-theme/ +│ ├── usr/local/bin/fws-* ← scripts de la distro FWS +│ ├── usr/local/share/fws/ ← modèles FWS (wofi, waybar, hyprland…) +│ ├── usr/share/sddm/themes/fws/ +│ └── usr/share/wayland-sessions/{hyprland,hyprland-uwsm}.desktop +├── home/ ← fichiers du home pas ailleurs dans le dépôt +│ ├── .zshrc .bashrc .bash_profile +│ ├── .config/btop/btop.conf ← `color_theme = "violet"` +│ ├── wofi-style-violet.css +│ └── grub-violet-theme/install-violet.sh +└── live-2026-09-21/ ← état exact des configs qui tournaient ce jour-là + └── .config/{hypr,waybar,wofi,kitty}/… ``` --- +## 🗄 Copie intégrale (system/, home/, live-/) + +En plus du thème installable, le dépôt contient une **sauvegarde brute** de tout +ce qui fait l'apparence de la machine : amorçage (GRUB), écran de connexion +(SDDM), session Wayland, verrouillage, barre, notifications, terminal, prompts +et les scripts qui vont avec. Rien à lancer : ce sont les fichiers tels quels. + +### Où se trouve quoi + +| Sur la machine | Dans le dépôt | +|----------------|----------------| +| `~/.config/hypr`, `waybar`, `mako`, `wofi`, `kitty`, `gtk-*`, `zsh`, `bash` | dossiers du même nom à la racine (modèles) + `live-2026-09-21/` (copie brute) | +| `~/.zshrc`, `~/.bashrc`, `~/.bash_profile` | `home/` | +| `~/.config/btop/btop.conf` | `home/.config/btop/btop.conf` | +| `~/wofi-style-violet.css`, `~/grub-violet-theme/` | `home/` | +| `/etc/default/grub` | `system/etc/default/grub` | +| `/etc/grub.d/42_fws-recovery` | `system/etc/grub.d/42_fws-recovery` | +| `/boot/grub/themes/violet` | `grub/violet/` (identique, vérifié) | +| `/boot/grub/themes/catppuccin-mocha-grub-theme` | `system/boot/grub/themes/catppuccin-mocha-grub-theme/` | +| `/etc/sddm.conf.d/10-fws.conf` | `system/etc/sddm.conf.d/10-fws.conf` | +| `/usr/share/sddm/themes/catppuccin-mocha-mauve` | `sddm/catppuccin-mocha-mauve/` (identique, vérifié) | +| `/usr/share/sddm/themes/fws` | `system/usr/share/sddm/themes/fws/` | +| `/usr/share/wayland-sessions/hyprland*.desktop` | `system/usr/share/wayland-sessions/` | +| `/usr/local/bin/fws-*` et amis | `system/usr/local/bin/` | +| `/usr/local/share/fws/` | `system/usr/local/share/fws/` | + +> `system/` reproduit l'arborescence réelle : `system/etc/default/grub` se +> recopie en `/etc/default/grub`. Les deux gros thèmes (GRUB violet, SDDM +> catppuccin) ne sont pas dupliqués : ils vivent déjà à la racine du dépôt. +> Non inclus : le binaire `PacManager` et ses `plugins/` (~1 Mo, +> réinstallables via FWS-PacManage) et `~/violet-dotfiles.tar.gz` (archive). + +### ⚠️ Le thème GRUB violet n'est pas celui qui s'affiche + +`/etc/default/grub` de cette machine pointe vers **catppuccin**, pas vers +violet : + +``` +GRUB_THEME="/boot/grub/themes/catppuccin-mocha-grub-theme/theme.txt" +``` + +Le thème violet est bien installé dans `/boot/grub/themes/violet`, mais inactif. +Pour basculer sur le violet (sudo) : + +```bash +sudo cp /home/damien/violet-dotfiles/system/etc/default/grub /etc/default/grub +# ou seulement changer la ligne : +sudo sed -i 's|^GRUB_THEME=.*|GRUB_THEME="/boot/grub/themes/violet/theme.txt"|' /etc/default/grub +sudo grub-mkconfig -o /boot/grub/grub.cfg +``` + +### Restaurer les fichiers système après un formatage + +```bash +cd violet-dotfiles +sudo cp -a system/etc/. /etc/ +sudo cp -a system/boot/. /boot/ +sudo cp -a system/usr/. /usr/ +sudo grub-mkconfig -o /boot/grub/grub.cfg # régénère le menu avec le thème +``` + +### `live-2026-09-21/` + +Copie **telle quelle** des configs qui tournaient le 21/09/2026, avec les +chemins absolus de cette machine. Les dossiers modèles de la racine en +diffèrent sur trois points, volontairement : + +1. les chemins absolus y sont des jetons (`__WALLPAPER__`, + `__WAYBAR_SCRIPTS__`, `__WAYBAR_LOGO__`) remplacés par `install.sh` — un + chemin en dur casserait l'installation chez quelqu'un d'autre ; +2. la Waybar de la racine contient les modules `bluetooth` et `network` ainsi + que les règles CSS associées, absents de la version qui tournait ; +3. la version qui tournait avait perdu le fond mauve du bouton d'alimentation + dans `style.css` (`background: #cba6f7`). + +Si la version qui tourne est celle que tu préfères, elle est dans +`live-2026-09-21/` : remets-la à la racine et `install.sh` la réinstallera. + +--- + ## 🚀 Installation rapide Prérequis : **Arch Linux / FWS**, session **Hyprland** déjà fonctionnelle. @@ -124,20 +222,24 @@ pochettes distantes. ## 🎵 Lecture en cours (pochette + panneau) -La barre affiche la piste qui joue : **la pochette**, puis l'icône du lecteur, -le titre, l'artiste et le temps (`0:42 / 3:18`). Rien n'est propre à un -lecteur : tout passe par **MPRIS** (`playerctl`), donc Spotify, mpv, Firefox ou -VLC fonctionnent de la même façon. Quand rien ne joue, la pochette et la piste -disparaissent et seule l'image de repli reste. +La barre affiche **la pochette** de la piste qui joue, et rien d'autre : le +titre, l'artiste et le temps (`0:42 / 3:18`) restent lisibles **au survol** de +la pochette. Rien n'est propre à un lecteur : tout passe par **MPRIS** +(`playerctl`), donc Spotify, mpv, Firefox ou VLC fonctionnent de la même façon. +Quand rien ne joue, la pilule disparaît complètement : la barre se referme au +lieu de garder un trou. | Action | Effet | |--------|-------| -| Clic sur la pochette ou le titre | Ouvre le **panneau multimédia** | -| Clic droit | Piste suivante | +| Clic sur la pochette | Ouvre le **panneau multimédia** | | Clic milieu | Piste précédente | | Molette | Avance / recule de 5 s | +| Survol | Titre — artiste (et « En pause » quand c'est le cas) | | `SUPER+M` | Ouvre le même panneau | +> Le module « image » de Waybar ne gère pas le **clic droit** : la piste +> suivante se lance depuis le panneau (bouton ⏭). + Le panneau (classe `fws.media`, déclarée flottante dans `hyprland.conf`) montre la pochette, le titre, l'artiste, l'album, une **barre de position déplaçable** (on peut sauter n'importe où dans la piste) et les commandes : piste @@ -157,7 +259,9 @@ Deux scripts, installés dans `~/.config/waybar/scripts/` : lecteurs du web n'exposent qu'une URL `https` : l'image est téléchargée une seule fois dans `~/.cache/fws-media/` (vidé après 7 jours), sinon la barre la retéléchargerait à chaque rafraîchissement. Sans pochette, c'est le logo FWS - qui s'affiche. + qui s'affiche ; **sans lecteur, le script n'imprime rien** et Waybar masque la + pilule (`#image.empty` dans `style.css`). Sa deuxième ligne de sortie remplit + le survol (`titre — artiste`). - **`media-panel`** — le panneau lui-même (GTK4 + PyGObject, rien de plus à installer que `playerctl`). diff --git a/home/.bash_profile b/home/.bash_profile new file mode 100644 index 0000000..01ab963 --- /dev/null +++ b/home/.bash_profile @@ -0,0 +1,7 @@ +# +# ~/.bash_profile +# + +[[ -f ~/.bashrc ]] && . ~/.bashrc + +export PATH=$PATH:/home/damien/.spicetify diff --git a/home/.bashrc b/home/.bashrc new file mode 100644 index 0000000..88c1663 --- /dev/null +++ b/home/.bashrc @@ -0,0 +1,57 @@ +# +# ~/.bashrc +# + +# If not running interactively, don't do anything +[[ $- != *i* ]] && return + +alias ls='ls --color=auto' +alias grep='grep --color=auto' + +# ═══════════════════════════════════════════════════════════════ +# 💜 PROMPT STYLE KALI — couleurs EXACTES de tty.png (image de +# référence, extraites au pixel près par analyse PNG) +# ╭──(damien💀pc)-[~/chemin]- (branche) [erreur] +# $ +# Boîtes/bordures : mauve #cba6f7 (203,166,247) +# Texte/chemin : bleu clair #89b4fa (137,180,250) +# $ / erreur : rose #f4c1e6 (244,193,230) +# ═══════════════════════════════════════════════════════════════ +MAUVE=$'\e[38;2;203;166;247m' # mauve — boîtes et bordures (tty.png) +BLEU=$'\e[38;2;137;180;250m' # bleu clair — texte et chemin (tty.png) +ROSE=$'\e[38;2;244;193;230m' # rose — $ et code d'erreur (tty.png) +RESET=$'\e[0m' + +# Branche git courante : parenthèses mauve, nom en bleu +__fws_git_branch() { + local b + b=$(git symbolic-ref --short HEAD 2>/dev/null) || return + printf '%s(%s%s%s)%s' "$MAUVE" "$BLEU" "$b" "$MAUVE" "$RESET" +} + +# Construction du prompt à chaque ligne +__fws_prompt_cmd() { + local code=$? status="" + (( code != 0 )) && status="${ROSE}[$code]${RESET} " + PS1=$'\n'"${MAUVE}╭──(${BLEU}\u@\h${MAUVE})-[${BLEU}\w${MAUVE}]$(__fws_git_branch)${status}"$'\n'"${ROSE}\$ ${RESET}" +} +PROMPT_COMMAND=__fws_prompt_cmd + +# ── Couleurs du terminal (ls assorti à tty.png) ──────────────── +# dossiers mauve, liens bleu, exécutables rose +if command -v dircolors >/dev/null; then + eval "$(dircolors -b | sed \ + -e 's/dir=01;34/dir=01;38;2;203;166;247/' \ + -e 's/:ln=01;36:/:ln=01;38;2;137;180;250:/' \ + -e 's/:ex=01;32:/:ex=01;38;2;244;193;230:/')" +fi + +# ── Alias pratiques ──────────────────────────────────────────── +alias update='sudo pacman -Syu' +alias cls='clear; echo -e "\e[38;2;203;166;247m 💜 Terminal violet prêt. 💜\e[0m"' +alias ll='ls -lah --color=auto' +alias ..='cd ..' +alias pkg='pacman -Q' +export PATH=$PATH:/home/damien/.spicetify +export PATH="$HOME/.local/bin:$PATH" +export PATH="$HOME/.local/bin:$PATH" diff --git a/home/.config/btop/btop.conf b/home/.config/btop/btop.conf new file mode 100644 index 0000000..9d15a34 --- /dev/null +++ b/home/.config/btop/btop.conf @@ -0,0 +1,286 @@ +#? Config file for btop v.1.4.7 + +#* Name of a btop++/bpytop/bashtop formatted ".theme" file, "Default" and "TTY" for builtin themes. +#* Themes should be placed in "../share/btop/themes" relative to binary or "$HOME/.config/btop/themes" +color_theme = "violet" + +#* If the theme set background should be shown, set to False if you want terminal background transparency. +theme_background = true + +#* Sets if 24-bit truecolor should be used, will convert 24-bit colors to 256 color (6x6x6 color cube) if false. +truecolor = true + +#* Set to true to force tty mode regardless if a real tty has been detected or not. +#* Will force 16-color mode and TTY theme, set all graph symbols to "tty" and swap out other non tty friendly symbols. +force_tty = false + +#* Option to disable presets. Either the default preset, custom presets, or all presets. +#* "Off" All presets are enabled. +#* "Default" preset is disabled.#* "Custom" presets are disabled.#* "All" presets are disabled. +disable_presets = "Off" + +#* Define presets for the layout of the boxes. Preset 0 is always all boxes shown with default settings. Max 9 presets. +#* Format: "box_name:P:G,box_name:P:G" P=(0 or 1) for alternate positions, G=graph symbol to use for box. +#* Use whitespace " " as separator between different presets. +#* Example: "cpu:0:default,mem:0:tty,proc:1:default cpu:0:braille,proc:0:tty" +presets = "cpu:1:default,proc:0:default cpu:0:default,mem:0:default,net:0:default cpu:0:block,net:0:tty" + +#* Set to True to enable "h,j,k,l,g,G" keys for directional control in lists. +#* Conflicting keys for h:"help" and k:"kill" is accessible while holding shift. +vim_keys = false + +#* Disable all mouse events. +disable_mouse = false + +#* Rounded corners on boxes, is ignored if TTY mode is ON. +rounded_corners = true + +#* Use terminal synchronized output sequences to reduce flickering on supported terminals. +terminal_sync = true + +#* Default symbols to use for graph creation, "braille", "block" or "tty". +#* "braille" offers the highest resolution but might not be included in all fonts. +#* "block" has half the resolution of braille but uses more common characters. +#* "tty" uses only 3 different symbols but will work with most fonts and should work in a real TTY. +#* Note that "tty" only has half the horizontal resolution of the other two, so will show a shorter historical view. +graph_symbol = "braille" + +# Graph symbol to use for graphs in cpu box, "default", "braille", "block" or "tty". +graph_symbol_cpu = "default" + +# Graph symbol to use for graphs in gpu box, "default", "braille", "block" or "tty". +graph_symbol_gpu = "default" + +# Graph symbol to use for graphs in cpu box, "default", "braille", "block" or "tty". +graph_symbol_mem = "default" + +# Graph symbol to use for graphs in cpu box, "default", "braille", "block" or "tty". +graph_symbol_net = "default" + +# Graph symbol to use for graphs in cpu box, "default", "braille", "block" or "tty". +graph_symbol_proc = "default" + +#* Manually set which boxes to show. Available values are "cpu mem net proc" and "gpu0" through "gpu5", separate values with whitespace. +shown_boxes = "cpu mem net proc" + +#* Update time in milliseconds, recommended 2000 ms or above for better sample times for graphs. +update_ms = 100 + +#* Processes sorting, "pid" "program" "arguments" "threads" "user" "memory" "cpu lazy" "cpu direct", +#* "cpu lazy" sorts top process over time (easier to follow), "cpu direct" updates top process directly. +proc_sorting = "cpu lazy" + +#* Reverse sorting order, True or False. +proc_reversed = false + +#* Show processes as a tree. +proc_tree = false + +#* Use the cpu graph colors in the process list. +proc_colors = true + +#* Use a darkening gradient in the process list. +proc_gradient = true + +#* If process cpu usage should be of the core it's running on or usage of the total available cpu power. +proc_per_core = false + +#* Show process memory as bytes instead of percent. +proc_mem_bytes = true + +#* Show cpu graph for each process. +proc_cpu_graphs = true + +#* Use /proc/[pid]/smaps for memory information in the process info box (very slow but more accurate) +proc_info_smaps = false + +#* Show proc box on left side of screen instead of right. +proc_left = false + +#* (Linux) Filter processes tied to the Linux kernel(similar behavior to htop). +proc_filter_kernel = false + +#* Should the process list follow the selected process when detailed view is open. +proc_follow_detailed = true + +#* In tree-view, always accumulate child process resources in the parent process. +proc_aggregate = false + +#* Should cpu and memory usage display be preserved for dead processes when paused. +keep_dead_proc_usage = false + +#* Sets the CPU stat shown in upper half of the CPU graph, "total" is always available. +#* Select from a list of detected attributes from the options menu. +cpu_graph_upper = "Auto" + +#* Sets the CPU stat shown in lower half of the CPU graph, "total" is always available. +#* Select from a list of detected attributes from the options menu. +cpu_graph_lower = "Auto" + +#* If gpu info should be shown in the cpu box. Available values = "Auto", "On" and "Off". +show_gpu_info = "Auto" + +#* Toggles if the lower CPU graph should be inverted. +cpu_invert_lower = true + +#* Set to True to completely disable the lower CPU graph. +cpu_single_graph = false + +#* Show cpu box at bottom of screen instead of top. +cpu_bottom = false + +#* Shows the system uptime in the CPU box. +show_uptime = true + +#* Shows the CPU package current power consumption in watts. Requires running `make setcap` or `make setuid` or running with sudo. +show_cpu_watts = true + +#* Show cpu temperature. +check_temp = true + +#* Which sensor to use for cpu temperature, use options menu to select from list of available sensors. +cpu_sensor = "Auto" + +#* Show temperatures for cpu cores also if check_temp is True and sensors has been found. +show_coretemp = true + +#* Set a custom mapping between core and coretemp, can be needed on certain cpus to get correct temperature for correct core. +#* Use lm-sensors or similar to see which cores are reporting temperatures on your machine. +#* Format "x:y" x=core with wrong temp, y=core with correct temp, use space as separator between multiple entries. +#* Example: "4:0 5:1 6:3" +cpu_core_map = "" + +#* Which temperature scale to use, available values: "celsius", "fahrenheit", "kelvin" and "rankine". +temp_scale = "celsius" + +#* Use base 10 for bits/bytes sizes, KB = 1000 instead of KiB = 1024. +base_10_sizes = false + +#* Show CPU frequency. +show_cpu_freq = true + +#* How to calculate CPU frequency, available values: "first", "range", "lowest", "highest" and "average". +freq_mode = "first" + +#* Draw a clock at top of screen, formatting according to strftime, empty string to disable. +#* Special formatting: /host = hostname | /user = username | /uptime = system uptime +clock_format = "%X" + +#* Update main ui in background when menus are showing, set this to false if the menus is flickering too much for comfort. +background_update = true + +#* Custom cpu model name, empty string to disable. +custom_cpu_name = "" + +#* Optional filter for shown disks, should be full path of a mountpoint, separate multiple values with whitespace " ". +#* Only disks matching the filter will be shown. Prepend exclude= to only show disks not matching the filter. Examples: disk_filter="/boot /home/user", disks_filter="exclude=/boot /home/user" +disks_filter = "" + +#* Show graphs instead of meters for memory values. +mem_graphs = true + +#* Show mem box below net box instead of above. +mem_below_net = false + +#* Count ZFS ARC in cached and available memory. +zfs_arc_cached = true + +#* If swap memory should be shown in memory box. +show_swap = true + +#* Show swap as a disk, ignores show_swap value above, inserts itself after first disk. +swap_disk = true + +#* If mem box should be split to also show disks info. +show_disks = true + +#* Filter out non physical disks. Set this to False to include network disks, RAM disks and similar. +only_physical = true + +#* Read disks list from /etc/fstab. This also disables only_physical. +use_fstab = true + +#* Setting this to True will hide all datasets, and only show ZFS pools. (IO stats will be calculated per-pool) +zfs_hide_datasets = false + +#* Set to true to show available disk space for privileged users. +disk_free_priv = false + +#* Toggles if io activity % (disk busy time) should be shown in regular disk usage view. +show_io_stat = true + +#* Toggles io mode for disks, showing big graphs for disk read/write speeds. +io_mode = false + +#* Set to True to show combined read/write io graphs in io mode. +io_graph_combined = false + +#* Set the top speed for the io graphs in MiB/s (100 by default), use format "mountpoint:speed" separate disks with whitespace " ". +#* Example: "/mnt/media:100 /:20 /boot:1". +io_graph_speeds = "" + +#* Swap the positions of the upload and download speed graphs. When true, upload will be on top. +swap_upload_download = false + +#* Set fixed values for network graphs in Mebibits. Is only used if net_auto is also set to False. +net_download = 100 + +net_upload = 100 + +#* Use network graphs auto rescaling mode, ignores any values set above and rescales down to 10 Kibibytes at the lowest. +net_auto = true + +#* Sync the auto scaling for download and upload to whichever currently has the highest scale. +net_sync = true + +#* Starts with the Network Interface specified here. +net_iface = "" + +#* "True" shows bitrates in base 10 (Kbps, Mbps). "False" shows bitrates in binary sizes (Kibps, Mibps, etc.). "Auto" uses base_10_sizes. +base_10_bitrate = "Auto" + +#* Show battery stats in top right if battery is present. +show_battery = true + +#* Which battery to use if multiple are present. "Auto" for auto detection. +selected_battery = "Auto" + +#* Show power stats of battery next to charge indicator. +show_battery_watts = true + +#* Set loglevel for "~/.local/state/btop.log" levels are: "ERROR" "WARNING" "INFO" "DEBUG". +#* The level set includes all lower levels, i.e. "DEBUG" will show all logging info. +log_level = "WARNING" + +#* Automatically save current settings to config file on exit. +save_config_on_exit = true + +#* Measure PCIe throughput on NVIDIA cards, may impact performance on certain cards. +nvml_measure_pcie_speeds = true + +#* Measure PCIe throughput on AMD cards, may impact performance on certain cards. +rsmi_measure_pcie_speeds = true + +#* Horizontally mirror the GPU graph. +gpu_mirror_graph = true + +#* Set which GPU vendors to show. Available values are "nvidia amd intel apple" +shown_gpus = "nvidia amd intel apple" + +#* Custom gpu0 model name, empty string to disable. +custom_gpu_name0 = "" + +#* Custom gpu1 model name, empty string to disable. +custom_gpu_name1 = "" + +#* Custom gpu2 model name, empty string to disable. +custom_gpu_name2 = "" + +#* Custom gpu3 model name, empty string to disable. +custom_gpu_name3 = "" + +#* Custom gpu4 model name, empty string to disable. +custom_gpu_name4 = "" + +#* Custom gpu5 model name, empty string to disable. +custom_gpu_name5 = "" diff --git a/home/.zshrc b/home/.zshrc new file mode 100644 index 0000000..1804ccc --- /dev/null +++ b/home/.zshrc @@ -0,0 +1,348 @@ +# Filename: /etc/skel/.zshrc +# Purpose: config file for zsh (z shell) +# Authors: (c) grml-team (grml.org) +# Bug-Reports: see http://grml.org/bugs/ +# License: This file is licensed under the GPL v2 or any later version. +################################################################################ +# Nowadays, grml's zsh setup lives in only *one* zshrc file. +# That is the global one: /etc/zsh/zshrc (from grml-etc-core). +# It is best to leave *this* file untouched and do personal changes to +# your zsh setup via ${HOME}/.zshrc.local which is loaded at the end of +# the global zshrc. +# +# That way, we enable people on other operating systems to use our +# setup, too, just by copying our global zshrc to their ${HOME}/.zshrc. +# Adjustments would still go to the .zshrc.local file. +################################################################################ + +## Inform users about upgrade path for grml's old zshrc layout, assuming that: +## /etc/skel/.zshrc was installed as ~/.zshrc, +## /etc/zsh/zshrc was installed as ~/.zshrc.global and +## ~/.zshrc.local does not exist yet. +if [ -r ~/.zshrc -a -r ~/.zshrc.global -a ! -r ~/.zshrc.local ] ; then + printf '-!-\n' + printf '-!- Looks like you are using the old zshrc layout of grml.\n' + printf '-!- Please read the notes in the grml-zsh-refcard, being' + printf '-!- available at: http://grml.org/zsh/\n' + printf '-!-\n' + printf '-!- If you just want to get rid of this warning message execute:\n' + printf '-!- touch ~/.zshrc.local\n' + printf '-!-\n' +fi + +## Settings for umask +#if (( EUID == 0 )); then +# umask 002 +#else +# umask 022 +#fi + +## Now, we'll give a few examples of what you might want to use in your +## .zshrc.local file (just copy'n'paste and uncomment it there): + +## Prompt theme extension ## + +# Virtualenv support + +#function virtual_env_prompt () { +# REPLY=${VIRTUAL_ENV+(${VIRTUAL_ENV:t}) } +#} +#grml_theme_add_token virtual-env -f virtual_env_prompt '%F{magenta}' '%f' +#zstyle ':prompt:grml:left:setup' items rc virtual-env change-root user at host path vcs percent + +## ZLE tweaks ## + +## use the vi navigation keys (hjkl) besides cursor keys in menu completion +#bindkey -M menuselect 'h' vi-backward-char # left +#bindkey -M menuselect 'k' vi-up-line-or-history # up +#bindkey -M menuselect 'l' vi-forward-char # right +#bindkey -M menuselect 'j' vi-down-line-or-history # bottom + +## set command prediction from history, see 'man 1 zshcontrib' +#zrcautoload predict-on && \ +#zle -N predict-on && \ +#zle -N predict-off && \ +#bindkey "^X^Z" predict-on && \ +#bindkey "^Z" predict-off + +## press ctrl-q to quote line: +#mquote () { +# zle beginning-of-line +# zle forward-word +# # RBUFFER="'$RBUFFER'" +# RBUFFER=${(q)RBUFFER} +# zle end-of-line +#} +#zle -N mquote && bindkey '^q' mquote + +## define word separators (for stuff like backward-word, forward-word, backward-kill-word,..) +#WORDCHARS='*?_-.[]~=/&;!#$%^(){}<>' # the default +#WORDCHARS=. +#WORDCHARS='*?_[]~=&;!#$%^(){}' +#WORDCHARS='${WORDCHARS:s@/@}' + +# just type '...' to get '../..' +#rationalise-dot() { +#local MATCH +#if [[ $LBUFFER =~ '(^|/| | |'$'\n''|\||;|&)\.\.$' ]]; then +# LBUFFER+=/ +# zle self-insert +# zle self-insert +#else +# zle self-insert +#fi +#} +#zle -N rationalise-dot +#bindkey . rationalise-dot +## without this, typing a . aborts incremental history search +#bindkey -M isearch . self-insert + +#bindkey '\eq' push-line-or-edit + +## some popular options ## + +## add `|' to output redirections in the history +#setopt histallowclobber + +## try to avoid the 'zsh: no matches found...' +#setopt nonomatch + +## warning if file exists ('cat /dev/null > ~/.zshrc') +#setopt NO_clobber + +## don't warn me about bg processes when exiting +#setopt nocheckjobs + +## alert me if something failed +#setopt printexitvalue + +## with spelling correction, assume dvorak kb +#setopt dvorak + +## Allow comments even in interactive shells +#setopt interactivecomments + +## if a new command line being added to the history list duplicates an older +## one, the older command is removed from the list +#setopt histignorealldups + +## compsys related snippets ## + +## changed completer settings +#zstyle ':completion:*' completer _complete _correct _approximate +#zstyle ':completion:*' expand prefix suffix + +## another different completer setting: expand shell aliases +#zstyle ':completion:*' completer _expand_alias _complete _approximate + +## to have more convenient account completion, specify your logins: +#my_accounts=( +# {grml,grml1}@foo.invalid +# grml-devel@bar.invalid +#) +#other_accounts=( +# {fred,root}@foo.invalid +# vera@bar.invalid +#) +#zstyle ':completion:*:my-accounts' users-hosts $my_accounts +#zstyle ':completion:*:other-accounts' users-hosts $other_accounts + +## add grml.org to your list of hosts +#hosts+=(grml.org) +#zstyle ':completion:*:hosts' hosts $hosts + +## telnet on non-default ports? ...well: +## specify specific port/service settings: +#telnet_users_hosts_ports=( +# user1@host1: +# user2@host2: +# @mail-server:{smtp,pop3} +# @news-server:nntp +# @proxy-server:8000 +#) +#zstyle ':completion:*:*:telnet:*' users-hosts-ports $telnet_users_hosts_ports + +## the default grml setup provides '..' as a completion. it does not provide +## '.' though. If you want that too, use the following line: +#zstyle ':completion:*' special-dirs true + +## aliases ## + +## translate +#alias u='translate -i' + +## ignore ~/.ssh/known_hosts entries +#alias insecssh='ssh -o "StrictHostKeyChecking=no" -o "UserKnownHostsFile=/dev/null" -o "PreferredAuthentications=keyboard-interactive"' + + +## global aliases (for those who like them) ## + +#alias -g '...'='../..' +#alias -g '....'='../../..' +#alias -g BG='& exit' +#alias -g C='|wc -l' +#alias -g G='|grep' +#alias -g H='|head' +#alias -g Hl=' --help |& less -r' +#alias -g J='|jq' +#alias -g K='|keep' +#alias -g L='|less' +#alias -g LL='|& less -r' +#alias -g M='|most' +#alias -g N='&>/dev/null' +#alias -g R='| tr A-z N-za-m' +#alias -g SL='| sort | less' +#alias -g S='| sort' +#alias -g T='|tail' +#alias -g TS='|ts "%F %H:%M:%.S"' +#alias -g V='| vim -' + +## instead of global aliase it might be better to use grmls $abk assoc array, whose contents are expanded after pressing ,. +#$abk[SnL]="| sort -n | less" + +## get top 10 shell commands: +#alias top10='print -l ${(o)history%% *} | uniq -c | sort -nr | head -n 10' + +## Execute \kbd{./configure} +#alias CO="./configure" + +## Execute \kbd{./configure --help} +#alias CH="./configure --help" + +## miscellaneous code ## + +## Use a default width of 80 for manpages for more convenient reading +#export MANWIDTH=${MANWIDTH:-80} + +## Set a search path for the cd builtin +#cdpath=(.. ~) + +## variation of our manzsh() function; pick you poison: +#manzsh() { /usr/bin/man zshall | most +/"$1" ; } + +## Switching shell safely and efficiently? http://www.zsh.org/mla/workers/2001/msg02410.html +#bash() { +# NO_SWITCH="yes" command bash "$@" +#} +#restart () { +# exec $SHELL $SHELL_ARGS "$@" +#} + +## Handy functions for use with the (e::) globbing qualifier (like nt) +#contains() { grep -q "$*" $REPLY } +#sameas() { diff -q "$*" $REPLY &>/dev/null } +#ot () { [[ $REPLY -ot ${~1} ]] } + +## get_ic() - queries imap servers for capabilities; real simple. no imaps +#ic_get() { +# emulate -L zsh +# local port +# if [[ ! -z $1 ]] ; then +# port=${2:-143} +# print "querying imap server on $1:${port}...\n"; +# print "a1 capability\na2 logout\n" | nc $1 ${port} +# else +# print "usage:\n $0 [port]" +# fi +#} + +## List all occurrences of programm in current PATH +#plap() { +# emulate -L zsh +# if [[ $# = 0 ]] ; then +# echo "Usage: $0 program" +# echo "Example: $0 zsh" +# echo "Lists all occurrences of program in the current PATH." +# else +# ls -l ${^path}/*$1*(*N) +# fi +#} + +## Find out which libs define a symbol +#lcheck() { +# if [[ -n "$1" ]] ; then +# nm -go /usr/lib/lib*.a 2>/dev/null | grep ":[[:xdigit:]]\{8\} . .*$1" +# else +# echo "Usage: lcheck " >&2 +# fi +#} + +## Download a file and display it locally +#uopen() { +# emulate -L zsh +# if ! [[ -n "$1" ]] ; then +# print "Usage: uopen \$URL/\$file">&2 +# return 1 +# else +# FILE=$1 +# MIME=$(curl --head $FILE | \ +# grep Content-Type | \ +# cut -d ' ' -f 2 | \ +# cut -d\; -f 1) +# MIME=${MIME%$'\r'} +# curl $FILE | see ${MIME}:- +# fi +#} + +## Memory overview +#memusage() { +# ps aux | awk '{if (NR > 1) print $5; +# if (NR > 2) print "+"} +# END { print "p" }' | dc +#} + +## print hex value of a number +#hex() { +# emulate -L zsh +# if [[ -n "$1" ]]; then +# printf "%x\n" $1 +# else +# print 'Usage: hex ' +# return 1 +# fi +#} + +## log out? set timeout in seconds... +## ...and do not log out in some specific terminals: +#if [[ "${TERM}" == ([Exa]term*|rxvt|dtterm|screen*) ]] ; then +# unset TMOUT +#else +# TMOUT=1800 +#fi + +## associate types and extensions (be aware with perl scripts and anwanted behaviour!) +#check_com zsh-mime-setup || { autoload zsh-mime-setup && zsh-mime-setup } +#alias -s pl='perl -S' + +## ctrl-s will no longer freeze the terminal. +#stty erase "^?" + +## you want to automatically use a bigger font on big terminals? +#if [[ "$TERM" == "xterm" ]] && [[ "$LINES" -ge 50 ]] && [[ "$COLUMNS" -ge 100 ]] && [[ -z "$SSH_CONNECTION" ]] ; then +# large +#fi + +## Some quick Perl-hacks aka /useful/ oneliner +#bew() { perl -le 'print unpack "B*","'$1'"' } +#web() { perl -le 'print pack "B*","'$1'"' } +#hew() { perl -le 'print unpack "H*","'$1'"' } +#weh() { perl -le 'print pack "H*","'$1'"' } +#pversion() { perl -M$1 -le "print $1->VERSION" } # i. e."pversion LWP -> 5.79" +#getlinks () { perl -ne 'while ( m/"((www|ftp|http):\/\/.*?)"/gc ) { print $1, "\n"; }' $* } +#gethrefs () { perl -ne 'while ( m/href="([^"]*)"/gc ) { print $1, "\n"; }' $* } +#getanames () { perl -ne 'while ( m/a name="([^"]*)"/gc ) { print $1, "\n"; }' $* } +#getforms () { perl -ne 'while ( m:(\):gic ) { print $1, "\n"; }' $* } +#getstrings () { perl -ne 'while ( m/"(.*?)"/gc ) { print $1, "\n"; }' $*} +#getanchors () { perl -ne 'while ( m/«([^«»\n]+)»/gc ) { print $1, "\n"; }' $* } +#showINC () { perl -e 'for (@INC) { printf "%d %s\n", $i++, $_ }' } +#vimpm () { vim `perldoc -l $1 | sed -e 's/pod$/pm/'` } +#vimhelp () { vim -c "help $1" -c on -c "au! VimEnter *" } + +## END OF FILE ################################################################# + +# ═══════════════════════════════════════════════════════════════ +# 💜 THÈME VIOLET « KALI-STYLE » — chargé en DERNIER pour que le +# prompt remplace celui de grml. Édite plutôt : +# ~/.config/zsh/kali-violet.zshrc +# ═══════════════════════════════════════════════════════════════ +[[ -f "$HOME/.config/zsh/kali-violet.zshrc" ]] && source "$HOME/.config/zsh/kali-violet.zshrc" diff --git a/home/grub-violet-theme/install-violet.sh b/home/grub-violet-theme/install-violet.sh new file mode 100755 index 0000000..00d0398 --- /dev/null +++ b/home/grub-violet-theme/install-violet.sh @@ -0,0 +1,49 @@ +#!/usr/bin/env bash +# ╔══════════════════════════════════════════════════════════════╗ +# ║ 💜 Installation du thème GRUB violet + hyprpaper ║ +# ║ À lancer ainsi : sudo bash ~/grub-violet-theme/install-violet.sh ║ +# ╚══════════════════════════════════════════════════════════════╝ +set -euo pipefail + +if [[ $EUID -ne 0 ]]; then + echo "À lancer avec sudo : sudo bash $0" + exit 1 +fi + +THEME_SRC="/home/damien/grub-violet-theme/violet" +THEME_DST="/boot/grub/themes/violet" +GRUB_DEFAULT="/etc/default/grub" + +echo "💜 Installation du thème GRUB violet..." + +# ── 1. hyprpaper (fond d'écran Hyprland) s'il manque ─────── +if ! command -v hyprpaper >/dev/null 2>&1; then + echo "→ installation de hyprpaper..." + pacman -S --needed --noconfirm hyprpaper +fi + +# ── 2. Copie du thème dans /boot ─────────────────────────── +echo "→ copie du thème dans $THEME_DST ..." +mkdir -p /boot/grub/themes +rm -rf "$THEME_DST" +cp -r "$THEME_SRC" "$THEME_DST" + +# ── 3. Déclaration du thème dans /etc/default/grub ───────── +echo "→ configuration de /etc/default/grub ..." +sed -i 's|^GRUB_THEME=.*|GRUB_THEME="/boot/grub/themes/violet/theme.txt"|' "$GRUB_DEFAULT" || true +grep -q '^GRUB_THEME=' "$GRUB_DEFAULT" || { + echo '' >> "$GRUB_DEFAULT" + echo '# Thème violet (généré automatiquement)' >> "$GRUB_DEFAULT" + echo 'GRUB_THEME="/boot/grub/themes/violet/theme.txt"' >> "$GRUB_DEFAULT" +} +grep -q '^GRUB_GFXMODE=' "$GRUB_DEFAULT" || { + echo 'GRUB_GFXMODE=1920x1080,auto' >> "$GRUB_DEFAULT" +} + +# ── 4. Régénération de grub.cfg ──────────────────────────── +echo "→ régénération de grub.cfg ..." +grub-mkconfig -o /boot/grub/grub.cfg + +echo "" +echo "✔ Thème GRUB violet installé ! Redémarre pour le voir 💜" +echo " (le fond d'écran Hyprland prendra effet aussi à la prochaine session)" diff --git a/home/wofi-style-violet.css b/home/wofi-style-violet.css new file mode 100644 index 0000000..308c6e5 --- /dev/null +++ b/home/wofi-style-violet.css @@ -0,0 +1,44 @@ +/* FWS — style wofi (menu d'applications Super+R, menu d'alimentation + Super+X). Édition VIOLETTE 💜, assorti à la barre Waybar : + fond #29242e · lavande #c3b6f6 · mauve #cba6f7 · texte #fafafa */ + +window { + background-color: rgba(41, 36, 46, 0.96); /* fond image #29242e */ + border: 2px solid #cba6f7; + border-radius: 14px; + font-family: "Noto Sans", sans-serif; + font-size: 14px; +} + +#input { + background-color: #1f1a2e; /* fond profond */ + color: #fafafa; + border: none; + border-radius: 10px; + margin: 12px; + padding: 8px 12px; +} + +#input image { color: #c3b6f6; } + +#inner-box { + margin: 0 8px 8px 8px; +} + +#entry { + padding: 8px 10px; + border-radius: 10px; + color: #fafafa; +} + +#entry:selected { + background-color: #cba6f7; /* mauve */ + color: #1f1a2e; +} + +#entry:selected #text { color: #1f1a2e; } + +#text { + margin-left: 8px; + color: inherit; +} \ No newline at end of file diff --git a/live-2026-09-21/.config/hypr/hyprland.conf b/live-2026-09-21/.config/hypr/hyprland.conf new file mode 100644 index 0000000..ffec737 --- /dev/null +++ b/live-2026-09-21/.config/hypr/hyprland.conf @@ -0,0 +1,196 @@ +# FWS — configuration Hyprland par défaut. +# Le clavier (ch / fr) 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 : VIOLET — dégradé violet → lavande sur la fenêtre active. +# (Fond du bureau, hyprlock, waybar, wofi et kitty sont assortis 💜) +# +# Les raccourcis sont déclarés avec « bindd » (bind + description) : la +# description alimente l'écran « Raccourcis clavier » (bouton ⌨ de la barre +# ou SUPER+K → fws-keys, qui lit les binds RÉELS via hyprctl). Ajoute +# tes propres bindd : ils apparaîtront automatiquement dans la liste. +# ⚠ Pas de virgule dans les descriptions (séparateur de champs Hyprland). + +monitor = , preferred, auto, 1 + +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 = rgb(cba6f7) rgb(c3b6f6) 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 = 0x1f1a2e # violet profond (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 violet (hyprpaper — ne fait rien s'il n'est pas installé, +# le script ~/grub-violet-theme/install-violet.sh l'installe). +exec-once = hyprpaper +exec-once = waybar +exec-once = mako +# playerctld suit le LECTEUR ACTIF : sans lui, les modules média de la barre +# resteraient collés au premier lecteur ouvert (Spotify pendant que mpv joue). +exec-once = playerctld daemon +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 + +$mod = SUPER + +# --- Applications --------------------------------------------------------- +bindd = $mod, Return, Ouvrir un terminal (kitty), exec, kitty +bindd = $mod SHIFT, Return, Terminal flottant, exec, kitty --class floating-term +bindd = $mod, R, Menu des applications, exec, wofi --show drun +bindd = $mod, E, Gestionnaire de fichiers, exec, dolphin +bindd = $mod, B, Ouvrir Firefox, exec, firefox +bindd = $mod, K, Afficher les raccourcis clavier, exec, fws-keys +bindd = $mod, X, Menu d'alimentation (arrêt/redémarrage…), exec, fws-powermenu +# Panneau multimédia : pochette, position déplaçable, lecture/pause, pistes. +# Même fenêtre que le clic sur la barre (script partagé avec Waybar). +bindd = $mod, M, Panneau multimédia (lecture en cours), exec, $HOME/.config/waybar/scripts/media-panel + +# --- Fenêtres --------------------------------------------------------------- +bindd = $mod, Q, Fermer la fenêtre, killactive, +bindd = $mod, V, Fenêtre flottante ou ancrée, togglefloating, +bindd = $mod, F, Plein écran, fullscreen, +bindd = $mod, J, Basculer la découpe horizontale/verticale, layoutmsg, togglesplit +bindd = $mod, L, Verrouiller l'écran, exec, hyprlock +bindd = $mod SHIFT, E, Quitter la session (retour à SDDM), exit, +bindd = $mod SHIFT, C, Recharger la configuration Hyprland, exec, hyprctl reload + +# --- Focus (flèches) --------------------------------------------------------- +bindd = $mod, left, Focus à gauche, movefocus, l +bindd = $mod, right, Focus à droite, movefocus, r +bindd = $mod, up, Focus en haut, movefocus, u +bindd = $mod, down, Focus en bas, movefocus, d + +# --- Déplacer la fenêtre (Maj + flèches) --------------------------------------- +bindd = $mod SHIFT, left, Déplacer la fenêtre à gauche, movewindow, l +bindd = $mod SHIFT, right, Déplacer la fenêtre à droite, movewindow, r +bindd = $mod SHIFT, up, Déplacer la fenêtre en haut, movewindow, u +bindd = $mod SHIFT, down, Déplacer la fenêtre en bas, 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, Aller à l'espace 1, workspace, 1 +bindd = $mod, 2, Aller à l'espace 2, workspace, 2 +bindd = $mod, 3, Aller à l'espace 3, workspace, 3 +bindd = $mod, 4, Aller à l'espace 4, workspace, 4 +bindd = $mod, 5, Aller à l'espace 5, workspace, 5 +bindd = $mod, 6, Aller à l'espace 6, workspace, 6 +bindd = $mod, 7, Aller à l'espace 7, workspace, 7 +bindd = $mod, 8, Aller à l'espace 8, workspace, 8 +bindd = $mod, 9, Aller à l'espace 9, workspace, 9 +bindd = $mod, 0, Aller à l'espace 10, workspace, 10 +bindd = $mod SHIFT, 1, Envoyer la fenêtre vers l'espace 1, movetoworkspace, 1 +bindd = $mod SHIFT, 2, Envoyer la fenêtre vers l'espace 2, movetoworkspace, 2 +bindd = $mod SHIFT, 3, Envoyer la fenêtre vers l'espace 3, movetoworkspace, 3 +bindd = $mod SHIFT, 4, Envoyer la fenêtre vers l'espace 4, movetoworkspace, 4 +bindd = $mod SHIFT, 5, Envoyer la fenêtre vers l'espace 5, movetoworkspace, 5 +bindd = $mod SHIFT, 6, Envoyer la fenêtre vers l'espace 6, movetoworkspace, 6 +bindd = $mod SHIFT, 7, Envoyer la fenêtre vers l'espace 7, movetoworkspace, 7 +bindd = $mod SHIFT, 8, Envoyer la fenêtre vers l'espace 8, movetoworkspace, 8 +bindd = $mod SHIFT, 9, Envoyer la fenêtre vers l'espace 9, movetoworkspace, 9 +bindd = $mod SHIFT, 0, Envoyer la fenêtre vers l'espace 10, movetoworkspace, 10 + +# --- Multi-écrans (comme i3 : Super+Ctrl+1/2 = écran gauche/droit) ------------- +bindd = $mod CTRL, 1, Envoyer la fenêtre vers l'écran de gauche, movewindow, mon:l +bindd = $mod CTRL, 2, Envoyer la fenêtre vers l'écran de droite, movewindow, mon:r + +# --- Molette = changer d'espace de travail -------------------------------------- +bindd = $mod, mouse_up, Espace de travail précédent, workspace, e-1 +bindd = $mod, mouse_down, Espace de travail suivant, workspace, e+1 + +# --- Scratchpad (espace spécial) ------------------------------------------------- +bindd = $mod, S, Afficher le scratchpad, togglespecialworkspace, magic +bindd = $mod SHIFT, S, Envoyer la fenêtre au scratchpad, movetoworkspace, special:magic + +# --- Captures d'écran (grim/slurp → presse-papier ou ~/Images) ------------------- +bindd = , Print, Capture plein écran vers le presse-papier, exec, grim - | wl-copy +bindd = $mod, Print, Capture d'une zone vers le presse-papier, exec, grim -g "$(slurp)" - | wl-copy +bindd = $mod SHIFT, Print, Capture d'une zone vers ~/Images, 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, fws-brightness up +bindel = , XF86MonBrightnessDown, exec, fws-brightness down + +# --- 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-about)$ +windowrule = float on, match:class ^([Ff]ws-bugreport)$ +windowrule = float on, match:title ^(Picture-in-Picture)$ +# Panneau multimédia (script media-panel) : flottant, à sa taille, au-dessus. +# La classe vient de l'identifiant d'application « fws.media » du script ; +# le point est écrit [.] pour rester valable quel que soit le moteur de regex. +windowrule = float on, match:class ^(fws[.]media)$ +windowrule = size 460 214, match:class ^(fws[.]media)$ \ No newline at end of file diff --git a/live-2026-09-21/.config/hypr/hyprlock-violet.conf b/live-2026-09-21/.config/hypr/hyprlock-violet.conf new file mode 100644 index 0000000..028b7cd --- /dev/null +++ b/live-2026-09-21/.config/hypr/hyprlock-violet.conf @@ -0,0 +1,15 @@ +# Palette extraite de l'image de référence (Downloads/image.png) +# — sourcée par hyprlock.conf, référence unique pour tout le thème : +# +# Fond image : #29242e → rgba(41, 36, 46, x) +# Fond profond : #1f1a2e → rgba(31, 26, 46, x) +# Surface : #313244 (Catppuccin surface0, bordures inactives) +# Texte : #fafafa → rgba(250, 250, 250, 1.0) +# Lavande highlight: #c3b6f6 → rgba(195, 182, 246, x) +# Mauve : #cba6f7 → rgba(203, 166, 247, x) +# Indigo : #7064b6 → rgba(112, 100, 182, x) +# Teal : #94e2d5 → rgba(148, 226, 213, x) +# Teal clair : #8cebd4 → rgba(140, 235, 212, x) +# Rose : #f569ca → rgba(245, 105, 202, x) +# +# Fond d'écran : ~/Images/Banner.png (via hyprpaper) diff --git a/live-2026-09-21/.config/hypr/hyprlock.conf b/live-2026-09-21/.config/hypr/hyprlock.conf new file mode 100644 index 0000000..1e2dd74 --- /dev/null +++ b/live-2026-09-21/.config/hypr/hyprlock.conf @@ -0,0 +1,90 @@ +# ╔══════════════════════════════════════════════════════════╗ +# ║ hyprlock — écran de verrouillage VIOLET 💜 ║ +# ╚══════════════════════════════════════Super+L═════════════╝ + +source = /home/damien/.config/hypr/hyprlock-violet.conf + +background { + monitor = + color = rgba(31, 26, 46, 1.0) # fond image #1f1a2e +} + +# Dégradé décoratif (bandeau vertical violet → lavande) à gauche +shape { + monitor = + size = 14, 100% + position = 0, 0 + halign = left + valign = center + rounding = 7 + rotations = 0 + gradient_from = rgba(195, 182, 246, 1.0) # lavande #c3b6f6 + gradient_to = rgba(112, 100, 182, 1.0) # indigo #7064b6 + angle = 180 +} + +# Grande lueur violette en fond (rectangle flou doux via dégradé) +shape { + monitor = + size = 60%, 3px + position = 0, 180 + halign = center + valign = center + rounding = 2 + angle = 0 + gradient_from = rgba(203, 166, 247, 0.9) + gradient_to = rgba(203, 166, 247, 0.0) +} + +# ── Textes ───────────────────────────────────────────────── +label { + monitor = + text = ⌛ $TIME + font_size = 90 + font_family = Noto Sans + color = rgba(250, 250, 250, 1.0) + position = 0, 220 + halign = center + valign = center +} + +label { + monitor = + text = Bonjour damien 💜 + font_size = 22 + font_family = Noto Sans Italic + color = rgba(195, 182, 246, 0.95) + position = 0, 120 + halign = center + valign = center +} + +label { + monitor = + text = ⌨ clavier : ch / fr + font_size = 18 + font_family = Noto Sans + color = rgba(155, 112, 185, 0.8) + position = 0, -190 + halign = center + valign = center +} + +# ── Champ mot de passe ───────────────────────────────────── +input-field { + monitor = + size = 320, 55 + outline_thickness = 3 + dots_center = true + dots_size = 0.28 + dots_spacing = 0.35 + dots_fade_time = 250 + outer_color = rgba(203, 166, 247, 0.9) # bord mauve #cba6f7 + inner_color = rgba(31, 26, 46, 0.92) # fond #1f1a2e + font_color = rgba(215, 200, 245, 1.0) # texte lavande + fade_on_empty = false + placeholder_text = Mot de passe… + position = 0, -80 + halign = center + valign = center +} diff --git a/live-2026-09-21/.config/hypr/hyprpaper.conf b/live-2026-09-21/.config/hypr/hyprpaper.conf new file mode 100644 index 0000000..da30227 --- /dev/null +++ b/live-2026-09-21/.config/hypr/hyprpaper.conf @@ -0,0 +1,14 @@ +# hyprpaper — fond d'écran : Banner.png (3440×1440) 💜 +# L'image a été déplacée dans ~/Images/ pour éviter une suppression accidentelle. +# Nécessite : sudo pacman -S hyprpaper (fait par install-violet.sh) +# Format de config hyprpaper ≥ 0.8 (hyprtoolkit) : +# wallpaper { monitor = ... path = ... } +splash = false +ipc = on + +preload = /home/damien/Images/Banner.png + +wallpaper { + monitor = + path = /home/damien/Images/Banner.png +} \ No newline at end of file diff --git a/live-2026-09-21/.config/kitty/kitty.conf b/live-2026-09-21/.config/kitty/kitty.conf new file mode 100644 index 0000000..b6aec5c --- /dev/null +++ b/live-2026-09-21/.config/kitty/kitty.conf @@ -0,0 +1,89 @@ +# ╔══════════════════════════════════════════════════════════╗ +# ║ kitty — thème VIOLET calqué sur l'image de Damien 💜 ║ +# ║ bg #29242e · texte #fafafa · lavande #c3b6f6 ║ +# ║ mauve #cba6f7 · teal #94e2d5 · rose #f569ca ║ +# ╚══════════════════════════════════════════════════════════╝ + +font_family Noto Sans Mono +bold_font auto +italic_font auto +bold_italic_font auto +font_size 11.0 +modify_font cell_height 108% + +cursor_shape beam +cursor_shape_thin 1 +cursor_blink_interval 0.6 +cursor_stop_blinking_after 8 + +scrollback_lines 10000 +wheel_scroll_multiplier 5.0 +url_style curly +detect_urls yes +open_url_with default +allow_hyperlinks yes + +repaint_delay 10 +input_delay 3 +sync_to_monitor yes +enable_audio_bell no +visual_bell_duration 0.0 +window_padding_width 10 +hide_window_decorations yes +confirm_os_window_close 0 +placement_strategy center +remember_window_size yes + +# ── Fond et texte : exactement l'image ───────────────────── +foreground #fafafa +background #29242e +background_opacity 0.94 +dim_opacity 0.55 +selection_foreground #1f1a2e +selection_background #7064b6 + +# Curseur : highlight lavande de l'image +cursor #c3b6f6 +cursor_text_color #1f1a2e + +# ── Palette 16 couleurs tirée de l'image ─────────────────── +# Normales +color0 #2a2438 # noir → fond plus profond +color1 #f569ca # rouge → rose de l'image (alertes) +color2 #8cebd4 # vert → teal clair de l'image +color3 #c3b6f6 # jaune → lavande highlight +color4 #7064b6 # bleu → indigo de l'image +color5 #cba6f7 # magenta → mauve Catppuccin +color6 #94e2d5 # cyan → teal de l'image +color7 #fafafa # blanc → texte image +# Vives +color8 #4a4160 # noir brillant (commentaires) +color9 #ff8fda # rose brillant +color10 #aef2e2 # teal brillant +color11 #d8cfff # lavande brillante +color12 #9a8cd8 # indigo brillant +color13 #e06abd # magenta de l'image +color14 #a8ecdf # teal doux +color15 #ffffff # blanc pur + +# ── Onglets / fenêtres kitty ─────────────────────────────── +tab_bar_edge top +tab_bar_style powerline +tab_powerline_style slanted +active_tab_foreground #1f1a2e +active_tab_background #cba6f7 +inactive_tab_foreground #9a8cd8 +inactive_tab_background #313244 +tab_title_template " {index} {title}" +active_tab_font_style bold + +active_border_color #cba6f7 +inactive_border_color #313244 +bell_border_color #f569ca + +# ── Raccourcis (style Kali : ctrl+shift+c/v) ─────────────── +map ctrl+shift+c copy_to_clipboard +map ctrl+shift+v paste_from_clipboard +map ctrl+shift+up scroll_line_up +map ctrl+shift+down scroll_line_down +map ctrl+shift+u kitten unicode_input diff --git a/live-2026-09-21/.config/waybar/config b/live-2026-09-21/.config/waybar/config new file mode 100644 index 0000000..da9cec5 --- /dev/null +++ b/live-2026-09-21/.config/waybar/config @@ -0,0 +1,100 @@ +{ + "layer": "top", + "position": "top", + "height": 36, + "spacing": 2, + "margin-top": 6, + "margin-left": 10, + "margin-right": 10, + "modules-left": ["hyprland/workspaces", "hyprland/window"], + "modules-center": ["clock"], + "modules-right": ["image", "custom/updates", "custom/keyhelp", "backlight", "pulseaudio", "cpu", "memory", "battery", "tray", "custom/power"], + + "image": { + "exec": "/home/damien/.config/waybar/scripts/media-cover", + "size": 22, + "interval": 1, + "tooltip": true, + "on-click": "/home/damien/.config/waybar/scripts/media-panel", + "on-click-middle": "playerctl previous", + "on-scroll-up": "playerctl position 5+", + "on-scroll-down": "playerctl position 5-" + }, + + "custom/power": { + "format": " ", + "tooltip-format": "Alimentation (SUPER+X)", + "on-click": "fws-powermenu" + }, + + "custom/updates": { + "exec": "fws-updates-check", + "interval": 1800, + "tooltip-format": "Mises à jour disponibles — clic pour installer", + "on-click": "kitty -e fws-update" + }, + + "hyprland/workspaces": { + "format": "{id}", + "on-click": "activate", + "on-scroll-up": "hyprctl dispatch workspace e-1", + "on-scroll-down": "hyprctl dispatch workspace e+1" + }, + "hyprland/window": { + "max-length": 45, + "separate-outputs": true + }, + "clock": { + "interval": 1, + "format": "󰥔 {:%H:%M:%S}", + "format-alt": "󰥔 {:%H:%M %A %d %B %Y}", + "tooltip-format": "{calendar}", + "calendar": { + "format": { + "today": "{}" + } + } + }, + "custom/keyhelp": { + "format": "󰌌 ", + "tooltip-format": "Raccourcis clavier (SUPER+K)", + "on-click": "fws-keys" + }, + "backlight": { + "format": "{icon} {percent}%", + "format-icons": ["󰃞", "󰃟", "󰃠"], + "on-scroll-up": "fws-brightness up", + "on-scroll-down": "fws-brightness down", + "tooltip-format": "Luminosité {percent}% (molette pour régler)" + }, + "pulseaudio": { + "format": "{icon} {volume}%", + "format-muted": "󰝟 muet", + "format-icons": { "default": ["󰕿", "󰖀", "󰕾"] }, + "on-click": "pavucontrol", + "on-click-right": "wpctl set-mute @DEFAULT_AUDIO_SINK@ toggle", + "on-scroll-up": "wpctl set-volume -l 1 @DEFAULT_AUDIO_SINK@ 2%+", + "on-scroll-down": "wpctl set-volume @DEFAULT_AUDIO_SINK@ 2%-", + "tooltip-format": "{desc} — clic : mixeur, clic droit : muet" + }, + "cpu": { + "format": " {usage}%", + "interval": 3 + }, + "memory": { + "format": " {percentage}%", + "interval": 3, + "tooltip-format": "{used:0.1f} / {total:0.1f} Gio" + }, + "battery": { + "states": { "warning": 25, "critical": 10 }, + "format": "{icon} {capacity}%", + "format-charging": "󰂄 {capacity}%", + "format-icons": ["󰁺", "󰁼", "󰁾", "󰂀", "󰁹"], + "tooltip-format": "{timeTo}" + }, + "tray": { + "spacing": 8, + "icon-size": 16 + } +} diff --git a/live-2026-09-21/.config/waybar/style.css b/live-2026-09-21/.config/waybar/style.css new file mode 100644 index 0000000..6841d54 --- /dev/null +++ b/live-2026-09-21/.config/waybar/style.css @@ -0,0 +1,136 @@ +/* FWS — style Waybar v2 — Édition VIOLETTE 💜 (palette de l'image) + bg #29242e · lavande #c3b6f6 · mauve #cba6f7 · teal #94e2d5 · rose #f569ca */ + +* { + font-family: "Noto Sans", "Symbols Nerd Font", sans-serif; + font-size: 13px; + min-height: 0; +} + +window#waybar { + background: rgba(41, 36, 46, 0.88); /* fond image #29242e */ + color: #fafafa; /* texte image */ + border: 1px solid rgba(195, 182, 246, 0.35); + border-radius: 14px; +} + +tooltip { + background: #29242e; + border: 1px solid #c3b6f6; + border-radius: 10px; +} +tooltip label { color: #fafafa; } + +/* --- Espaces de travail --------------------------------------------------- */ +#workspaces { + background: #1f1a2e; /* fond profond */ + margin: 5px 4px; + border-radius: 10px; + padding: 0 4px; +} + +#workspaces button { + color: #9a8cd8; /* lavande grise */ + padding: 0 8px; + margin: 3px 2px; + border: none; + border-radius: 8px; + background: transparent; + transition: all 0.2s ease; +} + +#workspaces button.active { + color: #1f1a2e; + background: #cba6f7; /* mauve */ + font-weight: bold; +} + +#workspaces button:hover { + color: #fafafa; + background: #3a3350; + box-shadow: none; +} + +#window { + color: #9a8cd8; + margin-left: 10px; + font-style: italic; +} + +/* --- Horloge (centre) ------------------------------------------------------ */ +#clock { + color: #fafafa; + font-weight: bold; + background: #1f1a2e; + padding: 0 16px; + margin: 5px 0; + border-radius: 10px; +} + +/* --- Modules de droite : pilules ------------------------------------------- */ +#custom-keyhelp, +#backlight, +#pulseaudio, +#cpu, +#memory, +#battery, +#tray { + background: #1f1a2e; + padding: 0 12px; + margin: 5px 3px; + border-radius: 10px; + color: #fafafa; +} + +#custom-keyhelp { + /* bouton d'appel : mauve plein */ + + font-weight: bold; +} +#custom-keyhelp:hover { background: #c3b6f6; } + +#custom-power { + background-color: #1f1a2e; /* pilule comme les autres modules */ + background-image: url("/home/damien/.config/waybar/icons/logo.png"); + background-size: 16px 16px; + background-repeat: no-repeat; + background-position: center; + min-width: 18px; + padding: 0 12px; + margin: 5px 10px 5px 3px; /* décalé du bord droit */ + border-radius: 10px; +} +#custom-power:hover { background-color: #3a3350; } + +#backlight { color: #c3b6f6; } /* lavande */ +#pulseaudio { color: #cba6f7; } +#pulseaudio.muted { color: #6b6180; } +#cpu { color: #9a8cd8; } /* indigo clair */ +#memory { color: #e06abd; } /* magenta de l'image */ + +#battery.warning { color: #c3b6f6; } +#battery.critical { color: #f569ca; } +#battery.charging { color: #8cebd4; } + +/* --- Lecture en cours : la pochette seule ------------------------------------ */ +/* La pochette vient du module « image » (script media-cover). Le titre, + l'artiste et le temps ne s'affichent plus dans la barre : ils restent + lisibles au survol de la pochette (le panneau multimédia, lui, montre tout). + Sans lecteur, media-cover ne renvoie aucune image : Waybar pose la classe + « empty » sur la pilule, que l'on efface juste en dessous. */ +#image { + background: #1f1a2e; + padding: 0 6px; + margin: 5px 3px; + border-radius: 10px; +} + +#image:hover { background: #3a3350; } + +/* Rien ne joue : pas de pochette → la pilule doit disparaître sans laisser + de carré vide ni de trou dans la barre. */ +#image.empty { + background: transparent; + padding: 0; + margin: 0; +} diff --git a/live-2026-09-21/.config/wofi/config b/live-2026-09-21/.config/wofi/config new file mode 100644 index 0000000..a5cae46 --- /dev/null +++ b/live-2026-09-21/.config/wofi/config @@ -0,0 +1,7 @@ +# FWS — configuration wofi (menu d'applications). +insensitive=true +allow_images=true +image_size=24 +prompt=Applications +width=560 +height=440 diff --git a/live-2026-09-21/.config/wofi/style.css b/live-2026-09-21/.config/wofi/style.css new file mode 100644 index 0000000..e940f34 --- /dev/null +++ b/live-2026-09-21/.config/wofi/style.css @@ -0,0 +1,42 @@ +/* FWS — style wofi (menu d'applications Super+R) — VIOLET, palette image 💜 */ + +window { + background-color: rgba(41, 36, 46, 0.96); /* fond image #29242e */ + border: 2px solid #cba6f7; + border-radius: 14px; + font-family: "Noto Sans", sans-serif; + font-size: 14px; +} + +#input { + background-color: #1f1a2e; /* fond profond */ + color: #fafafa; + border: none; + border-radius: 10px; + margin: 12px; + padding: 8px 12px; +} + +#input image { color: #c3b6f6; } + +#inner-box { + margin: 0 8px 8px 8px; +} + +#entry { + padding: 8px 10px; + border-radius: 10px; + color: #fafafa; +} + +#entry:selected { + background-color: #cba6f7; + color: #1f1a2e; +} + +#entry:selected #text { color: #1f1a2e; } + +#text { + margin-left: 8px; + color: inherit; +} diff --git a/system/boot/grub/themes/catppuccin-mocha-grub-theme/background.png b/system/boot/grub/themes/catppuccin-mocha-grub-theme/background.png new file mode 100644 index 0000000..c6eb605 Binary files /dev/null and b/system/boot/grub/themes/catppuccin-mocha-grub-theme/background.png differ diff --git a/system/boot/grub/themes/catppuccin-mocha-grub-theme/font.pf2 b/system/boot/grub/themes/catppuccin-mocha-grub-theme/font.pf2 new file mode 100644 index 0000000..b87a776 Binary files /dev/null and b/system/boot/grub/themes/catppuccin-mocha-grub-theme/font.pf2 differ diff --git a/system/boot/grub/themes/catppuccin-mocha-grub-theme/icons/4MLinux.png b/system/boot/grub/themes/catppuccin-mocha-grub-theme/icons/4MLinux.png new file mode 100644 index 0000000..0248eed Binary files /dev/null and b/system/boot/grub/themes/catppuccin-mocha-grub-theme/icons/4MLinux.png differ diff --git a/system/boot/grub/themes/catppuccin-mocha-grub-theme/icons/AlpineLinux.png b/system/boot/grub/themes/catppuccin-mocha-grub-theme/icons/AlpineLinux.png new file mode 100644 index 0000000..845d452 Binary files /dev/null and b/system/boot/grub/themes/catppuccin-mocha-grub-theme/icons/AlpineLinux.png differ diff --git a/system/boot/grub/themes/catppuccin-mocha-grub-theme/icons/Manjaro.i686.png b/system/boot/grub/themes/catppuccin-mocha-grub-theme/icons/Manjaro.i686.png new file mode 100644 index 0000000..160dacd Binary files /dev/null and b/system/boot/grub/themes/catppuccin-mocha-grub-theme/icons/Manjaro.i686.png differ diff --git a/system/boot/grub/themes/catppuccin-mocha-grub-theme/icons/Manjaro.x86_64.png b/system/boot/grub/themes/catppuccin-mocha-grub-theme/icons/Manjaro.x86_64.png new file mode 100644 index 0000000..160dacd Binary files /dev/null and b/system/boot/grub/themes/catppuccin-mocha-grub-theme/icons/Manjaro.x86_64.png differ diff --git a/system/boot/grub/themes/catppuccin-mocha-grub-theme/icons/SystemRescueCD.png b/system/boot/grub/themes/catppuccin-mocha-grub-theme/icons/SystemRescueCD.png new file mode 100644 index 0000000..edf6b30 Binary files /dev/null and b/system/boot/grub/themes/catppuccin-mocha-grub-theme/icons/SystemRescueCD.png differ diff --git a/system/boot/grub/themes/catppuccin-mocha-grub-theme/icons/android.png b/system/boot/grub/themes/catppuccin-mocha-grub-theme/icons/android.png new file mode 100644 index 0000000..242455b Binary files /dev/null and b/system/boot/grub/themes/catppuccin-mocha-grub-theme/icons/android.png differ diff --git a/system/boot/grub/themes/catppuccin-mocha-grub-theme/icons/anonymous.png b/system/boot/grub/themes/catppuccin-mocha-grub-theme/icons/anonymous.png new file mode 100644 index 0000000..ea608b6 Binary files /dev/null and b/system/boot/grub/themes/catppuccin-mocha-grub-theme/icons/anonymous.png differ diff --git a/system/boot/grub/themes/catppuccin-mocha-grub-theme/icons/antergos.png b/system/boot/grub/themes/catppuccin-mocha-grub-theme/icons/antergos.png new file mode 100644 index 0000000..f6cade3 Binary files /dev/null and b/system/boot/grub/themes/catppuccin-mocha-grub-theme/icons/antergos.png differ diff --git a/system/boot/grub/themes/catppuccin-mocha-grub-theme/icons/arch.png b/system/boot/grub/themes/catppuccin-mocha-grub-theme/icons/arch.png new file mode 100644 index 0000000..d376ba5 Binary files /dev/null and b/system/boot/grub/themes/catppuccin-mocha-grub-theme/icons/arch.png differ diff --git a/system/boot/grub/themes/catppuccin-mocha-grub-theme/icons/archlinux.png b/system/boot/grub/themes/catppuccin-mocha-grub-theme/icons/archlinux.png new file mode 100644 index 0000000..d376ba5 Binary files /dev/null and b/system/boot/grub/themes/catppuccin-mocha-grub-theme/icons/archlinux.png differ diff --git a/system/boot/grub/themes/catppuccin-mocha-grub-theme/icons/arcolinux.png b/system/boot/grub/themes/catppuccin-mocha-grub-theme/icons/arcolinux.png new file mode 100644 index 0000000..b12c621 Binary files /dev/null and b/system/boot/grub/themes/catppuccin-mocha-grub-theme/icons/arcolinux.png differ diff --git a/system/boot/grub/themes/catppuccin-mocha-grub-theme/icons/artix.png b/system/boot/grub/themes/catppuccin-mocha-grub-theme/icons/artix.png new file mode 100644 index 0000000..2f78ec1 Binary files /dev/null and b/system/boot/grub/themes/catppuccin-mocha-grub-theme/icons/artix.png differ diff --git a/system/boot/grub/themes/catppuccin-mocha-grub-theme/icons/cachyos.png b/system/boot/grub/themes/catppuccin-mocha-grub-theme/icons/cachyos.png new file mode 100644 index 0000000..5cf6819 Binary files /dev/null and b/system/boot/grub/themes/catppuccin-mocha-grub-theme/icons/cachyos.png differ diff --git a/system/boot/grub/themes/catppuccin-mocha-grub-theme/icons/cancel.png b/system/boot/grub/themes/catppuccin-mocha-grub-theme/icons/cancel.png new file mode 100644 index 0000000..255e201 Binary files /dev/null and b/system/boot/grub/themes/catppuccin-mocha-grub-theme/icons/cancel.png differ diff --git a/system/boot/grub/themes/catppuccin-mocha-grub-theme/icons/chakra.png b/system/boot/grub/themes/catppuccin-mocha-grub-theme/icons/chakra.png new file mode 100644 index 0000000..78ac022 Binary files /dev/null and b/system/boot/grub/themes/catppuccin-mocha-grub-theme/icons/chakra.png differ diff --git a/system/boot/grub/themes/catppuccin-mocha-grub-theme/icons/debian.png b/system/boot/grub/themes/catppuccin-mocha-grub-theme/icons/debian.png new file mode 100644 index 0000000..985af6b Binary files /dev/null and b/system/boot/grub/themes/catppuccin-mocha-grub-theme/icons/debian.png differ diff --git a/system/boot/grub/themes/catppuccin-mocha-grub-theme/icons/deepin.png b/system/boot/grub/themes/catppuccin-mocha-grub-theme/icons/deepin.png new file mode 100644 index 0000000..df62b9a Binary files /dev/null and b/system/boot/grub/themes/catppuccin-mocha-grub-theme/icons/deepin.png differ diff --git a/system/boot/grub/themes/catppuccin-mocha-grub-theme/icons/devuan.png b/system/boot/grub/themes/catppuccin-mocha-grub-theme/icons/devuan.png new file mode 100644 index 0000000..d7fdcd8 Binary files /dev/null and b/system/boot/grub/themes/catppuccin-mocha-grub-theme/icons/devuan.png differ diff --git a/system/boot/grub/themes/catppuccin-mocha-grub-theme/icons/driver.png b/system/boot/grub/themes/catppuccin-mocha-grub-theme/icons/driver.png new file mode 100644 index 0000000..1147d02 Binary files /dev/null and b/system/boot/grub/themes/catppuccin-mocha-grub-theme/icons/driver.png differ diff --git a/system/boot/grub/themes/catppuccin-mocha-grub-theme/icons/edit.png b/system/boot/grub/themes/catppuccin-mocha-grub-theme/icons/edit.png new file mode 100644 index 0000000..b1bdc02 Binary files /dev/null and b/system/boot/grub/themes/catppuccin-mocha-grub-theme/icons/edit.png differ diff --git a/system/boot/grub/themes/catppuccin-mocha-grub-theme/icons/efi.png b/system/boot/grub/themes/catppuccin-mocha-grub-theme/icons/efi.png new file mode 100644 index 0000000..29918f8 Binary files /dev/null and b/system/boot/grub/themes/catppuccin-mocha-grub-theme/icons/efi.png differ diff --git a/system/boot/grub/themes/catppuccin-mocha-grub-theme/icons/elementary.png b/system/boot/grub/themes/catppuccin-mocha-grub-theme/icons/elementary.png new file mode 100644 index 0000000..a6e3738 Binary files /dev/null and b/system/boot/grub/themes/catppuccin-mocha-grub-theme/icons/elementary.png differ diff --git a/system/boot/grub/themes/catppuccin-mocha-grub-theme/icons/endeavouros.png b/system/boot/grub/themes/catppuccin-mocha-grub-theme/icons/endeavouros.png new file mode 100644 index 0000000..b30bf70 Binary files /dev/null and b/system/boot/grub/themes/catppuccin-mocha-grub-theme/icons/endeavouros.png differ diff --git a/system/boot/grub/themes/catppuccin-mocha-grub-theme/icons/fedora.png b/system/boot/grub/themes/catppuccin-mocha-grub-theme/icons/fedora.png new file mode 100644 index 0000000..932f36a Binary files /dev/null and b/system/boot/grub/themes/catppuccin-mocha-grub-theme/icons/fedora.png differ diff --git a/system/boot/grub/themes/catppuccin-mocha-grub-theme/icons/find.efi.png b/system/boot/grub/themes/catppuccin-mocha-grub-theme/icons/find.efi.png new file mode 100644 index 0000000..40d15d9 Binary files /dev/null and b/system/boot/grub/themes/catppuccin-mocha-grub-theme/icons/find.efi.png differ diff --git a/system/boot/grub/themes/catppuccin-mocha-grub-theme/icons/find.none.png b/system/boot/grub/themes/catppuccin-mocha-grub-theme/icons/find.none.png new file mode 100644 index 0000000..ea7cd4c Binary files /dev/null and b/system/boot/grub/themes/catppuccin-mocha-grub-theme/icons/find.none.png differ diff --git a/system/boot/grub/themes/catppuccin-mocha-grub-theme/icons/freebsd.png b/system/boot/grub/themes/catppuccin-mocha-grub-theme/icons/freebsd.png new file mode 100644 index 0000000..19e20fc Binary files /dev/null and b/system/boot/grub/themes/catppuccin-mocha-grub-theme/icons/freebsd.png differ diff --git a/system/boot/grub/themes/catppuccin-mocha-grub-theme/icons/gentoo.png b/system/boot/grub/themes/catppuccin-mocha-grub-theme/icons/gentoo.png new file mode 100644 index 0000000..e865944 Binary files /dev/null and b/system/boot/grub/themes/catppuccin-mocha-grub-theme/icons/gentoo.png differ diff --git a/system/boot/grub/themes/catppuccin-mocha-grub-theme/icons/gnu-linux.png b/system/boot/grub/themes/catppuccin-mocha-grub-theme/icons/gnu-linux.png new file mode 100644 index 0000000..f4bfcc0 Binary files /dev/null and b/system/boot/grub/themes/catppuccin-mocha-grub-theme/icons/gnu-linux.png differ diff --git a/system/boot/grub/themes/catppuccin-mocha-grub-theme/icons/gpart.png b/system/boot/grub/themes/catppuccin-mocha-grub-theme/icons/gpart.png new file mode 100644 index 0000000..eba4e36 Binary files /dev/null and b/system/boot/grub/themes/catppuccin-mocha-grub-theme/icons/gpart.png differ diff --git a/system/boot/grub/themes/catppuccin-mocha-grub-theme/icons/haiku.png b/system/boot/grub/themes/catppuccin-mocha-grub-theme/icons/haiku.png new file mode 100644 index 0000000..476d86b Binary files /dev/null and b/system/boot/grub/themes/catppuccin-mocha-grub-theme/icons/haiku.png differ diff --git a/system/boot/grub/themes/catppuccin-mocha-grub-theme/icons/help.png b/system/boot/grub/themes/catppuccin-mocha-grub-theme/icons/help.png new file mode 100644 index 0000000..6bace79 Binary files /dev/null and b/system/boot/grub/themes/catppuccin-mocha-grub-theme/icons/help.png differ diff --git a/system/boot/grub/themes/catppuccin-mocha-grub-theme/icons/kali.png b/system/boot/grub/themes/catppuccin-mocha-grub-theme/icons/kali.png new file mode 100644 index 0000000..6264877 Binary files /dev/null and b/system/boot/grub/themes/catppuccin-mocha-grub-theme/icons/kali.png differ diff --git a/system/boot/grub/themes/catppuccin-mocha-grub-theme/icons/kaos.png b/system/boot/grub/themes/catppuccin-mocha-grub-theme/icons/kaos.png new file mode 100644 index 0000000..0a86340 Binary files /dev/null and b/system/boot/grub/themes/catppuccin-mocha-grub-theme/icons/kaos.png differ diff --git a/system/boot/grub/themes/catppuccin-mocha-grub-theme/icons/kbd.png b/system/boot/grub/themes/catppuccin-mocha-grub-theme/icons/kbd.png new file mode 100644 index 0000000..a07baf5 Binary files /dev/null and b/system/boot/grub/themes/catppuccin-mocha-grub-theme/icons/kbd.png differ diff --git a/system/boot/grub/themes/catppuccin-mocha-grub-theme/icons/kernel.png b/system/boot/grub/themes/catppuccin-mocha-grub-theme/icons/kernel.png new file mode 100644 index 0000000..b3dc406 Binary files /dev/null and b/system/boot/grub/themes/catppuccin-mocha-grub-theme/icons/kernel.png differ diff --git a/system/boot/grub/themes/catppuccin-mocha-grub-theme/icons/korora.png b/system/boot/grub/themes/catppuccin-mocha-grub-theme/icons/korora.png new file mode 100644 index 0000000..16c60f0 Binary files /dev/null and b/system/boot/grub/themes/catppuccin-mocha-grub-theme/icons/korora.png differ diff --git a/system/boot/grub/themes/catppuccin-mocha-grub-theme/icons/kubuntu.png b/system/boot/grub/themes/catppuccin-mocha-grub-theme/icons/kubuntu.png new file mode 100644 index 0000000..a72fff1 Binary files /dev/null and b/system/boot/grub/themes/catppuccin-mocha-grub-theme/icons/kubuntu.png differ diff --git a/system/boot/grub/themes/catppuccin-mocha-grub-theme/icons/lang.png b/system/boot/grub/themes/catppuccin-mocha-grub-theme/icons/lang.png new file mode 100644 index 0000000..217036b Binary files /dev/null and b/system/boot/grub/themes/catppuccin-mocha-grub-theme/icons/lang.png differ diff --git a/system/boot/grub/themes/catppuccin-mocha-grub-theme/icons/lfs.png b/system/boot/grub/themes/catppuccin-mocha-grub-theme/icons/lfs.png new file mode 100644 index 0000000..f4bfcc0 Binary files /dev/null and b/system/boot/grub/themes/catppuccin-mocha-grub-theme/icons/lfs.png differ diff --git a/system/boot/grub/themes/catppuccin-mocha-grub-theme/icons/linux.png b/system/boot/grub/themes/catppuccin-mocha-grub-theme/icons/linux.png new file mode 100644 index 0000000..f4bfcc0 Binary files /dev/null and b/system/boot/grub/themes/catppuccin-mocha-grub-theme/icons/linux.png differ diff --git a/system/boot/grub/themes/catppuccin-mocha-grub-theme/icons/linuxmint.png b/system/boot/grub/themes/catppuccin-mocha-grub-theme/icons/linuxmint.png new file mode 100644 index 0000000..53982b1 Binary files /dev/null and b/system/boot/grub/themes/catppuccin-mocha-grub-theme/icons/linuxmint.png differ diff --git a/system/boot/grub/themes/catppuccin-mocha-grub-theme/icons/lubuntu.png b/system/boot/grub/themes/catppuccin-mocha-grub-theme/icons/lubuntu.png new file mode 100644 index 0000000..14a66ec Binary files /dev/null and b/system/boot/grub/themes/catppuccin-mocha-grub-theme/icons/lubuntu.png differ diff --git a/system/boot/grub/themes/catppuccin-mocha-grub-theme/icons/macosx.png b/system/boot/grub/themes/catppuccin-mocha-grub-theme/icons/macosx.png new file mode 100644 index 0000000..fbf3dfa Binary files /dev/null and b/system/boot/grub/themes/catppuccin-mocha-grub-theme/icons/macosx.png differ diff --git a/system/boot/grub/themes/catppuccin-mocha-grub-theme/icons/mageia.png b/system/boot/grub/themes/catppuccin-mocha-grub-theme/icons/mageia.png new file mode 100644 index 0000000..494baf7 Binary files /dev/null and b/system/boot/grub/themes/catppuccin-mocha-grub-theme/icons/mageia.png differ diff --git a/system/boot/grub/themes/catppuccin-mocha-grub-theme/icons/manjaro.png b/system/boot/grub/themes/catppuccin-mocha-grub-theme/icons/manjaro.png new file mode 100644 index 0000000..160dacd Binary files /dev/null and b/system/boot/grub/themes/catppuccin-mocha-grub-theme/icons/manjaro.png differ diff --git a/system/boot/grub/themes/catppuccin-mocha-grub-theme/icons/manjarolinux.png b/system/boot/grub/themes/catppuccin-mocha-grub-theme/icons/manjarolinux.png new file mode 100644 index 0000000..160dacd Binary files /dev/null and b/system/boot/grub/themes/catppuccin-mocha-grub-theme/icons/manjarolinux.png differ diff --git a/system/boot/grub/themes/catppuccin-mocha-grub-theme/icons/memtest.png b/system/boot/grub/themes/catppuccin-mocha-grub-theme/icons/memtest.png new file mode 100644 index 0000000..1147d02 Binary files /dev/null and b/system/boot/grub/themes/catppuccin-mocha-grub-theme/icons/memtest.png differ diff --git a/system/boot/grub/themes/catppuccin-mocha-grub-theme/icons/mx-linux.png b/system/boot/grub/themes/catppuccin-mocha-grub-theme/icons/mx-linux.png new file mode 100644 index 0000000..e47db84 Binary files /dev/null and b/system/boot/grub/themes/catppuccin-mocha-grub-theme/icons/mx-linux.png differ diff --git a/system/boot/grub/themes/catppuccin-mocha-grub-theme/icons/neon.png b/system/boot/grub/themes/catppuccin-mocha-grub-theme/icons/neon.png new file mode 100644 index 0000000..3a9df69 Binary files /dev/null and b/system/boot/grub/themes/catppuccin-mocha-grub-theme/icons/neon.png differ diff --git a/system/boot/grub/themes/catppuccin-mocha-grub-theme/icons/nixos.png b/system/boot/grub/themes/catppuccin-mocha-grub-theme/icons/nixos.png new file mode 100644 index 0000000..4e5ebb2 Binary files /dev/null and b/system/boot/grub/themes/catppuccin-mocha-grub-theme/icons/nixos.png differ diff --git a/system/boot/grub/themes/catppuccin-mocha-grub-theme/icons/opensuse.png b/system/boot/grub/themes/catppuccin-mocha-grub-theme/icons/opensuse.png new file mode 100644 index 0000000..b010020 Binary files /dev/null and b/system/boot/grub/themes/catppuccin-mocha-grub-theme/icons/opensuse.png differ diff --git a/system/boot/grub/themes/catppuccin-mocha-grub-theme/icons/parrot.png b/system/boot/grub/themes/catppuccin-mocha-grub-theme/icons/parrot.png new file mode 100644 index 0000000..862fb2d Binary files /dev/null and b/system/boot/grub/themes/catppuccin-mocha-grub-theme/icons/parrot.png differ diff --git a/system/boot/grub/themes/catppuccin-mocha-grub-theme/icons/pop-os.png b/system/boot/grub/themes/catppuccin-mocha-grub-theme/icons/pop-os.png new file mode 100644 index 0000000..fa20d8a Binary files /dev/null and b/system/boot/grub/themes/catppuccin-mocha-grub-theme/icons/pop-os.png differ diff --git a/system/boot/grub/themes/catppuccin-mocha-grub-theme/icons/pop.png b/system/boot/grub/themes/catppuccin-mocha-grub-theme/icons/pop.png new file mode 100644 index 0000000..fa20d8a Binary files /dev/null and b/system/boot/grub/themes/catppuccin-mocha-grub-theme/icons/pop.png differ diff --git a/system/boot/grub/themes/catppuccin-mocha-grub-theme/icons/recovery.png b/system/boot/grub/themes/catppuccin-mocha-grub-theme/icons/recovery.png new file mode 100644 index 0000000..3e58156 Binary files /dev/null and b/system/boot/grub/themes/catppuccin-mocha-grub-theme/icons/recovery.png differ diff --git a/system/boot/grub/themes/catppuccin-mocha-grub-theme/icons/regolith.png b/system/boot/grub/themes/catppuccin-mocha-grub-theme/icons/regolith.png new file mode 100644 index 0000000..6fb578c Binary files /dev/null and b/system/boot/grub/themes/catppuccin-mocha-grub-theme/icons/regolith.png differ diff --git a/system/boot/grub/themes/catppuccin-mocha-grub-theme/icons/restart.png b/system/boot/grub/themes/catppuccin-mocha-grub-theme/icons/restart.png new file mode 100644 index 0000000..366e359 Binary files /dev/null and b/system/boot/grub/themes/catppuccin-mocha-grub-theme/icons/restart.png differ diff --git a/system/boot/grub/themes/catppuccin-mocha-grub-theme/icons/shutdown.png b/system/boot/grub/themes/catppuccin-mocha-grub-theme/icons/shutdown.png new file mode 100644 index 0000000..3a5bb7c Binary files /dev/null and b/system/boot/grub/themes/catppuccin-mocha-grub-theme/icons/shutdown.png differ diff --git a/system/boot/grub/themes/catppuccin-mocha-grub-theme/icons/siduction.png b/system/boot/grub/themes/catppuccin-mocha-grub-theme/icons/siduction.png new file mode 100644 index 0000000..dcc3b89 Binary files /dev/null and b/system/boot/grub/themes/catppuccin-mocha-grub-theme/icons/siduction.png differ diff --git a/system/boot/grub/themes/catppuccin-mocha-grub-theme/icons/solus.png b/system/boot/grub/themes/catppuccin-mocha-grub-theme/icons/solus.png new file mode 100644 index 0000000..3806d28 Binary files /dev/null and b/system/boot/grub/themes/catppuccin-mocha-grub-theme/icons/solus.png differ diff --git a/system/boot/grub/themes/catppuccin-mocha-grub-theme/icons/steamos.png b/system/boot/grub/themes/catppuccin-mocha-grub-theme/icons/steamos.png new file mode 100644 index 0000000..98d0f81 Binary files /dev/null and b/system/boot/grub/themes/catppuccin-mocha-grub-theme/icons/steamos.png differ diff --git a/system/boot/grub/themes/catppuccin-mocha-grub-theme/icons/submenu.png b/system/boot/grub/themes/catppuccin-mocha-grub-theme/icons/submenu.png new file mode 100644 index 0000000..2ed9ccc Binary files /dev/null and b/system/boot/grub/themes/catppuccin-mocha-grub-theme/icons/submenu.png differ diff --git a/system/boot/grub/themes/catppuccin-mocha-grub-theme/icons/type.png b/system/boot/grub/themes/catppuccin-mocha-grub-theme/icons/type.png new file mode 100644 index 0000000..87e775c Binary files /dev/null and b/system/boot/grub/themes/catppuccin-mocha-grub-theme/icons/type.png differ diff --git a/system/boot/grub/themes/catppuccin-mocha-grub-theme/icons/tz.png b/system/boot/grub/themes/catppuccin-mocha-grub-theme/icons/tz.png new file mode 100644 index 0000000..c375d8f Binary files /dev/null and b/system/boot/grub/themes/catppuccin-mocha-grub-theme/icons/tz.png differ diff --git a/system/boot/grub/themes/catppuccin-mocha-grub-theme/icons/ubuntu.png b/system/boot/grub/themes/catppuccin-mocha-grub-theme/icons/ubuntu.png new file mode 100644 index 0000000..21d205b Binary files /dev/null and b/system/boot/grub/themes/catppuccin-mocha-grub-theme/icons/ubuntu.png differ diff --git a/system/boot/grub/themes/catppuccin-mocha-grub-theme/icons/unknown.png b/system/boot/grub/themes/catppuccin-mocha-grub-theme/icons/unknown.png new file mode 100644 index 0000000..f4bfcc0 Binary files /dev/null and b/system/boot/grub/themes/catppuccin-mocha-grub-theme/icons/unknown.png differ diff --git a/system/boot/grub/themes/catppuccin-mocha-grub-theme/icons/unset.png b/system/boot/grub/themes/catppuccin-mocha-grub-theme/icons/unset.png new file mode 100644 index 0000000..889cf07 Binary files /dev/null and b/system/boot/grub/themes/catppuccin-mocha-grub-theme/icons/unset.png differ diff --git a/system/boot/grub/themes/catppuccin-mocha-grub-theme/icons/void.png b/system/boot/grub/themes/catppuccin-mocha-grub-theme/icons/void.png new file mode 100644 index 0000000..633a2f6 Binary files /dev/null and b/system/boot/grub/themes/catppuccin-mocha-grub-theme/icons/void.png differ diff --git a/system/boot/grub/themes/catppuccin-mocha-grub-theme/icons/windows.png b/system/boot/grub/themes/catppuccin-mocha-grub-theme/icons/windows.png new file mode 100644 index 0000000..640d43c Binary files /dev/null and b/system/boot/grub/themes/catppuccin-mocha-grub-theme/icons/windows.png differ diff --git a/system/boot/grub/themes/catppuccin-mocha-grub-theme/icons/windows11.png b/system/boot/grub/themes/catppuccin-mocha-grub-theme/icons/windows11.png new file mode 100644 index 0000000..2289fe4 Binary files /dev/null and b/system/boot/grub/themes/catppuccin-mocha-grub-theme/icons/windows11.png differ diff --git a/system/boot/grub/themes/catppuccin-mocha-grub-theme/icons/xubuntu.png b/system/boot/grub/themes/catppuccin-mocha-grub-theme/icons/xubuntu.png new file mode 100644 index 0000000..b07b4ce Binary files /dev/null and b/system/boot/grub/themes/catppuccin-mocha-grub-theme/icons/xubuntu.png differ diff --git a/system/boot/grub/themes/catppuccin-mocha-grub-theme/icons/zorin.png b/system/boot/grub/themes/catppuccin-mocha-grub-theme/icons/zorin.png new file mode 100644 index 0000000..8bf7f35 Binary files /dev/null and b/system/boot/grub/themes/catppuccin-mocha-grub-theme/icons/zorin.png differ diff --git a/system/boot/grub/themes/catppuccin-mocha-grub-theme/logo.png b/system/boot/grub/themes/catppuccin-mocha-grub-theme/logo.png new file mode 100644 index 0000000..ef83a2e Binary files /dev/null and b/system/boot/grub/themes/catppuccin-mocha-grub-theme/logo.png differ diff --git a/system/boot/grub/themes/catppuccin-mocha-grub-theme/select_c.png b/system/boot/grub/themes/catppuccin-mocha-grub-theme/select_c.png new file mode 100644 index 0000000..0275893 Binary files /dev/null and b/system/boot/grub/themes/catppuccin-mocha-grub-theme/select_c.png differ diff --git a/system/boot/grub/themes/catppuccin-mocha-grub-theme/select_e.png b/system/boot/grub/themes/catppuccin-mocha-grub-theme/select_e.png new file mode 100644 index 0000000..6eb93c9 Binary files /dev/null and b/system/boot/grub/themes/catppuccin-mocha-grub-theme/select_e.png differ diff --git a/system/boot/grub/themes/catppuccin-mocha-grub-theme/select_w.png b/system/boot/grub/themes/catppuccin-mocha-grub-theme/select_w.png new file mode 100644 index 0000000..ce7324a Binary files /dev/null and b/system/boot/grub/themes/catppuccin-mocha-grub-theme/select_w.png differ diff --git a/system/boot/grub/themes/catppuccin-mocha-grub-theme/theme.txt b/system/boot/grub/themes/catppuccin-mocha-grub-theme/theme.txt new file mode 100644 index 0000000..84cb2c8 --- /dev/null +++ b/system/boot/grub/themes/catppuccin-mocha-grub-theme/theme.txt @@ -0,0 +1,50 @@ +# GRUB2 gfxmenu pop theme, based and inspired by Vimix and Dracula grub themes +# Designed for any resolution + +# Global Property +title-text: "" +desktop-image: "background.png" +desktop-image-scale-method: "stretch" +desktop-color: "#1E1E2E" +terminal-font: "Unifont Regular 16" +terminal-left: "0" +terminal-top: "0" +terminal-width: "100%" +terminal-height: "100%" +terminal-border: "0" + +# Logo image ++ image { + left = 50%-50 + top = 50%-50 + file = "logo.png" +} + +# Show the boot menu ++ boot_menu { + left = 50%-240 + top = 60% + width = 480 + height = 30% + item_font = "Unifont Regular 16" + item_color = "#CDD6F4" + selected_item_color = "#CDD6F4" + icon_width = 32 + icon_height = 32 + item_icon_space = 20 + item_height = 36 + item_padding = 5 + item_spacing = 10 + selected_item_pixmap_style = "select_*.png" +} + +# Show a countdown message using the label component ++ label { + top = 82% + left = 35% + width = 30% + align = "center" + id = "__timeout__" + text = "Booting in %d seconds" + color = "#CDD6F4" +} diff --git a/system/etc/default/grub b/system/etc/default/grub new file mode 100644 index 0000000..8ddf290 --- /dev/null +++ b/system/etc/default/grub @@ -0,0 +1,16 @@ +# FWS — configuration GRUB du système installé. +# Cet overlay écrase le /etc/default/grub par défaut du paquet « grub » dans le +# live (l'installé étant une copie du live, il en hérite). +# +# DIFFÉRENCE CLÉ vs Arch : os-prober est ACTIVÉ (défaut Arch = désactivé, donc +# Windows/autres OS n'apparaissaient JAMAIS au menu GRUB d'une install FWS en +# dual-boot). fws-grub-finalize et le %post du kickstart re-génèrent aussi le +# menu avec ce réglage après l'installation. +GRUB_DEFAULT=0 +GRUB_TIMEOUT=8 +GRUB_DISTRIBUTOR="FWS" +GRUB_DISABLE_OS_PROBER=false + +# Thème violet (généré automatiquement) +GRUB_THEME="/boot/grub/themes/catppuccin-mocha-grub-theme/theme.txt" +GRUB_GFXMODE=1920x1080,auto diff --git a/system/etc/grub.d/42_fws-recovery b/system/etc/grub.d/42_fws-recovery new file mode 100755 index 0000000..d0b300c --- /dev/null +++ b/system/etc/grub.d/42_fws-recovery @@ -0,0 +1,40 @@ +#!/bin/sh +# ============================================================================ +# FWS — entrée « Réparer FWS » dans le menu GRUB du SYSTÈME INSTALLÉ +# (l'équivalent de l'environnement de récupération de Windows). +# +# Ce script est exécuté par grub-mkconfig (à l'installation via le %post du +# kickstart, puis à chaque fws-recovery « Réinstaller GRUB »). Il démarre le +# MÊME système sur fws-recovery.target (+ marqueur fws.recovery=1) : +# fws-recovery-boot.service prend alors tty1 et lance l'application de +# réparation (GUI via startx, repli console). +# +# Sur le live, ce fichier est inerte (grub-mkconfig n'y tourne jamais). +# ============================================================================ +set -e +. /usr/share/grub/grub-mkconfig_lib + +kernel=/boot/vmlinuz-linux +# L'initramfs FALLBACK (sans autodetect) : c'est l'entrée de secours, elle +# doit démarrer même si le matériel a changé depuis le dernier mkinitcpio. +initrd=/boot/initramfs-linux-fallback.img +[ -f "$initrd" ] || initrd=/boot/initramfs-linux.img +[ -f "$kernel" ] && [ -f "$initrd" ] || exit 0 + +# Même logique racine que 10_linux : UUID sauf refus explicite. +if [ -n "${GRUB_DEVICE_UUID:-}" ] && [ "x${GRUB_DISABLE_LINUX_UUID:-}" != xtrue ]; then + rootarg="root=UUID=$GRUB_DEVICE_UUID" +else + rootarg="root=$GRUB_DEVICE" +fi + +rel_kernel="$(make_system_path_relative_to_its_root "$kernel")" +rel_initrd="$(make_system_path_relative_to_its_root "$initrd")" + +cat </etc/pacman.d/mirrorlist <{GLib.markup_escape_text(key)}") + k.get_style_context().add_class("dim-label") + v = Gtk.Label(label=val, xalign=0, selectable=True) + v.set_line_wrap(True) + grid.attach(k, 0, i, 1, 1) + grid.attach(v, 1, i, 1, 1) + return grid + + +def _project_tab(osr): + box = Gtk.Box(orientation=Gtk.Orientation.VERTICAL, spacing=10, margin=20) + title = Gtk.Label() + name = osr.get("PRETTY_NAME") or osr.get("NAME") or "FWS Linux" + title.set_markup(f"{name}") + box.pack_start(title, False, False, 0) + + tag = Gtk.Label(label="Une distribution Linux pensée pour remplacer " + "Windows : bureau prêt à l'emploi, jeux, VR et " + "compatibilité applicative.") + tag.set_line_wrap(True) + tag.set_max_width_chars(52) + box.pack_start(tag, False, False, 0) + + feats = Gtk.Label() + feats.set_markup( + "Inclus : installateur graphique · plusieurs bureaux " + "(GNOME, KDE, Hyprland, i3, XFCE) · Steam & Proton-GE · " + "réalité virtuelle (SteamVR) · winboat (applications Windows) · " + "pare-feu · réparation système intégrée.") + feats.set_line_wrap(True) + feats.set_max_width_chars(52) + feats.set_xalign(0) + box.pack_start(feats, False, False, 6) + + home = osr.get("HOME_URL") or "https://gitea.nocode-var.tech/FWS/FWS-ISO" + link = Gtk.LinkButton.new_with_label(home, "Site du projet") + box.pack_start(link, False, False, 0) + return box + + +def _system_tab(osr): + rows = [ + ("Système", osr.get("PRETTY_NAME", "FWS Linux")), + ("Build", osr.get("BUILD_ID", "rolling")), + ("Noyau", _cmd("uname", "-r") or "inconnu"), + ("Bureau", _desktop()), + ("Affichage", _session_type()), + ("Nom de machine", _cmd("hostname") or os.uname().nodename), + ("Processeur", _cpu()), + ("Mémoire", _mem()), + ("Carte(s) graphique(s)", "\n".join(_gpus())), + ("Disque(s)", "\n".join(_disks())), + ] + scroll = Gtk.ScrolledWindow() + scroll.set_policy(Gtk.PolicyType.NEVER, Gtk.PolicyType.AUTOMATIC) + scroll.add(_grid(rows)) + return scroll + + +class AboutWindow(Gtk.Window): + def __init__(self): + super().__init__(title="À propos de FWS") + self.set_default_size(520, 460) + self.set_position(Gtk.WindowPosition.CENTER) + self.set_type_hint(Gdk.WindowTypeHint.DIALOG) + + osr = _osrelease() + notebook = Gtk.Notebook() + notebook.append_page(_project_tab(osr), Gtk.Label(label="Le projet FWS")) + notebook.append_page(_system_tab(osr), Gtk.Label(label="Système")) + self.add(notebook) + self.connect("destroy", Gtk.main_quit) + + +def main(): + if not Gtk.init_check()[0]: + return 1 + win = AboutWindow() + win.show_all() + Gtk.main() + return 0 + + +if __name__ == "__main__": + raise SystemExit(main()) diff --git a/system/usr/local/bin/fws-brightness b/system/usr/local/bin/fws-brightness new file mode 100755 index 0000000..b3f7d6c --- /dev/null +++ b/system/usr/local/bin/fws-brightness @@ -0,0 +1,16 @@ +#!/usr/bin/env bash +# FWS — réglage de la luminosité avec un plancher à 10 % : on ne tombe +# jamais dans le noir complet. Consommé par les touches Fn (Hyprland, +# XF86MonBrightness*) et la molette du module backlight (waybar). +# Pourquoi un script : --min-value de brightnessctl est en valeurs brutes +# (10 % de la plage du matériel, pas un pourcentage), calculé ici. +set -euo pipefail + +# 10 % de la plage max du matériel, arrondi au-dessus (>= 10 % garanti). +min=$(( ($(brightnessctl max) * 10 + 99) / 100 )) + +case "${1:-}" in + up) brightnessctl set +5% ;; + down) brightnessctl --min-value="$min" set 5%- ;; + *) echo "usage: fws-brightness up|down" >&2; exit 1 ;; +esac \ No newline at end of file diff --git a/system/usr/local/bin/fws-bugreport b/system/usr/local/bin/fws-bugreport new file mode 100755 index 0000000..892ff58 --- /dev/null +++ b/system/usr/local/bin/fws-bugreport @@ -0,0 +1,699 @@ +#!/usr/bin/env python3 +# FWS — « Signaler un problème » : envoi OPTIONNEL et validé par l'utilisateur +# de logs aux développeurs. Rien n'est collecté ni envoyé sans action +# explicite : l'utilisateur remplit le formulaire, voit le payload JSON EXACT +# qui partira (infos système + extrait du journal inclus si la case est +# cochée), puis confirme l'envoi. Aucun daemon, aucune collecte en +# arrière-plan, aucun envoi automatique. +# +# L'envoi passe par curl vers l'API bugs du projet — tout part par CE curl, +# rien d'autre ne quitte la machine : +# curl -X POST https://fws.laxacube.ch/api/bugs.php +# -H "Content-Type: application/json" +# -d '{"app":"FWS","version":"0.7.0","type":"bug","title":"…","description":"…"}' +# +# Usages : +# fws-bugreport → fenêtre GTK (menu « Signaler un problème ») +# fws-bugreport --file → pré-remplit la description avec un fichier +# de logs existant (écran de debug du live) +# fws-bugreport --tui → assistant console (repli sans X / SSH) +# +# Vérifier qu'un envoi est bien parti : la réponse du serveur (code HTTP + +# message, ex. « HTTP 201 — Signalement enregistré. Merci ! (id 13) ») est +# affichée et tracée dans /tmp/fws-bugreport.log. +# +# GTK3 : présent sur tous les bureaux FWS et sur le live (via Anaconda) ; +# sans GTK joignable, l'assistant console prend le relais automatiquement. + +import json +import os +import re +import subprocess +import sys +import time +import traceback + +# Trace locale de chaque tentative d'envoi (date, code HTTP, réponse du +# serveur) — la façon de vérifier qu'un rapport est bien parti : +# cat /tmp/fws-bugreport.log +_LOG_PATH = "/tmp/fws-bugreport.log" + +_URL = "https://fws.laxacube.ch/api/bugs.php" +_APP = "FWS" + +# (valeur envoyée au serveur, libellé affiché) +_TYPES = [ + ("bug", "Bug / panne"), + ("question", "Question"), + ("suggestion", "Suggestion"), + ("other", "Autre"), +] + +try: + import gi + + gi.require_version("Gtk", "3.0") + gi.require_version("Gdk", "3.0") # sinon gi charge Gdk 4.0 (conflit Gtk3) + from gi.repository import Gdk, GLib, Gtk # noqa: E402 + + _HAS_GTK = True +except Exception: # noqa: BLE001 — pas de GTK (système CLI, live minimal…) + _HAS_GTK = False + + +# ── Informations système (mêmes sources que fws-about) ─────────────────────── + +def _osrelease(): + data = {} + for path in ("/etc/os-release", "/usr/lib/os-release", + "/usr/local/share/fws/os-release"): + try: + with open(path) as fh: + for line in fh: + m = re.match(r'^([A-Z_]+)=(.*)$', line.strip()) + if m: + data[m.group(1)] = m.group(2).strip('"') + if data: + break + except OSError: + continue + return data + + +def _cmd(*argv): + try: + return subprocess.check_output( + argv, text=True, errors="replace", + stderr=subprocess.DEVNULL, timeout=10).strip() + except (OSError, subprocess.CalledProcessError, subprocess.TimeoutExpired): + return "" + + +def _cpu(): + try: + with open("/proc/cpuinfo") as fh: + for line in fh: + if line.startswith("model name"): + return line.split(":", 1)[1].strip() + except OSError: + pass + return "inconnu" + + +def _mem(): + try: + with open("/proc/meminfo") as fh: + for line in fh: + if line.startswith("MemTotal"): + return f"{int(line.split()[1]) / 1048576:.1f} Gio" + except OSError: + pass + return "inconnue" + + +def _gpus(): + out = [] + for line in _cmd("lspci").splitlines(): + low = line.lower() + if "vga" in low or "3d" in low or "display" in low: + out.append(line.split(":", 2)[-1].strip()) + return out or ["inconnu"] + + +def _disks(): + out = [] + for line in _cmd("lsblk", "-dno", "NAME,SIZE,MODEL,TYPE").splitlines(): + f = line.split() + if f and f[-1] == "disk": + out.append(" ".join(f[:-1])) + return out or ["inconnu"] + + +def _desktop(): + if os.environ.get("HYPRLAND_INSTANCE_SIGNATURE"): + return "Hyprland" + return (os.environ.get("XDG_CURRENT_DESKTOP") + or os.environ.get("DESKTOP_SESSION") or "inconnu") + + +def _session_type(): + t = os.environ.get("XDG_SESSION_TYPE", "") + return {"wayland": "Wayland", "x11": "X11"}.get(t, t or "inconnu") + + +def _tail(path, max_lines): + try: + with open(path, errors="replace") as fh: + lines = fh.readlines() + if len(lines) > max_lines: + lines = lines[-max_lines:] + return "".join(lines).rstrip() + except OSError: + return "" + + +def _system_summary(osr): + rows = [ + ("Système", osr.get("PRETTY_NAME") or "FWS Linux"), + ("Version", osr.get("VERSION_ID") or "inconnue"), + ("Build", osr.get("BUILD_ID", "rolling")), + ("Noyau", _cmd("uname", "-r") or "inconnu"), + ("Bureau", _desktop()), + ("Affichage", _session_type()), + ("Processeur", _cpu()), + ("Mémoire", _mem()), + ("Carte(s) graphique(s)", " ; ".join(_gpus())), + ("Disque(s)", " ; ".join(_disks())), + ] + return "\n".join(f"{k}: {v}" for k, v in rows) + + +def _journal_excerpt(max_lines=200): + """Extrait du journal (avertissements/erreurs) du dernier démarrage. + + Retourne (accessible, texte) : accessible=False si le journal n'a pas pu + être lu ; sinon le texte filtré, éventuellement vide si le démarrage ne + contenait aucun warning/erreur utile. + """ + try: + out = subprocess.check_output( + ["journalctl", "-b", "-p", "warning", "--no-pager"], + text=True, errors="replace", + stderr=subprocess.DEVNULL, timeout=20).strip() + except (OSError, subprocess.CalledProcessError, subprocess.TimeoutExpired): + return False, "" + lines = out.splitlines() + # BRUIT DE L'INSTALLATEUR (vu en réel sur bare metal, 2 ISO successives) : + # les modules D-Bus d'Anaconda journalisent leur debug SANS marqueur de + # priorité exploitable — dumps parted (PedPartition 0x…), rapports JSON LVM, + # listing des 42 tâches, sortie mkfs (« Superblock backups stored on… ») — + # en INFO/DEBUG journald, donc journalctl -p warning les renvoie quand même, + # et un filtre à marqueur INFO:/DEBUG: les laisse passer. Un filtre général + # risquerait d'écraser de VRAIS problèmes d'autres services → on cible : + # pour les unités org.fedoraproject.Anaconda.* on garde UNIQUEMENT les + # messages marqués ERROR:/WARNING: — plus les lignes non marquées d'un + # traceback Python toujours signifiantes (« Traceback (most recent call + # last): », cadres « File "…", line … » et exception finale, ex. + # « FileNotFoundError: [Errno 2] … ») — tout le reste du journal passe + # sans toucher. + def _jbody(line): + m = re.search(r"\[\d+\]: ", line) + return line[m.end():] if m else line + + kept = [] + for ln in lines: + if "org.fedoraproject.Anaconda." not in ln: + kept.append(ln) + continue + body = _jbody(ln).lstrip() + if (re.search(r"\b(?:ERROR|WARNING):", ln) + or body.startswith("Traceback (most recent call last):") + or body.startswith('File "') + or re.match(r"^\w[\w.]*(?:Error|Exception)\b", body)): + kept.append(ln) + lines = kept + + # « WARNING:py.warnings:… DeprecationWarning: … » : bruit de développement + # de l'installateur (la même ligne est répétée par chacun des ~12 modules + # D-Bus d'Anaconda), pas un problème machine — retiré, sauf côté noyau où + # un warning resterait significatif. + lines = [ln for ln in lines + if "DeprecationWarning:" not in ln or re.search(r" kernel: ", ln)] + + # « kernel: ntfs3… » : flot massif émis par le pilote ntfs3 quand + # l'installateur SONDE la partition Windows (« Correct links count -> N » + # pour des centaines d'inodes, « N callbacks suppressed »). C'est la + # correction de liens du système de fichiers Windows pendant la détection + # des disques — pas un problème FWS, inexploitable dans un rapport (vu en + # réel sur bare metal : des dizaines de lignes). Retiré ; un vrai problème + # de disque reste signalé ailleurs (kernel: ata/ahci/nvme…). + lines = [ln for ln in lines if " kernel: ntfs3" not in ln] + + # Reliques du build (checkout Windows → fichiers PLATS à la place des + # symlinks systemd, corrigées à la source dans build.sh mais présentes + # dans les anciennes ISO) : « Failed to preset all unit … already + # exists » et « … is not a symlink, ignoring » — bruit sans valeur de + # diagnostic. + lines = [ln for ln in lines + if ("Failed to preset all unit" not in ln + and "is not a symlink, ignoring" not in ln + and "Wants dependency dropin" not in ln)] + + # « anaconda: kickstart: Command X will be parsed in DBus module. » : + # trace de debug du parseur de kickstart, sans information. + lines = [ln for ln in lines + if "will be parsed in DBus module" not in ln] + + # 1) DÉDUPLICATION GLOBALE (vu en réel sur bare metal) : un service en + # échec boucle (xdg-desktop-portal-gtk sans session graphique) et les + # modules D-Bus répètent les mêmes warnings — le rapport se noie sous les + # doublons. Clé = ligne sans horodatage NI chiffres (« 125 »/« 11 » et + # [pids] s'effacent) : les répétitions à variable numérique près se + # fusionnent (ex. « fan_curve… (0x110024/25/32) failed » → 1 ligne [×3]), + # la 1re occurrence garde sa place, marquée « [×N] » — rien n'est perdu, + # le compte reste lisible. + _stamp_re = re.compile(r"^[A-Z][a-z]{2} +\d+ +\d\d:\d\d:\d\d +") + + seen = {} + order = [] + out = [] + for ln in lines: + m = _stamp_re.match(ln) + key = re.sub(r"\d+", "#", (ln[m.end():] if m else ln).strip()) + if key in seen: + seen[key] += 1 + continue + seen[key] = 1 + order.append(key) + out.append(ln) + lines = [ln + (f" [×{seen[k]}]" if seen[k] > 1 else "") + for ln, k in zip(out, order)] + + # 2) PLAFOND PAR SOURCE : même uniques, les lignes d'une source en tempête + # restent des dizaines (xdg-desktop-portal essaie chaque interface du + # portail l'une après l'autre) — au-delà de 8 lignes de la même source, la + # suite est omise avec une note explicite. Le noyau n'est pas concerné + # (pas de [pid] journald dans ses lignes). L'identifiant journald peut + # être un chemin (« /usr/lib/xdg-desktop-portal[856] ») → l'hostname et + # l'ident sont séparés par une espace, d'où « \S+ +(.+?)\[pid\] ». + def _src(line): + m = re.match(r"^[A-Z][a-z]{2} +\d+ +\d\d:\d\d:\d\d +\S+ +(.+?)\[\d+\]: ", line) + return m.group(1) if m else None + + capped, counts, omitted = [], {}, {} + + def _note(src, n): + return (f" (… +{n} autres lignes de « {src} » omises — " + "spam répétitif ; journal complet : journalctl -b -p warning)") + + for ln in lines: + src = _src(ln) + if src is not None and counts.get(src, 0) >= 8: + omitted[src] = omitted.get(src, 0) + 1 + continue + if src is not None: + counts[src] = counts.get(src, 0) + 1 + if omitted.get(src): + capped.append(_note(src, omitted[src])) + omitted[src] = 0 + capped.append(ln) + for src, n in omitted.items(): + if n: + capped.append(_note(src, n)) + lines = capped + if len(lines) > max_lines: + lines = lines[-max_lines:] + return True, "\n".join(lines) + + +def _collect_diagnostics(osr): + parts = ["===== Informations système =====", _system_summary(osr)] + post_log = "/var/log/fws-post.log" + if os.path.isfile(post_log): + tail = _tail(post_log, 100) + if tail: + parts += ["", "===== Log d'installation FWS (fin) =====", tail] + journal_ok, journal = _journal_excerpt() + if journal: + parts += ["", "===== Journal du dernier démarrage " + "(avertissements / erreurs) =====", journal] + elif journal_ok: + # Journal lisible mais rien d'utile après filtrage du bruit : mieux + # vaut le dire que d'insinuer que le journal était inaccessible. + parts += ["", "===== Journal du dernier démarrage " + "(avertissements / erreurs) =====", + "(aucune entrée warning/erreur utile dans le journal)"] + else: + parts += ["", "(journal du dernier démarrage inaccessible — " + "lance fws-bugreport depuis un terminal avec sudo " + "pour l'inclure)"] + return "\n".join(parts) + + +def _build_payload(osr, typ, title, description, include_diag): + description = description.strip() + if include_diag: + diag = _collect_diagnostics(osr) + description = f"{description}\n\n{diag}" if description else diag + return { + "app": _APP, + "version": osr.get("VERSION_ID") or "unknown", + "type": typ, + "title": title, + "description": description, + } + + +# ── Envoi (un seul curl, comme spécifié) ───────────────────────────────────── + +def _trace(lines): + try: + with open(_LOG_PATH, "a", + encoding="utf-8", errors="replace") as fh: + fh.write("\n".join(lines) + "\n") + except OSError: + pass + + +def _send(payload): + data = json.dumps(payload, ensure_ascii=False).encode("utf-8", "replace") + # Le corps passe par stdin (--data-binary @-) : pas de limite de taille + # d'argument (le journal peut faire des centaines de Ko) et aucun souci + # de quoting. -w ajoute le code HTTP en dernière ligne de stdout. + try: + proc = subprocess.run( + ["curl", "-sS", "--max-time", "30", "-X", "POST", _URL, + "-H", "Content-Type: application/json", + "--data-binary", "@-", + "-w", "\n%{http_code}"], + input=data, capture_output=True, timeout=45) + except OSError as exc: + _trace([f"[{time.strftime('%Y-%m-%d %H:%M:%S')}] ÉCHEC — " + f"curl introuvable : {exc}"]) + return False, f"curl introuvable : {exc}" + except subprocess.TimeoutExpired: + _trace([f"[{time.strftime('%Y-%m-%d %H:%M:%S')}] ÉCHEC — délai " + "dépassé (30 s)"]) + return False, "Délai dépassé (30 s) — vérifie ta connexion réseau." + + out = proc.stdout.decode("utf-8", "replace") + err = proc.stderr.decode("utf-8", "replace") + parts = out.rsplit("\n", 1) + body = parts[0] if len(parts) == 2 else out + code = parts[-1].strip() + + if proc.returncode != 0: + detail = err.strip() or body.strip() + _trace([f"[{time.strftime('%Y-%m-%d %H:%M:%S')}] ÉCHEC curl " + f"(code {proc.returncode}) : {detail[:300]}"]) + return False, detail or f"curl a échoué (code {proc.returncode})." + + # Le serveur répond en JSON : {"ok":true,"id":…,"message":…}. Un code + # HTTP ≥ 400 ne fait PAS échouer curl — on le détecte ici, sinon l'utilisateur + # verrait « envoyé ✔ » alors que rien n'a été enregistré. + ok = code.startswith("2") + msg = body.strip() + rid = "" + try: + j = json.loads(body) + if isinstance(j, dict): + ok = bool(j.get("ok")) and code.startswith("2") + if j.get("message"): + msg = str(j["message"]) + if j.get("id"): + rid = f" (id {j['id']})" + except ValueError: + pass + + _trace([f"[{time.strftime('%Y-%m-%d %H:%M:%S')}] {_URL} " + f"app={payload.get('app')} type={payload.get('type')} " + f"titre={payload.get('title')!r} payload={len(data)} o " + f"→ HTTP {code or '?'} ok={ok} {msg[:200]}{rid}"]) + + if ok: + return True, f"HTTP {code or '?'} — {msg}{rid}" + return False, (f"HTTP {code or '?'} — {msg or 'réponse vide'}. " + "Le serveur a refusé le rapport.") + + +# ── Assistant console (repli sans X) ───────────────────────────────────────── + +def _tui(preload_path): + # Robustesse locale : l'assistant console peut tourner dans une console + # non-UTF-8 (Windows…). On force UTF-8 avec remplacement plutôt que de + # crasher sur les caractères accentués/boîtes. + try: + sys.stdout.reconfigure(encoding="utf-8", errors="replace") + sys.stdin.reconfigure(encoding="utf-8", errors="replace") + except (AttributeError, ValueError, OSError): + pass + + def ask(prompt, default=""): + try: + return input(prompt).strip() or default + except EOFError: + return default + + print("FWS — « Signaler un problème » (envoi optionnel de logs)") + print("Rien ne sera envoyé sans ta confirmation.\n") + + if preload_path: + try: + with open(preload_path, errors="replace") as fh: + description = fh.read().strip() + print(f"Logs chargés depuis {preload_path} " + f"({len(description)} caractères).") + except OSError as exc: + print(f" ⚠ Impossible de lire {preload_path} : {exc}") + description = "" + else: + description = "" + + valid_types = [v for v, _l in _TYPES] + if not description: + print("Type (défaut : bug) : " + ", ".join(valid_types)) + typ = ask("> ", "bug") + if typ not in valid_types: + typ = "bug" + title = ask("Titre : ") + print("Description (ligne vide pour terminer) :") + lines = [] + while True: + line = ask("> ") + if not line: + break + lines.append(line) + description = "\n".join(lines) + else: + typ = ask("Type (défaut : bug) : ", "bug") + if typ not in valid_types: + typ = "bug" + title = ask("Titre : ") + + if not title: + print(" ⚠ Titre obligatoire — envoi annulé.") + return 1 + + osr = _osrelease() + payload = _build_payload(osr, typ, title, description, include_diag=True) + print("\n─── Aperçu de ce qui sera envoyé à", _URL, "───") + print(json.dumps(payload, ensure_ascii=False, indent=2)) + if ask("\nEnvoyer ? [o/N] ", "n").lower() not in ("o", "oui", "y", "yes"): + print("Envoi annulé.") + return 0 + ok, msg = _send(payload) + print(("✔ " if ok else "✖ ") + msg) + if not ok: + print(f"Détails : {_LOG_PATH}") + return 0 if ok else 1 + + +# ── Fenêtre GTK (uniquement si GTK est disponible) ─────────────────────────── + +if _HAS_GTK: + def _preview_dialog(parent, payload): + dlg = Gtk.Dialog(title="Confirmer l'envoi", transient_for=parent, + modal=True, destroy_with_parent=True) + dlg.set_default_size(680, 520) + dlg.set_position(Gtk.WindowPosition.CENTER) + dlg.add_buttons("Annuler", Gtk.ResponseType.CANCEL, + "Confirmer l'envoi", Gtk.ResponseType.OK) + + box = dlg.get_content_area() + box.set_spacing(10) + box.set_border_width(14) + + note = Gtk.Label() + note.set_markup( + "Voici EXACTEMENT ce qui sera envoyé à " + "https://fws.laxacube.ch/api/bugs.php :") + note.set_line_wrap(True) + note.set_xalign(0) + box.pack_start(note, False, False, 0) + + scroll = Gtk.ScrolledWindow() + scroll.set_policy(Gtk.PolicyType.AUTOMATIC, Gtk.PolicyType.AUTOMATIC) + view = Gtk.TextView() + view.set_editable(False) + view.set_cursor_visible(False) + view.set_monospace(True) + view.get_buffer().set_text( + json.dumps(payload, ensure_ascii=False, indent=2)) + scroll.add(view) + box.pack_start(scroll, True, True, 0) + + dlg.show_all() + response = dlg.run() + dlg.destroy() + return response == Gtk.ResponseType.OK + + def _message(parent, kind, title, text): + msg_type = (Gtk.MessageType.ERROR if kind == "error" + else Gtk.MessageType.INFO) + dlg = Gtk.MessageDialog(transient_for=parent, modal=True, + message_type=msg_type, + buttons=Gtk.ButtonsType.CLOSE, + text=title) + if text: + dlg.format_secondary_text(text) + dlg.run() + dlg.destroy() + + class BugReportWindow(Gtk.Window): + def __init__(self, preload_path=None): + super().__init__(title="Signaler un problème — FWS") + self.set_icon_name("fws-bugreport") + self.set_default_size(580, -1) + self.set_position(Gtk.WindowPosition.CENTER) + self.set_border_width(18) + # DIALOGUE : les tuileurs (i3/Hyprland) gardent les dialogues en + # flottant → taille naturelle au lieu d'être étirée. + self.set_type_hint(Gdk.WindowTypeHint.DIALOG) + self.set_resizable(False) + self.connect("destroy", Gtk.main_quit) + + self._osr = _osrelease() + + box = Gtk.Box(orientation=Gtk.Orientation.VERTICAL, spacing=10) + self.add(box) + + title = Gtk.Label() + title.set_markup( + "Signaler un problème") + box.pack_start(title, False, False, 0) + + subtitle = Gtk.Label( + label="Un souci avec FWS ? Décris-le ci-dessous. Les informations " + "système et les logs de diagnostic peuvent être joints pour " + "aider les développeurs. Rien ne part sans ta confirmation.") + subtitle.set_line_wrap(True) + subtitle.set_xalign(0) + box.pack_start(subtitle, False, False, 0) + + grid = Gtk.Grid(column_spacing=10, row_spacing=8) + grid.set_halign(Gtk.Align.FILL) + + grid.attach(Gtk.Label(label="Type :", xalign=1), 0, 0, 1, 1) + self._type = Gtk.ComboBoxText() + for value, label in _TYPES: + self._type.append(value, label) + self._type.set_active(0) + grid.attach(self._type, 1, 0, 1, 1) + + grid.attach(Gtk.Label(label="Titre :", xalign=1), 0, 1, 1, 1) + self._title = Gtk.Entry() + self._title.set_placeholder_text("Résumé court du problème") + grid.attach(self._title, 1, 1, 1, 1) + + box.pack_start(grid, False, False, 0) + + desc_label = Gtk.Label(label="Description :", xalign=0) + box.pack_start(desc_label, False, False, 0) + scroll = Gtk.ScrolledWindow() + scroll.set_min_content_height(130) + scroll.set_policy(Gtk.PolicyType.NEVER, Gtk.PolicyType.AUTOMATIC) + self._description = Gtk.TextView() + self._description.set_wrap_mode(Gtk.WrapMode.WORD) + self._description.set_placeholder_text( + "Ce qui s'est passé, ce que tu attendais, ce que tu as essayé…") + scroll.add(self._description) + box.pack_start(scroll, False, False, 0) + + if preload_path: + try: + with open(preload_path, errors="replace") as fh: + content = fh.read() + self._description.get_buffer().set_text(content) + loaded = Gtk.Label() + loaded.set_markup( + f"Logs chargés " + f"depuis {preload_path}" + f" — tu peux les compléter ou les retirer.") + loaded.set_line_wrap(True) + loaded.set_xalign(0) + box.pack_start(loaded, False, False, 0) + except OSError as exc: + _message(self, "error", "Fichier illisible", + f"{preload_path} : {exc}") + + self._include = Gtk.CheckButton( + label="Joindre les informations système et les logs de diagnostic") + self._include.set_active(True) + self._include.set_tooltip_text( + "Version FWS, matériel détecté, extrait du journal du dernier " + "démarrage — à relire dans l'aperçu avant l'envoi") + box.pack_start(self._include, False, False, 4) + + footer = Gtk.Box(orientation=Gtk.Orientation.HORIZONTAL, spacing=8) + cancel = Gtk.Button(label="Fermer") + cancel.connect("clicked", lambda _b: self.close()) + send = Gtk.Button(label="Envoyer…") + send.get_style_context().add_class("suggested-action") + send.connect("clicked", self._on_send) + footer.pack_end(send, False, False, 0) + footer.pack_end(cancel, False, False, 0) + box.pack_start(footer, False, False, 6) + + self._title.connect("activate", self._on_send) + + def _on_send(self, _widget=None): + # Un crash ne doit JAMAIS mourir en silence (le lancement depuis + # l'écran de debug du live redirige stderr vers /dev/null) : on + # trace et on affiche. + try: + self._do_send() + except Exception as exc: # noqa: BLE001 + _trace(["=== CRASH fws-bugreport ===", + traceback.format_exc()]) + _message(self, "error", "Erreur inattendue", + f"{exc}\n\nDétails : {_LOG_PATH}") + + def _do_send(self): + title = self._title.get_text().strip() + buf = self._description.get_buffer() + description = buf.get_text(buf.get_start_iter(), + buf.get_end_iter(), True).strip() + include = self._include.get_active() + if not title: + _message(self, "error", "Titre manquant", + "Indique un titre court pour le problème.") + return + if not description and not include: + _message(self, "error", "Rapport vide", + "Écris une description ou coche la jointure des " + "informations système et des logs.") + return + + typ = self._type.get_active_id() or "bug" + payload = _build_payload(self._osr, typ, title, description, include) + if not _preview_dialog(self, payload): + return + ok, msg = _send(payload) + if ok: + _message(self, "info", "Rapport envoyé ✔", + f"{msg}\n\nMerci ! L'équipe FWS a reçu ton rapport.\n" + f"(trace : {_LOG_PATH})") + else: + _message(self, "error", "Envoi impossible", + f"{msg}\n\nTon rapport n'a pas été envoyé. Vérifie ta " + f"connexion et réessaie.\nDétails : {_LOG_PATH}") + + +def main(): + args = sys.argv[1:] + preload = None + if "--file" in args: + i = args.index("--file") + if i + 1 < len(args): + preload = args[i + 1] + if _HAS_GTK and "--tui" not in args and Gtk.init_check()[0]: + GLib.set_prgname("fws-bugreport") + win = BugReportWindow(preload) + win.show_all() + Gtk.main() + return 0 + return _tui(preload) + + +if __name__ == "__main__": + raise SystemExit(main()) \ No newline at end of file diff --git a/system/usr/local/bin/fws-desktop-retry b/system/usr/local/bin/fws-desktop-retry new file mode 100755 index 0000000..9750c75 --- /dev/null +++ b/system/usr/local/bin/fws-desktop-retry @@ -0,0 +1,42 @@ +#!/bin/bash +# Généré par l'installateur FWS — (ré)installe le bureau « hyprland ». +# Usage : fws-desktop-retry [--auto] (--auto = relancé par le service au 1er démarrage) +set -u +[ "$(id -u)" -eq 0 ] || exec sudo "$0" "$@" +AUTO="" +[ "${1:-}" = "--auto" ] && AUTO=1 +if [ -n "$AUTO" ]; then + wall "FWS : installation du bureau « hyprland » en cours… ne coupez pas l'alimentation." 2>/dev/null || true +fi +echo "==> Installation du bureau hyprland…" +# Keyring pacman : s'il est périmé, -Sy échoue alors que le réseau va bien +# (typique d'un système fraîchement installé depuis une image). +pacman-key --init &>/dev/null || true +pacman-key --populate archlinux &>/dev/null || true +# Attente du réseau (DNS) : au 1er démarrage, NetworkManager peut mettre +# ~30 s à monter la connexion. +for _i in 1 2 3 4 5 6 7 8 9 10; do + getent hosts geo.mirror.pkgbuild.com >/dev/null 2>&1 && break + sleep 3 +done +# Synchro + filtre : un paquet renommé/absent ne doit pas faire échouer TOUT +# le bureau (même approche que fws-setup-hardware pour la stack matérielle). +pacman -Syy --noconfirm || { echo "Échec de la synchro (réseau ?) — réessayez."; exit 1; } +_FILTERED="" +for _p in hyprland kitty wofi waybar sddm noto-fonts dolphin kio-extras udisks2 hyprlock grim slurp wl-clipboard playerctl mako libnotify polkit-gnome network-manager-applet xdg-desktop-portal-hyprland ttf-nerd-fonts-symbols pipewire pipewire-alsa pipewire-pulse wireplumber pavucontrol bluez bluez-utils blueman firefox python-gobject pacman-contrib; do + pacman -Si "$_p" >/dev/null 2>&1 && _FILTERED="$_FILTERED $_p" +done +PKGS="${_FILTERED# }" +[ -n "$PKGS" ] || { echo "Aucun paquet du bureau hyprland trouvé dans les dépôts — réessayez plus tard."; exit 1; } +pacman -S --noconfirm --needed $PKGS || { echo "Échec (réseau ?) — réessayez."; exit 1; } +[ -n "sddm" ] && systemctl enable "sddm" +systemctl set-default graphical.target +rm -f /var/lib/fws/desktop-failed +[ -f /etc/motd ] && grep -q fws-desktop-retry /etc/motd && rm -f /etc/motd +echo "==> Bureau installé ✔" +if [ -n "$AUTO" ]; then + echo "==> Passage sur l'écran de connexion…" + systemctl isolate graphical.target || true +else + echo "==> Redémarrez (reboot) pour arriver sur l'écran de connexion." +fi diff --git a/system/usr/local/bin/fws-grub-finalize b/system/usr/local/bin/fws-grub-finalize new file mode 100755 index 0000000..4949a04 --- /dev/null +++ b/system/usr/local/bin/fws-grub-finalize @@ -0,0 +1,166 @@ +#!/bin/bash +# ============================================================ +# FWS — fws-grub-finalize : verrouille le bootloader au 1er démarrage. +# +# POURQUOI : sur du vrai matériel (bare-metal UEFI — cartes mères ASUS et +# autres), l'installation peut se terminer sans que GRUB soit inscrit dans la +# NVRAM, ou sans que Windows soit détecté (os-prober désactivé / partitions +# pas visibles pendant l'install). Résultats vus en conditions réelles : +# « le PC redémarre sur Windows », ou « GRUB s'ouvre mais le menu est vide ». +# +# Ce service tourne au premier démarrage du système installé (marqueur +# /var/lib/fws/grub-finalize-done posé seulement en cas de SUCCÈS, le service +# ne se relance donc pas ensuite). À ce moment-là, contrairement au chroot de +# l'installateur : +# - /sys/firmware/efi/efivars est accessible → l'entrée NVRAM « FWS » +# (efibootmgr) PEUT être créée/rafraîchie, +# - tous les disques sont présents → os-prober retrouve Windows (et tout +# autre OS) sur les autres disques/partitions, +# - le chemin de secours EFI/BOOT/BOOTX64.EFI (--removable) est (re)posé : +# les firmwares récalcitrants (ASUS…) bootent quand même dessus. +# +# Journal : /var/log/fws-grub-finalize.log +# ============================================================ +set -u +LOG=/var/log/fws-grub-finalize.log +DONE=/var/lib/fws/grub-finalize-done + +# Déjà finalisé → ne rien faire (le service a une ConditionPathExists=…, on se +# protège aussi d'un lancement manuel). +[ -e "$DONE" ] && exit 0 + +mkdir -p /var/lib/fws +exec >>"$LOG" 2>&1 +echo "== fws-grub-finalize : $(date '+%F %T')" + +# Laisse udev finir d'énumérer les disques (os-prober a besoin de tout voir). +udevadm settle --timeout=30 2>/dev/null || true + +# os-prober doit être présent et ACTIF (par défaut sur Arch : désactivé → les +# autres OS n'apparaissent jamais au menu). Les paquets sont normalement dans +# l'image installée (os-prober + ntfs-3g listés dans packages.x86_64) ; on +# tente un install de secours sans bloquer si pas de réseau. +if command -v os-prober >/dev/null 2>&1; then + if grep -q '^GRUB_DISABLE_OS_PROBER=' /etc/default/grub 2>/dev/null; then + sed -i 's/^GRUB_DISABLE_OS_PROBER=.*/GRUB_DISABLE_OS_PROBER=false/' /etc/default/grub + else + echo 'GRUB_DISABLE_OS_PROBER=false' >> /etc/default/grub + fi +else + pacman -S --noconfirm --needed os-prober ntfs-3g >/dev/null 2>&1 || \ + echo "[FWS] os-prober indisponible — Windows ne sera pas détecté au menu GRUB" +fi + +# Première partition ESP (vfat + type de partition EFI), optionnellement +# limitée à un disque donné. +# +# ⚠ NE PAS revenir à « lsblk -nro PATH,PARTTYPENAME,FSTYPE | awk '$2=="EFI +# System" …' » : « lsblk -r » sépare les colonnes par des ESPACES et le +# libellé d'une ESP est littéralement « EFI System » — avec une espace. awk +# voyait $2="EFI" et $3="System", le test n'était JAMAIS vrai, aucune ESP +# n'était trouvée et GRUB n'était donc jamais posé en UEFI (ni ici, ni dans +# le %post du kickstart qui portait le même bug). +# On lit PARTTYPE (un CODE : GUID en GPT, 0xef en MBR — jamais d'espace) et on +# interroge chaque partition séparément : une valeur par appel, donc aucun +# décalage de colonnes même si un champ est vide. +find_esp() { + _disk="${1:-}" + lsblk -nrpo NAME,FSTYPE $_disk 2>/dev/null | awk '$2=="vfat"{print $1}' \ + | while read -r _part; do + _ptype="$(lsblk -nrdo PARTTYPE "$_part" 2>/dev/null | tr 'A-Z' 'a-z')" + case "$_ptype" in + c12a7328-f81f-11d2-ba4b-00a0c93ec93b|0xef) printf '%s\n' "$_part" ;; + esac + done | head -n1 +} + +# --- UEFI : installer GRUB sur une ESP --------------------------------------- +# Règle : on préfère une ESP PORTÉE PAR LE MÊME DISQUE que « / » (installation +# FWS typique : /boot/efi déjà dans le fstab). Si l'installation a réutilisé +# l'ESP d'un autre OS (cas dual-boot vu en réel : ESP Windows sur le 1er +# disque), on retombe sur la première ESP FAT32 trouvée. +OK=1 +if [ -d /sys/firmware/efi ]; then + esp="" + if ! mountpoint -q /boot/efi; then + # /boot/efi pas monté (ou pas dans le fstab) : on cherche. + rootsrc="$(findmnt -no SOURCE / 2>/dev/null)" + rootdisk="$(lsblk -spno NAME,TYPE "$rootsrc" 2>/dev/null | awk '$2=="disk"{print $1; exit}')" + if [ -n "$rootdisk" ]; then + esp="$(find_esp "$rootdisk")" + fi + # Repli : première ESP du système (ex. ESP Windows réutilisée). + [ -n "$esp" ] || esp="$(find_esp)" + if [ -n "$esp" ]; then + echo "[FWS] ESP : $esp → montage sur /boot/efi (ne pas démonter, reboot ensuite)" + mkdir -p /boot/efi + mount "$esp" /boot/efi 2>/dev/null || echo "[FWS] montage ESP impossible ($esp)" + else + echo "[FWS] aucune partition EFI trouvée sur ce système" + fi + fi + + if mountpoint -q /boot/efi || [ -d /boot/efi/EFI ]; then + # (a) Entrée NVRAM « FWS » + fichiers EFI/FWS (best effort : grub-install + # crée lui-même l'entrée si efivars est accessible) : + grub-install --target=x86_64-efi --efi-directory=/boot/efi \ + --bootloader-id=FWS --recheck || echo "[FWS] grub-install (NVRAM) : échec, ignoré" + # (b) Chemin de SECOURS EFI/BOOT/BOOTX64.EFI (--removable) : boote SANS + # aucune entrée NVRAM. INDISPENSABLE sur firmware qui « oublie » + # l'entrée (ASUS…) — c'est lui qui garantit le 1er boot. + if ! grub-install --target=x86_64-efi --efi-directory=/boot/efi \ + --bootloader-id=FWS --removable --recheck; then + OK=0 + fi + # Copie physique de secours si --removable n'a pas produit le fichier. + if [ ! -f /boot/efi/EFI/BOOT/BOOTX64.EFI ] \ + && [ -f /boot/efi/EFI/FWS/grubx64.efi ]; then + mkdir -p /boot/efi/EFI/BOOT + cp -f /boot/efi/EFI/FWS/grubx64.efi /boot/efi/EFI/BOOT/BOOTX64.EFI \ + && echo "[FWS] BOOTX64.EFI copié depuis EFI/FWS" || OK=0 + fi + # (c) Rafraîchir l'entrée NVRAM si elle manque (efibootmgr). GRUB booté + # a déjà créé « FWS » ; on ne duplique pas si l'entrée existe. + if command -v efibootmgr >/dev/null 2>&1 \ + && [ -d /sys/firmware/efi/efivars ]; then + espdev="$(findmnt -no SOURCE /boot/efi 2>/dev/null)" + if [ -n "$espdev" ]; then + disk="$(lsblk -spno NAME,TYPE "$espdev" | awk '$2=="disk"{print $1; exit}')" + part="$(printf '%s' "$espdev" | grep -oE '[0-9]+$')" + if ! efibootmgr 2>/dev/null | grep -qi 'FWS'; then + efibootmgr -c -d "${disk:-/dev/null}" -p "${part:-1}" \ + -L "FWS" -l '\EFI\FWS\grubx64.efi' >/dev/null 2>&1 \ + && echo "[FWS] entrée NVRAM FWS créée" || \ + echo "[FWS] NVRAM non modifiable — le chemin --removable suffit" + else + echo "[FWS] entrée NVRAM FWS déjà présente" + fi + fi + fi + else + echo "[FWS] aucune ESP montée sur /boot/efi — grub-install UEFI impossible ici" + OK=0 + fi +else + # --- BIOS/CSM : GRUB dans le MBR du disque portant « / » --------------- + rootsrc="$(findmnt -no SOURCE / 2>/dev/null)" + disk="$(lsblk -spno NAME,TYPE "$rootsrc" 2>/dev/null \ + | awk '$2=="disk"{print $1; exit}' | grep -oE '/dev/[a-z0-9]+')" + if [ -n "$disk" ]; then + grub-install --target=i386-pc --recheck "$disk" || OK=0 + else + echo "[FWS] disque BIOS introuvable" + OK=0 + fi +fi + +# Régénère le menu COMPLET (FWS + recovery + Windows/autres OS via os-prober). +if grub-mkconfig -o /boot/grub/grub.cfg; then + if grep -q 'menuentry' /boot/grub/grub.cfg; then + touch "$DONE" + echo "[FWS] GRUB finalisé : entrées NVRAM + menu OK ($(date '+%T'))" + exit 0 + fi +fi +echo "[FWS] grub.cfg absent/vide — nouvel essai au prochain démarrage" +exit 1 diff --git a/system/usr/local/bin/fws-hello b/system/usr/local/bin/fws-hello new file mode 100755 index 0000000..0891730 --- /dev/null +++ b/system/usr/local/bin/fws-hello @@ -0,0 +1,158 @@ +#!/usr/bin/env python3 +# FWS — fenêtre de bienvenue au premier démarrage (pendant post-install de la +# page récap de l'installateur). Boutons : mise à jour, codecs, VR, raccourcis, +# Proton-GE. GTK3 : présent sur TOUS les bureaux FWS (Firefox le tire) ; +# python-gobject est installé avec le bureau par le kickstart. +# +# Lancement : /etc/xdg/autostart (KDE/GNOME/XFCE) et exec des configs +# Hyprland/i3, toujours avec --autostart : on se retire sans bruit si +# l'utilisateur a coché « ne plus afficher » (~/.config/fws/hello-done). + +import os +import shutil +import subprocess +import sys + +import gi + +gi.require_version("Gtk", "3.0") +gi.require_version("Gdk", "3.0") # sinon gi charge Gdk 4.0 (conflit avec Gtk3) +from gi.repository import Gdk, GLib, Gtk # noqa: E402 + +# WM_CLASS déterministe : les règles i3/Hyprland « fenêtre flottante » +# ciblent cette classe. +GLib.set_prgname("fws-hello") + +_FLAG = os.path.expanduser("~/.config/fws/hello-done") + +_CODECS = ("gst-plugins-base gst-plugins-good gst-plugins-bad " + "gst-plugins-ugly gst-libav ffmpeg mpv") + +# (libellé, description, commande, en_terminal) +_ACTIONS = [ + ("Mettre à jour le système", + "pacman -Syu + nettoyage du cache", + "fws-update", True), + ("Installer les codecs multimédia", + "lecture vidéo/audio (GStreamer, ffmpeg, mpv)", + f"sudo pacman -S --needed {_CODECS}", True), + ("Proton-GE pour Steam", + "meilleure compatibilité des jeux Windows", + "fws-proton-ge", True), + ("Configurer la VR", + "drivers casque : HTC Vive, Index, Quest…", + "fws-vr-setup", True), +] + +_TERMINALS = ["kitty", "konsole", "gnome-terminal", "xfce4-terminal", "xterm"] + + +def _terminal(): + for term in _TERMINALS: + if shutil.which(term): + return term + return None + + +def _run(command, in_terminal): + if in_terminal: + term = _terminal() + if term is None: + return + if term == "gnome-terminal": + argv = [term, "--", "sh", "-c", command] + else: + argv = [term, "-e", "sh", "-c", command] + else: + argv = ["sh", "-c", command] + subprocess.Popen(argv) # noqa: S603 — commandes internes FWS + + +class HelloWindow(Gtk.Window): + def __init__(self): + super().__init__(title="Bienvenue sur FWS") + self.set_default_size(460, -1) + self.set_position(Gtk.WindowPosition.CENTER) + self.set_border_width(18) + # DIALOGUE : les tuileurs (i3/Hyprland) laissent les dialogues en + # flottant → la fenêtre garde sa taille naturelle au lieu d'être + # étirée sur tout l'espace de travail (layout illisible sinon). + self.set_type_hint(Gdk.WindowTypeHint.DIALOG) + self.set_resizable(False) + + box = Gtk.Box(orientation=Gtk.Orientation.VERTICAL, spacing=12) + self.add(box) + + title = Gtk.Label() + title.set_markup("Bienvenue sur FWS !") + box.pack_start(title, False, False, 0) + + subtitle = Gtk.Label( + label="Ton système est prêt. Quelques réglages utiles pour bien démarrer :") + subtitle.set_line_wrap(True) + subtitle.set_xalign(0) + box.pack_start(subtitle, False, False, 0) + + actions = list(_ACTIONS) + # Raccourcis clavier : uniquement sur les sessions qui ont fws-keys + # (Hyprland/i3) — les autres bureaux ont leurs propres réglages. + session = os.environ.get("XDG_CURRENT_DESKTOP", "").lower() + if os.environ.get("HYPRLAND_INSTANCE_SIGNATURE") or "i3" in session: + actions.append(("Voir les raccourcis clavier", + "aussi disponible à tout moment : Super+K", + "fws-keys", False)) + + for label, desc, command, in_term in actions: + button = Gtk.Button() + inner = Gtk.Box(orientation=Gtk.Orientation.VERTICAL, spacing=2) + lab = Gtk.Label() + lab.set_markup(f"{label}") + lab.set_xalign(0) + sub = Gtk.Label(label=desc) + sub.set_xalign(0) + sub.get_style_context().add_class("dim-label") + inner.pack_start(lab, False, False, 0) + inner.pack_start(sub, False, False, 0) + button.add(inner) + button.connect("clicked", + lambda _b, c=command, t=in_term: _run(c, t)) + box.pack_start(button, False, False, 0) + + self._again = Gtk.CheckButton(label="Afficher cette fenêtre au prochain démarrage") + self._again.set_active(False) + box.pack_start(self._again, False, False, 6) + + close = Gtk.Button(label="Fermer") + close.connect("clicked", lambda _b: self.close()) + box.pack_start(close, False, False, 0) + + self.connect("destroy", self._on_destroy) + + def _on_destroy(self, _win): + if not self._again.get_active(): + os.makedirs(os.path.dirname(_FLAG), exist_ok=True) + with open(_FLAG, "w") as fh: + fh.write("ok\n") + else: + try: + os.unlink(_FLAG) + except OSError: + pass + Gtk.main_quit() + + +def main(): + if "--autostart" in sys.argv and os.path.exists(_FLAG): + return 0 + # Pas d'affichage joignable (lancement hors session graphique) : on se + # retire sans traceback plutôt que de crasher. + if not Gtk.init_check()[0]: + return 1 + win = HelloWindow() + win.show_all() + Gtk.main() + return 0 + + +if __name__ == "__main__": + sys.exit(main()) diff --git a/system/usr/local/bin/fws-hyprland b/system/usr/local/bin/fws-hyprland new file mode 100755 index 0000000..68ffe23 --- /dev/null +++ b/system/usr/local/bin/fws-hyprland @@ -0,0 +1,18 @@ +#!/bin/sh +if systemd-detect-virt --quiet 2>/dev/null; then + # GPU virtuel (VMware vmwgfx…) : on FORCE le chemin d'affichage 100% logiciel. + # La PIÈCE MAÎTRESSE est MESA_LOADER_DRIVER_OVERRIDE=kms_swrast : elle force + # Mesa à allouer le GBM/EGL via kms_swrast (rendu logiciel dans les « dumb + # buffers » KMS) AU LIEU du pilote vmwgfx (qui ne fournit pas le GBM dont + # aquamarine a besoin → « CBackend::create() failed »). + llvmpipe pour le GL. + export MESA_LOADER_DRIVER_OVERRIDE=kms_swrast + export GALLIUM_DRIVER=llvmpipe LIBGL_ALWAYS_SOFTWARE=1 + export WLR_RENDERER_ALLOW_SOFTWARE=1 WLR_NO_HARDWARE_CURSORS=1 + export AQ_NO_ATOMIC=1 +fi +# Hyprland ≥ 0.53 : start-hyprland est le lanceur officiel (prépare la +# session/env systemd) — sans lui, bandeau « started without start-hyprland ». +if command -v start-hyprland >/dev/null 2>&1; then + exec start-hyprland "$@" +fi +exec Hyprland "$@" diff --git a/system/usr/local/bin/fws-keys b/system/usr/local/bin/fws-keys new file mode 100755 index 0000000..0e3dc5e --- /dev/null +++ b/system/usr/local/bin/fws-keys @@ -0,0 +1,129 @@ +#!/usr/bin/env python3 +# FWS — affiche les raccourcis clavier RÉELS de la session (bouton ⌨ de la +# barre ou Super+K). Universel : +# • Hyprland : « hyprctl binds -j » = les binds effectivement chargés +# (descriptions des bindd) — affichage wofi (Wayland). +# • i3 : parse ~/.config/i3/config (bindsym, variables résolues) +# — affichage rofi (X11). +# Aucune dépendance hors python3 + wofi/rofi (déjà installés avec le bureau). + +import json +import os +import re +import subprocess +import sys + +_WOFI_STYLE = "/usr/local/share/fws/wofi-keys.css" + +# Bits de modmask Hyprland (masques X11) dans l'ordre d'affichage voulu. +_MODS = [(64, "SUPER"), (4, "CTRL"), (8, "ALT"), (1, "SHIFT")] + +_KEY_LABELS = { + "mouse:272": "clic gauche", + "mouse:273": "clic droit", + "mouse:274": "clic molette", + "mouse_down": "molette bas", + "mouse_up": "molette haut", + "button4": "molette haut", + "button5": "molette bas", + "return": "Entrée", + "space": "Espace", + "escape": "Échap", + "tab": "Tab", + "left": "←", + "right": "→", + "up": "↑", + "down": "↓", + "print": "Impr écran", +} + + +def _label(key): + return _KEY_LABELS.get(key.lower(), key) + + +# --- Hyprland : binds réels via hyprctl ------------------------------------ +def hyprland_lines(): + raw = subprocess.check_output(["hyprctl", "binds", "-j"], text=True) + lines, seen = [], set() + for bind in json.loads(raw): + parts = [name for bit, name in _MODS if bind.get("modmask", 0) & bit] + key = bind.get("key") or (f"code {bind['keycode']}" if bind.get("keycode") else "") + parts.append(_label(key)) + combo = " + ".join(p for p in parts if p) + if not combo or combo in seen: + continue + seen.add(combo) + desc = (bind.get("description") or "").strip() \ + or f"{bind.get('dispatcher', '?')} {(bind.get('arg') or '').strip()}".strip() + lines.append(f"{combo:<24} {desc}") + return lines + + +# --- i3 : parse de la config (variables résolues) ---------------------------- +def i3_lines(): + path = os.path.expanduser("~/.config/i3/config") + variables = {} + lines, seen = [], set() + with open(path, encoding="utf-8", errors="replace") as fh: + content = fh.readlines() + for line in content: + m = re.match(r"\s*set\s+(\$\S+)\s+(.+)$", line) + if m: + variables[m.group(1)] = m.group(2).strip() + def resolve(text): + # $var les plus longs d'abord ($filemanager avant $file…). + for var in sorted(variables, key=len, reverse=True): + text = text.replace(var, variables[var]) + return text + for line in content: + m = re.match(r"\s*bindsym\s+(?:--\S+\s+)*(\S+)\s+(.+)$", line) + if not m: + continue + combo_raw, action = m.groups() + combo_raw = resolve(combo_raw).replace("Mod4", "Super").replace("Mod1", "Alt") + combo = " + ".join(_label(k) for k in combo_raw.split("+")) + if combo in seen: + continue + seen.add(combo) + action = resolve(action) + action = re.sub(r"^exec\s+(--no-startup-id\s+)?", "", action).strip().strip('"') + lines.append(f"{combo:<24} {action}") + return lines + + +def show(lines): + if not lines: + lines = ["(aucun raccourci trouvé)"] + text = "\n".join(lines) + if os.environ.get("HYPRLAND_INSTANCE_SIGNATURE"): + cmd = ["wofi", "--dmenu", "--prompt", "Raccourcis clavier — taper pour filtrer", + "--width", "820", "--height", "600", "--insensitive", + "--cache-file", "/dev/null"] + if os.path.exists(_WOFI_STYLE): + cmd += ["--style", _WOFI_STYLE] + else: + # X11/i3 : rofi en dmenu, style assorti (mono pour l'alignement). + cmd = ["rofi", "-dmenu", "-i", "-p", "Raccourcis clavier", + "-no-custom", + "-theme-str", 'window { width: 880px; } listview { lines: 18; }', + "-theme-str", '* { font: "Noto Sans Mono 11"; }'] + subprocess.run(cmd, input=text, text=True, check=False) + + +def main(): + try: + if os.environ.get("HYPRLAND_INSTANCE_SIGNATURE"): + lines = hyprland_lines() + else: + lines = i3_lines() + except Exception as exc: # noqa: BLE001 — best effort, jamais de crash muet + subprocess.run(["notify-send", "Raccourcis FWS", f"Erreur : {exc}"], + check=False) + return 1 + show(lines) + return 0 + + +if __name__ == "__main__": + sys.exit(main()) diff --git a/system/usr/local/bin/fws-powermenu b/system/usr/local/bin/fws-powermenu new file mode 100755 index 0000000..4002796 --- /dev/null +++ b/system/usr/local/bin/fws-powermenu @@ -0,0 +1,59 @@ +#!/usr/bin/env python3 +# FWS — menu d'alimentation (verrouiller / déconnexion / suspendre / +# redémarrer / éteindre). Bouton de la barre ou Super+X. Universel : +# • Hyprland (Wayland) → wofi, verrouillage hyprlock, sortie hyprctl. +# • i3 (X11) → rofi, verrouillage i3lock, sortie i3-msg exit. +# Aucune dépendance hors python3 + wofi/rofi (déjà là avec le bureau). + +import os +import subprocess +import sys + +_WOFI_STYLE = "/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. +if _HYPR: + _lock = "hyprlock" + _logout = "hyprctl dispatch exit" +else: + _lock = "i3lock -c 1e1e2e" + _logout = "i3-msg exit" + +_ITEMS = [ + ("󰌾 Verrouiller", _lock), + ("󰗽 Déconnexion", _logout), + ("󰤄 Suspendre", "systemctl suspend"), + ("󰜉 Redémarrer", "systemctl reboot"), + ("󰐥 Éteindre", "systemctl poweroff"), +] + + +def _menu(entries): + text = "\n".join(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] + else: + cmd = ["rofi", "-dmenu", "-i", "-p", "Alimentation", "-no-custom", + "-theme-str", "window { width: 300px; } listview { lines: 5; }"] + out = subprocess.run(cmd, input=text, text=True, + capture_output=True, check=False) + return out.stdout.strip() + + +def main(): + choice = _menu([label for label, _ in _ITEMS]) + if not choice: + return 0 + for label, command in _ITEMS: + if label == choice: + subprocess.Popen(["sh", "-c", command]) # noqa: S603,S607 + break + return 0 + + +if __name__ == "__main__": + sys.exit(main()) diff --git a/system/usr/local/bin/fws-proton-ge b/system/usr/local/bin/fws-proton-ge new file mode 100755 index 0000000..8aa035a --- /dev/null +++ b/system/usr/local/bin/fws-proton-ge @@ -0,0 +1,46 @@ +#!/bin/bash +# FWS — installe/actualise Proton-GE (GloriousEggroll) pour Steam : +# meilleure compatibilité des jeux Windows que le Proton officiel. +# S'exécute en UTILISATEUR (installe dans ~/.steam/root/compatibilitytools.d). +set -u +say() { printf '\n\033[1;34m==> %s\033[0m\n' "$*"; } +fail() { printf '\033[1;31m ✗ %s\033[0m\n' "$*"; read -rp "Entrée pour fermer. " _; exit 1; } + +[ "$(id -u)" -eq 0 ] && fail "à lancer en utilisateur normal (pas root) : l'outil s'installe dans ton Steam." + +API="https://api.github.com/repos/GloriousEggroll/proton-ge-custom/releases/latest" +DEST="$HOME/.steam/root/compatibilitytools.d" + +say "Recherche de la dernière version de Proton-GE…" +JSON="$(curl -fsSL "$API")" || fail "GitHub inaccessible (réseau ?)" +URL="$(printf '%s' "$JSON" | grep -o '"browser_download_url": *"[^"]*\.tar\.gz"' | cut -d'"' -f4 | head -1)" +SUM_URL="$(printf '%s' "$JSON" | grep -o '"browser_download_url": *"[^"]*\.sha512sum"' | cut -d'"' -f4 | head -1)" +[ -n "$URL" ] || fail "archive introuvable dans la release GitHub" +NAME="$(basename "$URL" .tar.gz)" + +if [ -d "$DEST/$NAME" ]; then + say "$NAME est déjà installé ✔" + read -rp "Entrée pour fermer. " _; exit 0 +fi + +TMP="$(mktemp -d)" +trap 'rm -rf "$TMP"' EXIT +say "Téléchargement de $NAME (~450 Mo)…" +curl -fL --progress-bar -o "$TMP/$NAME.tar.gz" "$URL" || fail "téléchargement échoué" + +if [ -n "$SUM_URL" ]; then + say "Vérification de l'intégrité (sha512)…" + curl -fsSL -o "$TMP/sum" "$SUM_URL" \ + && (cd "$TMP" && sed "s|[^ ]*\.tar\.gz|$NAME.tar.gz|" sum | sha512sum -c -) \ + || fail "somme de contrôle invalide — archive corrompue ?" +fi + +say "Installation dans $DEST…" +mkdir -p "$DEST" +tar -xzf "$TMP/$NAME.tar.gz" -C "$DEST" || fail "extraction échouée" + +say "$NAME installé ✔" +echo " Dans Steam : Paramètres → Compatibilité → activer, puis choisir" +echo " « $NAME » (ou par jeu : Propriétés → Compatibilité)." +echo " Redémarre Steam pour qu'il apparaisse." +read -rp "Entrée pour fermer. " _ diff --git a/system/usr/local/bin/fws-recovery b/system/usr/local/bin/fws-recovery new file mode 100755 index 0000000..cecbb62 --- /dev/null +++ b/system/usr/local/bin/fws-recovery @@ -0,0 +1,220 @@ +#!/bin/bash +# ============================================================================ +# FWS — moteur de réparation d'une installation existante depuis le live +# (« point de restauration à la Windows »). +# +# L'interface GRAPHIQUE est fws-recovery-gui (GTK3 python — le live embarque +# python-gobject/gtk3 via Anaconda) ; elle pilote CE script en sous-commandes. +# Sans argument : assistant CONSOLE (repli sans X, ou usage à la main). +# +# Sous-commandes (pour la GUI / scripts) : +# scan → une ligne « périphérique|nom » par install FWS +# repair → monte, répare, démonte ; sortie en continu +# action ∈ grub|initramfs|pacman|pacman-update|all +# shell → terminal DANS le système (xterm si DISPLAY) +# +# arch-chroot (arch-install-scripts, présent sur le live) gère les binds. +# +# Fonctionne depuis le LIVE (autre disque) ET depuis le SYSTÈME INSTALLÉ +# lui-même (menu d'applications / entrée GRUB « Réparer FWS ») : si la cible +# est la racine en cours d'exécution, on opère directement, sans mount/chroot. +# ============================================================================ +set -u +MNT=/mnt/fws-recovery +ROOTDEV="" +DO_UPDATE="" +SELF="" # cible = système courant +ROOTSRC="$(findmnt -no SOURCE / 2>/dev/null)" # sur le live : overlay → jamais un lsblk + +say() { printf '\n==> %s\n' "$*"; } +warn() { printf ' ⚠ %s\n' "$*"; } + +[ "$(id -u)" -eq 0 ] || { echo "root requis"; exit 1; } + +cleanup() { [ -n "$MNT" ] && [ "$MNT" != "/" ] && umount -R "$MNT" 2>/dev/null; } + +# Exécute DANS la cible : chroot si elle est montée, directement si c'est nous. +in_target() { + if [ -n "$SELF" ]; then "$@"; else arch-chroot "$MNT" "$@"; fi +} + +# ── Moteur ─────────────────────────────────────────────────────────────────── + +scan_installs() { + vgscan --mknodes >/dev/null 2>&1 + vgchange -ay >/dev/null 2>&1 + udevadm settle --timeout=10 >/dev/null 2>&1 + # Le système en cours d'exécution d'abord (app lancée depuis l'OS installé). + if [ ! -d /run/archiso ] && grep -qiE '^(ID|NAME)=.*fws' /etc/os-release 2>/dev/null; then + printf '%s|%s (ce système)\n' "$ROOTSRC" \ + "$(. /etc/os-release 2>/dev/null; echo "${PRETTY_NAME:-FWS}")" + fi + mkdir -p "$MNT" + local dev name + while read -r dev; do + [ -b "$dev" ] || continue + [ "$dev" = "$ROOTSRC" ] && continue # déjà listé ci-dessus + mount -o ro "$dev" "$MNT" 2>/dev/null || continue + if [ -f "$MNT/etc/os-release" ] && [ -d "$MNT/boot" ] \ + && grep -qiE '^(ID|NAME)=.*fws' "$MNT/etc/os-release" 2>/dev/null; then + name="$(. "$MNT/etc/os-release" 2>/dev/null; echo "${PRETTY_NAME:-FWS}")" + printf '%s|%s\n' "$dev" "$name" + fi + umount "$MNT" 2>/dev/null + done < <(lsblk -rpno NAME,TYPE | awk '$2=="part"||$2=="lvm"{print $1}') +} + +# Monte la cible + /boot + ESP d'après son fstab. +# Cas particulier : la cible EST la racine en cours d'exécution (app lancée +# depuis l'OS installé, ou entrée GRUB « Réparer FWS ») → tout est déjà là, +# on opère en place (MNT="" : les chemins "$MNT/…" pointent sur la vraie racine). +mount_target() { + ROOTDEV="$1" + if [ "$ROOTDEV" = "$ROOTSRC" ] && [ ! -d /run/archiso ]; then + SELF=1; MNT="" + echo " cible = système en cours d'exécution (pas de montage)" + return 0 + fi + mkdir -p "$MNT" + mount "$ROOTDEV" "$MNT" || return 1 + local mp src + for mp in /boot /boot/efi; do + src="$(awk -v mp="$mp" '$2==mp && $1!~/^#/{print $1; exit}' "$MNT/etc/fstab" 2>/dev/null)" + [ -n "$src" ] || continue + mount "$(findfs "$src" 2>/dev/null || echo "$src")" "$MNT$mp" 2>/dev/null \ + && echo " $mp monté" || warn "$mp non monté (on continue)" + done + return 0 +} + +fix_grub() { + say "Réinstallation de GRUB…" + if [ -d /sys/firmware/efi ]; then + in_target grub-install --target=x86_64-efi \ + --efi-directory=/boot/efi --bootloader-id=FWS --recheck || true + in_target grub-install --target=x86_64-efi \ + --efi-directory=/boot/efi --bootloader-id=FWS --removable --recheck + else + local disk + disk="$(lsblk -spno NAME,TYPE "$ROOTDEV" 2>/dev/null \ + | awk '$2=="disk"{print $1; exit}' | grep -oE '/dev/[a-z0-9]+')" + [ -n "$disk" ] || { warn "disque BIOS introuvable"; return 1; } + in_target grub-install --target=i386-pc --recheck "$disk" + fi + in_target grub-mkconfig -o /boot/grub/grub.cfg +} + +fix_initramfs() { + say "Régénération de l'initramfs (mkinitcpio -P)…" + echo " NB : les avertissements « Possibly missing firmware for module … » sont" + echo " NORMAUX sur Arch : firmware de matériel exotique (cartes SCSI/fibre…)" + echo " non fourni par linux-firmware. Sans effet, sauf si tu AS ce matériel." + in_target mkinitcpio -P +} + +fix_pacman() { + say "Réparation de pacman…" + rm -f "$MNT/var/lib/pacman/db.lck" && echo " verrou db.lck retiré (s'il existait)" + in_target pacman-key --init + in_target pacman-key --populate archlinux + if [ -n "$DO_UPDATE" ]; then + say "Mise à jour complète (pacman -Syu)…" + [ -z "$SELF" ] && cp -f /etc/resolv.conf "$MNT/etc/resolv.conf" 2>/dev/null + in_target pacman -Syu --noconfirm + fi +} + +fix_all() { fix_initramfs && fix_grub; } + +# ── Sous-commandes (pilotées par fws-recovery-gui) ─────────────────────────── +case "${1:-}" in + scan) + scan_installs + exit 0 ;; + repair) + action="${2:?action manquante}"; dev="${3:?périphérique manquant}" + trap cleanup EXIT + say "Montage de $dev…" + mount_target "$dev" || { warn "montage impossible"; exit 1; } + rc=0 + case "$action" in + grub) fix_grub || rc=$? ;; + initramfs) fix_initramfs || rc=$? ;; + pacman) fix_pacman || rc=$? ;; + pacman-update) DO_UPDATE=1; fix_pacman || rc=$? ;; + all) fix_all || rc=$? ;; + *) warn "action inconnue : $action"; rc=2 ;; + esac + cleanup; trap - EXIT + [ "$rc" -eq 0 ] && say "Terminé ✔" || say "Échec (code $rc)" + exit "$rc" ;; + shell) + dev="${2:?périphérique manquant}" + trap cleanup EXIT + mount_target "$dev" || { warn "montage impossible"; exit 1; } + if [ -z "$SELF" ] && [ -n "${DISPLAY:-}" ] && command -v xterm >/dev/null 2>&1; then + xterm -title "FWS — terminal dans le système (chroot)" \ + -e arch-chroot "$MNT" /bin/bash + else + in_target /bin/bash + fi + cleanup; trap - EXIT + exit 0 ;; + ""|tui) : ;; # assistant console ci-dessous + *) echo "usage : fws-recovery [scan|repair |shell ]"; exit 2 ;; +esac + +# ── Assistant CONSOLE (repli sans X / usage manuel) ────────────────────────── +trap cleanup EXIT +say "Recherche des installations FWS…" +mapfile -t CANDIDATES < <(scan_installs) + +if [ "${#CANDIDATES[@]}" -eq 0 ]; then + warn "Aucune installation FWS trouvée. Disques visibles :" + lsblk -o NAME,SIZE,TYPE,FSTYPE,MOUNTPOINTS + read -rp "Entrée pour ouvrir un shell (exit pour redémarrer). " _ + bash; exit 0 +fi + +echo; i=1 +for c in "${CANDIDATES[@]}"; do echo " $i) ${c%%|*} — ${c##*|}"; i=$((i+1)); done +read -rp "Installation à réparer [1] : " pick; pick="${pick:-1}" +dev="${CANDIDATES[$((pick-1))]%%|*}" +[ -n "$dev" ] || exit 1 +say "Montage de $dev…" +mount_target "$dev" || { warn "montage impossible"; exit 1; } + +while :; do + cat <<'MENU' + + ╔════════════════════════════════════════════════════════╗ + ║ FWS — Réparation du système ║ + ╠════════════════════════════════════════════════════════╣ + ║ 1) Réinstaller GRUB (le système ne démarre plus) ║ + ║ 2) Régénérer l'initramfs (mkinitcpio -P) ║ + ║ 3) Réparer pacman (verrou, clés, mise à jour) ║ + ║ 4) Tout réparer (initramfs + GRUB) ║ + ║ 5) Ouvrir un shell DANS le système (chroot) ║ + ║ q) Quitter et redémarrer ║ + ╚════════════════════════════════════════════════════════╝ +MENU + read -rp " Choix : " choice + case "$choice" in + 1) fix_grub ;; + 2) fix_initramfs ;; + 3) DO_UPDATE="" + read -rp " Mise à jour complète aussi (réseau) ? [o/N] " _u + case "$_u" in o|O|oui) DO_UPDATE=1 ;; esac + fix_pacman ;; + 4) fix_all ;; + 5) say "Shell chroot — « exit » pour revenir au menu." + in_target /bin/bash ;; + q|Q) break ;; + *) warn "choix inconnu" ;; + esac +done + +cleanup; trap - EXIT +say "Réparation terminée." +read -rp "Redémarrer maintenant ? [O/n] " _r +case "$_r" in n|N) bash ;; *) systemctl reboot ;; esac diff --git a/system/usr/local/bin/fws-recovery-gui b/system/usr/local/bin/fws-recovery-gui new file mode 100755 index 0000000..cd46998 --- /dev/null +++ b/system/usr/local/bin/fws-recovery-gui @@ -0,0 +1,269 @@ +#!/usr/bin/env python3 +# FWS — application GRAPHIQUE de réparation du système (mode « Réparer FWS » +# du live). GTK3 : le live embarque python-gobject/gtk3 via Anaconda. +# +# Pilote le MOTEUR fws-recovery en sous-commandes : +# fws-recovery scan → détecte les installations FWS +# fws-recovery repair → répare (sortie streamée ici) +# fws-recovery shell → terminal chroot (xterm) +# +# Deux contextes de lancement : +# • mode « Réparer FWS » (live OU entrée GRUB de l'OS installé) : session +# root via fws-recovery-session → le moteur est appelé directement ; +# • menu d'applications de l'OS installé : lancée en UTILISATEUR → chaque +# appel du moteur passe par pkexec (politique org.fws.recovery, +# auth_admin_keep : un seul mot de passe pour toute la session). + +import os +import shutil +import subprocess +import sys + +import gi + +gi.require_version("Gtk", "3.0") +from gi.repository import GLib, Gtk, Pango # noqa: E402 + +GLib.set_prgname("fws-recovery-gui") + +_ENGINE = "/usr/local/bin/fws-recovery" + + +def _engine_cmd(args): + """Commande moteur, élevée via pkexec si on n'est pas root.""" + cmd = [_ENGINE] + args + if os.geteuid() != 0: + cmd = ["pkexec"] + cmd + return cmd + +_ACTIONS = [ + ("grub", "Réinstaller GRUB", + "le système ne démarre plus / « Operating System not found »"), + ("initramfs", "Régénérer l'initramfs", + "kernel panic au démarrage, module manquant (mkinitcpio -P)"), + ("pacman", "Réparer pacman", + "verrou bloqué, clés de signature cassées"), + ("pacman-update", "Réparer pacman + mise à jour complète", + "idem, puis pacman -Syu (réseau requis)"), + ("all", "Tout réparer", + "initramfs puis GRUB — le réflexe « ça ne boote plus »"), +] + + +class RecoveryWindow(Gtk.Window): + def __init__(self): + super().__init__(title="FWS — Réparation du système") + self.set_icon_name("fws-recovery") + self.set_default_size(720, 560) + self.set_position(Gtk.WindowPosition.CENTER) + self.set_border_width(18) + self.connect("destroy", Gtk.main_quit) + + self._proc = None + self._installs = [] # [(dev, nom), …] + self._action_buttons = [] + + root = Gtk.Box(orientation=Gtk.Orientation.VERTICAL, spacing=10) + self.add(root) + + title = Gtk.Label() + title.set_markup("Réparation du système FWS") + root.pack_start(title, False, False, 0) + + self._status = Gtk.Label(label="Recherche des installations FWS sur les disques…") + self._status.set_xalign(0) + root.pack_start(self._status, False, False, 0) + + # Sélecteur d'installation (rempli après le scan). + picker_row = Gtk.Box(orientation=Gtk.Orientation.HORIZONTAL, spacing=8) + picker_row.pack_start(Gtk.Label(label="Système à réparer :"), False, False, 0) + self._picker = Gtk.ComboBoxText() + picker_row.pack_start(self._picker, True, True, 0) + root.pack_start(picker_row, False, False, 0) + + # Boutons d'action (style fws-hello : titre + description). + for key, label, desc in _ACTIONS: + button = Gtk.Button() + inner = Gtk.Box(orientation=Gtk.Orientation.VERTICAL, spacing=2) + lab = Gtk.Label() + lab.set_markup(f"{label}") + lab.set_xalign(0) + sub = Gtk.Label(label=desc) + sub.set_xalign(0) + sub.get_style_context().add_class("dim-label") + inner.pack_start(lab, False, False, 0) + inner.pack_start(sub, False, False, 0) + button.add(inner) + button.connect("clicked", self._on_action, key) + root.pack_start(button, False, False, 0) + self._action_buttons.append(button) + + shell_btn = Gtk.Button(label="Ouvrir un terminal dans le système (chroot)") + shell_btn.connect("clicked", self._on_shell) + root.pack_start(shell_btn, False, False, 0) + self._action_buttons.append(shell_btn) + + # Journal (sortie du moteur, en continu). + frame = Gtk.Frame(label="Journal") + scroll = Gtk.ScrolledWindow() + scroll.set_min_content_height(150) + self._log = Gtk.TextView() + self._log.set_editable(False) + self._log.set_cursor_visible(False) + self._log.set_monospace(True) + self._log.modify_font(Pango.FontDescription("Monospace 9")) + scroll.add(self._log) + frame.add(scroll) + root.pack_start(frame, True, True, 0) + + # Pied : redémarrer / éteindre. + footer = Gtk.Box(orientation=Gtk.Orientation.HORIZONTAL, spacing=8) + reboot = Gtk.Button(label="Redémarrer") + reboot.connect("clicked", lambda _b: self._power("reboot")) + poweroff = Gtk.Button(label="Éteindre") + poweroff.connect("clicked", lambda _b: self._power("poweroff")) + footer.pack_end(reboot, False, False, 0) + footer.pack_end(poweroff, False, False, 0) + root.pack_start(footer, False, False, 0) + + self._set_busy(True) + GLib.idle_add(self._start_scan) + + # ── Utilitaires ───────────────────────────────────────────────────────── + def _append(self, text): + # Rebranding d'affichage : les outils sous-jacents parlent + # d'« Arch Linux » — pas le journal FWS. (Les identifiants techniques + # comme archlinux-keyring restent tels quels : ce sont de vrais noms + # de fichiers/paquets, les masquer fausserait le diagnostic.) + text = text.replace("Arch Linux", "FWS").replace("Fedora", "FWS") + buf = self._log.get_buffer() + buf.insert(buf.get_end_iter(), text) + mark = buf.create_mark(None, buf.get_end_iter(), False) + self._log.scroll_mark_onscreen(mark) + buf.delete_mark(mark) + + def _set_busy(self, busy): + for b in self._action_buttons: + b.set_sensitive(not busy and bool(self._installs)) + # Sensible même avec UNE seule install : un combo grisé donne + # l'impression que TOUTE l'app est désactivée (retour utilisateur). + self._picker.set_sensitive(not busy and bool(self._installs)) + + def _selected_dev(self): + idx = self._picker.get_active() + if 0 <= idx < len(self._installs): + return self._installs[idx][0] + return None + + def _power(self, what): + subprocess.run(["systemctl", what], check=False) + + # ── Scan des installations ────────────────────────────────────────────── + def _start_scan(self): + self._run_engine(["scan"], self._scan_done, quiet=True) + return False + + def _scan_done(self, rc, output): + self._installs = [] + for line in output.splitlines(): + if "|" in line: + dev, _, name = line.partition("|") + self._installs.append((dev.strip(), name.strip())) + self._picker.append_text(f"{name.strip()} — {dev.strip()}") + if self._installs: + self._picker.set_active(0) + n = len(self._installs) + self._status.set_markup( + f"{n} installation{'s' if n > 1 else ''} FWS détectée{'s' if n > 1 else ''}." + " Choisis une réparation :") + elif rc in (126, 127): + # pkexec : authentification annulée ou refusée. + self._status.set_markup( + "Authentification annulée. Ferme puis relance" + " l'application pour réessayer.") + else: + self._status.set_markup( + "Aucune installation FWS détectée. Vérifie les disques" + " (terminal ci-dessous) ou redémarre.") + self._append("Aucune installation FWS trouvée.\n\n" + + subprocess.run(["lsblk", "-o", "NAME,SIZE,TYPE,FSTYPE"], + capture_output=True, text=True, + check=False).stdout) + self._set_busy(False) + # Le terminal reste utile même sans installation détectée (diagnostic). + self._action_buttons[-1].set_sensitive(True) + + # ── Exécution du moteur avec sortie en continu ────────────────────────── + def _run_engine(self, args, done_cb, quiet=False): + self._set_busy(True) + self._proc = subprocess.Popen( + _engine_cmd(args), stdout=subprocess.PIPE, + stderr=subprocess.STDOUT, text=True, bufsize=1) + chunks = [] + + def on_io(source, _cond): + line = source.readline() + if line: + chunks.append(line) + if not quiet: + self._append(line) + return True + rc = self._proc.wait() + done_cb(rc, "".join(chunks)) + return False + + GLib.io_add_watch(self._proc.stdout, + GLib.IO_IN | GLib.IO_HUP, on_io) + + def _on_action(self, _button, key): + dev = self._selected_dev() + if not dev: + return + label = next(lab for k, lab, _d in _ACTIONS if k == key) + self._status.set_markup(f"{label} sur {dev} — en cours…") + self._append(f"\n───── {label} ({dev}) ─────\n") + self._run_engine(["repair", key, dev], self._action_done) + + def _action_done(self, rc, _output): + if rc == 0: + self._status.set_markup("Terminé ✔ — autre réparation, ou redémarre.") + elif rc in (126, 127): + self._status.set_markup( + "Authentification annulée — rien n'a été modifié.") + else: + self._status.set_markup( + f"Échec (code {rc}) — détail dans le journal ci-dessous.") + self._set_busy(False) + + def _on_shell(self, _button): + dev = self._selected_dev() + if dev and os.geteuid() == 0: + subprocess.Popen([_ENGINE, "shell", dev]) + elif dev: + # pkexec purge DISPLAY → le moteur ouvre le chroot DANS cet xterm + # (lancé en utilisateur, donc visible sur X11 comme Wayland). + subprocess.Popen(["xterm", "-title", + "FWS — terminal dans le système (chroot)", + "-e", "pkexec", _ENGINE, "shell", dev]) + elif shutil.which("xterm"): + subprocess.Popen(["xterm", "-title", "FWS — terminal"]) + + +def main(): + if not Gtk.init_check()[0]: + # Pas d'affichage : le .zprofile retombera sur l'assistant console. + return 1 + if os.geteuid() != 0 and not shutil.which("pkexec"): + dlg = Gtk.MessageDialog(message_type=Gtk.MessageType.ERROR, + buttons=Gtk.ButtonsType.CLOSE, + text="pkexec introuvable : lance fws-recovery-gui en root.") + dlg.run() + return 1 + win = RecoveryWindow() + win.show_all() + Gtk.main() + return 0 + + +if __name__ == "__main__": + sys.exit(main()) diff --git a/system/usr/local/bin/fws-recovery-session b/system/usr/local/bin/fws-recovery-session new file mode 100755 index 0000000..56ec69d --- /dev/null +++ b/system/usr/local/bin/fws-recovery-session @@ -0,0 +1,8 @@ +#!/bin/sh +# FWS — session X du mode réparation. Lancé par startx (cf. /root/.zprofile, +# entrée de boot « Réparer FWS »). Openbox minimal + l'application GTK +# fws-recovery-gui. Si la GUI meurt, openbox reste pour un xterm de secours. +xsetroot -solid "#1a1a2e" 2>/dev/null +openbox & +fws-recovery-gui +exec openbox diff --git a/system/usr/local/bin/fws-setup-hardware b/system/usr/local/bin/fws-setup-hardware new file mode 100755 index 0000000..526f631 --- /dev/null +++ b/system/usr/local/bin/fws-setup-hardware @@ -0,0 +1,84 @@ +#!/bin/bash +# ============================================================================ +# FWS — détection matérielle + drivers + stack « remplacement de Windows ». +# +# Appelé par le %post du kickstart : fws-setup-hardware +# ( = cli|gnome|kde|xfce|hyprland). Réseau requis ; CHAQUE étape est +# NON bloquante (pas de set -e) : un paquet manquant ou pas de réseau ne casse +# pas l'installation. +# +# Installe : +# - les drivers GPU détectés via lspci (Intel / AMD / NVIDIA) + Mesa/Vulkan, +# - les outils invité selon l'hyperviseur (VMware/VirtualBox/QEMU/Hyper-V), +# - le son/micro/casque (PipeWire), le Bluetooth (BlueZ), les conteneurs +# (Podman), +# - et — si un bureau est choisi — la stack « comme Windows » : Steam, Wine, +# VR (Monado/OpenXR → SteamVR pour HTC Vive / Valve Index ; Oculus n'a pas +# de support Linux officiel), winboat-bin (apps Windows). +# ============================================================================ +DESK="${1:-cli}" +log() { echo "[FWS-hw] $*"; } + +# ── 1) Drivers GPU (détection lspci) ───────────────────────────────────────── +DRIVERS="mesa" +GPU="$(lspci 2>/dev/null | grep -iE 'VGA compatible controller|3D controller|Display controller')" +case "$GPU" in + *NVIDIA*|*GeForce*) DRIVERS="$DRIVERS nvidia-dkms nvidia-utils linux-headers dkms" ;; + *AMD*|*ATI*|*Radeon*) DRIVERS="$DRIVERS vulkan-radeon libva-mesa-driver" ;; + *Intel*) DRIVERS="$DRIVERS vulkan-intel intel-media-driver" ;; +esac + +# ── 2) Outils invité selon l'hyperviseur ───────────────────────────────────── +VMSVC="" +case "$(systemd-detect-virt 2>/dev/null)" in + vmware) DRIVERS="$DRIVERS open-vm-tools"; VMSVC="vmtoolsd vmware-vmblock-fuse" ;; + oracle) DRIVERS="$DRIVERS virtualbox-guest-utils"; VMSVC="vboxservice" ;; + qemu|kvm) DRIVERS="$DRIVERS qemu-guest-agent spice-vdagent"; VMSVC="qemu-guest-agent spice-vdagentd" ;; + microsoft) DRIVERS="$DRIVERS hyperv"; VMSVC="hv_fcopy_daemon hv_kvp_daemon hv_vss_daemon" ;; +esac + +# ── 3) Stack de base : son / micro / casque, Bluetooth, luminosité, conteneurs +# brightnessctl : réglage de luminosité sans root (via logind) — consommé par +# les touches XF86MonBrightness* et la molette du module backlight de waybar. +BASE="pipewire pipewire-alsa pipewire-pulse pipewire-jack wireplumber \ + pavucontrol bluez bluez-utils brightnessctl podman" +# Gestionnaire Bluetooth graphique : KDE et GNOME ont le leur ; blueman pour +# les bureaux qui n'en fournissent pas (tray + assistant d'appairage). +case "$DESK" in + hyprland|xfce|i3) BASE="$BASE blueman" ;; +esac + +# ── 4) Stack desktop : jeux, Windows-compat, VR (si un bureau est choisi) ──── +DESKTOP="" +if [ "$DESK" != "cli" ]; then + # multilib requis (Steam / Wine 32 bits). + grep -qE '^\[multilib\]' /etc/pacman.conf \ + || printf '\n[multilib]\nInclude = /etc/pacman.d/mirrorlist\n' >> /etc/pacman.conf + # mangohud : overlay FPS/perfs en jeu (mangohud %command% dans Steam). + DESKTOP="steam wine winetricks wine-mono wine-gecko \ + lib32-mesa lib32-pipewire monado gamemode \ + mangohud lib32-mangohud \ + noto-fonts ttf-liberation" +fi + +# ── Sync + filtre aux paquets RÉELLEMENT existants ─────────────────────────── +# (un nom de paquet manquant/renommé ne doit pas faire échouer tout le reste). +pacman -Sy --noconfirm || log "synchro pacman échouée (réseau ?)" +VALID="" +for p in $DRIVERS $BASE $DESKTOP; do + pacman -Si "$p" >/dev/null 2>&1 && VALID="$VALID $p" +done +if [ -n "$VALID" ]; then + log "installation :$VALID" + pacman -S --noconfirm --needed $VALID || log "certains paquets non installés" +fi + +# NB : winboat-bin (AUR) n'est PAS installé ici (fws-local n'existe pas sur la +# cible) : il est intégré à l'image FWS via packages.x86_64 et recopié par le +# payload LiveOS d'Anaconda → déjà présent sur le système installé. + +# ── Services matériels ─────────────────────────────────────────────────────── +[ -n "$VMSVC" ] && systemctl enable $VMSVC 2>/dev/null +systemctl enable bluetooth.service 2>/dev/null +systemctl enable podman.socket 2>/dev/null +exit 0 diff --git a/system/usr/local/bin/fws-update b/system/usr/local/bin/fws-update new file mode 100755 index 0000000..c8acd4a --- /dev/null +++ b/system/usr/local/bin/fws-update @@ -0,0 +1,33 @@ +#!/bin/bash +# FWS — mise à jour du système en une commande (bouton de la barre, fws-hello, +# ou terminal). pacman -Syu + nettoyage du cache + rapport des orphelins. +set -u +say() { printf '\n\033[1;34m==> %s\033[0m\n' "$*"; } + +if [ "$(id -u)" -ne 0 ]; then + exec sudo "$0" "$@" +fi + +say "Mise à jour du système (pacman -Syu)…" +pacman -Syu || { echo "Échec de la mise à jour (réseau ?)"; read -rp "Entrée pour fermer. " _; exit 1; } + +if command -v paccache >/dev/null 2>&1; then + say "Nettoyage du cache des paquets (2 dernières versions gardées)…" + paccache -rk2 +fi + +ORPHANS="$(pacman -Qtdq 2>/dev/null)" +if [ -n "$ORPHANS" ]; then + say "Paquets orphelins (plus requis par rien) :" + echo "$ORPHANS" + read -rp "Les supprimer ? [o/N] " _rm + case "$_rm" in o|O|oui) echo "$ORPHANS" | pacman -Rns --noconfirm - ;; esac +fi + +if command -v flatpak >/dev/null 2>&1; then + say "Mise à jour des Flatpaks…" + flatpak update -y || true +fi + +say "Système à jour ✔" +read -rp "Entrée pour fermer. " _ diff --git a/system/usr/local/bin/fws-updates-check b/system/usr/local/bin/fws-updates-check new file mode 100755 index 0000000..860430a --- /dev/null +++ b/system/usr/local/bin/fws-updates-check @@ -0,0 +1,8 @@ +#!/bin/sh +# FWS — indicateur « mises à jour disponibles » pour waybar/polybar. +# checkupdates (pacman-contrib) : lit les dépôts SANS toucher la base pacman. +# Sortie vide = rien à faire → le module de la barre se cache. +command -v checkupdates >/dev/null 2>&1 || exit 0 +n="$(checkupdates 2>/dev/null | wc -l)" +[ "$n" -gt 0 ] && printf '󰚰 %s\n' "$n" +exit 0 diff --git a/system/usr/local/bin/fws-vr-setup b/system/usr/local/bin/fws-vr-setup new file mode 100755 index 0000000..34beca4 --- /dev/null +++ b/system/usr/local/bin/fws-vr-setup @@ -0,0 +1,115 @@ +#!/bin/bash +# ============================================================================ +# FWS — installation des drivers/runtimes VR selon le casque. +# +# À lancer depuis un terminal (Super+Shift+V sous i3, ou l'entrée +# « Installation VR (FWS) » du menu d'applications). Réservé aux sessions +# X11 (i3) : SteamVR ne fonctionne PAS sous Wayland/Hyprland. +# +# Réalité du support Linux (résumé honnête) : +# • HTC Vive / Vive Pro / Valve Index (stations lighthouse) → NATIF via +# SteamVR. C'est le chemin le plus fiable. +# • Meta/Oculus Quest 1-3, Pico → PAS de support officiel ; streaming +# Wi-Fi via ALVR (+ SteamVR). ALVR n'est pas dans les dépôts Arch : +# le script installe la base et donne la marche à suivre. +# • Oculus Rift CV1/S (filaire) → pas de support utilisable. +# • Monado : runtime OpenXR libre (déjà proposé par fws-setup-hardware), +# utile pour les applis OpenXR natives sans SteamVR. +# ============================================================================ +set -u +say() { printf '\n\033[1;34m==> %s\033[0m\n' "$*"; } +warn() { printf '\033[1;33m ⚠ %s\033[0m\n' "$*"; } + +if [ "$(id -u)" -ne 0 ]; then + exec sudo "$0" "$@" +fi + +# VM = cul-de-sac VR : pas d'accès direct au GPU ni à l'USB/DisplayPort du +# casque, et Steam (steamwebhelper) est INSTABLE en rendu logiciel (llvmpipe). +# On prévient au lieu de laisser l'utilisateur croire à une panne de FWS. +if systemd-detect-virt --quiet 2>/dev/null; then + warn "Machine VIRTUELLE détectée ($(systemd-detect-virt 2>/dev/null))." + warn "La VR ne fonctionnera PAS ici : casque et GPU inaccessibles depuis une VM." + warn "Steam lui-même peut planter en rendu logiciel (steamwebhelper)." + echo " → Fais cette installation sur la machine RÉELLE avec le casque branché." + read -rp " Continuer quand même (tests uniquement) ? [o/N] " _ok + case "$_ok" in o|O|oui) ;; *) exit 0 ;; esac +fi + +# lib32 Vulkan selon le GPU (indispensable à SteamVR, qui est 32/64 bits). +GPU="$(lspci 2>/dev/null | grep -iE 'VGA compatible controller|3D controller|Display controller')" +LIB32="lib32-mesa" +case "$GPU" in + *NVIDIA*|*GeForce*) LIB32="$LIB32 lib32-nvidia-utils" ;; + *AMD*|*ATI*|*Radeon*) LIB32="$LIB32 lib32-vulkan-radeon" ;; + *Intel*) LIB32="$LIB32 lib32-vulkan-intel" ;; +esac + +install_pkgs() { + # multilib requis pour Steam/lib32. + grep -qE '^\[multilib\]' /etc/pacman.conf \ + || printf '\n[multilib]\nInclude = /etc/pacman.d/mirrorlist\n' >> /etc/pacman.conf + pacman -Sy --noconfirm || { warn "synchro pacman échouée (réseau ?)"; return 1; } + local valid="" p + for p in "$@"; do + pacman -Si "$p" >/dev/null 2>&1 && valid="$valid $p" || warn "paquet inconnu ignoré : $p" + done + # shellcheck disable=SC2086 + pacman -S --noconfirm --needed $valid +} + +steamvr_base() { + say "Installation de la base SteamVR (Steam + Vulkan 32 bits : $LIB32)…" + # ttf-liberation : polices attendues par l'interface Steam (évite des + # rendus cassés/plantages cosmétiques sur install minimale). + # shellcheck disable=SC2086 + install_pkgs steam $LIB32 ttf-liberation || return 1 + say "Base installée. Étapes suivantes :" + echo " 1. Lance Steam, connecte-toi, puis installe « SteamVR » (Bibliothèque → Outils)." + echo " 2. Branche le casque et les stations, puis lance SteamVR." + echo " 3. Premier lancement : SteamVR peut demander à ajuster les règles udev — accepte." + say "Si Steam PLANTE (fenêtre qui se ferme, souvent steamwebhelper) :" + echo " • Vérifie l'espace disque (SteamVR ≈ 5 Go) : df -h ~" + echo " • GPU faible / VM / rendu logiciel — lance :" + echo " steam -cef-disable-gpu -cef-disable-gpu-compositing" + echo " • Pour voir l'erreur exacte : lance « steam » depuis un terminal," + echo " ou regarde ~/.steam/steam/logs/ (console_log.txt, bootstrap_log.txt)." +} + +case "${1:-menu}" in + menu) + cat <<'MENU' + + ╔══════════════════════════════════════════════════════════╗ + ║ FWS — Installation VR (session X11 requise) ║ + ╠══════════════════════════════════════════════════════════╣ + ║ 1) HTC Vive / Vive Pro / Valve Index (natif, SteamVR) ║ + ║ 2) Meta Quest / Pico (streaming ALVR) ║ + ║ 3) Monado (runtime OpenXR libre, sans SteamVR) ║ + ║ q) Quitter ║ + ╚══════════════════════════════════════════════════════════╝ +MENU + read -rp " Choix : " choice + exec "$0" "$choice" + ;; + 1|vive|index) + steamvr_base || exit 1 + ;; + 2|quest|pico) + steamvr_base || exit 1 + say "Streaming Quest/Pico : il faut AUSSI ALVR (pas dans les dépôts Arch) :" + echo " 1. Télécharge le .tar.gz « ALVR Launcher » : https://github.com/alvr-org/ALVR/releases" + echo " 2. Sur le casque, installe le client ALVR (App Lab / SideQuest)." + echo " 3. Lance ALVR sur le PC (même Wi-Fi 5 GHz que le casque) — il pilote SteamVR." + ;; + 3|monado) + say "Installation de Monado (OpenXR) + outils…" + install_pkgs monado || exit 1 + say "Monado installé. Les applis OpenXR le trouvent via /usr/share/openxr/." + ;; + q|Q) exit 0 ;; + *) warn "choix inconnu : ${1}"; exec "$0" menu ;; +esac + +echo +read -rp "Terminé — appuie sur Entrée pour fermer. " _ diff --git a/system/usr/local/bin/livecd-sound b/system/usr/local/bin/livecd-sound new file mode 100755 index 0000000..b92fcf2 --- /dev/null +++ b/system/usr/local/bin/livecd-sound @@ -0,0 +1,239 @@ +#!/usr/bin/env bash +# +# SPDX-License-Identifier: GPL-3.0-or-later + +usage() { + cat <<-_EOF_ + live cd sound helper script. + Usage: livecdsound [OPTION] + OPTIONS + -u, --unmute unmute all sound cards + -p, --pick select a card for speetch output + -h, --help Show this usage message + +_EOF_ +} + +bugout() { + printf "/usr/local/bin/livecdsound: programming error" + stat_fail +} + +echo_card_indices() { + if [[ -f /proc/asound/cards ]]; then + sed -n -e's/^[[:space:]]*\([0-7]\)[[:space:]].*/\1/p' /proc/asound/cards + fi +} + +# The following functions try to set many controls. +# No card has all the controls and so some of the attempts are bound to fail. +# Because of this, the functions can't return useful status values. + +# $1 +# $2 +# $3 +unmute_and_set_level() { + [[ -n "$3" && -n "$2" && -n "$1" ]] || bugout + systemd-cat -t "livecdsound" printf "Setting: %s on card: %s to %s\n" "$2" "$1" "$3" + systemd-cat -t "livecdsound" amixer -c "$1" set "$2" "$3" unmute + return 0 +} + +# $1 +# $2 +mute_and_zero_level() { + [[ -n "$1" && -n "$2" ]] || bugout + systemd-cat -t "livecdsound" printf "Muting control: %s on card: %s\n" "$2" "$1" + systemd-cat -t "livecdsound" amixer -c "$1" set "$2" "0%" mute + return 0 +} + +# $1 +# $2 +# $3 "on" | "off" +switch_control() { + [[ -n "$3" && -n "$1" ]] || bugout + systemd-cat -t "livecdsound" printf "Switching control: %s on card: %s to %s\n" "$2" "$1" "$3" + systemd-cat -t "livecdsound" amixer -c "$1" set "$2" "$3" + return 0 +} + +# $1 +sanify_levels_on_card() { + unmute_and_set_level "$1" "Front" "80%" + unmute_and_set_level "$1" "Master" "80%" + unmute_and_set_level "$1" "Master Mono" "80%" + unmute_and_set_level "$1" "Master Digital" "80%" # E.g., cs4237B + unmute_and_set_level "$1" "Playback" "80%" + unmute_and_set_level "$1" "Headphone" "100%" + unmute_and_set_level "$1" "PCM" "80%" + unmute_and_set_level "$1" "PCM,1" "80%" # E.g., ess1969 + unmute_and_set_level "$1" "DAC" "80%" # E.g., envy24, cs46xx + unmute_and_set_level "$1" "DAC,0" "80%" # E.g., envy24 + unmute_and_set_level "$1" "DAC,1" "80%" # E.g., envy24 + unmute_and_set_level "$1" "Synth" "80%" + unmute_and_set_level "$1" "CD" "80%" + unmute_and_set_level "$1" "PC Speaker" "100%" + + mute_and_zero_level "$1" "Mic" + mute_and_zero_level "$1" "IEC958" # Ubuntu #19648 + + # Intel P4P800-MX + switch_control "$1" "Master Playback Switch" on + switch_control "$1" "Master Surround" on + + # Trident/YMFPCI/emu10k1: + unmute_and_set_level "$1" "Wave" "80%" + unmute_and_set_level "$1" "Music" "80%" + unmute_and_set_level "$1" "AC97" "80%" + + # DRC: + unmute_and_set_level "$1" "Dynamic Range Compression" "80%" + + # Required for HDA Intel (hda-intel): + unmute_and_set_level "$1" "Front" "80%" + + # Required for SB Live 7.1/24-bit (ca0106): + unmute_and_set_level "$1" "Analog Front" "80%" + + # Required at least for Via 823x hardware on DFI K8M800-MLVF Motherboard + switch_control "$1" "IEC958 Capture Monitor" off + + # Required for hardware allowing toggles for AC97 through IEC958, + # valid values are 0, 1, 2, 3. Needs to be set to 0 for PCM1. + unmute_and_set_level "$1" "IEC958 Playback AC97-SPSA" "0" + + # Required for newer Via hardware + unmute_and_set_level "$1" "VIA DXS,0" "80%" + unmute_and_set_level "$1" "VIA DXS,1" "80%" + unmute_and_set_level "$1" "VIA DXS,2" "80%" + unmute_and_set_level "$1" "VIA DXS,3" "80%" + + # Required on some notebooks with ICH4: + switch_control "$1" "Headphone Jack Sense" off + switch_control "$1" "Line Jack Sense" off + + # Some machines need one or more of these to be on; + # others need one or more of these to be off: + + switch_control "$1" "Audigy Analog/Digital Output Jack" on + switch_control "$1" "SB Live Analog/Digital Output Jack" on + + # D1984 -- Thinkpad T61/X61 + switch_control "$1" "Speaker" on + switch_control "$1" "Headphone" on + + # HDA-Intel w/ "Digital" capture mixer (See Ubuntu #193823) + unmute_and_set_level "$1" "Digital" "80%" + + return 0 +} + +# $1 | "all" +sanify_levels() { + local ttsdml_returnstatus=0 + local card + case "$1" in + all) + for card in $(echo_card_indices); do + sanify_levels_on_card "$card" || ttsdml_returnstatus=1 + done + ;; + *) + sanify_levels_on_card "$1" || ttsdml_returnstatus=1 + ;; + esac + return "$ttsdml_returnstatus" +} + +# List all cards that *should* be usable for PCM audio. In my experience, +# the console speaker (handled by the pcsp driver) isn't a suitable playback +# device, so we'll exclude it. +list_non_pcsp_cards() { + for card in $(echo_card_indices); do + local cardfile="/proc/asound/card${card}/id" + if [[ -r "$cardfile" && -f "$cardfile" && "$(cat "$cardfile")" != pcsp ]]; then + echo "$card" + fi + done +} + +# Properly initialize the sound card so that we have audio at boot. +unmute_all_cards() { + sanify_levels all +} + +is_numeric() { + local str="$1" + [[ "$str" =~ ^[0-9]+$ ]] +} + +set_default_card() { + local card="$1" + sed -e "s/%card%/$card/g" /etc/asound.conf +} + +play_on_card() { + local card="$1" file="$2" + aplay -q "-Dplughw:$card,0" "$file" +} + +# If there are multiple usable sound cards, prompt the user to choose one, +# using auditory feedback. +pick_a_card() { + set -f + usable_cards="$(list_non_pcsp_cards)" + num_usable_cards="$(wc -w <<<"$usable_cards")" + + if (( num_usable_cards == 1 )); then + systemd-cat -t "livecdsound" printf "Only one sound card is detected\n" + exit 0 + fi + systemd-cat -t "livecdsound" printf "multiple sound cards detected\n" + for card in "${usable_cards[@]}"; do + if ! is_numeric "$card"; then + continue + fi + play_on_card "$card" /usr/share/livecd-sounds/pick-a-card.wav & + done + wait + sleep 1 + for card in "${usable_cards[@]}"; do + if ! is_numeric "$card"; then + continue + fi + play_on_card "$card" /usr/share/livecd-sounds/beep.wav + if read -r -t 10; then + systemd-cat -t "livecdsound" printf "Selecting %s sound card as default\n" "$card" + set_default_card "$card" + break + fi + done +} + +if (( $# == 0 )); then + echo "error: No argument passed." + exit 1 +fi +while [[ "${1}" != "" ]]; do + case ${1} in + -h|--help) + usage + exit + ;; + -u|--unmute) + systemd-cat -t "livecdsound" printf "Unmuting all cards" + unmute_all_cards + ;; + -p|--pick) + pick_a_card + ;; + *) + echo "error: Unsupported argument" + usage + exit 1 + ;; + esac + shift +done diff --git a/system/usr/local/bin/version b/system/usr/local/bin/version new file mode 100644 index 0000000..347f583 --- /dev/null +++ b/system/usr/local/bin/version @@ -0,0 +1 @@ +1.4.1 diff --git a/system/usr/local/share/fws/anaconda-summary-hub.glade b/system/usr/local/share/fws/anaconda-summary-hub.glade new file mode 100644 index 0000000..db733f0 --- /dev/null +++ b/system/usr/local/share/fws/anaconda-summary-hub.glade @@ -0,0 +1,136 @@ + + + + + + + + False + INSTALLATION SUMMARY + quitButton + continueButton + + + False + vertical + + + False + + + False + + + + + + + + + + + False + False + 0 + + + + + False + 0 + 12 + 6 + + + False + vertical + 6 + + + True + True + never + + + + + + True + True + 1 + + + + + + + True + True + 1 + + + + + True + False + 6 + 6 + 12 + end + + + _Quit + False + True + True + True + True + True + + + False + True + 0 + + + + + _Begin Installation + False + True + False + True + True + True + + + + False + True + end + 1 + + + + + False + True + 2 + + + + + + + INSTALLATION SUMMARY + + + + diff --git a/system/usr/local/share/fws/hyprland.conf.tmpl b/system/usr/local/share/fws/hyprland.conf.tmpl new file mode 100644 index 0000000..2efebdc --- /dev/null +++ b/system/usr/local/share/fws/hyprland.conf.tmpl @@ -0,0 +1,181 @@ +# 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). +# +# Les raccourcis sont déclarés avec « bindd » (bind + description) : la +# description alimente l'écran « Raccourcis clavier » (bouton ⌨ de la barre +# ou SUPER+K → fws-keys, qui lit les binds RÉELS via hyprctl). Ajoute +# tes propres bindd : ils apparaîtront automatiquement dans la liste. +# ⚠ Pas de virgule dans les descriptions (séparateur de champs Hyprland). + +monitor = , preferred, auto, 1 + +input { + kb_layout = __KB_LAYOUT__ + kb_variant = __KB_VARIANT__ + 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…). +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 + +$mod = SUPER + +# --- Applications --------------------------------------------------------- +bindd = $mod, Return, Ouvrir un terminal (kitty), exec, kitty +bindd = $mod SHIFT, Return, Terminal flottant, exec, kitty --class floating-term +bindd = $mod, R, Menu des applications, exec, wofi --show drun +bindd = $mod, E, Gestionnaire de fichiers, exec, dolphin +bindd = $mod, B, Ouvrir Firefox, exec, firefox +bindd = $mod, K, Afficher les raccourcis clavier, exec, fws-keys +bindd = $mod, X, Menu d'alimentation (arrêt/redémarrage…), exec, fws-powermenu + +# --- Fenêtres --------------------------------------------------------------- +bindd = $mod, Q, Fermer la fenêtre, killactive, +bindd = $mod, V, Fenêtre flottante ou ancrée, togglefloating, +bindd = $mod, F, Plein écran, fullscreen, +bindd = $mod, J, Basculer la découpe horizontale/verticale, layoutmsg, togglesplit +bindd = $mod, L, Verrouiller l'écran, exec, hyprlock +bindd = $mod SHIFT, E, Quitter la session (retour à SDDM), exit, +bindd = $mod SHIFT, C, Recharger la configuration Hyprland, exec, hyprctl reload + +# --- Focus (flèches) --------------------------------------------------------- +bindd = $mod, left, Focus à gauche, movefocus, l +bindd = $mod, right, Focus à droite, movefocus, r +bindd = $mod, up, Focus en haut, movefocus, u +bindd = $mod, down, Focus en bas, movefocus, d + +# --- Déplacer la fenêtre (Maj + flèches) --------------------------------------- +bindd = $mod SHIFT, left, Déplacer la fenêtre à gauche, movewindow, l +bindd = $mod SHIFT, right, Déplacer la fenêtre à droite, movewindow, r +bindd = $mod SHIFT, up, Déplacer la fenêtre en haut, movewindow, u +bindd = $mod SHIFT, down, Déplacer la fenêtre en bas, 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, Aller à l'espace 1, workspace, 1 +bindd = $mod, 2, Aller à l'espace 2, workspace, 2 +bindd = $mod, 3, Aller à l'espace 3, workspace, 3 +bindd = $mod, 4, Aller à l'espace 4, workspace, 4 +bindd = $mod, 5, Aller à l'espace 5, workspace, 5 +bindd = $mod, 6, Aller à l'espace 6, workspace, 6 +bindd = $mod, 7, Aller à l'espace 7, workspace, 7 +bindd = $mod, 8, Aller à l'espace 8, workspace, 8 +bindd = $mod, 9, Aller à l'espace 9, workspace, 9 +bindd = $mod, 0, Aller à l'espace 10, workspace, 10 +bindd = $mod SHIFT, 1, Envoyer la fenêtre vers l'espace 1, movetoworkspace, 1 +bindd = $mod SHIFT, 2, Envoyer la fenêtre vers l'espace 2, movetoworkspace, 2 +bindd = $mod SHIFT, 3, Envoyer la fenêtre vers l'espace 3, movetoworkspace, 3 +bindd = $mod SHIFT, 4, Envoyer la fenêtre vers l'espace 4, movetoworkspace, 4 +bindd = $mod SHIFT, 5, Envoyer la fenêtre vers l'espace 5, movetoworkspace, 5 +bindd = $mod SHIFT, 6, Envoyer la fenêtre vers l'espace 6, movetoworkspace, 6 +bindd = $mod SHIFT, 7, Envoyer la fenêtre vers l'espace 7, movetoworkspace, 7 +bindd = $mod SHIFT, 8, Envoyer la fenêtre vers l'espace 8, movetoworkspace, 8 +bindd = $mod SHIFT, 9, Envoyer la fenêtre vers l'espace 9, movetoworkspace, 9 +bindd = $mod SHIFT, 0, Envoyer la fenêtre vers l'espace 10, movetoworkspace, 10 + +# --- Multi-écrans (comme i3 : Super+Ctrl+1/2 = écran gauche/droit) ------------- +bindd = $mod CTRL, 1, Envoyer la fenêtre vers l'écran de gauche, movewindow, mon:l +bindd = $mod CTRL, 2, Envoyer la fenêtre vers l'écran de droite, movewindow, mon:r + +# --- Molette = changer d'espace de travail -------------------------------------- +bindd = $mod, mouse_up, Espace de travail précédent, workspace, e-1 +bindd = $mod, mouse_down, Espace de travail suivant, workspace, e+1 + +# --- Scratchpad (espace spécial) ------------------------------------------------- +bindd = $mod, S, Afficher le scratchpad, togglespecialworkspace, magic +bindd = $mod SHIFT, S, Envoyer la fenêtre au scratchpad, movetoworkspace, special:magic + +# --- Captures d'écran (grim/slurp → presse-papier ou ~/Images) ------------------- +bindd = , Print, Capture plein écran vers le presse-papier, exec, grim - | wl-copy +bindd = $mod, Print, Capture d'une zone vers le presse-papier, exec, grim -g "$(slurp)" - | wl-copy +bindd = $mod SHIFT, Print, Capture d'une zone vers ~/Images, 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-about)$ +windowrule = float on, match:class ^([Ff]ws-bugreport)$ +windowrule = float on, match:title ^(Picture-in-Picture)$ diff --git a/system/usr/local/share/fws/i3-config b/system/usr/local/share/fws/i3-config new file mode 100644 index 0000000..b1c2a44 --- /dev/null +++ b/system/usr/local/share/fws/i3-config @@ -0,0 +1,161 @@ +# FWS — configuration i3 par défaut (session X11, COMPATIBLE VR). +# SteamVR fonctionne en X11 : c'est le bureau à choisir pour un casque VR +# (HTC Vive, Valve Index…). Lance « fws-vr-setup » (Super+Shift+V, ou menu) +# pour installer les drivers/runtimes selon ton casque. +# Le clavier X11 est configuré système via /etc/X11/xorg.conf.d/00-keyboard.conf +# (écrit par l'installateur selon ton choix Anaconda) : rien à régler ici. + +set $mod Mod4 +set $term kitty +set $filemanager dolphin +set $menu rofi -show drun -show-icons +set $browser firefox + +# Couleurs — nuances de bleu (Catppuccin Mocha, comme SDDM/waybar FWS) +set $base #1e1e2e +set $surface0 #313244 +set $text #cdd6f4 +set $blue #89b4fa +set $sapphire #74c7ec +set $red #f38ba8 + +# classe bordure fond texte indicateur child_border +client.focused $blue $blue $base $sapphire $blue +client.focused_inactive $surface0 $surface0 $text $surface0 $surface0 +client.unfocused $surface0 $surface0 $text $surface0 $surface0 +client.urgent $red $red $base $red $red +client.background $base + +font pango:Noto Sans 10 +default_border pixel 2 +gaps inner 4 +gaps outer 4 + +################## +## APPLICATIONS ## +################## +bindsym $mod+Return exec $term +bindsym $mod+Shift+Return exec kitty --class floating-term +bindsym $mod+r exec $menu +bindsym $mod+e exec $filemanager +bindsym $mod+b exec $browser +# VR : installation des drivers/runtimes casque (HTC Vive, Index, Quest…) +bindsym $mod+Shift+v exec kitty -e fws-vr-setup +# Panneau des raccourcis clavier (aussi via le bouton ⌌ de la barre) +bindsym $mod+k exec fws-keys +# Menu d'alimentation (verrouiller/déconnexion/redémarrer/éteindre) +bindsym $mod+x exec fws-powermenu + +############## +## FENETRES ## +############## +bindsym $mod+q kill +bindsym $mod+v floating toggle +bindsym $mod+f fullscreen toggle +bindsym $mod+j split toggle +bindsym $mod+l exec i3lock -c 1e1e2e +# Quitter i3 → retour à SDDM +bindsym $mod+Shift+e exec "i3-nagbar -t warning -m 'Quitter i3 et revenir à SDDM ?' -B 'Oui, quitter' 'i3-msg exit'" +bindsym $mod+Shift+c reload + +# Focus (flèches) +bindsym $mod+Left focus left +bindsym $mod+Right focus right +bindsym $mod+Up focus up +bindsym $mod+Down focus down +# Déplacer la fenêtre +bindsym $mod+Shift+Left move left +bindsym $mod+Shift+Right move right +bindsym $mod+Shift+Up move up +bindsym $mod+Shift+Down move down +# Redimensionner (Ctrl + flèches) +bindsym $mod+Ctrl+Left resize shrink width 30 px +bindsym $mod+Ctrl+Right resize grow width 30 px +bindsym $mod+Ctrl+Up resize shrink height 30 px +bindsym $mod+Ctrl+Down resize grow height 30 px + +################ +## WORKSPACES ## +################ +bindsym $mod+1 workspace number 1 +bindsym $mod+2 workspace number 2 +bindsym $mod+3 workspace number 3 +bindsym $mod+4 workspace number 4 +bindsym $mod+5 workspace number 5 +bindsym $mod+6 workspace number 6 +bindsym $mod+7 workspace number 7 +bindsym $mod+8 workspace number 8 +bindsym $mod+9 workspace number 9 +bindsym $mod+0 workspace number 10 +bindsym $mod+Shift+1 move container to workspace number 1 +bindsym $mod+Shift+2 move container to workspace number 2 +bindsym $mod+Shift+3 move container to workspace number 3 +bindsym $mod+Shift+4 move container to workspace number 4 +bindsym $mod+Shift+5 move container to workspace number 5 +bindsym $mod+Shift+6 move container to workspace number 6 +bindsym $mod+Shift+7 move container to workspace number 7 +bindsym $mod+Shift+8 move container to workspace number 8 +bindsym $mod+Shift+9 move container to workspace number 9 +bindsym $mod+Shift+0 move container to workspace number 10 +# Multi-écrans +bindsym $mod+Ctrl+1 move container to output left +bindsym $mod+Ctrl+2 move container to output right +# Molette = changer de workspace +bindsym $mod+button4 workspace prev +bindsym $mod+button5 workspace next +# Scratchpad +bindsym $mod+s scratchpad show +bindsym $mod+Shift+s move scratchpad + +############## +## CAPTURES ## +############## +bindsym Print exec --no-startup-id "maim | xclip -selection clipboard -t image/png" +bindsym $mod+Print exec --no-startup-id "maim -s | xclip -selection clipboard -t image/png" +bindsym $mod+Shift+Print exec --no-startup-id "mkdir -p ~/Images && maim -s ~/Images/capture_$(date +%Y-%m-%d_%H-%M-%S).png" + +################ +## MULTIMEDIA ## +################ +bindsym XF86AudioRaiseVolume exec --no-startup-id wpctl set-volume -l 1 @DEFAULT_AUDIO_SINK@ 5%+ +bindsym XF86AudioLowerVolume exec --no-startup-id wpctl set-volume @DEFAULT_AUDIO_SINK@ 5%- +bindsym XF86AudioMute exec --no-startup-id wpctl set-mute @DEFAULT_AUDIO_SINK@ toggle +bindsym XF86AudioPlay exec --no-startup-id playerctl play-pause +bindsym XF86AudioNext exec --no-startup-id playerctl next +bindsym XF86AudioPrev exec --no-startup-id playerctl previous +bindsym XF86MonBrightnessUp exec --no-startup-id brightnessctl set +5% +bindsym XF86MonBrightnessDown exec --no-startup-id brightnessctl set 5%- + +##################### +## REGLES FENETRES ## +##################### +for_window [class="floating-term"] floating enable, resize set 900 550 +for_window [class="(?i)fws-hello"] floating enable +for_window [class="(?i)fws-about"] floating enable +for_window [class="(?i)fws-bugreport"] floating enable +for_window [class="(?i)pavucontrol"] floating enable, resize set 700 500 +for_window [class="(?i)blueman-manager"] floating enable +for_window [title="Picture-in-Picture"] floating enable + +########### +## BARRE ## +########### +# Polybar (config ~/.config/polybar/config.ini) : clone visuel de la waybar +# Hyprland FWS — pilules, icônes, horloge+date au centre, bouton Raccourcis. +# exec_always + pkill : la barre survit proprement aux reload ($mod+Shift+c). +exec_always --no-startup-id sh -c 'pkill -x polybar; sleep 0.3; exec polybar -q fws' + +############### +## AUTOSTART ## +############### +# picom : coins arrondis (parité visuelle avec Hyprland) — config FWS légère. +# PAS en machine virtuelle : le compositing sur GPU virtuel (vmwgfx/llvmpipe) +# rate le repaint des fenêtres GTK → contenus noirs/artefacts. Les coins +# arrondis sont sacrifiés en VM ; sur matériel réel picom se lance normalement. +exec --no-startup-id sh -c 'systemd-detect-virt --quiet || exec picom --config ~/.config/picom.conf' +exec --no-startup-id dunst +exec --no-startup-id nm-applet +exec --no-startup-id /usr/lib/polkit-gnome/polkit-gnome-authentication-agent-1 +exec --no-startup-id sh -c '[ -n "$(ls -A /sys/class/bluetooth 2>/dev/null)" ] && exec blueman-applet' +# Fenêtre de bienvenue (1er démarrage seulement — se retire ensuite). +exec --no-startup-id fws-hello --autostart diff --git a/system/usr/local/share/fws/logo.txt b/system/usr/local/share/fws/logo.txt new file mode 100644 index 0000000..bc237b9 --- /dev/null +++ b/system/usr/local/share/fws/logo.txt @@ -0,0 +1,9 @@ +$1████████ $2██$5████$2██ +$1████████ $2█$5██$2██$5██$2█ +$1████████ $2█$5██████$2█ +$1████████ $2██$6█$2██$6█$2██ + +$3████████ $4████████ +$3████████ $4████████ +$3████████ $4████████ +$3████████ $4████████ diff --git a/system/usr/local/share/fws/os-release b/system/usr/local/share/fws/os-release new file mode 100644 index 0000000..1ea326c --- /dev/null +++ b/system/usr/local/share/fws/os-release @@ -0,0 +1,11 @@ +NAME="FWS" +PRETTY_NAME="FWS Linux" +ID=fws +ID_LIKE=arch +BUILD_ID=rolling +VERSION_ID="0.7.0" +ANSI_COLOR="38;2;23;147;209" +HOME_URL="https://gitea.nocode-var.tech/FWS/FWS-ISO" +SUPPORT_URL="https://gitea.nocode-var.tech/FWS/FWS-ISO/issues" +BUG_REPORT_URL="https://fws.laxacube.ch" +LOGO=fws diff --git a/system/usr/local/share/fws/picom.conf b/system/usr/local/share/fws/picom.conf new file mode 100644 index 0000000..6edbb89 --- /dev/null +++ b/system/usr/local/share/fws/picom.conf @@ -0,0 +1,19 @@ +# FWS — picom minimal (session i3) : coins arrondis comme sous Hyprland. +# xrender : fiable partout, y compris en VM (rendu logiciel) ; pas de flou ni +# d'ombres (parité avec la config Hyprland FWS, et léger pour la VR). +backend = "xrender"; +vsync = true; + +corner-radius = 8; +rounded-corners-exclude = [ + "window_type = 'dock'", # polybar gère son propre arrondi + "class_g = 'i3-frame'" +]; + +shadow = false; +fading = true; +fade-in-step = 0.08; +fade-out-step = 0.08; + +# VR / jeux plein écran : ne pas composer par-dessus (latence). +unredir-if-possible = true; diff --git a/system/usr/local/share/fws/polybar-config.ini b/system/usr/local/share/fws/polybar-config.ini new file mode 100644 index 0000000..8babbec --- /dev/null +++ b/system/usr/local/share/fws/polybar-config.ini @@ -0,0 +1,174 @@ +; FWS — polybar (session i3) : clone visuel de la waybar Hyprland. +; Barre flottante arrondie, modules en « pilules » Catppuccin Mocha, +; icônes Nerd Font (ttf-nerd-fonts-symbols). Horloge + date au centre, +; bouton « ⌌ Raccourcis » (fws-keys), volume/réseau/CPU/RAM/tray à droite. + +[colors] +base = #E01e1e2e +surface0 = #313244 +text = #cdd6f4 +subtext = #a6adc8 +blue = #89b4fa +sapphire = #74c7ec +teal = #94e2d5 +mauve = #cba6f7 +maroon = #eba0ac +yellow = #f9e2af +red = #f38ba8 +darkbase = #1e1e2e + +[bar/fws] +monitor = ${env:MONITOR:} +width = 100%:-20 +offset-x = 10 +offset-y = 6 +height = 36 +radius = 14 +background = ${colors.base} +foreground = ${colors.text} +border-size = 1 +border-color = #5989b4fa +padding-left = 1 +padding-right = 1 +module-margin = 1 +line-size = 0 +font-0 = Noto Sans:size=10;2 +font-1 = Symbols Nerd Font:size=12;3 +font-2 = Noto Sans:weight=bold:size=10;2 +modules-left = i3 xwindow +modules-center = date +modules-right = updates keyhelp backlight pulseaudio network cpu memory tray power +enable-ipc = true +wm-restack = i3 + +[module/i3] +type = internal/i3 +pin-workspaces = true +show-urgent = true +strip-wsnumbers = false +format = +label-focused = %name% +label-focused-background = ${colors.blue} +label-focused-foreground = ${colors.darkbase} +label-focused-padding = 2 +label-unfocused = %name% +label-unfocused-background = ${colors.surface0} +label-unfocused-foreground = ${colors.subtext} +label-unfocused-padding = 2 +label-visible = %name% +label-visible-background = ${colors.surface0} +label-visible-padding = 2 +label-urgent = %name% +label-urgent-background = ${colors.red} +label-urgent-foreground = ${colors.darkbase} +label-urgent-padding = 2 + +[module/xwindow] +type = internal/xwindow +label = %title:0:45:…% +label-foreground = ${colors.subtext} +format-padding = 1 + +[module/date] +type = internal/date +interval = 1 +date = %A %d %B %Y +time = %H:%M +label = 󰥔 %time% %date% +label-font = 3 +format-background = ${colors.surface0} +format-padding = 3 + +[module/updates] +type = custom/script +exec = fws-updates-check +interval = 1800 +click-left = kitty -e fws-update +format-background = ${colors.surface0} +format-foreground = ${colors.yellow} +format-padding = 2 + +[module/keyhelp] +type = custom/script +exec = echo "󰌌 Raccourcis" +interval = 3600 +click-left = fws-keys +format-background = ${colors.blue} +format-foreground = ${colors.darkbase} +format-padding = 2 +label-font = 3 + +[module/backlight] +type = internal/backlight +enable-scroll = true +format =