Compare commits
No commits in common. "0da07f94d0ce137eedf0cf1b90ec08cb3de159de" and "7ae6b0950151482682ef6ea0e79e57bededdb972" have entirely different histories.
0da07f94d0
...
7ae6b09501
|
|
@ -1 +0,0 @@
|
||||||
/home/gil/App
|
|
||||||
|
|
@ -1,4 +0,0 @@
|
||||||
profile dual_screen {
|
|
||||||
output "HDMI-A-1" mode 1920x1080@60Hz position 0,0 transform 90 scale 1.0
|
|
||||||
output "DP-3" mode 2560x1440@144Hz position 1080,0 scale 1.0
|
|
||||||
}
|
|
||||||
|
|
@ -1,533 +0,0 @@
|
||||||
# =============================================================================
|
|
||||||
# ~/.config/sway/config — Configuration Sway (Wayland)
|
|
||||||
# =============================================================================
|
|
||||||
# Sway est un gestionnaire de fenêtres en tuiles pour Wayland, compatible
|
|
||||||
# avec la syntaxe de configuration de i3.
|
|
||||||
#
|
|
||||||
# Documentation officielle : https://man.archlinux.org/man/sway.5
|
|
||||||
# Pour recharger la configuration sans redémarrer : Super + Maj + C
|
|
||||||
# Pour quitter Sway : Super + Maj + E
|
|
||||||
# =============================================================================
|
|
||||||
|
|
||||||
|
|
||||||
# =============================================================================
|
|
||||||
# 1. TOUCHE MODIFICATEUR (Super / Meta)
|
|
||||||
# =============================================================================
|
|
||||||
# $mod est la touche principale utilisée pour tous les raccourcis.
|
|
||||||
# Mod4 = touche Super (touche Windows / Commande)
|
|
||||||
# Mod1 = touche Alt (alternative si Super est indisponible)
|
|
||||||
|
|
||||||
set $mod Mod4
|
|
||||||
|
|
||||||
|
|
||||||
# =============================================================================
|
|
||||||
# 2. CLAVIER — DISPOSITION AZERTY FRANÇAISE
|
|
||||||
# =============================================================================
|
|
||||||
# Configurez ici votre clavier. Tous les paramètres sont optionnels.
|
|
||||||
#
|
|
||||||
# Options courantes pour `xkb_options` :
|
|
||||||
# caps:escape → Caps Lock fonctionne comme Échap
|
|
||||||
# caps:ctrl_modifier → Caps Lock fonctionne comme Ctrl
|
|
||||||
# compose:ralt → Alt droit = touche Compose (accents)
|
|
||||||
# grp:alt_shift_toggle → Alt+Maj pour changer de disposition
|
|
||||||
#
|
|
||||||
# Délai et répétition (repeat_delay / repeat_rate) :
|
|
||||||
# repeat_delay : temps en ms avant que la répétition commence (défaut : 600)
|
|
||||||
# repeat_rate : frappes par seconde en répétition (défaut : 25)
|
|
||||||
|
|
||||||
input "type:keyboard" {
|
|
||||||
xkb_layout fr
|
|
||||||
xkb_variant azerty
|
|
||||||
xkb_options caps:escape
|
|
||||||
repeat_delay 300
|
|
||||||
repeat_rate 40
|
|
||||||
}
|
|
||||||
|
|
||||||
# --- Claviers spécifiques (optionnel) ---
|
|
||||||
# Si vous avez plusieurs claviers et voulez des réglages différents,
|
|
||||||
# trouvez l'identifiant avec : swaymsg -t get_inputs
|
|
||||||
# Exemple :
|
|
||||||
# input "1:1:AT_Translated_Set_2_keyboard" {
|
|
||||||
# xkb_layout fr
|
|
||||||
# }
|
|
||||||
|
|
||||||
|
|
||||||
# =============================================================================
|
|
||||||
# 3. SOURIS ET PAVÉ TACTILE
|
|
||||||
# =============================================================================
|
|
||||||
# Trouvez les identifiants de vos périphériques avec : swaymsg -t get_inputs
|
|
||||||
|
|
||||||
input "type:touchpad" {
|
|
||||||
# Activer/désactiver le clic en tapant sur le pavé
|
|
||||||
tap enabled
|
|
||||||
# Désactiver le pavé tactile pendant la frappe
|
|
||||||
dwt enabled
|
|
||||||
# Défilement naturel (comme sur macOS) : disabled | enabled
|
|
||||||
natural_scroll disabled
|
|
||||||
# Accélération du pointeur : valeur entre -1.0 (lent) et 1.0 (rapide)
|
|
||||||
pointer_accel 0.2
|
|
||||||
# Mode d'accélération : adaptive | flat
|
|
||||||
accel_profile adaptive
|
|
||||||
}
|
|
||||||
|
|
||||||
input "type:pointer" {
|
|
||||||
# Désactiver l'accélération pour une souris (utile en jeu)
|
|
||||||
# accel_profile flat
|
|
||||||
pointer_accel 0.0
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
# =============================================================================
|
|
||||||
# 4. MONITEURS / ÉCRANS
|
|
||||||
# =============================================================================
|
|
||||||
# Configurez vos moniteurs ici.
|
|
||||||
# Listez les sorties disponibles avec : swaymsg -t get_outputs
|
|
||||||
#
|
|
||||||
# Syntaxe : output <NOM> <PARAMÈTRE> <VALEUR>
|
|
||||||
#
|
|
||||||
# Résolutions courantes : 1920x1080, 2560x1440, 3840x2160
|
|
||||||
# Fréquences courantes : 60Hz, 75Hz, 144Hz, 165Hz
|
|
||||||
# Position (multi-écran): pos 0 0 (principal), pos 1920 0 (à droite), etc.
|
|
||||||
# Rotation : transform normal | 90 | 180 | 270
|
|
||||||
# Mise à l'échelle HiDPI: scale 1.5 (pour les écrans 4K par exemple)
|
|
||||||
|
|
||||||
# Écran principal (adaptez le nom à votre matériel)
|
|
||||||
output * bg #1e1e2e solid_color
|
|
||||||
|
|
||||||
# Exemples de configurations d'écrans (décommentez et adaptez) :
|
|
||||||
#
|
|
||||||
# output HDMI-A-1 {
|
|
||||||
# resolution 1920x1080
|
|
||||||
# refresh 60
|
|
||||||
# pos 0 0
|
|
||||||
# transform normal
|
|
||||||
# scale 1
|
|
||||||
# }
|
|
||||||
#
|
|
||||||
# output DP-1 {
|
|
||||||
# resolution 2560x1440
|
|
||||||
# refresh 144
|
|
||||||
# pos 1920 0
|
|
||||||
# }
|
|
||||||
#
|
|
||||||
# Désactiver un écran :
|
|
||||||
# output eDP-1 disable
|
|
||||||
|
|
||||||
|
|
||||||
# =============================================================================
|
|
||||||
# 5. POLICE D'AFFICHAGE
|
|
||||||
# =============================================================================
|
|
||||||
# Police utilisée pour les titres de fenêtres et la barre swaybar.
|
|
||||||
# Formats : pango:<Nom> <taille>
|
|
||||||
# Exemples : pango:monospace 10 | pango:Noto Sans 11 | pango:JetBrains Mono 10
|
|
||||||
|
|
||||||
font pango:monospace 10
|
|
||||||
|
|
||||||
|
|
||||||
# =============================================================================
|
|
||||||
# 6. APPARENCE DES FENÊTRES
|
|
||||||
# =============================================================================
|
|
||||||
|
|
||||||
# Épaisseur de la bordure des fenêtres (en pixels). 0 = sans bordure.
|
|
||||||
default_border pixel 2
|
|
||||||
|
|
||||||
# Taille des espaces entre les fenêtres en tuiles (gaps)
|
|
||||||
# inner = espace entre les fenêtres
|
|
||||||
# outer = espace entre les fenêtres et le bord de l'écran
|
|
||||||
gaps inner 6
|
|
||||||
gaps outer 4
|
|
||||||
|
|
||||||
# Masquer les bordures quand une seule fenêtre est visible
|
|
||||||
# none | smart | smart_no_gaps
|
|
||||||
smart_borders smart_no_gaps
|
|
||||||
|
|
||||||
# Couleurs des bordures
|
|
||||||
# Format : client.<état> <bordure> <fond> <texte> <indicateur> <bordure_enfant>
|
|
||||||
#
|
|
||||||
# États :
|
|
||||||
# focused → fenêtre active
|
|
||||||
# unfocused → fenêtre inactive
|
|
||||||
# focused_inactive → fenêtre inactive d'un conteneur actif
|
|
||||||
# urgent → fenêtre avec une alerte
|
|
||||||
|
|
||||||
set $bleu #89b4fa
|
|
||||||
set $surface #313244
|
|
||||||
set $fond #1e1e2e
|
|
||||||
set $texte #cdd6f4
|
|
||||||
set $urgence #f38ba8
|
|
||||||
|
|
||||||
client.focused $bleu $surface $texte $bleu $bleu
|
|
||||||
client.unfocused $fond $fond $texte $fond $fond
|
|
||||||
client.focused_inactive $surface $surface $texte $surface $surface
|
|
||||||
client.urgent $urgence $urgence $texte $urgence $urgence
|
|
||||||
|
|
||||||
|
|
||||||
# =============================================================================
|
|
||||||
# 7. APPLICATIONS PAR DÉFAUT
|
|
||||||
# =============================================================================
|
|
||||||
# Définissez ici vos applications favorites.
|
|
||||||
# Ces variables sont utilisées dans les raccourcis clavier ci-dessous.
|
|
||||||
#
|
|
||||||
# Terminal : foot (léger, natif Wayland) | alacritty | kitty | wezterm
|
|
||||||
# Navigateur : firefox | chromium | brave-browser | librewolf
|
|
||||||
# Explorateur : thunar | nautilus | nemo | dolphin
|
|
||||||
# Éditeur : code | gedit | mousepad | kate
|
|
||||||
# Lanceur : wofi --show drun | rofi -show drun (via XWayland)
|
|
||||||
# Messagerie : telegram-desktop | signal-desktop | discord
|
|
||||||
# Mail : thunderbird | evolution
|
|
||||||
# Musique : spotify | rhythmbox | lollypop
|
|
||||||
|
|
||||||
set $terminal foot
|
|
||||||
set $browser firefox
|
|
||||||
set $displaymgr nwg-displays
|
|
||||||
set $files nemo
|
|
||||||
set $editor idea
|
|
||||||
set $launcher wofi --show drun --allow-markup --insensitive
|
|
||||||
set $screenshot grim -g "$(slurp)" - | wl-copy
|
|
||||||
set $screenclip grim ~/Images/capture-$(date +%Y%m%d-%H%M%S).png
|
|
||||||
|
|
||||||
|
|
||||||
# =============================================================================
|
|
||||||
# 8. RACCOURCIS CLAVIER — APPLICATIONS DIRECTES
|
|
||||||
# =============================================================================
|
|
||||||
# Principe : une touche = une application. Pas de cycling, pas de Alt+Tab.
|
|
||||||
# Chaque raccourci lance l'application ou y retourne si elle est déjà ouverte.
|
|
||||||
#
|
|
||||||
# Syntaxe : bindsym $mod+<touche> exec <commande>
|
|
||||||
#
|
|
||||||
# Sur AZERTY, les touches disponibles facilement avec Super :
|
|
||||||
# Lettres : a z e r t y u i o p q s d f g h j k l m w x c v b n
|
|
||||||
# Chiffres : 1 2 3 4 5 6 7 8 9 0 (pour les espaces de travail)
|
|
||||||
# Autres : Return (Entrée), space (Espace), Tab, F1-F12
|
|
||||||
#
|
|
||||||
# Astuce : utilisez `xev` ou `wev` pour identifier le nom d'une touche
|
|
||||||
|
|
||||||
# --- Lanceur et terminal ---
|
|
||||||
bindsym $mod+Return exec $terminal
|
|
||||||
bindsym $mod+space exec $launcher
|
|
||||||
|
|
||||||
# --- Applications courantes (modifiez selon vos besoins) ---
|
|
||||||
bindsym $mod+b exec $browser
|
|
||||||
bindsym $mod+e exec $files
|
|
||||||
bindsym $mod+c exec $editor
|
|
||||||
bindsym $mod+p exec $displaymgr
|
|
||||||
|
|
||||||
# --- Capture d'écran ---
|
|
||||||
# Super + Impr → capture d'une zone sélectionnée (copie dans le presse-papier)
|
|
||||||
# Super + Maj + Impr → capture de tout l'écran (sauvegarde dans ~/Images)
|
|
||||||
bindsym $mod+Print exec $screenshot
|
|
||||||
bindsym $mod+Shift+Print exec $screenclip
|
|
||||||
|
|
||||||
# --- Applications supplémentaires (décommentez et adaptez) ---
|
|
||||||
# bindsym $mod+m exec thunderbird
|
|
||||||
# bindsym $mod+s exec spotify
|
|
||||||
# bindsym $mod+t exec telegram-desktop
|
|
||||||
# bindsym $mod+n exec $terminal -e nvim
|
|
||||||
# bindsym $mod+p exec pavucontrol
|
|
||||||
|
|
||||||
|
|
||||||
# =============================================================================
|
|
||||||
# 9. RACCOURCIS CLAVIER — GESTION DES FENÊTRES
|
|
||||||
# =============================================================================
|
|
||||||
|
|
||||||
# --- Fermer la fenêtre active ---
|
|
||||||
bindsym $mod+q kill
|
|
||||||
|
|
||||||
# --- Recharger la configuration sans redémarrer ---
|
|
||||||
bindsym $mod+Shift+c reload
|
|
||||||
|
|
||||||
# --- Quitter Sway (déconnexion) ---
|
|
||||||
bindsym $mod+Shift+e exec swaynag \
|
|
||||||
-t warning \
|
|
||||||
-m 'Voulez-vous vraiment quitter Sway ?' \
|
|
||||||
-b 'Oui, quitter' 'swaymsg exit'
|
|
||||||
|
|
||||||
# --- Déplacer le focus entre les fenêtres ---
|
|
||||||
# Avec les flèches directionnelles
|
|
||||||
bindsym $mod+Left focus left
|
|
||||||
bindsym $mod+Down focus down
|
|
||||||
bindsym $mod+Up focus up
|
|
||||||
bindsym $mod+Right focus right
|
|
||||||
|
|
||||||
# Avec les touches hjkl (style Vim) — optionnel
|
|
||||||
bindsym $mod+h focus left
|
|
||||||
bindsym $mod+j focus down
|
|
||||||
bindsym $mod+k focus up
|
|
||||||
bindsym $mod+l focus right
|
|
||||||
|
|
||||||
# --- Déplacer les fenêtres ---
|
|
||||||
bindsym $mod+Shift+Left move left
|
|
||||||
bindsym $mod+Shift+Down move down
|
|
||||||
bindsym $mod+Shift+Up move up
|
|
||||||
bindsym $mod+Shift+Right move right
|
|
||||||
|
|
||||||
# --- Changer le mode de découpe (split) ---
|
|
||||||
# Horizontal : les nouvelles fenêtres s'ouvrent à droite
|
|
||||||
bindsym $mod+Shift+h split h
|
|
||||||
# Vertical : les nouvelles fenêtres s'ouvrent en bas
|
|
||||||
bindsym $mod+Shift+v split v
|
|
||||||
# Alterner automatiquement selon la dimension du conteneur
|
|
||||||
bindsym $mod+Shift+t split toggle
|
|
||||||
|
|
||||||
# --- Changer la disposition du conteneur actif ---
|
|
||||||
# stacking : fenêtres empilées avec onglets en haut
|
|
||||||
# tabbed : fenêtres en onglets
|
|
||||||
# toggle split : alterner horizontal/vertical
|
|
||||||
bindsym $mod+s layout stacking
|
|
||||||
bindsym $mod+w layout tabbed
|
|
||||||
bindsym $mod+z layout toggle split
|
|
||||||
|
|
||||||
# --- Fenêtre en plein écran ---
|
|
||||||
bindsym $mod+f fullscreen toggle
|
|
||||||
|
|
||||||
# --- Mode flottant ---
|
|
||||||
# Basculer la fenêtre active entre tuile et flottante
|
|
||||||
bindsym $mod+Shift+f floating toggle
|
|
||||||
# Garder le focus sur les fenêtres tuiles même quand une flottante est présente
|
|
||||||
focus_follows_mouse no
|
|
||||||
# Passer le focus sur tuiles / flottantes
|
|
||||||
bindsym $mod+Shift+space focus mode_toggle
|
|
||||||
|
|
||||||
# Déplacer une fenêtre flottante avec Super + clic gauche
|
|
||||||
# Redimensionner une fenêtre flottante avec Super + clic droit
|
|
||||||
floating_modifier $mod normal
|
|
||||||
|
|
||||||
|
|
||||||
# =============================================================================
|
|
||||||
# 10. ESPACES DE TRAVAIL (BUREAUX VIRTUELS)
|
|
||||||
# =============================================================================
|
|
||||||
# Les espaces de travail permettent d'organiser vos fenêtres par thème.
|
|
||||||
# Exemple d'organisation :
|
|
||||||
# 1 → Terminal 2 → Navigateur 3 → Éditeur
|
|
||||||
# 4 → Messagerie 5 → Musique 6 → Fichiers
|
|
||||||
|
|
||||||
# Noms des espaces de travail (modifiez selon vos préférences)
|
|
||||||
set $ws1 "1"
|
|
||||||
set $ws2 "2"
|
|
||||||
set $ws3 "3"
|
|
||||||
set $ws4 "4"
|
|
||||||
set $ws5 "5"
|
|
||||||
set $ws6 "6"
|
|
||||||
set $ws7 "7"
|
|
||||||
set $ws8 "8"
|
|
||||||
set $ws9 "9"
|
|
||||||
set $ws10 "10"
|
|
||||||
|
|
||||||
# --- Aller à un espace de travail ---
|
|
||||||
# Note AZERTY : les chiffres sont accessibles directement (pas besoin de Maj)
|
|
||||||
bindsym $mod+ampersand workspace $ws1
|
|
||||||
bindsym $mod+eacute workspace $ws2
|
|
||||||
bindsym $mod+quotedbl workspace $ws3
|
|
||||||
bindsym $mod+apostrophe workspace $ws4
|
|
||||||
bindsym $mod+parenleft workspace $ws5
|
|
||||||
bindsym $mod+minus workspace $ws6
|
|
||||||
bindsym $mod+egrave workspace $ws7
|
|
||||||
bindsym $mod+underscore workspace $ws8
|
|
||||||
bindsym $mod+ccedilla workspace $ws9
|
|
||||||
bindsym $mod+agrave workspace $ws10
|
|
||||||
|
|
||||||
# Variante avec les touches numériques directes (si les touches ci-dessus
|
|
||||||
# ne fonctionnent pas selon votre configuration) :
|
|
||||||
# bindsym $mod+1 workspace $ws1
|
|
||||||
# ...
|
|
||||||
# bindsym $mod+0 workspace $ws10
|
|
||||||
|
|
||||||
# --- Déplacer la fenêtre active vers un espace de travail ---
|
|
||||||
bindsym $mod+Shift+ampersand move container to workspace $ws1
|
|
||||||
bindsym $mod+Shift+eacute move container to workspace $ws2
|
|
||||||
bindsym $mod+Shift+quotedbl move container to workspace $ws3
|
|
||||||
bindsym $mod+Shift+apostrophe move container to workspace $ws4
|
|
||||||
bindsym $mod+Shift+parenleft move container to workspace $ws5
|
|
||||||
bindsym $mod+Shift+minus move container to workspace $ws6
|
|
||||||
bindsym $mod+Shift+egrave move container to workspace $ws7
|
|
||||||
bindsym $mod+Shift+underscore move container to workspace $ws8
|
|
||||||
bindsym $mod+Shift+ccedilla move container to workspace $ws9
|
|
||||||
bindsym $mod+Shift+agrave move container to workspace $ws10
|
|
||||||
|
|
||||||
# --- Navigation entre espaces de travail ---
|
|
||||||
# Aller à l'espace de travail précédent/suivant
|
|
||||||
bindsym $mod+Tab workspace next
|
|
||||||
bindsym $mod+Shift+Tab workspace prev
|
|
||||||
|
|
||||||
# Revenir à l'espace de travail précédemment actif
|
|
||||||
bindsym $mod+BackSpace workspace back_and_forth
|
|
||||||
|
|
||||||
# --- Affecter des applications à des espaces de travail ---
|
|
||||||
# Trouvez le nom de classe avec : swaymsg -t get_tree | grep app_id
|
|
||||||
# Pour les apps XWayland, cherchez "class" au lieu de "app_id"
|
|
||||||
#
|
|
||||||
# assign [app_id="firefox"] $ws2
|
|
||||||
# assign [app_id="org.gnome.Nautilus"] $ws6
|
|
||||||
# assign [class="code-oss"] $ws3
|
|
||||||
# assign [app_id="thunderbird"] $ws4
|
|
||||||
# assign [app_id="spotify"] $ws5
|
|
||||||
|
|
||||||
|
|
||||||
# =============================================================================
|
|
||||||
# 11. MODE REDIMENSIONNEMENT
|
|
||||||
# =============================================================================
|
|
||||||
# Appuyez sur Super+R pour entrer en mode redimensionnement.
|
|
||||||
# Utilisez les flèches pour redimensionner, Échap ou Entrée pour sortir.
|
|
||||||
|
|
||||||
mode "resize" {
|
|
||||||
bindsym Left resize shrink width 40px
|
|
||||||
bindsym Down resize grow height 40px
|
|
||||||
bindsym Up resize shrink height 40px
|
|
||||||
bindsym Right resize grow width 40px
|
|
||||||
|
|
||||||
# Sorties du mode redimensionnement
|
|
||||||
bindsym Return mode "default"
|
|
||||||
bindsym Escape mode "default"
|
|
||||||
bindsym $mod+r mode "default"
|
|
||||||
}
|
|
||||||
|
|
||||||
bindsym $mod+r mode "resize"
|
|
||||||
|
|
||||||
|
|
||||||
# =============================================================================
|
|
||||||
# 12. TOUCHES MULTIMÉDIA ET SYSTÈME
|
|
||||||
# =============================================================================
|
|
||||||
|
|
||||||
# --- Volume (PulseAudio / PipeWire) ---
|
|
||||||
bindsym XF86AudioRaiseVolume exec pactl set-sink-volume @DEFAULT_SINK@ +5%
|
|
||||||
bindsym XF86AudioLowerVolume exec pactl set-sink-volume @DEFAULT_SINK@ -5%
|
|
||||||
bindsym XF86AudioMute exec pactl set-sink-mute @DEFAULT_SINK@ toggle
|
|
||||||
bindsym XF86AudioMicMute exec pactl set-source-mute @DEFAULT_SOURCE@ toggle
|
|
||||||
|
|
||||||
# --- Luminosité (nécessite brightnessctl) ---
|
|
||||||
bindsym XF86MonBrightnessUp exec brightnessctl set +10%
|
|
||||||
bindsym XF86MonBrightnessDown exec brightnessctl set 10%-
|
|
||||||
|
|
||||||
# --- Contrôle multimédia (nécessite playerctl) ---
|
|
||||||
bindsym XF86AudioPlay exec playerctl play-pause
|
|
||||||
bindsym XF86AudioNext exec playerctl next
|
|
||||||
bindsym XF86AudioPrev exec playerctl previous
|
|
||||||
bindsym XF86AudioStop exec playerctl stop
|
|
||||||
|
|
||||||
|
|
||||||
# =============================================================================
|
|
||||||
# 13. VERROUILLAGE ET MISE EN VEILLE
|
|
||||||
# =============================================================================
|
|
||||||
|
|
||||||
# Verrouiller l'écran manuellement
|
|
||||||
bindsym Mod1+l exec swaylock --color 1e1e2e --inside-color 313244 \
|
|
||||||
--ring-color 89b4fa --key-hl-color cdd6f4 --line-color 00000000 \
|
|
||||||
--separator-color 00000000 --fade-in 0.2
|
|
||||||
|
|
||||||
# Mise en veille automatique avec swayidle :
|
|
||||||
# - après 5 min sans activité → verrouillage
|
|
||||||
# - après 10 min → extinction de l'écran
|
|
||||||
# - au retour → rallumage de l'écran
|
|
||||||
exec swayidle -w \
|
|
||||||
timeout 300 'swaylock --color 1e1e2e' \
|
|
||||||
timeout 600 'swaymsg "output * dpms off"' \
|
|
||||||
resume 'swaymsg "output * dpms on"' \
|
|
||||||
before-sleep 'swaylock --color 1e1e2e'
|
|
||||||
|
|
||||||
|
|
||||||
# =============================================================================
|
|
||||||
# 14. RÈGLES DE FENÊTRES (COMPORTEMENTS SPÉCIFIQUES)
|
|
||||||
# =============================================================================
|
|
||||||
# Vous pouvez forcer certaines fenêtres à être flottantes, à s'ouvrir
|
|
||||||
# sur un espace de travail particulier, ou à ne pas avoir de bordure.
|
|
||||||
#
|
|
||||||
# Trouvez app_id avec : swaymsg -t get_tree | grep app_id
|
|
||||||
# Trouvez class avec : swaymsg -t get_tree | grep '"class"'
|
|
||||||
# (class = apps XWayland comme certaines apps Electron)
|
|
||||||
#
|
|
||||||
# Paramètres disponibles :
|
|
||||||
# floating enable/disable
|
|
||||||
# border normal <taille> | pixel <taille> | none
|
|
||||||
# move to workspace <nom>
|
|
||||||
# inhibit_idle focus | visible | open | none
|
|
||||||
|
|
||||||
# Fenêtres flottantes par défaut (boîtes de dialogue, utilitaires)
|
|
||||||
for_window [window_role="dialog"] floating enable
|
|
||||||
for_window [window_role="bubble"] floating enable
|
|
||||||
for_window [window_role="pop-up"] floating enable
|
|
||||||
for_window [window_type="dialog"] floating enable
|
|
||||||
for_window [window_type="menu"] floating enable
|
|
||||||
for_window [app_id="pavucontrol"] floating enable, resize set 700 450
|
|
||||||
for_window [app_id="nm-connection-editor"] floating enable
|
|
||||||
|
|
||||||
# Exemples supplémentaires (décommentez selon vos besoins) :
|
|
||||||
# for_window [app_id="firefox" title="Téléchargements"] floating enable
|
|
||||||
# for_window [app_id="mpv"] floating enable, border none
|
|
||||||
# for_window [class="Steam" title="Friends List"] floating enable
|
|
||||||
|
|
||||||
|
|
||||||
# =============================================================================
|
|
||||||
# 15. BARRE D'ÉTAT
|
|
||||||
# =============================================================================
|
|
||||||
# Deux options :
|
|
||||||
# A) swaybar (intégré, simple, recommandé pour débuter)
|
|
||||||
# B) waybar (externe, très personnalisable — voir ~/.config/waybar/)
|
|
||||||
#
|
|
||||||
# Pour utiliser waybar, commentez le bloc "bar { ... }" ci-dessous
|
|
||||||
# et décommentez la ligne "exec waybar".
|
|
||||||
|
|
||||||
# --- Option A : swaybar intégré ---
|
|
||||||
# bar {
|
|
||||||
# # Position : top | bottom
|
|
||||||
# position top
|
|
||||||
#
|
|
||||||
# # Commande de statut (status_command)
|
|
||||||
# # swaybar-status : basique | i3status : plus d'infos | i3blocks : scripts
|
|
||||||
# status_command while date +'%a %d %b %H:%M:%S'; do sleep 1; done
|
|
||||||
#
|
|
||||||
# colors {
|
|
||||||
# # Fond et texte de la barre
|
|
||||||
# background #1e1e2e
|
|
||||||
# statusline #cdd6f4
|
|
||||||
# separator #45475a
|
|
||||||
#
|
|
||||||
# # Couleurs des espaces de travail
|
|
||||||
# # format : <bordure> <fond> <texte>
|
|
||||||
# focused_workspace #89b4fa #313244 #cdd6f4
|
|
||||||
# active_workspace #313244 #313244 #cdd6f4
|
|
||||||
# inactive_workspace #1e1e2e #1e1e2e #585b70
|
|
||||||
# urgent_workspace #f38ba8 #f38ba8 #1e1e2e
|
|
||||||
# }
|
|
||||||
# }
|
|
||||||
|
|
||||||
# --- Option B : waybar (décommentez pour activer) ---
|
|
||||||
exec_always pkill waybar; waybar
|
|
||||||
|
|
||||||
|
|
||||||
# =============================================================================
|
|
||||||
# 16. DÉMARRAGE AUTOMATIQUE DES APPLICATIONS
|
|
||||||
# =============================================================================
|
|
||||||
# `exec` : lancé une seule fois au démarrage de Sway
|
|
||||||
# `exec_always` : lancé aussi à chaque rechargement de la configuration
|
|
||||||
|
|
||||||
exec dbus-update-activation-environment --systemd WAYLAND_DISPLAY XDG_CURRENT_DESKTOP=sway
|
|
||||||
exec systemctl --user import-environment WAYLAND_DISPLAY XDG_CURRENT_DESKTOP
|
|
||||||
|
|
||||||
# config écrans
|
|
||||||
exec_always pkill kanshi; kanshi
|
|
||||||
# sync cloud boulot
|
|
||||||
exec nextcloud
|
|
||||||
# Notifications
|
|
||||||
exec mako
|
|
||||||
|
|
||||||
# Gestionnaire d'authentification (nécessaire pour certaines apps graphiques)
|
|
||||||
exec /usr/lib/policykit-1-gnome/polkit-gnome-authentication-agent-1
|
|
||||||
exec gnome-keyring-daemon --start --components=secrets,ssh,pkcs11
|
|
||||||
|
|
||||||
# Gestionnaire de réseau (barre système)
|
|
||||||
exec nm-applet --indicator
|
|
||||||
|
|
||||||
# Presse-papier persistant (optionnel — nécessite wl-paste)
|
|
||||||
exec wl-paste --watch cliphist store
|
|
||||||
|
|
||||||
# Démarrer des apps au lancement (décommentez selon vos besoins) :
|
|
||||||
exec firefox
|
|
||||||
exec mattermost-desktop
|
|
||||||
|
|
||||||
|
|
||||||
# =============================================================================
|
|
||||||
# FIN DE LA CONFIGURATION
|
|
||||||
# =============================================================================
|
|
||||||
# Pour tester les changements : Super + Maj + C (recharge la config)
|
|
||||||
# Manuel complet : man 5 sway
|
|
||||||
# Dépôt officiel : https://github.com/swaywm/sway
|
|
||||||
|
|
@ -1,218 +0,0 @@
|
||||||
#!/usr/bin/env bash
|
|
||||||
# =============================================================================
|
|
||||||
# install-sway.sh — Installation de Sway (Wayland) sur Debian 13
|
|
||||||
# =============================================================================
|
|
||||||
# Usage :
|
|
||||||
# chmod +x install-sway.sh
|
|
||||||
# ./install-sway.sh
|
|
||||||
#
|
|
||||||
# Ce script installe :
|
|
||||||
# - sway : gestionnaire de fenêtres en tuiles (Wayland)
|
|
||||||
# - swaybar : barre de statut (inclus avec sway)
|
|
||||||
# - swaybg : fond d'écran Wayland
|
|
||||||
# - swaylock : verrouillage d'écran Wayland
|
|
||||||
# - swayidle : gestion de la mise en veille
|
|
||||||
# - waybar : barre de statut avancée (alternative à swaybar)
|
|
||||||
# - wofi : lanceur d'applications Wayland (remplace rofi/dmenu)
|
|
||||||
# - foot : terminal léger natif Wayland
|
|
||||||
# - mako : notifications Wayland
|
|
||||||
# - wl-clipboard : copier/coller en ligne de commande sous Wayland
|
|
||||||
# - grim + slurp : capture d'écran Wayland
|
|
||||||
# - brightnessctl : contrôle de la luminosité
|
|
||||||
# - playerctl : contrôle multimédia (play/pause/next)
|
|
||||||
# - kanshi : gestion dynamique des moniteurs (optionnel)
|
|
||||||
# - polkit-gnome : agent d'authentification graphique
|
|
||||||
# =============================================================================
|
|
||||||
|
|
||||||
set -euo pipefail
|
|
||||||
|
|
||||||
# --- Couleurs pour l'affichage ---
|
|
||||||
RED='\033[0;31m'
|
|
||||||
GREEN='\033[0;32m'
|
|
||||||
YELLOW='\033[1;33m'
|
|
||||||
BLUE='\033[0;34m'
|
|
||||||
NC='\033[0m' # No Color
|
|
||||||
|
|
||||||
log() { echo -e "${GREEN}[✓]${NC} $*"; }
|
|
||||||
info() { echo -e "${BLUE}[i]${NC} $*"; }
|
|
||||||
warn() { echo -e "${YELLOW}[!]${NC} $*"; }
|
|
||||||
err() { echo -e "${RED}[✗]${NC} $*" >&2; exit 1; }
|
|
||||||
|
|
||||||
# --- Vérification des droits ---
|
|
||||||
if [[ "$EUID" -eq 0 ]]; then
|
|
||||||
err "Ne pas lancer ce script en root. Utilisez un utilisateur normal (sudo sera demandé si nécessaire)."
|
|
||||||
fi
|
|
||||||
|
|
||||||
info "Démarrage de l'installation de Sway sur Debian 13..."
|
|
||||||
echo ""
|
|
||||||
|
|
||||||
# --- Mise à jour des paquets ---
|
|
||||||
info "Mise à jour de la liste des paquets..."
|
|
||||||
sudo apt-get update -qq
|
|
||||||
log "Liste des paquets mise à jour."
|
|
||||||
|
|
||||||
# --- Installation des paquets principaux ---
|
|
||||||
info "Installation de Sway et des outils Wayland..."
|
|
||||||
sudo apt-get install -y \
|
|
||||||
sway \
|
|
||||||
swaybg \
|
|
||||||
swaylock \
|
|
||||||
swayidle \
|
|
||||||
waybar \
|
|
||||||
wofi \
|
|
||||||
foot \
|
|
||||||
mako-notifier \
|
|
||||||
wl-clipboard \
|
|
||||||
grim \
|
|
||||||
slurp \
|
|
||||||
brightnessctl \
|
|
||||||
playerctl \
|
|
||||||
kanshi \
|
|
||||||
policykit-1-gnome \
|
|
||||||
xdg-user-dirs \
|
|
||||||
xdg-desktop-portal-wlr \
|
|
||||||
fonts-font-awesome \
|
|
||||||
fonts-noto \
|
|
||||||
pulseaudio \
|
|
||||||
pavucontrol \
|
|
||||||
nwg-displays \
|
|
||||||
xdg-desktop-portal-wlr \
|
|
||||||
network-manager-gnome
|
|
||||||
|
|
||||||
log "Paquets installés avec succès."
|
|
||||||
|
|
||||||
# --- Création des répertoires de configuration ---
|
|
||||||
info "Création des répertoires de configuration..."
|
|
||||||
mkdir -p "$HOME/.config/sway"
|
|
||||||
mkdir -p "$HOME/.config/waybar"
|
|
||||||
mkdir -p "$HOME/.config/foot"
|
|
||||||
mkdir -p "$HOME/.config/mako"
|
|
||||||
mkdir -p "$HOME/.config/wofi"
|
|
||||||
mkdir -p "$HOME/.config/kanshi"
|
|
||||||
log "Répertoires créés."
|
|
||||||
|
|
||||||
# --- Copie du fichier de configuration Sway ---
|
|
||||||
SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
|
|
||||||
SWAY_CONFIG_SRC="$SCRIPT_DIR/sway-config"
|
|
||||||
SWAY_CONFIG_DEST="$HOME/.config/sway/config"
|
|
||||||
|
|
||||||
if [[ -f "$SWAY_CONFIG_SRC" ]]; then
|
|
||||||
if [[ -f "$SWAY_CONFIG_DEST" ]]; then
|
|
||||||
warn "Un fichier de configuration Sway existe déjà. Sauvegarde dans config.bak"
|
|
||||||
cp "$SWAY_CONFIG_DEST" "$SWAY_CONFIG_DEST.bak"
|
|
||||||
fi
|
|
||||||
cp "$SWAY_CONFIG_SRC" "$SWAY_CONFIG_DEST"
|
|
||||||
log "Configuration Sway copiée vers $SWAY_CONFIG_DEST"
|
|
||||||
else
|
|
||||||
warn "Fichier 'sway-config' introuvable à côté du script. Placez-le dans : $SCRIPT_DIR/"
|
|
||||||
warn "La configuration par défaut de Sway sera utilisée au premier lancement."
|
|
||||||
fi
|
|
||||||
|
|
||||||
# --- Configuration minimale de foot (terminal) ---
|
|
||||||
info "Génération d'une configuration de base pour foot..."
|
|
||||||
cat > "$HOME/.config/foot/foot.ini" << 'EOF'
|
|
||||||
# Configuration du terminal Foot
|
|
||||||
# Documentation : https://codeberg.org/dnkl/foot/src/branch/master/doc/foot.ini.5.scd
|
|
||||||
|
|
||||||
[main]
|
|
||||||
# Police et taille (modifiez selon vos préférences)
|
|
||||||
font=monospace:size=11
|
|
||||||
|
|
||||||
[colors]
|
|
||||||
# Thème sombre simple
|
|
||||||
background=1e1e2e
|
|
||||||
foreground=cdd6f4
|
|
||||||
EOF
|
|
||||||
log "Configuration foot créée."
|
|
||||||
|
|
||||||
# --- Configuration minimale de mako (notifications) ---
|
|
||||||
info "Génération d'une configuration de base pour mako..."
|
|
||||||
cat > "$HOME/.config/mako/config" << 'EOF'
|
|
||||||
# Configuration des notifications Mako
|
|
||||||
# Documentation : man mako
|
|
||||||
|
|
||||||
# Position des notifications
|
|
||||||
anchor=top-right
|
|
||||||
margin=10
|
|
||||||
|
|
||||||
# Apparence
|
|
||||||
background-color=#1e1e2edd
|
|
||||||
text-color=#cdd6f4
|
|
||||||
border-color=#89b4fadd
|
|
||||||
border-radius=8
|
|
||||||
border-size=2
|
|
||||||
|
|
||||||
# Durée d'affichage (en millisecondes)
|
|
||||||
default-timeout=5000
|
|
||||||
|
|
||||||
# Police
|
|
||||||
font=sans 10
|
|
||||||
EOF
|
|
||||||
log "Configuration mako créée."
|
|
||||||
|
|
||||||
# --- Configuration de wofi (lanceur d'apps) ---
|
|
||||||
info "Génération d'une configuration de base pour wofi..."
|
|
||||||
cat > "$HOME/.config/wofi/style.css" << 'EOF'
|
|
||||||
/* Style de Wofi - lanceur d'applications */
|
|
||||||
window {
|
|
||||||
background-color: #1e1e2e;
|
|
||||||
border: 2px solid #89b4fa;
|
|
||||||
border-radius: 10px;
|
|
||||||
}
|
|
||||||
#input {
|
|
||||||
background-color: #313244;
|
|
||||||
color: #cdd6f4;
|
|
||||||
border: none;
|
|
||||||
border-radius: 6px;
|
|
||||||
padding: 8px;
|
|
||||||
margin: 6px;
|
|
||||||
}
|
|
||||||
#outer-box { padding: 6px; }
|
|
||||||
#entry { padding: 6px; border-radius: 6px; }
|
|
||||||
#entry:selected { background-color: #45475a; }
|
|
||||||
#text { color: #cdd6f4; }
|
|
||||||
EOF
|
|
||||||
log "Style wofi créé."
|
|
||||||
|
|
||||||
# --- Ajout de l'utilisateur aux groupes nécessaires ---
|
|
||||||
info "Ajout de l'utilisateur aux groupes video et input (pour luminosité et entrées)..."
|
|
||||||
sudo usermod -aG video,input "$USER" 2>/dev/null || warn "Impossible d'ajouter aux groupes (peut-être déjà membre)."
|
|
||||||
log "Groupes configurés."
|
|
||||||
|
|
||||||
# --- Création d'une entrée de session Wayland (si nécessaire) ---
|
|
||||||
SESSION_FILE="/usr/share/wayland-sessions/sway.desktop"
|
|
||||||
if [[ ! -f "$SESSION_FILE" ]]; then
|
|
||||||
info "Création de l'entrée de session Sway pour le gestionnaire de connexion..."
|
|
||||||
sudo bash -c "cat > $SESSION_FILE" << 'EOF'
|
|
||||||
[Desktop Entry]
|
|
||||||
Name=Sway
|
|
||||||
Comment=Sway - Compositeur Wayland en tuiles (i3-compatible)
|
|
||||||
Exec=sway
|
|
||||||
Type=Application
|
|
||||||
EOF
|
|
||||||
log "Entrée de session créée."
|
|
||||||
else
|
|
||||||
log "Entrée de session Sway déjà présente."
|
|
||||||
fi
|
|
||||||
|
|
||||||
# --- Récapitulatif ---
|
|
||||||
echo ""
|
|
||||||
echo -e "${GREEN}════════════════════════════════════════════════════════${NC}"
|
|
||||||
echo -e "${GREEN} Installation terminée !${NC}"
|
|
||||||
echo -e "${GREEN}════════════════════════════════════════════════════════${NC}"
|
|
||||||
echo ""
|
|
||||||
echo -e " Prochaine étape :"
|
|
||||||
echo -e " 1. Assurez-vous que le fichier ${YELLOW}sway-config${NC} est copié dans :"
|
|
||||||
echo -e " ${BLUE}~/.config/sway/config${NC}"
|
|
||||||
echo -e " 2. ${YELLOW}Déconnectez-vous${NC} de votre session actuelle."
|
|
||||||
echo -e " 3. Choisissez ${BLUE}Sway${NC} comme session dans votre gestionnaire de connexion."
|
|
||||||
echo -e " (ou lancez ${BLUE}sway${NC} depuis un TTY)"
|
|
||||||
echo ""
|
|
||||||
echo -e " Raccourcis essentiels (voir le fichier de config pour tout) :"
|
|
||||||
echo -e " ${BLUE}Super + Entrée${NC} → Terminal (foot)"
|
|
||||||
echo -e " ${BLUE}Super + Espace${NC} → Lanceur d'apps (wofi)"
|
|
||||||
echo -e " ${BLUE}Super + Q${NC} → Fermer la fenêtre active"
|
|
||||||
echo -e " ${BLUE}Super + [1-9]${NC} → Aller à l'espace de travail numéroté"
|
|
||||||
echo ""
|
|
||||||
warn "Reconnectez-vous pour que les changements de groupes (video/input) prennent effet."
|
|
||||||
echo ""
|
|
||||||
Loading…
Reference in New Issue