MAURJDLJIL3B65RJA4C64F3MYJRPEMNB7ZDPLCIZZV4FVJAQ2ASQC { pkgs ? import <nixpkgs> {} }:[## Outils de base et shellpkgs.fishpkgs.gitpkgs.pijulpkgs.opensshpkgs.ezapkgs.fdpkgs.ripgreppkgs.batpkgs.zellijpkgs.stowpkgs.rangerpkgs.zoxide## Programmationpkgs.roswell## Paquets Emacs(pkgs.emacsWithPackages (epkgs: with epkgs; [evilwhich-keyverticoorderlessmarginaliaconsultcorfucapedirvishprojectileslygeneralsolarized-theme]))]
;; Ceci est une configuration de système d'exploitation générée par;; l'installateur graphique.;;;; Une fois l'installation terminée, vous pouvez apprendre à modifier;; ce fichier pour ajuster la configuration du système et le passer à;; la commande « guix system reconfigure » pour rendre vos changements;; effectifs.;; Indique quels modules importer pour accéder aux variables;; utilisées dans cette configuration.(use-modules (gnu)(nongnu packages linux)(gnu services nix)(gnu packages shells))(use-service-modules cups desktop networking ssh xorg)(operating-system(kernel linux)(firmware (list linux-firmware))(locale "fr_FR.utf8")(timezone "Europe/Paris")(keyboard-layout (keyboard-layout "fr" "bepo_afnor"))(host-name "lenouveau");; La liste des comptes utilisateurs (« root » est implicite).(users (cons* (user-account(name "jc")(comment "Jean-Christophe JAMEUX BERTHE")(group "users")(home-directory "/home/jc")(shell (file-append fish "/bin/fish"))(supplementary-groups '("wheel" "netdev" "audio" "video")))%base-user-accounts));; Paquets installés pour tout le système. Les utilisateurs et utilisatrices peuvent;; aussi installer des paquets sous leur propre compte : utilisez « guix search MOT-CLÉ »;; pour chercher des paquets et « guix install PAQUET » pour installer un paquet.(packages (append (list (specification->package "zsh")) %base-packages));; Voici la liste des services du système. Pour trouver les services;; disponibles, lancez « guix system search MOT-CLÉ » dans un terminal.(services(append (list (service gnome-desktop-service-type)(service bluetooth-service-type(bluetooth-configuration(auto-enable? #t)));; Pour configurer OpenSSH, passez un enregistrement « openssh-configuration »;; en deuxième argument à « service » ci-dessous.(service openssh-service-type)(service tor-service-type)(service cups-service-type)(set-xorg-configuration(xorg-configuration (keyboard-layout keyboard-layout)))(service nix-service-type));; Voici la liste des services par défaut à laquelle nous;; ajoutons nos propres services.%desktop-services))(bootloader (bootloader-configuration(bootloader grub-efi-bootloader)(targets (list "/boot/efi"))(keyboard-layout keyboard-layout)))(swap-devices (list (swap-space(target (uuid"8d68a9eb-fd51-47ee-a37e-8e1a3bc745b7")))));; La liste des systèmes de fichiers qui seront « montés ». Les identifiants;; de systèmes de fichiers uniques (« UUIDs ») qui se trouvent ici s'obtiennent;; en exécutant « blkid » dans un terminal.(file-systems (cons* (file-system(mount-point "/boot/efi")(device (uuid "F76A-B6B7"'fat32))(type "vfat"))(file-system(mount-point "/")(device (uuid"dec13dac-1afb-4560-86cb-4e305f5e84fa"'ext4))(type "ext4")) %base-file-systems)))
;; Ce fichier « home-environment » peut être passé à « guix home reconfigure »;; pour reproduire le contenu de votre profil. Son contenu est « symbolique » :;; il ne spécifie que les noms des paquets. Pour reproduire exactement le même;; profil, vous devez aussi retenir les canaux utilisés, ceux renvoyés par;; « guix describe ». Voir la section « Répliquer Guix » dans le manuel.(use-modules (gnu home)(gnu packages)(gnu services)(guix gexp)(gnu home services dotfiles)(gnu home services shells)(gnu packages wm)(gnu packages terminals)(gnu packages xorg)(gnu home services)(guix gexp))(home-environment;; Ci-dessous se trouve la liste des paquets qui seront disponibles dans votre;; profil personnel, dans ~/.guix-home/profile.(packages (specifications->packages (list "curl""python""python-pytest""python-pip""python-isort""python-pyflakes""cabal-install""hoogle""ghc""bat""cmake""roswell""ocaml-ocp-indent""xclip""xdotool""xprop""xwininfo""shfmt""racket""python""gnuplot""wl-clipboard""ocaml-merlin""ocaml-utop""dune""ocamlformat""nixfmt";"grip""markdown""shellcheck""fd""ripgrep""tealdeer""libreoffice""xdg-utils""tree-sitter""git""font-fira-code""zsh""fish""ispell""emacs""emacs-guix""guix-icons""gtk+""gtk""pkg-config""openssl""rust""rust-cargo""zoxide""texmacs""texlive""gnome-shell-extension-paperwm""kmonad""eza""fzf-tab""fzf""zsh-completions""zsh-autosuggestions""zsh-syntax-highlighting""ranger""syncthing""curl""ispell""libinput""gnome-shell-extension-appindicator""stow""git-delta""evince""flatpak""glibc""ffmpeg""sox""fyi""xbindkeys""nix")));; Voici la liste des services personnels. Pour trouver les services;; disponibles, lancez « guix home search MOT-CLÉ » dans un terminal.(services(list(service home-fish-service-type(home-fish-configuration(config(list(plain-file "chemins""if test -e $HOME/.nix-profile/etc/profile.d/nix.fishsource $HOME/.nix-profile/etc/profile.d/nix.fishendset -Ux NIX_PATH nixpkgs=https://github.com/NixOS/nixpkgs/archive/nixos-unstable.tar.gzset -gx PATH $PATH $HOME/.nix-profile/binif test -e /var/lib/flatpakset -gx FLATPAK_INSTALLATIONS_DIR /var/lib/flatpakendif test -e $HOME/.local/share/flatpakset -gx PATH $PATH $HOME/.local/share/flatpak/exports/binset -gx PATH $PATH /var/lib/flatpak/exports/binset -gx XDG_DATA_DIRS $XDG_DATA_DIRS $HOME/.local/share/flatpak/exports/shareset -gx XDG_DATA_DIRS $XDG_DATA_DIRS /var/lib/flatpak/exports/shareendif test -d $HOME/.local/binset -gx PATH $PATH $HOME/.local/binend")))));(service home-dotfiles-service-type; (home-dotfiles-configuration; (directories '("/home/jc/Documents/Git/Config/Guix/dotfiles")))))))
(menu-bar-mode -1)(tool-bar-mode -1)(scroll-bar-mode -1)(setq inhibit-startup-message t)(prefer-coding-system 'utf-8)(setq backup-directory-alist `(("." . "~/.emacs-saves")))(setq auto-save-file-name-transforms `((".*" "~/.emacs-saves/" t)))(make-directory "~/.emacs-saves" t)(use-package vertico:init (vertico-mode))(use-package orderless:custom (completion-styles '(orderless)))(use-package marginalia:init (marginalia-mode))(use-package consult:bind (("C-s" . consult-line)("C-x b" . consult-buffer)("M-g g" . consult-goto-line)("M-g i" . consult-imenu)))(use-package corfu:custom(corfu-auto t)(corfu-cycle t):init(global-corfu-mode))(use-package cape:init(add-to-list 'completion-at-point-functions #'cape-file)(add-to-list 'completion-at-point-functions #'cape-dabbrev)(add-to-list 'completion-at-point-functions #'cape-symbol))(setq inferior-lisp-program "ros run")(use-package sly:init (setq sly-lisp-implementations '((roswell ("ros" "run")))):config (setq sly-symbol-completion-mode t))(use-package eglot:hook ((python-mode . eglot-ensure)(c-mode . eglot-ensure)(c++-mode . eglot-ensure)))(use-package which-key:init (which-key-mode))(use-package evil:init (evil-mode 1))(use-package general:config(general-create-definer my/leader-keys:keymaps '(normal insert visual emacs):prefix "SPC":global-prefix "C-SPC")(my/leader-keys"f" '(:ignore t :which-key "fichier")"f f" '(find-file :which-key "ouvrir fichier")"f s" '(save-buffer :which-key "sauver")"b" '(:ignore t :which-key "buffer")"b b" '(consult-buffer :which-key "changer buffer")"w" '(:ignore t :which-key "fenêtres")"w v" '(split-window-right :which-key "split vertical")"w s" '(split-window-below :which-key "split horizontal")"w d" '(delete-window :which-key "fermer fenêtre")"h" '(:ignore t :which-key "aide")"h f" '(describe-function :which-key "fonction")"h v" '(describe-variable :which-key "variable")"h k" '(describe-key :which-key "touche")"p" '(:ignore t :which-key "projet")"p p" '(projectile-switch-project :which-key "changer projet")"d" '(:ignore t :which-key "Dired")"d d" '(dirvish :which-key "ouvrir Dired")"g" '(:ignore t :which-key "Magit")"g g" '(magit-status :which-key "status git")))(use-package projectile:diminish projectile-mode:config (projectile-mode):custom ((projectile-completion-system 'default)):bind-keymap ("C-c p" . projectile-command-map):init(when (file-directory-p "~/projects")(setq projectile-project-search-path '("~/projects")))(setq projectile-switch-project-action #'projectile-dired))(use-package dirvish:init (dirvish-override-dired-mode))(use-package solarized-theme)(load-theme 'solarized-light t)(defun toggle-solarized-theme ()(interactive)(let ((current (car custom-enabled-themes)))(mapc #'disable-theme custom-enabled-themes)(load-theme (if (eq current 'solarized-light)'solarized-dark'solarized-light) t)))(global-set-key (kbd "<f6>") #'toggle-solarized-theme)(use-package perspective:custom(persp-mode-prefix-key (kbd "C-c M-p")):init(persp-mode):config(setq persp-state-default-file "~/.emacs.d/perspectives")(add-hook 'kill-emacs-hook #'persp-state-save))(use-package org-auto-tangle:hook (org-mode . org-auto-tangle-mode))(message "✅ Emacs avec complétion moderne, workspaces, Solarized et raccourcis SPC")
(defcfginput (device-file"/dev/input/by-path/platform-i8042-serio-0-event-kbd")output (uinput-sink"Sortie Kmonad principale""sleep 1 && setxkbmap -option compose:paus")cmp-seq pausecmp-seq-delay 5fallthrough trueallow-cmd true)(defaliasj (tap-hold-next-release 300 j rsft)f (tap-hold-next-release 300 f lsft)d (tap-hold-next-release 300 d lctl)k (tap-hold-next-release 300 k lctl)s (tap-hold-next-release 300 s lalt)l (tap-hold-next-release 300 l lalt)a (tap-hold-next-release 300 a ralt)cps (tap-hold-next-release 300 caps lmet)pv (tap-hold-next-release 300 ; ralt)gll (tap-hold-next-release 300 ' lmet)g (tap-hold-next-release 300 g lmet)h (tap-hold-next-release 300 h lmet)spc (tap-hold-next-release 300 spc (layer-toggle slayer))fin #(ralt spc))(defsrcesc f1 f2 f3 f4 f5 f6 f7 f8 f9 f10 f11 f12 ins prnt delgrv 1 2 3 4 5 6 7 8 9 0 - = bspctab q w e r t y u i o p [ ] retcaps a s d f g h j k l ; ' \lsft 102d z x c v b n m , . / rsftlctl lmet lalt spc ralt rctl left up down right)(deflayer mainesc f1 f2 f3 f4 f5 f6 f7 f8 f9 f10 f11 f12 ins prnt delgrv 1 2 3 4 5 6 7 8 9 0 - = bspctab q w e r t y u i o p [ ] ret@cps @a @s @d @f @g @h @j @k @l @pv @gll \lsft 102d z x c v b n m , . / rsftlctl lmet lalt @spc ralt rctl left up down right)(deflayer slayer_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ __ _ _ _ _ _ _ _ pgup _ _ _ _ _esc S-5 S-6 S-7 S-8 S-9 _ _ up _ _ _ _ _S-0 S-1 S-2 S-3 S-4 _ home left down rght rght end __ _ _ _ _ _ _ _ pgdn pgdn _ _ __ _ _ _ _ _ _ _ _ _)
(defcfginput (device-file "ADDR_CLAVIER")output (uinput-sink"Sortie Kmonad MX Keys""/usr/bin/sleep 1 && /usr/bin/setxkbmap -option compose:paus")cmp-seq pausecmp-seq-delay 5fallthrough trueallow-cmd true)(defaliasj (tap-hold-next-release 300 j rsft)f (tap-hold-next-release 300 f lsft)d (tap-hold-next-release 300 d lctl)k (tap-hold-next-release 300 k lctl)s (tap-hold-next-release 300 s lalt)l (tap-hold-next-release 300 l lalt)a (tap-hold-next-release 300 a ralt)cps (tap-hold-next-release 300 caps lmet)pv (tap-hold-next-release 300 ; ralt)gll (tap-hold-next-release 300 ' lmet)g (tap-hold-next-release 300 g lmet)h (tap-hold-next-release 300 h lmet)spc (tap-hold-next-release 300 spc (layer-toggle slayer))fin #(ralt spc))(defsrcesc f1 f2 f3 f4 f5 f6 f7 f8 f9 f10 f11 f12 ins prnt delgrv 1 2 3 4 5 6 7 8 9 0 - = bspctab q w e r t y u i o p [ ] retcaps a s d f g h j k l ; ' \lsft 102d z x c v b n m , . / rsftlctl lmet lalt spc ralt rctl left up down right)(deflayer mainesc f1 f2 f3 f4 f5 f6 f7 f8 f9 f10 f11 f12 ins prnt delgrv 1 2 3 4 5 6 7 8 9 0 - = bspctab q w e r t y u i o p [ ] ret@cps @a @s @d @f @g @h @j @k @l @pv @gll \lsft 102d z x c v b n m , . / rsftlctl lmet lalt @spc ralt rctl left up down right)(deflayer slayer_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ __ _ _ _ _ _ _ _ pgup _ _ _ _ _esc S-5 S-6 S-7 S-8 S-9 _ _ up _ _ _ _ _S-0 S-1 S-2 S-3 S-4 _ home left down rght rght end __ _ _ _ _ _ _ _ pgdn pgdn _ _ __ _ _ _ _ _ _ _ _ _)
(defcfginput (device-file "ADDR_CLAVIER")output (uinput-sink"Sortie Kmonad Casa Keys""/usr/bin/sleep 1 && /usr/bin/setxkbmap -option compose:paus")cmp-seq pausecmp-seq-delay 5fallthrough trueallow-cmd true)(defaliasj (tap-hold-next-release 300 j rsft)f (tap-hold-next-release 300 f lsft)d (tap-hold-next-release 300 d lctl)k (tap-hold-next-release 300 k lctl)s (tap-hold-next-release 300 s lalt)l (tap-hold-next-release 300 l lalt)a (tap-hold-next-release 300 a ralt)cps (tap-hold-next-release 300 caps lmet)pv (tap-hold-next-release 300 ; ralt)gll (tap-hold-next-release 300 ' lmet)g (tap-hold-next-release 300 g lmet)h (tap-hold-next-release 300 h lmet)spc (tap-hold-next-release 300 spc (layer-toggle slayer))fin #(ralt spc))(defsrcesc f1 f2 f3 f4 f5 f6 f7 f8 f9 f10 f11 f12 ins prnt delgrv 1 2 3 4 5 6 7 8 9 0 - = bspctab q w e r t y u i o p [ ] retcaps a s d f g h j k l ; ' \lsft 102d z x c v b n m , . / rsftlctl lmet lalt spc ralt rctl left up down right)(deflayer mainesc f1 f2 f3 f4 f5 f6 f7 f8 f9 f10 f11 f12 ins prnt delgrv 1 2 3 4 5 6 7 8 9 0 - = bspctab q w e r t y u i o p [ ] ret@cps @a @s @d @f @g @h @j @k @l @pv @gll \lsft 102d z x c v b n m , . / rsftlctl lmet lalt @spc ralt rctl left up down right)(deflayer slayer_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ __ _ _ _ _ _ _ _ pgup _ _ _ _ _esc S-5 S-6 S-7 S-8 S-9 _ _ up _ _ _ _ _S-0 S-1 S-2 S-3 S-4 _ home left down rght rght end __ _ _ _ _ _ _ _ pgdn pgdn _ _ __ _ _ _ _ _ _ _ _ _)
#+begin_src emacs-lisptruc#+end_src
;; Ceci est une configuration de système d'exploitation générée par;; l'installateur graphique.;;;; Une fois l'installation terminée, vous pouvez apprendre à modifier;; ce fichier pour ajuster la configuration du système et le passer à;; la commande « guix system reconfigure » pour rendre vos changements;; effectifs.;; Indique quels modules importer pour accéder aux variables;; utilisées dans cette configuration.(use-modules (gnu)(nongnu packages linux)(gnu packages shells))(use-service-modules cups desktop networking ssh xorg)(operating-system(kernel linux)(firmware (list linux-firmware))(locale "fr_FR.utf8")(timezone "Europe/Paris")(keyboard-layout (keyboard-layout "fr" "bepo_afnor"))(host-name "Papareil");; La liste des comptes utilisateurs (« root » est implicite).(users (cons* (user-account(name "jc")(comment "Jean-Christophe JAMEUX BERTHE")(group "users")(home-directory "/home/jc")(shell (file-append fish "/bin/fish"))(supplementary-groups '("wheel" "netdev" "audio" "video")))%base-user-accounts));; Voici la liste des services du système. Pour trouver les services;; disponibles, lancez « guix system search MOT-CLÉ » dans un terminal.(services(append (list (service gnome-desktop-service-type)(service bluetooth-service-type(bluetooth-configuration(auto-enable? #t)));; Pour configurer OpenSSH, passez un enregistrement « openssh-configuration »;; en deuxième argument à « service » ci-dessous.(service openssh-service-type)(service tor-service-type)(service cups-service-type)(set-xorg-configuration(xorg-configuration (keyboard-layout keyboard-layout))));; Voici la liste des services par défaut à laquelle nous;; ajoutons nos propres services.%desktop-services))(bootloader (bootloader-configuration(bootloader grub-efi-bootloader)(targets (list "/boot/efi"))(keyboard-layout keyboard-layout)))(initrd-modules (append '("vmd") %base-initrd-modules))(mapped-devices (list (mapped-device(source (uuid"2d6b9a0b-5c61-4843-aa02-06b4b974906d"))(target "Guix")(type luks-device-mapping))));; La liste des systèmes de fichiers qui seront « montés ». Les identifiants;; de systèmes de fichiers uniques (« UUIDs ») qui se trouvent ici s'obtiennent;; en exécutant « blkid » dans un terminal.(file-systems (cons* (file-system(mount-point "/")(device "/dev/mapper/Guix")(type "ext4")(dependencies mapped-devices))(file-system(mount-point "/mnt/dos")(device (uuid "C4A0C709A0C70142"'ntfs))(type "ntfs"))(file-system(mount-point "/boot/efi")(device (uuid "A4C6-AB5C"'fat32))(type "vfat")) %base-file-systems)))
#+title: Emacs Configuration#+PROPERTY: header-args :tangle init.elLes sections suivantes décrivent une configuration moderne et modulaire d'Emacs, adaptée aussi bien à un usage mobile que desktop, avec des raccourcis inspirés de Doom/SpaceMax et une expérience de complétion fluide et contextuelle.* Interface minimale et UTF-8Une interface épurée pour se concentrer sur l'essentiel.#+begin_src emacs-lisp(menu-bar-mode -1)(tool-bar-mode -1)(scroll-bar-mode -1)(setq inhibit-startup-message t)(prefer-coding-system 'utf-8)#+end_src* Sauvegardes centraliséesTous les fichiers de sauvegarde sont regroupés dans un même dossier.#+begin_src emacs-lisp(setq backup-directory-alist `(("." . "~/.emacs-saves")))(setq auto-save-file-name-transforms `((".*" "~/.emacs-saves/" t)))(make-directory "~/.emacs-saves" t)#+end_src* Complétion moderneCette section active une suite d’outils de complétion efficaces et modulaires :- *Vertico* : interface minimale pour la complétion dans le minibuffer- *Orderless* : permet une complétion dans n’importe quel ordre- *Marginalia* : affiche des annotations contextuelles dans les listes de complétion- *Consult* : utilitaires pour la navigation et la recherche- *Corfu* : complétion inline (dans le buffer courant)- *Cape* : ajoute des sources à la complétion comme les fichiers, symboles, etc.#+begin_src emacs-lisp(use-package vertico:init (vertico-mode))(use-package orderless:custom (completion-styles '(orderless)))(use-package marginalia:init (marginalia-mode))(use-package consult:bind (("C-s" . consult-line)("C-x b" . consult-buffer)("M-g g" . consult-goto-line)("M-g i" . consult-imenu)))(use-package corfu:custom(corfu-auto t)(corfu-cycle t):init(global-corfu-mode))(use-package cape:init(add-to-list 'completion-at-point-functions #'cape-file)(add-to-list 'completion-at-point-functions #'cape-dabbrev)(add-to-list 'completion-at-point-functions #'cape-symbol))#+end_src* Programmation LispUtilisation de *SLY* avec Roswell pour interagir avec Common Lisp.#+begin_src emacs-lisp(setq inferior-lisp-program "ros run")(use-package sly:init (setq sly-lisp-implementations '((roswell ("ros" "run")))):config (setq sly-symbol-completion-mode t))#+end_src* Support LSP avec EglotActive *Eglot* pour plusieurs langages (C, C++, Python…) afin d'obtenir la complétion, la navigation et la documentation.#+begin_src emacs-lisp(use-package eglot:hook ((python-mode . eglot-ensure)(c-mode . eglot-ensure)(c++-mode . eglot-ensure)))#+end_src* Ergonomie et raccourcis- *Which-key* : aide à la découverte des raccourcis- *Evil* : navigation façon Vim- *General* : création de raccourcis cohérents autour de la touche SPC#+begin_src emacs-lisp(use-package which-key:init (which-key-mode))(use-package evil:init (evil-mode 1))(use-package general:config(general-create-definer my/leader-keys:keymaps '(normal insert visual emacs):prefix "SPC":global-prefix "C-SPC")(my/leader-keys"f" '(:ignore t :which-key "fichier")"f f" '(find-file :which-key "ouvrir fichier")"f s" '(save-buffer :which-key "sauver")"b" '(:ignore t :which-key "buffer")"b b" '(consult-buffer :which-key "changer buffer")"w" '(:ignore t :which-key "fenêtres")"w v" '(split-window-right :which-key "split vertical")"w s" '(split-window-below :which-key "split horizontal")"w d" '(delete-window :which-key "fermer fenêtre")"h" '(:ignore t :which-key "aide")"h f" '(describe-function :which-key "fonction")"h v" '(describe-variable :which-key "variable")"h k" '(describe-key :which-key "touche")"p" '(:ignore t :which-key "projet")"p p" '(projectile-switch-project :which-key "changer projet")"d" '(:ignore t :which-key "Dired")"d d" '(dirvish :which-key "ouvrir Dired")"g" '(:ignore t :which-key "Magit")"g g" '(magit-status :which-key "status git")))#+end_src* Gestion de projetsAvec *Projectile*, navigation rapide entre projets, fichiers, buffers, etc.#+begin_src emacs-lisp(use-package projectile:diminish projectile-mode:config (projectile-mode):custom ((projectile-completion-system 'default)):bind-keymap ("C-c p" . projectile-command-map):init(when (file-directory-p "~/projects")(setq projectile-project-search-path '("~/projects")))(setq projectile-switch-project-action #'projectile-dired))#+end_src* Gestionnaire de fichiers*Dirvish* est une surcouche moderne à Dired avec une interface à la Ranger.#+begin_src emacs-lisp(use-package dirvish:init (dirvish-override-dired-mode))#+end_src* Thème et bascule jour/nuitUtilise *solarized-theme*, avec une fonction de bascule entre clair et sombre (F6).#+begin_src emacs-lisp(use-package solarized-theme)(load-theme 'solarized-light t)(defun toggle-solarized-theme ()(interactive)(let ((current (car custom-enabled-themes)))(mapc #'disable-theme custom-enabled-themes)(load-theme (if (eq current 'solarized-light)'solarized-dark'solarized-light) t)))(global-set-key (kbd "<f6>") #'toggle-solarized-theme)#+end_src* Workspaces persistantsAvec *Perspective*, on peut retrouver les fenêtres et buffers tels qu’on les avait laissés à la fermeture d’Emacs.#+begin_src emacs-lisp(use-package perspective:custom(persp-mode-prefix-key (kbd "C-c M-p")):init(persp-mode):config(setq persp-state-default-file "~/.emacs.d/perspectives")(add-hook 'kill-emacs-hook #'persp-state-save))#+end_src* Auto-Tangle des fichiers OrgActive automatiquement le tangle (extraction du code) pour les fichiers contenant ~#+auto_tangle: t~.#+begin_src emacs-lisp(use-package org-auto-tangle:hook (org-mode . org-auto-tangle-mode))#+end_src* Chargement terminé#+begin_src emacs-lisp(message "✅ Emacs avec complétion moderne, workspaces, Solarized et raccourcis SPC")#+end_src
;; Ceci est une configuration de système d'exploitation générée par;; l'installateur graphique.;;;; Une fois l'installation terminée, vous pouvez apprendre à modifier;; ce fichier pour ajuster la configuration du système et le passer à;; la commande « guix system reconfigure » pour rendre vos changements;; effectifs.;; Indique quels modules importer pour accéder aux variables;; utilisées dans cette configuration.(use-modules (gnu)(nongnu packages linux)(gnu packages shells))(use-service-modules cups desktop networking ssh xorg)(operating-system(kernel linux)(firmware (list linux-firmware))(locale "fr_FR.utf8")(timezone "Europe/Paris")(keyboard-layout (keyboard-layout "fr" "bepo_afnor"))(host-name "CoursThales");; La liste des comptes utilisateurs (« root » est implicite).(users (cons* (user-account(name "jc")(comment "Jean-Christophe JANEUX BERTHE")(group "users")(home-directory "/home/jc")(shell (file-append fish "/bin/fish"))(supplementary-groups '("wheel" "netdev" "audio" "video")))%base-user-accounts));; Paquets installés pour tout le système. Les utilisateurs et utilisatrices peuvent;; aussi installer des paquets sous leur propre compte : utilisez « guix search MOT-CLÉ »;; pour chercher des paquets et « guix install PAQUET » pour installer un paquet.(packages (append (list (specification->package "zsh")) %base-packages));; Voici la liste des services du système. Pour trouver les services;; disponibles, lancez « guix system search MOT-CLÉ » dans un terminal.(services(append (list (service gnome-desktop-service-type)(service bluetooth-service-type(bluetooth-configuration(auto-enable? #t)));; Pour configurer OpenSSH, passez un enregistrement « openssh-configuration »;; en deuxième argument à « service » ci-dessous.(service openssh-service-type)(service tor-service-type)(service cups-service-type)(set-xorg-configuration(xorg-configuration (keyboard-layout keyboard-layout))));; Voici la liste des services par défaut à laquelle nous;; ajoutons nos propres services.%desktop-services))(bootloader (bootloader-configuration(bootloader grub-efi-bootloader)(targets (list "/boot/efi"))(keyboard-layout keyboard-layout)))(mapped-devices (list (mapped-device(source (uuid"52cf448f-df74-47ba-9091-14db17094221"))(target "cryptroot")(type luks-device-mapping))));; La liste des systèmes de fichiers qui seront « montés ». Les identifiants;; de systèmes de fichiers uniques (« UUIDs ») qui se trouvent ici s'obtiennent;; en exécutant « blkid » dans un terminal.(file-systems (cons* (file-system(mount-point "/boot/efi")(device (uuid "A148-A386"'fat32))(type "vfat"))(file-system(mount-point "/")(device "/dev/mapper/cryptroot")(type "ext4")(dependencies mapped-devices)) %base-file-systems)))
#+TITLE: Configuration du clavier#+AUTHOR: Jean-Chistophe JAMEUX BERTHE#+DESCRIPTION: Raccourci divers pour le confort d’utilisation du clavier#+PROPERTY: header-args :tangle no :results silent* Paramètres KMonad** Nom des touches pour l’option de setxkbmap :| compose:ralt | Right Alt || compose:lwin | Left Win || compose:lwin-altgr | 3rd level of Left Win || compose:rwin | Right Win || compose:rwin-altgr | 3rd level of Right Win || compose:menu | Menu (compose in KMonad) || compose:menu-altgr | 3rd level of Menu || compose:lctrl | Left Ctrl || compose:lctrl-altgr | 3rd level of Left Ctrl || compose:rctrl | Right Ctrl || compose:rctrl-altgr | 3rd level of Right Ctrl || compose:caps | Caps Lock || compose:caps-altgr | 3rd level of Caps Lock || compose:102 | The "< >" key || compose:102-altgr | 3rd level of the "< >" key || compose:paus | Pause || compose:ins | Insert || compose:prsc | PrtSc |** Initialisation~cmp-seq-delay 5~ permet d’avoir 5ms de délai entre chaque suite de pression d’une compose-key.La commande ~sudo libinput list-devices~ permet de lister les périphériques.*** Clavier portable intégré#+begin_src lisp :noweb yes :tangle home/.config/clavier.kbd(defcfginput (device-file"/dev/input/by-path/platform-i8042-serio-0-event-kbd")output (uinput-sink"Sortie Kmonad principale""sleep 1 && setxkbmap -option compose:paus")cmp-seq pausecmp-seq-delay 5fallthrough trueallow-cmd true)<<config>>#+end_src*** Clavier Casa Keys#+begin_src bash :tangle home/.local/bin/clavier-casa-keys#!/bin/bashADDR_CLAVIER=$(lsinput | grep -B 5 -m 1 "Casa Keys" | grep -m 1 "")kmonad <(sed "s,ADDR_CLAVIER,$ADDR_CLAVIER," $HOME/.config/clavier-casa-keys.kbd)#+end_src#+begin_src lisp :noweb yes :tangle home/.config/clavier-casa-keys.kbd(defcfginput (device-file "ADDR_CLAVIER")output (uinput-sink"Sortie Kmonad Casa Keys""/usr/bin/sleep 1 && /usr/bin/setxkbmap -option compose:paus")cmp-seq pausecmp-seq-delay 5fallthrough trueallow-cmd true)<<config>>#+end_src*** Clavier MX Keys#+begin_src bash :tangle home/.local/bin/clavier-mx-keys#!/bin/bashADDR_CLAVIER=$(lsinput | grep -B 5 -m 1 "MX Keys Mini Keyboard" | grep -m 1 "")kmonad <(sed "s,ADDR_CLAVIER,$ADDR_CLAVIER," $HOME/.config/clavier-mx-keys.kbd)#+end_src#+begin_src lisp :noweb yes :tangle home/.config/clavier-mx-keys.kbd(defcfginput (device-file "ADDR_CLAVIER")output (uinput-sink"Sortie Kmonad MX Keys""/usr/bin/sleep 1 && /usr/bin/setxkbmap -option compose:paus")cmp-seq pausecmp-seq-delay 5fallthrough trueallow-cmd true)<<config>>#+end_src* Aliass (tap-hold-next-release 300 s (layer-toggle nombres))a (tap-hold-next-release 300 a (layer-toggle navigation))nav (layer-add navigation)unv (layer-rem navigation)nbr (layer-add nombres)unb (layer-rem nombres)#+begin_src lisp :noweb-ref config(defaliasj (tap-hold-next-release 300 j rsft)f (tap-hold-next-release 300 f lsft)d (tap-hold-next-release 300 d lctl)k (tap-hold-next-release 300 k lctl)s (tap-hold-next-release 300 s lalt)l (tap-hold-next-release 300 l lalt)a (tap-hold-next-release 300 a ralt)cps (tap-hold-next-release 300 caps lmet)pv (tap-hold-next-release 300 ; ralt)gll (tap-hold-next-release 300 ' lmet)g (tap-hold-next-release 300 g lmet)h (tap-hold-next-release 300 h lmet)spc (tap-hold-next-release 300 spc (layer-toggle slayer))fin #(ralt spc))#+end_src* Disposition de base#+begin_src lisp :noweb-ref config(defsrcesc f1 f2 f3 f4 f5 f6 f7 f8 f9 f10 f11 f12 ins prnt delgrv 1 2 3 4 5 6 7 8 9 0 - = bspctab q w e r t y u i o p [ ] retcaps a s d f g h j k l ; ' \lsft 102d z x c v b n m , . / rsftlctl lmet lalt spc ralt rctl left up down right)#+end_src(deflayer_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ __ _ _ _ _ _ _ _ _ _ _ _ _ __ _ _ _ _ _ _ _ _ _ _ _ _ __ _ _ _ _ _ _ _ _ _ _ _ __ _ _ _ _ _ _ _ _ _ _ _ __ _ _ _ _ _ _ _ _ _)* Disposition principale#+begin_src lisp :noweb-ref config(deflayer mainesc f1 f2 f3 f4 f5 f6 f7 f8 f9 f10 f11 f12 ins prnt delgrv 1 2 3 4 5 6 7 8 9 0 - = bspctab q w e r t y u i o p [ ] ret@cps @a @s @d @f @g @h @j @k @l @pv @gll \lsft 102d z x c v b n m , . / rsftlctl lmet lalt @spc ralt rctl left up down right)#+end_src* Disposition sous l’espace#+begin_src lisp :noweb-ref config(deflayer slayer_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ __ _ _ _ _ _ _ _ pgup _ _ _ _ _esc S-5 S-6 S-7 S-8 S-9 _ _ up _ _ _ _ _S-0 S-1 S-2 S-3 S-4 _ home left down rght rght end __ _ _ _ _ _ _ _ pgdn pgdn _ _ __ _ _ _ _ _ _ _ _ _)#+end_src
#+TITLE: Configuration d’Awesome#+AUTHOR: Jean-Chistophe JAMEUX BERTHE#+DESCRIPTION: Personnalisation de l’interface graphique#+PROPERTY: header-args :tangle ~/.config/awesome/rc.lua#+auto_tangle: t* Configuration d’origine#+begin_src lua-- If LuaRocks is installed, make sure that packages installed through it are-- found (e.g. lgi). If LuaRocks is not installed, do nothing.pcall(require, "luarocks.loader")-- Standard awesome librarylocal gears = require("gears")local awful = require("awful")require("awful.autofocus")-- Widget and layout librarylocal wibox = require("wibox")-- Theme handling librarylocal beautiful = require("beautiful")-- Notification librarylocal naughty = require("naughty")local menubar = require("menubar")local hotkeys_popup = require("awful.hotkeys_popup")-- Enable hotkeys help widget for VIM and other apps-- when client with a matching name is opened:require("awful.hotkeys_popup.keys")-- Load Debian menu entrieslocal debian = require("debian.menu")local has_fdo, freedesktop = pcall(require, "freedesktop")-- {{{ Error handling-- Check if awesome encountered an error during startup and fell back to-- another config (This code will only ever execute for the fallback config)if awesome.startup_errors thennaughty.notify({ preset = naughty.config.presets.critical,title = "Oops, there were errors during startup!",text = awesome.startup_errors })end-- Handle runtime errors after startupdolocal in_error = falseawesome.connect_signal("debug::error", function (err)-- Make sure we don't go into an endless error loopif in_error then return endin_error = truenaughty.notify({ preset = naughty.config.presets.critical,title = "Oops, an error happened!",text = tostring(err) })in_error = falseend)end-- }}}#+end_src* ThèmeThemes define colours, icons, font and wallpapers.#+begin_src luabeautiful.init("/home/echophile/.config/awesome/default/theme.lua")#+end_src* Définitions de variablesUsually, Mod4 is the key with a logo between Control and Alt.If you do not like this or do not have such a key,I suggest you to remap Mod4 to another key using xmodmap or other tools.However, you can use another modifier like Mod1, but it may interact with others.#+begin_src luaterminal = "alacritty -e zellij a Zellij"editor = os.getenv("EDITOR") or "editor"editor_cmd = terminal .. " -e " .. editormodkey = "Mod4"-- Table of layouts to cover with awful.layout.inc, order matters.local l = awful.layout.suitawful.layout.layouts = {-- l.floating,-- l.tile,-- l.tile.left,-- l.tile.bottom,-- l.tile.top,-- l.fair,-- l.fair.horizontal,-- l.spiral,l.max,l.spiral.dwindle,-- l.max.fullscreen,-- l.magnifier,-- l.corner.nw,-- l.corner.ne,-- l.corner.sw,-- l.corner.se,}#+end_src* Menu#+begin_src lua-- Create a launcher widget and a main menumyawesomemenu = {{ "hotkeys", function() hotkeys_popup.show_help(nil, awful.screen.focused()) end },{ "manual", terminal .. " -e man awesome" },{ "edit config", editor_cmd .. " " .. awesome.conffile },{ "restart", awesome.restart },{ "quit", function() awesome.quit() end },}local menu_awesome = { "awesome", myawesomemenu, beautiful.awesome_icon }local menu_terminal = { "open terminal", terminal }if has_fdo thenmymainmenu = freedesktop.menu.build({before = { menu_awesome },after = { menu_terminal }})elsemymainmenu = awful.menu({items = {menu_awesome,{ "Debian", debian.menu.Debian_menu.Debian },menu_terminal,}})endmylauncher = awful.widget.launcher({ image = beautiful.awesome_icon,menu = mymainmenu })-- Menubar configurationmenubar.utils.terminal = terminal -- Set the terminal for applications that require it-- }}}-- Keyboard map indicator and switchermykeyboardlayout = awful.widget.keyboardlayout()-- {{{ Wibar-- Create a textclock widgetmytextclock = wibox.widget.textclock()-- Create a wibox for each screen and add itlocal taglist_buttons = gears.table.join(awful.button({ }, 1, function(t) t:view_only() end),awful.button({ modkey }, 1, function(t)if client.focus thenclient.focus:move_to_tag(t)endend),awful.button({ }, 3, awful.tag.viewtoggle),awful.button({ modkey }, 3, function(t)if client.focus thenclient.focus:toggle_tag(t)endend),awful.button({ }, 4, function(t) awful.tag.viewnext(t.screen) end),awful.button({ }, 5, function(t) awful.tag.viewprev(t.screen) end))local tasklist_buttons = gears.table.join(awful.button({ }, 1, function (c)if c == client.focus thenc.minimized = trueelsec:emit_signal("request::activate","tasklist",{raise = true})endend),awful.button({ }, 3, function()awful.menu.client_list({ theme = { width = 250 } })end),awful.button({ }, 4, function ()awful.client.focus.byidx(1)end),awful.button({ }, 5, function ()awful.client.focus.byidx(-1)end))local function set_wallpaper(s)-- Wallpaperif beautiful.wallpaper thenlocal wallpaper = beautiful.wallpaper-- If wallpaper is a function, call it with the screenif type(wallpaper) == "function" thenwallpaper = wallpaper(s)endgears.wallpaper.maximized(wallpaper, s, true)endend-- Re-set wallpaper when a screen's geometry changes (e.g. different resolution)screen.connect_signal("property::geometry", set_wallpaper)#+end_src* Wibar#+begin_src lualocal apt_widget = require("awesome-wm-widgets.apt-widget.apt-widget")local batteryarc_widget = require("awesome-wm-widgets.batteryarc-widget.batteryarc")local volume_widget = require('awesome-wm-widgets.volume-widget.volume')awful.screen.connect_for_each_screen(function(s)-- Wallpaperset_wallpaper(s)-- Each screen has its own tag table.local names = { "main", "notes", "www", "cons", "emacs", "chat", "nav", "média", "conf" }awful.tag(names, s, awful.layout.layouts[1])-- Create a promptbox for each screens.mypromptbox = awful.widget.prompt()-- Create an imagebox widget which will contain an icon indicating which layout we're using.-- We need one layoutbox per screen.s.mylayoutbox = awful.widget.layoutbox(s)s.mylayoutbox:buttons(gears.table.join(awful.button({ }, 1, function () awful.layout.inc( 1) end),awful.button({ }, 3, function () awful.layout.inc(-1) end),awful.button({ }, 4, function () awful.layout.inc( 1) end),awful.button({ }, 5, function () awful.layout.inc(-1) end)))-- Create a taglist widgets.mytaglist = awful.widget.taglist {screen = s,filter = awful.widget.taglist.filter.all,buttons = taglist_buttons}-- Create a tasklist widgets.mytasklist = awful.widget.tasklist {screen = s,filter = awful.widget.tasklist.filter.currenttags,buttons = tasklist_buttons}-- Create the wiboxs.mywibox = awful.wibar({ position = "top", screen = s })-- Add widgets to the wiboxs.mywibox:setup {layout = wibox.layout.align.horizontal,{ -- Left widgetslayout = wibox.layout.fixed.horizontal,mylauncher,s.mytaglist,s.mypromptbox,},s.mytasklist, -- Middle widget{ -- Right widgetslayout = wibox.layout.fixed.horizontal,-- mykeyboardlayout,apt_widget(),wibox.widget.systray(),batteryarc_widget(),volume_widget(),--{--widget_type = 'icon_and_text'--},mytextclock,s.mylayoutbox,},}end)-- }}}-- {{{ Mouse bindingsroot.buttons(gears.table.join(awful.button({ }, 3, function () mymainmenu:toggle() end),awful.button({ }, 4, awful.tag.viewnext),awful.button({ }, 5, awful.tag.viewprev)))-- }}}-- {{{ Key bindingsglobalkeys = gears.table.join(awful.key({ modkey, }, "s", hotkeys_popup.show_help,{description="show help", group="awesome"}),awful.key({ modkey, }, "Left", awful.tag.viewprev,{description = "view previous", group = "tag"}),awful.key({ modkey, }, "Right", awful.tag.viewnext,{description = "view next", group = "tag"}),awful.key({ modkey, }, "Escape", awful.tag.history.restore,{description = "go back", group = "tag"}),awful.key({ modkey, }, "j",function ()awful.client.focus.byidx( 1)end,{description = "focus next by index", group = "client"}),awful.key({ modkey, }, "k",function ()awful.client.focus.byidx(-1)end,{description = "focus previous by index", group = "client"}),awful.key({ modkey, }, "w", function () mymainmenu:show() end,{description = "show main menu", group = "awesome"}),-- Layout manipulationawful.key({ modkey, "Shift" }, "j", function () awful.client.swap.byidx( 1) end,{description = "swap with next client by index", group = "client"}),awful.key({ modkey, "Shift" }, "k", function () awful.client.swap.byidx( -1) end,{description = "swap with previous client by index", group = "client"}),awful.key({ modkey, "Control" }, "j", function () awful.screen.focus_relative( 1) end,{description = "focus the next screen", group = "screen"}),awful.key({ modkey, "Control" }, "k", function () awful.screen.focus_relative(-1) end,{description = "focus the previous screen", group = "screen"}),awful.key({ modkey, }, "u", awful.client.urgent.jumpto,{description = "jump to urgent client", group = "client"}),awful.key({ modkey, }, "Tab",function ()awful.client.focus.history.previous()if client.focus thenclient.focus:raise()endend,{description = "go back", group = "client"}),-- Standard programawful.key({ modkey, }, "Return", function () awful.spawn(terminal) end,{description = "open a terminal", group = "launcher"}),awful.key({ modkey, "Control" }, "r", awesome.restart,{description = "reload awesome", group = "awesome"}),awful.key({ modkey, "Shift" }, "q", awesome.quit,{description = "quit awesome", group = "awesome"}),awful.key({ modkey, }, "l", function () awful.tag.incmwfact( 0.05) end,{description = "increase master width factor", group = "layout"}),awful.key({ modkey, }, "h", function () awful.tag.incmwfact(-0.05) end,{description = "decrease master width factor", group = "layout"}),awful.key({ modkey, "Shift" }, "h", function () awful.tag.incnmaster( 1, nil, true) end,{description = "increase the number of master clients", group = "layout"}),awful.key({ modkey, "Shift" }, "l", function () awful.tag.incnmaster(-1, nil, true) end,{description = "decrease the number of master clients", group = "layout"}),awful.key({ modkey, "Control" }, "h", function () awful.tag.incncol( 1, nil, true) end,{description = "increase the number of columns", group = "layout"}),awful.key({ modkey, "Control" }, "l", function () awful.tag.incncol(-1, nil, true) end,{description = "decrease the number of columns", group = "layout"}),awful.key({ modkey, }, "space", function () awful.layout.inc( 1) end,{description = "select next", group = "layout"}),awful.key({ modkey, "Shift" }, "space", function () awful.layout.inc(-1) end,{description = "select previous", group = "layout"}),awful.key({ modkey, "Control" }, "n",function ()local c = awful.client.restore()-- Focus restored clientif c thenc:emit_signal("request::activate", "key.unminimize", {raise = true})endend,{description = "restore minimized", group = "client"}),-- Promptawful.key({ modkey, "Shift" }, "r", function () awful.screen.focused().mypromptbox:run() end,{description = "run prompt", group = "launcher"}),awful.key({ modkey }, "x",function ()awful.prompt.run {prompt = "Run Lua code: ",textbox = awful.screen.focused().mypromptbox.widget,exe_callback = awful.util.eval,history_path = awful.util.get_cache_dir() .. "/history_eval"}end,{description = "lua execute prompt", group = "awesome"}),-- Menubarawful.key({ modkey }, "p", function() menubar.show() end,{description = "show the menubar", group = "launcher"}))clientkeys = gears.table.join(awful.key({ modkey, }, "f",function (c)c.fullscreen = not c.fullscreenc:raise()end,{description = "toggle fullscreen", group = "client"}),awful.key({ modkey, "Shift" }, "c", function (c) c:kill() end,{description = "close", group = "client"}),awful.key({ modkey, "Control" }, "space", awful.client.floating.toggle ,{description = "toggle floating", group = "client"}),awful.key({ modkey, "Control" }, "Return", function (c) c:swap(awful.client.getmaster()) end,{description = "move to master", group = "client"}),awful.key({ modkey, }, "o", function (c) c:move_to_screen() end,{description = "move to screen", group = "client"}),awful.key({ modkey, }, "t", function (c) c.ontop = not c.ontop end,{description = "toggle keep on top", group = "client"}),awful.key({ modkey, }, "n",function (c)-- The client currently has the input focus, so it cannot be-- minimized, since minimized clients can't have the focus.c.minimized = trueend ,{description = "minimize", group = "client"}),awful.key({ modkey, }, "m",function (c)c.maximized = not c.maximizedc:raise()end ,{description = "(un)maximize", group = "client"}),awful.key({ modkey, "Control" }, "m",function (c)c.maximized_vertical = not c.maximized_verticalc:raise()end ,{description = "(un)maximize vertically", group = "client"}),awful.key({ modkey, "Shift" }, "m",function (c)c.maximized_horizontal = not c.maximized_horizontalc:raise()end ,{description = "(un)maximize horizontally", group = "client"}))-- Bind all key numbers to tags.-- Be careful: we use keycodes to make it work on any keyboard layout.-- This should map on the top row of your keyboard, usually 1 to 9.for i = 1, 9 doglobalkeys = gears.table.join(globalkeys,-- View tag only.awful.key({ modkey }, "#" .. i + 9,function ()local screen = awful.screen.focused()local tag = screen.tags[i]if tag thentag:view_only()endend,{description = "view tag #"..i, group = "tag"}),-- Toggle tag display.awful.key({ modkey, "Control" }, "#" .. i + 9,function ()local screen = awful.screen.focused()local tag = screen.tags[i]if tag thenawful.tag.viewtoggle(tag)endend,{description = "toggle tag #" .. i, group = "tag"}),-- Move client to tag.awful.key({ modkey, "Shift" }, "#" .. i + 9,function ()if client.focus thenlocal tag = client.focus.screen.tags[i]if tag thenclient.focus:move_to_tag(tag)endendend,{description = "move focused client to tag #"..i, group = "tag"}),-- Toggle tag on focused client.awful.key({ modkey, "Control", "Shift" }, "#" .. i + 9,function ()if client.focus thenlocal tag = client.focus.screen.tags[i]if tag thenclient.focus:toggle_tag(tag)endendend,{description = "toggle focused client on tag #" .. i, group = "tag"}))endclientbuttons = gears.table.join(awful.button({ }, 1, function (c)c:emit_signal("request::activate", "mouse_click", {raise = true})end),awful.button({ modkey }, 1, function (c)c:emit_signal("request::activate", "mouse_click", {raise = true})awful.mouse.client.move(c)end),awful.button({ modkey }, 3, function (c)c:emit_signal("request::activate", "mouse_click", {raise = true})awful.mouse.client.resize(c)end))-- Set keys-- }}}#+end_src* Règles de fenêtresRules to apply to new clients (through the "manage" signal).#+begin_src luaawful.rules.rules = {-- All clients will match this rule.{ rule = { },properties = { border_width = beautiful.border_width,border_color = beautiful.border_normal,focus = awful.client.focus.filter,raise = true,keys = clientkeys,buttons = clientbuttons,screen = awful.screen.preferred,placement = awful.placement.no_overlap+awful.placement.no_offscreen}},{rule = { class = "Syncthing" },properties = { tag = "conf" },callback = function(c)local t = awful.tag.find_by_name(c.screen, "conf")if t thenawful.tag.viewmore({ t }, c.screen)endend},{rule = { class = "Emacs" },properties = { tag = "emacs" },callback = function(c)local t = awful.tag.find_by_name(c.screen, "emacs")if t thenawful.tag.viewmore({ t }, c.screen)endend},{rule = { class = "Alacritty" },properties = { tag = "cons" },callback = function(c)local t = awful.tag.find_by_name(c.screen, "cons")if t thenawful.tag.viewmore({ t }, c.screen)endend},{rule = { class = "Proton Pass" },properties = { tag = "conf" },callback = function(c)local t = awful.tag.find_by_name(c.screen, "conf")if t thenawful.tag.viewmore({ t }, c.screen)endend},{rule = { class = "Brave-browser" },properties = { tag = "www" },callback = function(c)local t = awful.tag.find_by_name(c.screen, "www")if t thenawful.tag.viewmore({ t }, c.screen)endend},{rule = { class = "discord" },properties = { tag = "chat" },callback = function(c)local t = awful.tag.find_by_name(c.screen, "chat")if t thenawful.tag.viewmore({ t }, c.screen)endend},{rule = { class = "Slack" },properties = { tag = "chat" },callback = function(c)local t = awful.tag.find_by_name(c.screen, "chat")if t thenawful.tag.viewmore({ t }, c.screen)endend},{rule = { name = "Outlook.*" },properties = { tag = "chat" },callback = function(c)local t = awful.tag.find_by_name(c.screen, "chat")if t thenawful.tag.viewmore({ t }, c.screen)endend},{rule = { name = "Thunar" },properties = { tag = "nav" },callback = function(c)local t = awful.tag.find_by_name(c.screen, "nav")if t thenawful.tag.viewmore({ t }, c.screen)endend},{rule = { name = "obsidian" },properties = { tag = "notes" },callback = function(c)local t = awful.tag.find_by_name(c.screen, "notes")if t thenawful.tag.viewmore({ t }, c.screen)endend},{rule = { name = "Proton Mail" },properties = { tag = "chat" },callback = function(c)local t = awful.tag.find_by_name(c.screen, "chat")if t thenawful.tag.viewmore({ t }, c.screen)endend},-- Floating clients.{ rule_any = {instance = {"DTA", -- Firefox addon DownThemAll."copyq", -- Includes session name in class."pinentry",},class = {"Arandr","Blueman-manager","Gpick","Kruler","MessageWin", -- kalarm."Sxiv","Tor Browser", -- Needs a fixed window size to avoid fingerprinting by screen size."Wpa_gui","veromix","xtightvncviewer"},-- Note that the name property shown in xprop might be set slightly after creation of the client-- and the name shown there might not match defined rules here.name = {"Event Tester", -- xev.},role = {"AlarmWindow", -- Thunderbird's calendar."ConfigManager", -- Thunderbird's about:config."pop-up", -- e.g. Google Chrome's (detached) Developer Tools.}}, properties = { floating = true }},-- Add titlebars to normal clients and dialogs{ rule_any = {type = { "normal", "dialog" }}, properties = { titlebars_enabled = true }},-- Set Firefox to always map on the tag named "2" on screen 1.-- { rule = { class = "Firefox" },-- properties = { screen = 1, tag = "2" } },}-- }}}-- {{{ Signals-- Signal function to execute when a new client appears.client.connect_signal("manage", function (c)-- Set the windows at the slave,-- i.e. put it at the end of others instead of setting it master.-- if not awesome.startup then awful.client.setslave(c) endif awesome.startupand not c.size_hints.user_positionand not c.size_hints.program_position then-- Prevent clients from being unreachable after screen count changes.awful.placement.no_offscreen(c)endend)-- Add a titlebar if titlebars_enabled is set to true in the rules.client.connect_signal("request::titlebars", function(c)-- buttons for the titlebarlocal buttons = gears.table.join(awful.button({ }, 1, function()c:emit_signal("request::activate", "titlebar", {raise = true})awful.mouse.client.move(c)end),awful.button({ }, 3, function()c:emit_signal("request::activate", "titlebar", {raise = true})awful.mouse.client.resize(c)end))awful.titlebar(c) : setup {{ -- Leftawful.titlebar.widget.iconwidget(c),buttons = buttons,layout = wibox.layout.fixed.horizontal},{ -- Middle{ -- Titlealign = "center",widget = awful.titlebar.widget.titlewidget(c)},buttons = buttons,layout = wibox.layout.flex.horizontal},{ -- Rightawful.titlebar.widget.floatingbutton (c),awful.titlebar.widget.maximizedbutton(c),awful.titlebar.widget.stickybutton (c),awful.titlebar.widget.ontopbutton (c),awful.titlebar.widget.closebutton (c),layout = wibox.layout.fixed.horizontal()},layout = wibox.layout.align.horizontal}end)#+end_src#+RESULTS:* Souris** Activer le clic par tapotement~xinput list~ permet d’obtenir la liste des périphériques.#+begin_src luaawful.spawn.with_shell("xinput set-prop 'SYNA3297:00 06CB:CD50 Touchpad' 'libinput Tapping Enabled' 1")awful.spawn.with_shell("xinput set-prop 'Casa Touch' 'libinput Tapping Enabled' 1")#+end_src** Inverser le scroll de la souris#+begin_src luaawful.spawn.with_shell("xinput set-prop 'SYNA3297:00 06CB:CD50 Touchpad' 'libinput Natural Scrolling Enabled' 1")awful.spawn.with_shell("xinput set-prop 'Casa Touch' 'libinput Natural Scrolling Enabled' 1")#+end_src** Le focus suit la souris#+begin_src luaclient.connect_signal("mouse::enter", function(c)c:emit_signal("request::activate", "mouse_enter", {raise = false})end)client.connect_signal("focus", function(c) c.border_color = beautiful.border_focus end)client.connect_signal("unfocus", function(c) c.border_color = beautiful.border_normal end)#+end_src** Vitesse de la souris#+begin_src luaawful.spawn.with_shell("xinput set-prop 'SYNA3297:00 06CB:CD50 Touchpad' 'libinput Accel Speed' 0.3")awful.spawn.with_shell("xinput set-prop 'Casa Touch' 'libinput Accel Speed' 0.3")#+end_src* Clavier** Configurer le clavier en Bépo Afnor#+begin_src luaawful.spawn.with_shell("setxkbmap fr bepo_afnor")#+end_src** Raccourcis clavier pour le volume et la luminosité#+begin_src lua-- Ajouter les nouvelles clés de volume et luminosité aux globalkeysglobalkeys = gears.table.join(globalkeys,-- Raccourcis volumeawful.key({ }, "XF86AudioMute", function ()awful.spawn("amixer -q sset Master toggle")end,{description = "Couper / rétablir le son", group = "audio"}),awful.key({ }, "XF86AudioRaiseVolume", function ()awful.spawn("amixer -q sset Master 5%+")end,{description = "Augmenter le volume", group = "audio"}),awful.key({ }, "XF86AudioLowerVolume", function ()awful.spawn("amixer -q sset Master 5%-")end,{description = "Diminuer le volume", group = "audio"}),awful.key({}, "XF86AudioRaiseVolume", function() volume_widget.inc() end),awful.key({}, "XF86AudioLowerVolume", function() volume_widget.dec() end),awful.key({}, "XF86AudioMute", function() volume_widget.toggle() end),-- Media Keysawful.key({}, "XF86AudioPlay", function()awful.util.spawn("playerctl play-pause", false) end),awful.key({}, "XF86AudioNext", function()awful.util.spawn("playerctl next", false) end),awful.key({}, "XF86AudioPrev", function()awful.util.spawn("playerctl previous", false) end),-- Raccourcis luminositéawful.key({ }, "XF86MonBrightnessUp", function ()awful.spawn("brightnessctl set +10%")end,{description = "Augmenter la luminosité", group = "brightness"}),awful.key({ }, "XF86MonBrightnessDown", function ()awful.spawn("brightnessctl set 10%-")end,{description = "Diminuer la luminosité", group = "brightness"}))#+end_src** Raccourcis clavier pour le lancement de Rofi#+begin_src luaglobalkeys = gears.table.join(globalkeys,awful.key({ modkey }, "r", function ()awful.spawn("rofi -show drun -theme fancy")end,{description = "Lancer Rofi", group = "Outils"}))root.keys(globalkeys)#+end_src* Applications au démarrage#+begin_src luaawful.spawn.with_shell("nm-applet &")awful.spawn.with_shell("blueman-applet &")awful.spawn.with_shell("emacs --daemon &")awful.spawn.with_shell("dropbox start &")awful.spawn.with_shell("libinput-gestures-setup stop desktop autostart start")awful.spawn.with_shell("syncthing-gtk &")awful.spawn.with_shell("clavier-bluetooth")#+end_src
.git/old/.roswell/.local/