init
authorOlivier Matz <zer0@droids-corp.org>
Wed, 2 Jun 2021 13:22:29 +0000 (15:22 +0200)
committerOlivier Matz <zer0@droids-corp.org>
Wed, 2 Jun 2021 13:22:29 +0000 (15:22 +0200)
.emacs [new file with mode: 0644]
.gitignore [new file with mode: 0644]
.screenrc [new file with mode: 0644]
.tmux.conf [new file with mode: 0644]
debian-config.txt [new file with mode: 0644]

diff --git a/.emacs b/.emacs
new file mode 100644 (file)
index 0000000..04ba873
--- /dev/null
+++ b/.emacs
@@ -0,0 +1,408 @@
+;; .emacs
+
+(add-to-list 'load-path "~/.emacs.d/lisp/egg")
+
+;;; uncomment this line to disable loading of "default.el" at startup
+;; (setq inhibit-default-init t)
+
+;; enable visual feedback on selections
+;(setq transient-mark-mode t)
+
+;; default to better frame titles
+(setq frame-title-format
+      (concat  "%b - emacs@" (system-name)))
+
+;; default to unified diffs
+(setq diff-switches "-u")
+
+;; always end a file with a newline
+;(setq require-final-newline 'query)
+
+;;; uncomment for CJK utf-8 support for non-Asian users
+;; (require 'un-define)
+
+(set-background-color "black")
+(set-foreground-color "grey")
+(set-cursor-color "white")
+(set-mouse-color "white")
+
+(setq delete-auto-save-files t)
+(setq inhibit-startup-message t)
+
+(menu-bar-mode 0)
+(tool-bar-mode 0)
+
+(electric-indent-mode 0)
+
+;; (require 'color-theme)
+;; (if window-system
+;;       (color-theme-emacs-21)
+;;       (color-theme-hober))
+;;(color-theme-arjen)
+
+(set-frame-font "7x14")
+
+;; Mousewheel
+(defun sd-mousewheel-scroll-up (event)
+  "Scroll window under mouse up by five lines."
+  (interactive "e")
+  (let ((current-window (selected-window)))
+    (unwind-protect
+       (progn
+         (select-window (posn-window (event-start event)))
+         (scroll-up 5))
+      (select-window current-window))))
+
+(defun sd-mousewheel-scroll-down (event)
+  "Scroll window under mouse down by five lines."
+  (interactive "e")
+  (let ((current-window (selected-window)))
+    (unwind-protect
+       (progn
+         (select-window (posn-window (event-start event)))
+         (scroll-down 5))
+      (select-window current-window))))
+
+(global-set-key (kbd "<mouse-5>") 'sd-mousewheel-scroll-up)
+(global-set-key (kbd "<mouse-4>") 'sd-mousewheel-scroll-down)
+
+; Montrer la correspondance des parenthèses
+; (systématiquement et non seulement après la frappe)
+(require 'paren)
+(show-paren-mode t)
+(setq blink-matching-paren t)
+(setq blink-matching-paren-on-screen t)
+(setq blink-matching-paren-dont-ignore-comments t)
+
+; Afficher l'heure dans la barre d'état (format 24 heures)
+(setq display-time-24hr-format t)
+(display-time)
+
+; Nom en clair des jours et mois apparaissant dans le calendrier
+(setq european-calendar-style t)
+(setq calendar-week-start-day 1)
+(defvar calendar-day-name-array
+  ["dimanche" "lundi" "mardi" "mercredi" "jeudi" "vendredi" "samedi"])
+(defvar calendar-month-name-array
+  ["janvier" "février" "mars" "avril" "mai" "juin"
+   "juillet" "août" "septembre" "octobre" "novembre" "décembre"])
+
+; C'est fastidieux de taper « yes » pour confirmer, raccourcissons
+; cela à « y » (idem pour « no », désormais « n »).
+(fset 'yes-or-no-p 'y-or-n-p)
+
+;; Raccourcis clavier
+(global-set-key [f2]           'egg-status)
+(global-set-key [f3]           'cvs-status)
+(global-set-key [f4]           'cvs-quickdir)
+(global-set-key [f5]           'toggle-read-only)
+(global-set-key [f6]           'goto-line)
+(global-set-key [f7]           'rgrep)
+(global-set-key [f8]           'revert-buffer)
+(global-set-key [f9]           'compile)
+(global-set-key [f10]          'next-error)
+(global-set-key [f11]          'toggle-fill-mode)
+(global-set-key [f12]          'toggle-whitespace-begin-space)
+
+(global-set-key "\M-?"         'tags-search)
+(global-set-key "\M-s"         'search-word)
+(global-set-key (kbd "C-x <down>") 'rotate-windows)
+
+
+;; page up, page down
+(fset 'page-down
+   [next])
+(fset 'page-up
+   [prior])
+
+(global-set-key "\M-p" 'page-up)
+(global-set-key "\M-n" 'page-down)
+
+;; Pour utiliser gnumake par defaut
+;; M-x customize !
+(custom-set-variables
+ ;; custom-set-variables was added by Custom.
+ ;; If you edit it by hand, you could mess it up, so be careful.
+ ;; Your init file should contain only one such instance.
+ ;; If there is more than one, they won't work right.
+ '(compile-command "make")
+ '(ediff-split-window-function (quote split-window-horizontally))
+ '(ediff-window-setup-function (quote ediff-setup-windows-plain))
+ '(egg-buffer-hide-section-type-on-start nil)
+ '(egg-mode-key-prefix "C-x !")
+ '(rst-adornment-faces-alist (quote ((t . font-lock-keyword-face) (nil . font-lock-keyword-face) (nil . rst-level-1-face) (nil . rst-level-2-face) (nil . rst-level-3-face) (nil . rst-level-4-face) (nil . rst-level-5-face) (nil . rst-level-6-face))))
+ '(shell-file-name "/bin/bash")
+ '(vc-handled-backends (quote (RCS CVS SVN SCCS Bzr Hg Mtn Arch))))
+
+; Effacer tous les espaces en fin de ligne
+(defun delete-trailing-spaces ()
+  "Effacer les espaces et tabulations en fin de chaque ligne du tampon"
+  (interactive)
+  (progn
+    (save-excursion
+      (goto-line 1)
+      (replace-regexp "[ \t]+$" "")
+    )
+  )
+)
+
+
+; Conversion des fins de lignes du format MS-DOS au format Unix
+(defun dos2unix ()
+  (interactive)
+  (goto-char (point-min))
+  (while (search-forward "\r" nil t)
+    (replace-match "")
+  )
+)
+
+
+; Conversion des fins de ligne du format Unix au format MS-DOS
+(defun unix2dos ()
+  (interactive)
+  (goto-char (point-min))
+  (while (search-forward "\n" nil t)
+    (replace-match "\r\n")
+  )
+)
+
+
+; Montrer la table des caractères ASCII étendus
+; Fonction fournie par Alex Schroeder <asc@bsiag.com>
+(defun ascii-table ()
+  "Afficher la table de caractères ASCII."
+  (interactive)
+  (switch-to-buffer "*ASCII*")
+  (erase-buffer)
+  (insert (format "Caractères ASCII de code 1 à 254.\n"))
+  (let ((i 0))
+    (while (< i 254) (setq i (+ i 1))
+      (insert (format "%4d %c\n" i i))
+    )
+  )
+  (beginning-of-buffer)
+)
+
+
+; Activation des fonctions « upcase-region » et « downcase-region »
+; Ces fonctions sont désactivées par défaut sous Emacs 21 ; pourquoi ?
+(put 'upcase-region 'disabled nil)
+(put 'downcase-region 'disabled nil)
+
+; taille de la fenetre de compil
+(setq compilation-window-height 15)
+
+; indentation
+(require 'cc-mode)
+(defun my-build-tab-stop-list (width)
+  (let ((num-tab-stops (/ 80 width))
+       (counter 1)
+       (ls nil))
+    (while (<= counter num-tab-stops)
+      (setq ls (cons (* width counter) ls))
+      (setq counter (1+ counter)))
+    (set (make-local-variable 'tab-stop-list) (nreverse ls))))
+
+; from linux/Documentation/CodingStyle
+;
+(defun c-lineup-arglist-tabs-only (ignored)
+  "Line up argument lists by tabs, not spaces"
+  (let* ((anchor (c-langelem-pos c-syntactic-element))
+        (column (c-langelem-2nd-pos c-syntactic-element))
+        (offset (- (1+ column) anchor))
+        (steps (floor offset c-basic-offset)))
+    (* (max steps 1)
+       c-basic-offset)))
+
+;; Add kernel style
+(c-add-style
+ "linux-tabs-only"
+ '("linux" (c-offsets-alist
+           (arglist-cont-nonempty
+            c-lineup-gcc-asm-reg
+            c-lineup-arglist-tabs-only))))
+
+(add-hook 'c-mode-hook
+         (lambda ()
+           (c-set-style "linux-tabs-only"))
+)
+
+(add-hook 'c-mode-common-hook
+  (lambda ()
+    (font-lock-add-keywords nil
+    '(("\\<\\(FIXME\\|TODO\\|HACK\\|fixme\\|todo\\|hack\\|XXX\\)" 1
+        font-lock-warning-face t)))))
+
+(defun set-indent-quagga ()
+  (interactive)
+  (setq c-basic-offset 2)
+  (setq tab-width 8 indent-tabs-mode nil)
+)
+
+(defun set-indent-xms ()
+  (interactive)
+  (setq c-basic-offset 4)
+  (setq tab-width 8 indent-tabs-mode nil)
+)
+
+(defun set-indent-std ()
+  (interactive)
+  (c-set-offset 'arglist-cont-nonempty 8)
+  (c-set-offset 'arglist-intro '+)
+  (c-set-offset 'arglist-close 0)
+  (setq c-basic-offset 8)
+  (setq tab-width 8 indent-tabs-mode 1)
+)
+
+;; marche pas...
+(defun set-indent-dpdk ()
+  (interactive)
+  (c-set-offset 'arglist-cont-nonempty 16)
+  (c-set-offset 'arglist-intro '+)
+  (c-set-offset 'arglist-close 0)
+  (setq c-basic-offset 8)
+  (setq tab-width 8 indent-tabs-mode 1)
+)
+
+(defun toggle-whitespace-begin-space ()
+  (interactive)
+  (whitespace-toggle-options '(indentation::tab indentation))
+)
+
+ '(sh-basic-offset 2)
+ '(sh-indent-after-function (quote -))
+ '(sh-indent-comment t)
+
+;; indentation of shell scripts
+(defun set-sh-indent-8 ()
+  "My own personal preferences for `sh-mode'.
+
+This is a custom function that sets up the parameters I usually
+prefer for `sh-mode'.  It is automatically added to
+`sh-mode-hook', but is can also be called interactively."
+  (interactive)
+  (setq sh-basic-offset 8
+       sh-indentation 8
+       sh-indent-comment t))
+(add-hook 'sh-mode-hook 'set-sh-indent-8)
+
+;; packager
+(defun set-sh-indent-4 ()
+  (interactive)
+  (setq sh-basic-offset 4
+       sh-indentation 4
+       sh-indent-comment t
+       indent-tabs-mode nil))
+
+(custom-set-faces
+ ;; custom-set-faces was added by Custom.
+ ;; If you edit it by hand, you could mess it up, so be careful.
+ ;; Your init file should contain only one such instance.
+ ;; If there is more than one, they won't work right.
+ )
+
+;; (set-terminal-coding-system 'latin-9)
+;; (set-keyboard-coding-system 'latin-9)
+;; (set-language-environment 'latin-9)
+
+(add-to-list 'kill-emacs-query-functions
+            (lambda () (y-or-n-p "Should Emacs really close? ")))
+
+(require 'xcscope)
+
+(define-key global-map [(control f3)]  'cscope-set-initial-directory)
+(define-key global-map [(control f4)]  'cscope-unset-initial-directory)
+(define-key global-map [(control f5)]  'cscope-find-this-symbol)
+(define-key global-map [(control f6)]  'cscope-find-global-definition)
+(define-key global-map [(control f7)]  'cscope-find-global-definition-no-prompting)
+(define-key global-map [(control f8)]  'cscope-pop-mark)
+(define-key global-map [(control f9)]  'cscope-next-symbol)
+(define-key global-map [(control f10)] 'cscope-next-file)
+(define-key global-map [(control f11)] 'cscope-prev-symbol)
+(define-key global-map [(control f12)] 'cscope-prev-file)
+(define-key global-map [(meta f9)]  'cscope-display-buffer)
+(define-key global-map [(meta f10)] 'cscope-display-buffer-toggle)
+;(setq cscope-display-cscope-buffer nil)
+
+
+(defun vi-nolist ()
+  "Simulate a :set nolist in Vi."
+  (interactive)
+  (standard-display-ascii ?\t "\t")
+  (standard-display-ascii ?\ "\ ") )
+
+(defun sign ()
+  "Insert signature."
+  (interactive "*")
+  (insert "Signed-off-by: Olivier Matz <olivier.matz@6wind.com>")
+)
+
+(defun ack-choice ()
+  "Insert acked-by."
+  (interactive
+   (let ((string (read-string "Name: " nil 'my-history)))
+     (insert (shell-command-to-string (concat "acked-by.py " string))))
+  )
+)
+
+(defun sign-choice ()
+  "Insert acked-by."
+  (interactive
+   (let ((string (read-string "Name: " nil 'my-history)))
+     (insert (shell-command-to-string (concat "acked-by.py -s " string))))
+  )
+)
+
+(defun toggle-fill-mode ()
+  "toggle fill mode between 72 and 80"
+  (interactive "*")
+  (if (<= fill-column 72)
+    (setq-default fill-column 80)
+    (setq-default fill-column 72)))
+
+(defun rotate-windows-helper(x d)
+  (if (equal (cdr x) nil) (set-window-buffer (car x) d)
+    (set-window-buffer (car x) (window-buffer (cadr x))) (rotate-windows-helper (cdr x) d)))
+
+(defun rotate-windows ()
+  (interactive)
+  (rotate-windows-helper (window-list) (window-buffer (car (window-list))))
+  (select-window (car (last (window-list)))))
+
+;; http://www.emacswiki.org/emacs/WhiteSpace
+(require 'whitespace)
+(global-whitespace-mode 1)
+(setq whitespace-style '(face trailing lines-tail indentation::tab indentation
+                                 space-after-tab::tab space-after-tab::space
+                                 space-after-tab space-before-tab::tab
+                                 space-before-tab::space space-before-tab))
+;; for xms, remove indentation::tab and indentation
+;; (setq whitespace-style '(face trailing lines-tail
+;;                               space-after-tab::tab space-after-tab::space
+;;                               space-after-tab space-before-tab::tab
+;;                               space-before-tab::space space-before-tab))
+
+
+(defun bf-pretty-print-xml-region (begin end)
+  "Pretty format XML markup in region. You need to have nxml-mode
+http://www.emacswiki.org/cgi-bin/wiki/NxmlMode installed to do
+this.  The function inserts linebreaks to separate tags that have
+nothing but whitespace between them.  It then indents the markup
+by using nxml's indentation rules."
+  (interactive "r")
+  (save-excursion
+      (nxml-mode)
+      (goto-char begin)
+      (while (search-forward-regexp "\>[ \\t]*\<" nil t)
+       (backward-char) (insert "\n"))
+      (indent-region begin end))
+    (message "Ah, much better!"))
+
+; git
+(require 'egg)
+
+; fill column to 80 when we use M-q
+(setq-default fill-column 80)
+
+; to remove once fixed (make 4.0 compat)
+(setq-default compilation-directory-matcher '("\\(?:Entering\\|Leavin\\(g\\)\\) directory [`']\\(.+\\)'$" (2 . 1)))
diff --git a/.gitignore b/.gitignore
new file mode 100644 (file)
index 0000000..e69de29
diff --git a/.screenrc b/.screenrc
new file mode 100644 (file)
index 0000000..2f667bf
--- /dev/null
+++ b/.screenrc
@@ -0,0 +1,66 @@
+
+# term vt100
+term screen-256color
+
+deflogin on
+
+vbell on
+vbell_msg "   Maou !! Maaaaaaaou !    "
+
+# define a bigger scrollback, default is 100 lines
+defscrollback 65536
+
+escape ^pp
+
+# Remove some stupid / dangerous key bindings
+bind ^k
+#bind L
+bind ^\
+# Make them better
+bind \\ quit
+bind K kill
+bind I login on
+bind O login off
+bind } history
+
+# The vt100 description does not mention "dl". *sigh*
+#termcapinfo vt100 dl=5\E[M
+
+
+hardstatus on
+hardstatus alwayslastline
+#hardstatus string "%{= kw}%w"
+#hardstatus string "%h%? users: %u%?"
+
+# An alternative hardstatus to display a bar at the bottom listing the
+# windownames and highlighting the current windowname in blue. (This is only
+# enabled if there is no hardstatus setting for your terminal)
+#
+#hardstatus lastline "%-Lw%{= BW}%50>%n%f* %t%{-}%+Lw%<"
+hardstatus string "%-Lw%{= BW}%50>%n%f* %t%{-}%+Lw%<"
+
+# set these terminals up to be 'optimal' instead of vt100
+termcapinfo xterm*|linux*|rxvt*|Eterm* OP
+
+# Change the xterm initialization string from is2=\E[!p\E[?3;4l\E[4l\E>
+# (This fixes the "Aborted because of window size change" konsole symptoms found
+#  in bug #134198)
+termcapinfo xterm 'is=\E[r\E[m\E[2J\E[H\E[?7h\E[?1;4;6l'
+
+# Enable non-blocking mode to better cope with flaky ssh connections.
+defnonblock 5
+
+# STARTUP SCREENS
+# ------------------------------------------------------------------------------
+
+# Example of automatically running some programs in windows on screen startup.
+#
+#   The following will open top in the first window, an ssh session to monkey
+#   in the next window, and then open mutt and tail in windows 8 and 9
+#   respectively.
+#
+# screen top
+# screen -t monkey ssh monkey
+# screen -t mail 8 mutt
+# screen -t daemon 9 tail -f /var/log/daemon.log
+
diff --git a/.tmux.conf b/.tmux.conf
new file mode 100644 (file)
index 0000000..7f5bdeb
--- /dev/null
@@ -0,0 +1,88 @@
+unbind-key C-b
+set-option -g prefix C-p
+bind-key p send-prefix
+bind-key C-p last-window
+
+setw -g window-status-format "#[bg=blue]#[fg=white]#I #W"
+setw -g window-status-current-format "#[fg=white,bold]#[bg=cyan]#I #W"
+set -g window-status-separator ' | '
+
+set -g status-justify left
+set -g status-fg white
+set -g status-bg blue
+set -g status-right ''
+set -g status-left-length 100
+
+set -g message-command-style "bold,fg=red,bg=blue"
+set -g message-style "bold,fg=red,bg=blue"
+
+set -g automatic-rename off
+
+# Greather history
+set -g history-limit 100000
+
+# New session with prefix + C
+bind-key C new-session \; command-prompt "rename-session %%"
+
+# New window + title
+bind-key c new-window \; command-prompt "rename-window %%"
+
+# Shift arrow to switch windows
+bind -n S-Left  previous-window
+bind -n S-Right next-window
+
+# Move windows with arrow keys
+bind-key -n C-S-Left swap-window -t -1
+bind-key -n C-S-Right swap-window -t +1
+
+#  The default command key bindings are:
+#
+#  [           Enter copy mode to copy text or view the history.
+#
+#  Function                     vi              emacs
+#  --------                     --              -----
+#  Half page down               C-d             M-Down
+#  Half page up                 C-u             M-Up
+#  Next page                    C-f             Page down
+#  Previous page                C-b             Page up
+#  Scroll down                  C-Down or C-e   C-Down
+#  Scroll up                    C-Up or C-y     C-Up
+#  Search again                 n               n
+#  Search again in reverse      N               N
+#  Search backward              ?               C-r
+#  Search forward               /               C-s
+setw -g mode-keys vi
+
+# Toggle mouse on with prefix + m
+bind m \
+       set -g mouse on \;\
+       display 'Mouse: on'
+# Toggle mouse off with prefix + M
+bind M \
+       set -g mouse off \;\
+       display 'Mouse: off'
+
+# Use escape for copy mode
+unbind [
+bind Escape copy-mode
+# use vi style to select/copy/paste
+bind-key -T copy-mode-vi v send -X begin-selection
+bind-key -T copy-mode-vi y send -X copy-pipe-and-cancel "reattach-to-user-namespace pbcopy"
+bind p paste-buffer
+
+# useful to scroll but breaks copy&paste
+# setw -g mouse on
+# Scroll with the mouse
+#bind -n WheelUpPane if-shell -F -t = "#{mouse_any_flag}" "send-keys -M" "if -Ft= '#{pane_in_mode}' 'send-keys -M' 'copy-mode -e; send-keys -M'"
+
+# No delay for escape key press
+set -sg escape-time 0
+
+# Reload tmux config
+bind r source-file ~/.tmux.conf
+
+# Automatically set window title
+#set-window-option -g automatic-rename on
+#set-option -g set-titles on
+
+#set -g terminal-overrides 'xterm*:smcup@:rmcup@'
diff --git a/debian-config.txt b/debian-config.txt
new file mode 100644 (file)
index 0000000..c245ba4
--- /dev/null
@@ -0,0 +1,350 @@
+- enable non-free in sources.list
+  needed for firmwares
+
+deb http://deb.debian.org/debian/ buster main non-free
+deb-src http://deb.debian.org/debian/ buster main
+
+deb http://security.debian.org/debian-security buster/updates main non-free
+deb-src http://security.debian.org/debian-security buster/updates main
+
+# buster-updates, previously known as 'volatile'
+deb http://deb.debian.org/debian/ buster-updates main non-free
+deb-src http://deb.debian.org/debian/ buster-updates main
+
+deb http://deb.debian.org/debian buster-backports main
+
+- install firmwares
+
+  apt install firmware-amd-graphics firmware-iwlwifi firmware-realtek
+
+- install new kernel (needed for amd gpu)
+
+  apt install linux-image-5.2.0-0.bpo.3-amd64
+
+- firefox
+
+  - cookie autodelete
+  - ublock origin
+
+- usual packages
+
+  emacs gcc make meson mutt tmux clang git xcscope-el elpa-magit git-el \
+  isync msmtp-mta cmake python3 libsecret-tools linux-cpupower powertop \
+  lm-sensors tor ripperx freecad gdb gimp adb smbclient cifs-utils pidgin \
+  unison audacity borgbackup
+
+- sudo
+
+  adduser zer0 sudo
+
+- gpg
+
+  copy private key in .gnupg
+
+- gnome3
+
+  # list all shortcuts
+  gsettings list-recursively | grep -E 'keybindings|media-keys'
+
+  gsettings set org.gnome.desktop.wm.keybindings switch-to-workspace-1 "['<Super>ampersand']"
+  gsettings set org.gnome.desktop.wm.keybindings switch-to-workspace-2 "['<Super>eacute']"
+  gsettings set org.gnome.desktop.wm.keybindings switch-to-workspace-3 "['<Super>quotedbl']"
+  gsettings set org.gnome.desktop.wm.keybindings switch-to-workspace-4 "['<Super>apostrophe']"
+  gsettings set org.gnome.desktop.wm.keybindings switch-to-workspace-5 "['<Super>parenleft']"
+  gsettings set org.gnome.desktop.wm.keybindings switch-to-workspace-6 "['<Super>minus']"
+  gsettings set org.gnome.desktop.wm.keybindings switch-to-workspace-7 "['<Super>egrave']"
+  gsettings set org.gnome.desktop.wm.keybindings switch-to-workspace-8 "['<Super>underscore']"
+  gsettings set org.gnome.desktop.wm.keybindings switch-to-workspace-9 "['<Super>ccedilla']"
+
+  gsettings set org.gnome.desktop.wm.keybindings move-to-workspace-1 "['<Super><Shift>ampersand']"
+  gsettings set org.gnome.desktop.wm.keybindings move-to-workspace-2 "['<Super><Shift>eacute']"
+  gsettings set org.gnome.desktop.wm.keybindings move-to-workspace-3 "['<Super><Shift>quotedbl']"
+  gsettings set org.gnome.desktop.wm.keybindings move-to-workspace-4 "['<Super><Shift>apostrophe']"
+  gsettings set org.gnome.desktop.wm.keybindings move-to-workspace-5 "['<Super><Shift>parenleft']"
+  gsettings set org.gnome.desktop.wm.keybindings move-to-workspace-6 "['<Super><Shift>minus']"
+  gsettings set org.gnome.desktop.wm.keybindings move-to-workspace-7 "['<Super><Shift>egrave']"
+  gsettings set org.gnome.desktop.wm.keybindings move-to-workspace-8 "['<Super><Shift>underscore']"
+  gsettings set org.gnome.desktop.wm.keybindings move-to-workspace-9 "['<Super><Shift>ccedilla']"
+
+  gsettings set org.gnome.mutter dynamic-workspaces false
+  gsettings set org.gnome.desktop.wm.preferences num-workspaces 9
+
+  gsettings set org.gnome.desktop.wm.keybindings panel-run-dialog "['<Super>r']"
+  gsettings set org.gnome.mutter overlay-key ""
+
+  gsettings set org.gnome.desktop.wm.keybindings cycle-windows "['<Super>Tab']"
+  gsettings set org.gnome.desktop.wm.keybindings switch-applications "['<Alt>Tab']"
+
+  gsettings set org.gnome.desktop.wm.keybindings switch-input-source "['disabled']"
+  gsettings set org.gnome.desktop.wm.keybindings switch-input-source-backward "['disabled']"
+
+  # enable workspace indicator, auto-move windows, alternate tab
+  gnome-tweaks
+
+  in settings, create a new shortcut for terminal emulator (super-enter)
+
+  -- bullseye: need to remove some new shortcuts
+  for i in 1 2 3 4 5 6 7 8 9; do gsettings set org.gnome.shell.keybindings switch-to-application-$i []; done
+
+- gnome3 gtile
+
+  install gnome shell extension in firefox
+
+  set super+space as main shortcut
+
+- gnome3 disable workspace popup
+
+  https://extensions.gnome.org/extension/959/disable-workspace-switcher-popup/
+
+- gnome3 no title bar
+
+  instead of an extension:
+  https://joshtronic.com/2017/07/26/hide-title-bars-in-gnome-shell/
+  update .config/gtk-3.0/gtk.css
+
+- gnome3: legacy system tray (for pidgin)
+
+  install topicons plus
+  disable "normal" notifications in gnome settings
+
+- gnome3: improved workspace indicator
+
+- load xresources at startup
+
+  # with +x perms
+  zer0@platinum:~$ cat bin/load-xresources.sh
+  xrdb -merge ~/.Xresources
+  xset r rate 200 30
+
+  zer0@platinum:~$ cat .config/autostart/load-xresources.desktop
+  [Desktop Entry]
+  Name=load-xresources
+  GenericName=load-xresources
+  Comment=load Xresources with xrdb, and set the kbd rate
+  Exec=~/bin/load-xresources.sh
+  Terminal=false
+  Type=Application
+  X-GNOME-Autostart-enabled=true
+
+- pidgin
+
+  update
+  /usr/share/pixmaps/pidgin/tray/hicolor/22x22/status/pidgin-tray-available.png
+
+- etc/hosts
+
+  add "127.0.0.1 glum"
+
+- msmtp
+
+  dans ~/.msmtprc
+
+defaults
+
+account 6wind
+tls on
+port 587
+from olivier.matz@6wind.com
+host smtp.gmail.com
+domain 6wind.com
+aliases /etc/aliases
+logfile /var/log/msmtp
+auth on
+user olivier.matz@6wind.com
+password XXXX
+
+account default
+tls on
+port 587
+auto_from on
+host mail.droids-corp.org
+domain droids-corp.org
+maildomain droids-corp.org
+aliases /etc/aliases
+logfile /var/log/msmtp
+auth on
+user zer0
+password XXXX
+
+- rcfiles
+
+https://www.digitalocean.com/community/tutorials/how-to-use-git-to-manage-your-user-configuration-files-on-a-linux-vps
+
+- passwords
+
+
+$ secret-tool store --label=Google type google user olivier.matz@6wind.com
+$ secret-tool lookup type google user olivier.matz@6wind.com
+test
+
+seahorse to show them in as gui
+
+- set default editor
+
+cat > /usr/local/bin/e << EOF
+#!/bin/sh
+emacs -nw "$@"
+EOF
+
+chmod a+x /usr/local/bin/e
+
+update-alternatives --install /usr/bin/editor editor /usr/local/bin/e 10
+update-alternatives --install /usr/bin/editor editor /usr/local/bin/e 10
+update-alternatives --set editor /usr/local/bin/e
+
+- powersaving
+
+don't know how to change thresholds for fan control, so switch to
+powersave, it avoids the fan to start when doing usual tasks
+
+modprobe cpufreq_powersave
+cpupower -c all frequency-set -g powersave
+sensors
+
+#disable all cpus but 0
+for x in /sys/devices/system/cpu/cpu[1-9]*/online; do
+  echo 0 >"$x"
+done
+
+
+cat << EOF | sudo tee /etc/systemd/system/powertop.service
+[Unit]
+Description=PowerTOP auto tune
+
+[Service]
+Type=oneshot
+Environment="TERM=dumb"
+RemainAfterExit=true
+ExecStart=/usr/sbin/powertop --auto-tune
+
+[Install]
+WantedBy=multi-user.target
+EOF
+
+systemctl daemon-reload
+systemctl enable powertop.service
+
+
+- pinning
+
+/etc/apt/preferences
+
+# note: do not use names like "jessie" with a=, use n= in that case --OM
+
+Package: *
+Pin: release a=testing
+Pin-Priority: -10
+
+Package: *
+Pin: release a=unstable
+Pin-Priority: -10
+
+Package: *
+Pin: release o=Debian
+Pin-Priority: 900
+
+and add this in /etc/apt/sources.list
+
+# with low prio, for apt-pinning
+deb http://ftp.fr.debian.org/debian/ testing main contrib non-free
+deb-src http://ftp.fr.debian.org/debian/ testing main
+deb http://ftp.fr.debian.org/debian/ unstable main contrib non-free
+deb-src http://ftp.fr.debian.org/debian/ unstable main
+
+- mount backup
+
+fstab:
+//192.168.1.12/music /backup/music cifs credentials=/etc/fstab-smb-credentials,workgroup=workgroup,rw,vers=1.0 0 0
+//192.168.1.12/misc /backup/misc cifs credentials=/etc/fstab-smb-credentials,workgroup=workgroup,rw,vers=1.0 0 0
+//192.168.1.12/photos /backup/photos cifs credentials=/etc/fstab-smb-credentials,workgroup=workgroup,rw,vers=1.0 0 0
+
+/etc/fstab-smb-credentials:
+username=zer0
+password=...
+
+
+- mouse
+
+  https://unix.stackexchange.com/questions/422470/how-to-set-device-specific-mouse-settings-in-wayland-under-libinput-debian-gnom
+  https://wayland.freedesktop.org/libinput/doc/1.4.0/faq.html#faq_config_options
+
+  libinput debug-events
+
+  apt install libevdev-tools evemu-tools
+  evemu-describe
+  mouse-dpi-tool /dev/input/event
+
+  e /lib/udev/hwdb.d/70-mouse.hwdb  -> 71-mouse.hwdb
+  # Logitech G400 (Wired)
+  mouse:usb:v046dpc245:name:Logitech Gaming Mouse G400:*
+  # MOUSE_DPI=3600@1000
+
+  udevadm hwdb --update
+  udevadm trigger /dev/input/event3
+  udevadm info /dev/input/event3
+
+  # need to go back to gdm (ctrl-alt-f1)
+
+- mime applications
+
+  root@platinum:/home/zer0# xdg-mime default /usr/share/applications/okularApplication_pdf.desktop application/pdf
+  root@platinum:/home/zer0# xdg-mime query default application/pdf
+  /usr/share/applications/okularApplication_pdf.desktop
+
+  for mutt (bof...)
+
+  see /etc/mailcap
+
+  order in /etc/mailcap.order:
+    okular:application/pdf
+
+  needs update of /usr/lib/mime/packages
+    grep okular /etc/mailcap > /usr/lib/mime/packages/okular
+
+  then udpated by update-mime
+
+  see https://askubuntu.com/questions/1118437/promote-evince-in-etc-mailcap-order
+
+- xterm
+
+  for middle click copy/paste
+
+  XTerm*selectToClipboard: false
+
+- clipboard from command line: wl-clipboard
+
+  https://github.com/bugaevc/wl-clipboard
+
+- load xrdb at xterm start
+
+  #!/bin/sh
+  
+  START_TIME=$(ps -C Xwayland --no-headers -o lstart)
+  PREV_START_TIME=$(cat ~/.xwayland_start 2> /dev/null)
+  
+  if [ "$START_TIME" != "$PREV_START_TIME" ]; then
+       load-xresources.sh
+       echo "$START_TIME" > ~/.xwayland_start
+  fi
+  
+  exec xterm "$@"
+
+
+
+
+TODO
+- emacs config
+- mutt
+- backup
+- transfer data from neon
+- gnome shortcuts
+- retrieve windows key
+- customize firefox
+- gpg key on yubikey
+- start xrdb -load ~/.Xresources at session start
+  https://bugzilla.redhat.com/show_bug.cgi?id=1225384
+- mesa >= 19.2 ?
+  https://bugs.freedesktop.org/show_bug.cgi?id=110214#c91
+- molette souris dans xterm: scroll plutot que up/down
+- ~/bin dans le path
+- imapami