[Org, Emacs] Do not add spaces in front of code in src blocks
By default, org-mode will add two spaces before code lines in the org file itself. This does not change how code is edited when editing a code block through `org-edit-special' but when copy/pasting code or editing it directly from the org file, it can be troublesome. Setting `org-src-preserve-indentation' to `t' prevents org from adding these two spaces.
This commit is contained in:
		
							parent
							
								
									c12164d9bb
								
							
						
					
					
						commit
						d4f11b612d
					
				
										
											
												File diff suppressed because it is too large
												Load Diff
											
										
									
								
							
										
											
												File diff suppressed because it is too large
												Load Diff
											
										
									
								
							@ -47,9 +47,9 @@ partition is 16GB large.
 | 
			
		||||
:END:
 | 
			
		||||
When you boot into the live ISO, execute the following command:
 | 
			
		||||
#+BEGIN_SRC sh
 | 
			
		||||
  pacman -Sy reflector
 | 
			
		||||
  reflector -c FR -c DE -c BE -l 200 -p http -p https --sort rate \
 | 
			
		||||
            --save /etc/pacman.d/mirrorlist --verbose
 | 
			
		||||
pacman -Sy reflector
 | 
			
		||||
reflector -c FR -c DE -c BE -l 200 -p http -p https --sort rate \
 | 
			
		||||
          --save /etc/pacman.d/mirrorlist --verbose
 | 
			
		||||
#+END_SRC
 | 
			
		||||
 | 
			
		||||
This will update the packages from your live ISO, and you will get the best
 | 
			
		||||
@ -67,14 +67,14 @@ how the distro works, I just want to be able to install my distro quickly now.
 | 
			
		||||
I’ll need to download the script with ~wget~, but apparently it isn’t installed
 | 
			
		||||
by default on Arch ISOs anymore, so I’ll need to install it.
 | 
			
		||||
#+BEGIN_SRC sh
 | 
			
		||||
  pacman -S wget
 | 
			
		||||
pacman -S wget
 | 
			
		||||
#+END_SRC
 | 
			
		||||
 | 
			
		||||
Now, let’s grab the script. You can check it on [[https://github.com/matmoul/archfi][Github]].
 | 
			
		||||
#+BEGIN_SRC sh
 | 
			
		||||
  wget archfi.sf.net/archfi
 | 
			
		||||
  # Or from matmoul.github.io/archfi if SourceForge is down
 | 
			
		||||
  sh archfi
 | 
			
		||||
wget archfi.sf.net/archfi
 | 
			
		||||
# Or from matmoul.github.io/archfi if SourceForge is down
 | 
			
		||||
sh archfi
 | 
			
		||||
#+END_SRC
 | 
			
		||||
 | 
			
		||||
Then, follow the instructions and install Arch Linux. Take the opportunity to
 | 
			
		||||
@ -90,28 +90,32 @@ your computer.
 | 
			
		||||
:HEADER-ARGS:fish: :tangle ~/.config/yadm/bootstrap :shebang "#!/usr/bin/fish" :exports code :mkdirp yes
 | 
			
		||||
:CUSTOM_ID: Execute_bootstrap-e37054ef
 | 
			
		||||
:END:
 | 
			
		||||
The first thing I will do is add the [[https://github.com/archlinuxcn/repo][ArchLinuxCN]] repository so I can get access
 | 
			
		||||
to ~paru~.
 | 
			
		||||
The first thing I will do is add the [[https://aur.chaotic.cx/][Chaotic AUR]] repository so I can
 | 
			
		||||
get access to ~paru~ as well as some AUR packages without the need of an
 | 
			
		||||
AUR helper (ironic considering ~paru~ is one)..
 | 
			
		||||
#+BEGIN_SRC sh
 | 
			
		||||
  printf '[archlinuxcn]\nServer = https://repo.archlinuxcn.org/$arch\n' | sudo tee -a /etc/pacman.conf
 | 
			
		||||
sudo pacman-key --recv-key 3056513887B78AEB --keyserver keyserver.ubuntu.com
 | 
			
		||||
sudo pacman-key --lsign-key 3056513887B78AEB
 | 
			
		||||
sudo pacman -U 'https://cdn-mirror.chaotic.cx/chaotic-aur/chaotic-keyring.pkg.tar.zst' 'https://cdn-mirror.chaotic.cx/chaotic-aur/chaotic-mirrorlist.pkg.tar.zst'
 | 
			
		||||
printf '[chaotic-aur]\nServer = /etc/pacman.d/chaotic-mirrorlist\n' | sudo tee -a /etc/pacman.conf
 | 
			
		||||
#+END_SRC
 | 
			
		||||
 | 
			
		||||
I can now install ~fish~, ~git~, and ~paru~:
 | 
			
		||||
#+BEGIN_SRC sh
 | 
			
		||||
  sudo pacman -S fish git paru
 | 
			
		||||
sudo pacman -S fish git paru
 | 
			
		||||
#+END_SRC
 | 
			
		||||
 | 
			
		||||
And now that ~paru~ is available, we can install ~yadm~:
 | 
			
		||||
#+BEGIN_SRC sh
 | 
			
		||||
  paru -S yadm
 | 
			
		||||
paru -S yadm
 | 
			
		||||
#+END_SRC
 | 
			
		||||
 | 
			
		||||
~yadm~ comes with a very handy feature: its bootstrap script. It can be executed
 | 
			
		||||
automatically once the dotfiles are cloned with yadm:
 | 
			
		||||
#+BEGIN_SRC sh
 | 
			
		||||
  yadm clone https://labs.phundrak.com/phundrak/dotfiles
 | 
			
		||||
  # or if labs.phundrak.com is down or too slow for you
 | 
			
		||||
  #yadm clone https://github.com/phundrak/dotfiles
 | 
			
		||||
yadm clone https://labs.phundrak.com/phundrak/dotfiles
 | 
			
		||||
# or if labs.phundrak.com is down or too slow for you
 | 
			
		||||
#yadm clone https://github.com/phundrak/dotfiles
 | 
			
		||||
#+END_SRC
 | 
			
		||||
 | 
			
		||||
Let’s take a look at what it does.
 | 
			
		||||
@ -123,11 +127,11 @@ Let’s take a look at what it does.
 | 
			
		||||
Some private files are stored encrypted in the repository of my yadm dotfiles. I
 | 
			
		||||
will need them later on during the bootstrap execution.
 | 
			
		||||
#+BEGIN_SRC fish
 | 
			
		||||
  if test "$USER" = 'phundrak'
 | 
			
		||||
      yadm decrypt
 | 
			
		||||
  else
 | 
			
		||||
      whiptail --yesno "Decrypt private files?" 8 40 && yadm decrypt
 | 
			
		||||
  end
 | 
			
		||||
if test "$USER" = 'phundrak'
 | 
			
		||||
    yadm decrypt
 | 
			
		||||
else
 | 
			
		||||
    whiptail --yesno "Decrypt private files?" 8 40 && yadm decrypt
 | 
			
		||||
end
 | 
			
		||||
#+END_SRC
 | 
			
		||||
 | 
			
		||||
** Get a correct keyboard layout
 | 
			
		||||
@ -140,24 +144,24 @@ or the American QWERTY layout, so I make it so the Menu key switches for me my
 | 
			
		||||
layout between these three. This makes it so my xorg configuration of my
 | 
			
		||||
keyboard looks like this:
 | 
			
		||||
#+BEGIN_SRC fish
 | 
			
		||||
  set keyboardconf \
 | 
			
		||||
  'Section "InputClass"
 | 
			
		||||
          Identifier "system-keyboard"
 | 
			
		||||
          MatchIsKeyboard "on"
 | 
			
		||||
          Option "XkbLayout" "fr"
 | 
			
		||||
          Option "XkbModel" "pc104"
 | 
			
		||||
          Option "XkbVariant" "bepo_afnor"
 | 
			
		||||
          Option "XkbOptions" "caps:ctrl_modifier"
 | 
			
		||||
  EndSection'
 | 
			
		||||
set keyboardconf \
 | 
			
		||||
'Section "InputClass"
 | 
			
		||||
        Identifier "system-keyboard"
 | 
			
		||||
        MatchIsKeyboard "on"
 | 
			
		||||
        Option "XkbLayout" "fr"
 | 
			
		||||
        Option "XkbModel" "pc104"
 | 
			
		||||
        Option "XkbVariant" "bepo_afnor"
 | 
			
		||||
        Option "XkbOptions" "caps:ctrl_modifier"
 | 
			
		||||
EndSection'
 | 
			
		||||
#+END_SRC
 | 
			
		||||
 | 
			
		||||
So, let’s ask the user if they want to set it as their keyboard configuration.
 | 
			
		||||
#+BEGIN_SRC fish
 | 
			
		||||
  printf "\n# Set keyboard layout #########################################################\n\n"
 | 
			
		||||
  whiptail --yesno "Would you like to set your keyboard layout to the bépo layout?" 8 55
 | 
			
		||||
  if test $status -eq 0
 | 
			
		||||
      echo $keyboardconf | sudo tee /etc/X11/xorg.conf.d/00-keyboard.conf
 | 
			
		||||
  end
 | 
			
		||||
printf "\n# Set keyboard layout #########################################################\n\n"
 | 
			
		||||
whiptail --yesno "Would you like to set your keyboard layout to the bépo layout?" 8 55
 | 
			
		||||
if test $status -eq 0
 | 
			
		||||
    echo $keyboardconf | sudo tee /etc/X11/xorg.conf.d/00-keyboard.conf
 | 
			
		||||
end
 | 
			
		||||
#+END_SRC
 | 
			
		||||
 | 
			
		||||
** Set our locale
 | 
			
		||||
@ -167,12 +171,12 @@ So, let’s ask the user if they want to set it as their keyboard configuration.
 | 
			
		||||
I use two main locales, the French and US UTF-8 locales, and I like to keep the
 | 
			
		||||
Japanese locale activated just in case.
 | 
			
		||||
#+BEGIN_SRC fish
 | 
			
		||||
  set mylocales "en_US.UTF-8 UTF-8" "fr_FR.UTF-8 UTF-8" "ja_JP.UTF-8 UTF-8"
 | 
			
		||||
set mylocales "en_US.UTF-8 UTF-8" "fr_FR.UTF-8 UTF-8" "ja_JP.UTF-8 UTF-8"
 | 
			
		||||
#+END_SRC
 | 
			
		||||
 | 
			
		||||
I’ll let the user accept them one by one.
 | 
			
		||||
#+BEGIN_SRC fish
 | 
			
		||||
  printf "\n# Set locale ##################################################################\n\n"
 | 
			
		||||
printf "\n# Set locale ##################################################################\n\n"
 | 
			
		||||
 | 
			
		||||
  for item in $mylocales
 | 
			
		||||
      whiptail --yesno "Set the \"$item\" locale?" 8 40
 | 
			
		||||
@ -184,29 +188,29 @@ I’ll let the user accept them one by one.
 | 
			
		||||
 | 
			
		||||
This is my configuration I usually use when it comes to my locale.
 | 
			
		||||
#+BEGIN_SRC fish
 | 
			
		||||
  set localeconf "LANG=en_DK.UTF-8
 | 
			
		||||
  LC_COLLATE=C
 | 
			
		||||
  LC_NAME=fr_FR.UTF-8
 | 
			
		||||
  LC_IDENTIFICATION=fr_FR.UTF-8
 | 
			
		||||
  LC_TELEPHONE=fr_FR.UTF-8
 | 
			
		||||
  LC_MONETARY=fr_FR.UTF-8
 | 
			
		||||
  LC_PAPER=fr_FR.UTF-8
 | 
			
		||||
  LC_ADDRESS=fr_FR.UTF-8
 | 
			
		||||
  LC_MEASUREMENT=fr_FR.UTF-8"
 | 
			
		||||
set localeconf "LANG=en_DK.UTF-8
 | 
			
		||||
LC_COLLATE=C
 | 
			
		||||
LC_NAME=fr_FR.UTF-8
 | 
			
		||||
LC_IDENTIFICATION=fr_FR.UTF-8
 | 
			
		||||
LC_TELEPHONE=fr_FR.UTF-8
 | 
			
		||||
LC_MONETARY=fr_FR.UTF-8
 | 
			
		||||
LC_PAPER=fr_FR.UTF-8
 | 
			
		||||
LC_ADDRESS=fr_FR.UTF-8
 | 
			
		||||
LC_MEASUREMENT=fr_FR.UTF-8"
 | 
			
		||||
#+END_SRC
 | 
			
		||||
 | 
			
		||||
Let’s set it as our system’s locale if the user whishes to.
 | 
			
		||||
#+BEGIN_SRC fish
 | 
			
		||||
  whiptail --yesno "Do you agree to have the following locale set?\n\n     $localeconf"  20 43
 | 
			
		||||
  if test $status -eq 0
 | 
			
		||||
      echo $localeconf | sudo tee /etc/locale.conf
 | 
			
		||||
  end
 | 
			
		||||
whiptail --yesno "Do you agree to have the following locale set?\n\n     $localeconf"  20 43
 | 
			
		||||
if test $status -eq 0
 | 
			
		||||
    echo $localeconf | sudo tee /etc/locale.conf
 | 
			
		||||
end
 | 
			
		||||
#+END_SRC
 | 
			
		||||
 | 
			
		||||
Now we can generate our locale!
 | 
			
		||||
#+BEGIN_SRC fish
 | 
			
		||||
  printf "\n# Generate locale #############################################################\n\n"
 | 
			
		||||
  sudo locale-gen
 | 
			
		||||
printf "\n# Generate locale #############################################################\n\n"
 | 
			
		||||
sudo locale-gen
 | 
			
		||||
#+END_SRC
 | 
			
		||||
 | 
			
		||||
** Create some folders
 | 
			
		||||
@ -216,9 +220,9 @@ Now we can generate our locale!
 | 
			
		||||
Let’s create some folders we might need for mounting our drives, Android devices
 | 
			
		||||
and CDs.
 | 
			
		||||
#+BEGIN_SRC fish
 | 
			
		||||
  printf "\n# Create directories for mounting #############################################\n\n"
 | 
			
		||||
  sudo mkdir -p /mnt/{USB,CD,Android}
 | 
			
		||||
  sudo chown $USER:(id -g $USER) /mnt/{USB,CD,Android}
 | 
			
		||||
printf "\n# Create directories for mounting #############################################\n\n"
 | 
			
		||||
sudo mkdir -p /mnt/{USB,CD,Android}
 | 
			
		||||
sudo chown $USER:(id -g $USER) /mnt/{USB,CD,Android}
 | 
			
		||||
#+END_SRC
 | 
			
		||||
 | 
			
		||||
** Set user’s shell to fish
 | 
			
		||||
@ -227,11 +231,11 @@ and CDs.
 | 
			
		||||
:END:
 | 
			
		||||
First of all, the bootstrap shell will set the user’s shell to fish.
 | 
			
		||||
#+BEGIN_SRC fish
 | 
			
		||||
  printf "\n# Set fish as the default shell ###############################################\n\n"
 | 
			
		||||
  whiptail --yesno "Set the current user’s default shell to fish?" 8 50
 | 
			
		||||
  if test $status -eq 0 -a ! "$SHELL" = '/usr/bin/fish'
 | 
			
		||||
      chsh -s /usr/bin/fish
 | 
			
		||||
  end
 | 
			
		||||
printf "\n# Set fish as the default shell ###############################################\n\n"
 | 
			
		||||
whiptail --yesno "Set the current user’s default shell to fish?" 8 50
 | 
			
		||||
if test $status -eq 0 -a ! "$SHELL" = '/usr/bin/fish'
 | 
			
		||||
    chsh -s /usr/bin/fish
 | 
			
		||||
end
 | 
			
		||||
#+END_SRC
 | 
			
		||||
 | 
			
		||||
** Install basic packages
 | 
			
		||||
@ -240,49 +244,49 @@ First of all, the bootstrap shell will set the user’s shell to fish.
 | 
			
		||||
:END:
 | 
			
		||||
Let’s set in a custom varible what packages we’ll be needing.
 | 
			
		||||
#+BEGIN_SRC fish
 | 
			
		||||
  set PACKAGES \
 | 
			
		||||
  acpi acpilight adobe-source-han-sans-jp-fonts arc-gtk-theme asar ascii \
 | 
			
		||||
  aspell-en aspell-fr awesome awesome-terminal-fonts awesome-freedesktop-git \
 | 
			
		||||
  base-devel bashtop bat biber bitwarden-bin bluez-firmware bluez-utils bzip2 \
 | 
			
		||||
  chicken chromium clisp corrupter-git cppcheck cppreference \
 | 
			
		||||
  cppreference-devhelp cpupower discord-canary discount docker docker-compose \
 | 
			
		||||
  dockerfile-language-server-bin doxygen emacs emacs-org-mode exa exfat-utils \
 | 
			
		||||
  farbfeld fd ffmpegthumbnailer findutils firefox flake8 flat-remix-gtk freeglut \
 | 
			
		||||
  fzf gcc-libs gdb gimp gnome-disk-utility gnome-epub-thumbnailer gnu-free-fonts \
 | 
			
		||||
  gnuplot go go-tools golangci-lint-bin graphviz htop hugo i3lock-color \
 | 
			
		||||
  inetutils isync inter-font javascript-typescript-langserver js-beautify \
 | 
			
		||||
  jfsutils jmtpfs kitty lain-git libxft-bgra linux-headers lldb logrotate meson \
 | 
			
		||||
  minted man-db man-pages mpc mpd mpd-rich-presence-discord-git mpv mupdf-tools \
 | 
			
		||||
  nano ncdu ncmpcpp nemo-fileroller nemo-preview neofetch netctl \
 | 
			
		||||
  network-manager-applet networkmanager networkmanager-openvpn \
 | 
			
		||||
  nm-connection-editor nodejs-vmd nomacs nordic-theme-git nordvpn-bin \
 | 
			
		||||
  noto-fonts-emoji npm ntfs-3g numlockx obs-studio openssh otf-fandol \
 | 
			
		||||
  otf-ipafont p7zip pacman-contrib pandoc-bin pass pavucontrol pdfpc picom-git \
 | 
			
		||||
  powerline-fonts prettier pulseaudio-bluetooth python-autoflake python-epc \
 | 
			
		||||
  python-importmagic python-language-server python-nose python-pip python-poetry \
 | 
			
		||||
  python-ptvsd python-pytest qt5-imageformats qemu r raw-thumbnailer reflector \
 | 
			
		||||
  ripgrep rofi rsync rtv ruby-rb-fsevent ruby-sass rustup samba scrot sent \
 | 
			
		||||
  shadow siji-git simplescreenrecorder sshfs sxiv texlive-bibtexextra \
 | 
			
		||||
  texlive-fontsextra texlive-formatsextra texlive-humanities \
 | 
			
		||||
  texlive-langjapanese texlive-pictures texlive-pstricks texlive-publishers \
 | 
			
		||||
  texlive-science tldr tmux tree ttf-arphic-uming ttf-baekmuk ttf-charis-sil \
 | 
			
		||||
  ttf-dejavu ttf-google-fonts-opinionated-git ttf-hanazono ttf-joypixels \
 | 
			
		||||
  ttf-koruri ttf-liberation ttf-monapo ttf-sazanami ttf-tibetan-machine \
 | 
			
		||||
  typescript typescript-language-server-bin unicode-emoji unrar usbutils \
 | 
			
		||||
  valgrind vscode-css-languageserver-bin vscode-html-languageserver-bin w3m wget \
 | 
			
		||||
  x11-ssh-askpass xclip xdg-user-dirs-gtk xfce-polkit xidlehook xfsprogs \
 | 
			
		||||
  xorg-drivers xorg-server xorg-xinit xss-lock xvkbd xwallpaper \
 | 
			
		||||
  yaml-language-server-bin zeal
 | 
			
		||||
set PACKAGES \
 | 
			
		||||
acpi acpilight adobe-source-han-sans-jp-fonts arc-gtk-theme asar ascii \
 | 
			
		||||
aspell-en aspell-fr awesome awesome-terminal-fonts awesome-freedesktop-git \
 | 
			
		||||
base-devel bashtop bat biber bitwarden-bin bluez-firmware bluez-utils bzip2 \
 | 
			
		||||
chicken chromium clisp corrupter-git cppcheck cppreference \
 | 
			
		||||
cppreference-devhelp cpupower discord-canary discount docker docker-compose \
 | 
			
		||||
dockerfile-language-server-bin doxygen emacs emacs-org-mode exa exfat-utils \
 | 
			
		||||
farbfeld fd ffmpegthumbnailer findutils firefox flake8 flat-remix-gtk freeglut \
 | 
			
		||||
fzf gcc-libs gdb gimp gnome-disk-utility gnome-epub-thumbnailer gnu-free-fonts \
 | 
			
		||||
gnuplot go go-tools golangci-lint-bin graphviz htop hugo i3lock-color \
 | 
			
		||||
inetutils isync inter-font javascript-typescript-langserver js-beautify \
 | 
			
		||||
jfsutils jmtpfs kitty lain-git libxft-bgra linux-headers lldb logrotate meson \
 | 
			
		||||
minted man-db man-pages mpc mpd mpd-rich-presence-discord-git mpv mupdf-tools \
 | 
			
		||||
nano ncdu ncmpcpp nemo-fileroller nemo-preview neofetch netctl \
 | 
			
		||||
network-manager-applet networkmanager networkmanager-openvpn \
 | 
			
		||||
nm-connection-editor nodejs-vmd nomacs nordic-theme-git nordvpn-bin \
 | 
			
		||||
noto-fonts-emoji npm ntfs-3g numlockx obs-studio openssh otf-fandol \
 | 
			
		||||
otf-ipafont p7zip pacman-contrib pandoc-bin pass pavucontrol pdfpc picom-git \
 | 
			
		||||
powerline-fonts prettier pulseaudio-bluetooth python-autoflake python-epc \
 | 
			
		||||
python-importmagic python-language-server python-nose python-pip python-poetry \
 | 
			
		||||
python-ptvsd python-pytest qt5-imageformats qemu r raw-thumbnailer reflector \
 | 
			
		||||
ripgrep rofi rsync rtv ruby-rb-fsevent ruby-sass rustup samba scrot sent \
 | 
			
		||||
shadow siji-git simplescreenrecorder sshfs sxiv texlive-bibtexextra \
 | 
			
		||||
texlive-fontsextra texlive-formatsextra texlive-humanities \
 | 
			
		||||
texlive-langjapanese texlive-pictures texlive-pstricks texlive-publishers \
 | 
			
		||||
texlive-science tldr tmux tree ttf-arphic-uming ttf-baekmuk ttf-charis-sil \
 | 
			
		||||
ttf-dejavu ttf-google-fonts-opinionated-git ttf-hanazono ttf-joypixels \
 | 
			
		||||
ttf-koruri ttf-liberation ttf-monapo ttf-sazanami ttf-tibetan-machine \
 | 
			
		||||
typescript typescript-language-server-bin unicode-emoji unrar usbutils \
 | 
			
		||||
valgrind vscode-css-languageserver-bin vscode-html-languageserver-bin w3m wget \
 | 
			
		||||
x11-ssh-askpass xclip xdg-user-dirs-gtk xfce-polkit xidlehook xfsprogs \
 | 
			
		||||
xorg-drivers xorg-server xorg-xinit xss-lock xvkbd xwallpaper \
 | 
			
		||||
yaml-language-server-bin zeal
 | 
			
		||||
#+END_SRC
 | 
			
		||||
 | 
			
		||||
These are the minimum I would have in my own installation. You can edit it
 | 
			
		||||
however you want. Let’s install those.
 | 
			
		||||
#+BEGIN_SRC fish
 | 
			
		||||
  printf "\n# Installing needed packages ##################################################\n\n"
 | 
			
		||||
  sudo pacman -Syu
 | 
			
		||||
  for pkg in $PACKAGES
 | 
			
		||||
      paru -S --needed $pkg
 | 
			
		||||
  end
 | 
			
		||||
printf "\n# Installing needed packages ##################################################\n\n"
 | 
			
		||||
sudo pacman -Syu
 | 
			
		||||
for pkg in $PACKAGES
 | 
			
		||||
    paru -S --needed $pkg
 | 
			
		||||
end
 | 
			
		||||
#+END_SRC
 | 
			
		||||
 | 
			
		||||
** Tangle configuration files from Org files
 | 
			
		||||
@ -308,9 +312,9 @@ need to create:
 | 
			
		||||
 | 
			
		||||
#+NAME: gen-dirs-tangle
 | 
			
		||||
#+BEGIN_SRC emacs-lisp :var dirs=dirs-tangled-files
 | 
			
		||||
  (mapconcat (lambda (x) (format "mkdir -p %s" (car x)))
 | 
			
		||||
             dirs
 | 
			
		||||
             "\n")
 | 
			
		||||
(mapconcat (lambda (x) (format "mkdir -p %s" (car x)))
 | 
			
		||||
           dirs
 | 
			
		||||
           "\n")
 | 
			
		||||
#+END_SRC
 | 
			
		||||
 | 
			
		||||
#+RESULTS[a95e25a5f3ac91b1f884b39dde38e3b51366b188]: gen-dirs-tangle
 | 
			
		||||
@ -331,7 +335,7 @@ mkdir -p $HOME/org/capture
 | 
			
		||||
 | 
			
		||||
Our code to generate such directories looks like this:
 | 
			
		||||
#+BEGIN_SRC fish :noweb yes
 | 
			
		||||
  <<gen-dirs-tangle()>>
 | 
			
		||||
<<gen-dirs-tangle()>>
 | 
			
		||||
#+END_SRC
 | 
			
		||||
 | 
			
		||||
The next step is to tangle all the Org files. Here is the list of files that are
 | 
			
		||||
@ -350,13 +354,13 @@ to be tangled:
 | 
			
		||||
 | 
			
		||||
#+NAME: generate-tangle
 | 
			
		||||
#+BEGIN_SRC emacs-lisp :var files=tangled-files[,0]
 | 
			
		||||
  (mapconcat (lambda (x) (concat
 | 
			
		||||
                          (format "printf '\\n\\n==== Tangling %s\\n\\n' && \\\n" x)
 | 
			
		||||
                          (concat "emacs -q --batch --eval '(require \\'ob-tangle)' \\\n"
 | 
			
		||||
                                  "--eval '(setq org-confirm-babel-evaluate nil)' \\\n"
 | 
			
		||||
                                  (format "--eval '(org-babel-tangle-file \"~/org/config/%s\")'\n" x))))
 | 
			
		||||
             files
 | 
			
		||||
             "\n")
 | 
			
		||||
(mapconcat (lambda (x) (concat
 | 
			
		||||
                        (format "printf '\\n\\n==== Tangling %s\\n\\n' && \\\n" x)
 | 
			
		||||
                        (concat "emacs -q --batch --eval '(require \\'ob-tangle)' \\\n"
 | 
			
		||||
                                "--eval '(setq org-confirm-babel-evaluate nil)' \\\n"
 | 
			
		||||
                                (format "--eval '(org-babel-tangle-file \"~/org/config/%s\")'\n" x))))
 | 
			
		||||
           files
 | 
			
		||||
           "\n")
 | 
			
		||||
#+END_SRC
 | 
			
		||||
 | 
			
		||||
#+RESULTS[87a25d6c524e8d1346452c54aa42ac3ac09d94cf]: generate-tangle
 | 
			
		||||
@ -403,8 +407,8 @@ emacs -q --batch --eval '(require \'ob-tangle)' \
 | 
			
		||||
#+end_example
 | 
			
		||||
 | 
			
		||||
#+BEGIN_SRC fish :noweb yes
 | 
			
		||||
  printf "\n# Tangling org files ##########################################################\n\n"
 | 
			
		||||
  <<generate-tangle()>>
 | 
			
		||||
printf "\n# Tangling org files ##########################################################\n\n"
 | 
			
		||||
<<generate-tangle()>>
 | 
			
		||||
#+END_SRC
 | 
			
		||||
 | 
			
		||||
** Setting up Emacs: Installing Spacemacs
 | 
			
		||||
@ -418,19 +422,19 @@ cloned within our =~/.config/emacs= directory, and git won’t let us clone
 | 
			
		||||
Spacemacs in an already existing and non-empty directory. To make sure it isn’t
 | 
			
		||||
one, let’s delete any potentially existing =~/.config/emacs= directory:
 | 
			
		||||
#+BEGIN_SRC fish
 | 
			
		||||
  printf "\n# Installing Spacemacs ########################################################\n\n"
 | 
			
		||||
  rm -rf $HOME/.config/emacs $HOME/.emacs* .spacemacs
 | 
			
		||||
printf "\n# Installing Spacemacs ########################################################\n\n"
 | 
			
		||||
rm -rf $HOME/.config/emacs $HOME/.emacs* .spacemacs
 | 
			
		||||
#+END_SRC
 | 
			
		||||
 | 
			
		||||
Now we can clone Spacemacs:
 | 
			
		||||
#+BEGIN_SRC fish
 | 
			
		||||
  git clone --branch develop https://github.com/syl20bnr/spacemacs ~/.config/emacs
 | 
			
		||||
git clone --branch develop https://github.com/syl20bnr/spacemacs ~/.config/emacs
 | 
			
		||||
#+END_SRC
 | 
			
		||||
 | 
			
		||||
And we can restore what might have been deleted in our =~/.emacs.d/private=
 | 
			
		||||
directory:
 | 
			
		||||
#+BEGIN_SRC fish
 | 
			
		||||
  yadm checkout -- ~/.config/emacs/private/
 | 
			
		||||
yadm checkout -- ~/.config/emacs/private/
 | 
			
		||||
#+END_SRC
 | 
			
		||||
 | 
			
		||||
** Set up dotfiles’ git repository
 | 
			
		||||
@ -444,26 +448,26 @@ directory:
 | 
			
		||||
This line in the bootstrap script will test if the current user is using my
 | 
			
		||||
username. If yes, it’s probably me.
 | 
			
		||||
#+BEGIN_SRC fish
 | 
			
		||||
  if test "$USER" = 'phundrak'
 | 
			
		||||
if test "$USER" = 'phundrak'
 | 
			
		||||
#+END_SRC
 | 
			
		||||
 | 
			
		||||
If it is me installing and using these dotfiles, I want the remotes of my
 | 
			
		||||
dotfiles to be set to ssh remotes using my ssh keys.
 | 
			
		||||
#+BEGIN_SRC fish
 | 
			
		||||
  printf "\n# Update yadm’s remotes #######################################################\n\n"
 | 
			
		||||
  yadm remote set-url origin git@labs.phundrak.com:phundrak/dotfiles.git
 | 
			
		||||
  yadm remote add github git@github.com:phundrak/dotfiles.git
 | 
			
		||||
printf "\n# Update yadm’s remotes #######################################################\n\n"
 | 
			
		||||
yadm remote set-url origin git@labs.phundrak.com:phundrak/dotfiles.git
 | 
			
		||||
yadm remote add github git@github.com:phundrak/dotfiles.git
 | 
			
		||||
#+END_SRC
 | 
			
		||||
 | 
			
		||||
I will also want to decrypt my encrypted files, such as said ssh keys.
 | 
			
		||||
#+BEGIN_SRC fish
 | 
			
		||||
  printf "\n# Decrypt encrypted dotfiles ##################################################\n\n"
 | 
			
		||||
  yadm decrypt
 | 
			
		||||
printf "\n# Decrypt encrypted dotfiles ##################################################\n\n"
 | 
			
		||||
yadm decrypt
 | 
			
		||||
#+END_SRC
 | 
			
		||||
 | 
			
		||||
Finally, let’s close this ~if~ statement.
 | 
			
		||||
#+BEGIN_SRC fish
 | 
			
		||||
  end
 | 
			
		||||
end
 | 
			
		||||
#+END_SRC
 | 
			
		||||
 | 
			
		||||
*** Update our submodules
 | 
			
		||||
@ -473,8 +477,8 @@ Finally, let’s close this ~if~ statement.
 | 
			
		||||
Now we can download the various dependencies of our dotfiles. To do so, let’s
 | 
			
		||||
run the following command:
 | 
			
		||||
#+BEGIN_SRC fish
 | 
			
		||||
  printf "\n# Getting yadm susbmodules ####################################################\n\n"
 | 
			
		||||
  yadm submodule update --init --recursive
 | 
			
		||||
printf "\n# Getting yadm susbmodules ####################################################\n\n"
 | 
			
		||||
yadm submodule update --init --recursive
 | 
			
		||||
#+END_SRC
 | 
			
		||||
 | 
			
		||||
** Enable some services
 | 
			
		||||
@ -491,14 +495,14 @@ them.
 | 
			
		||||
This service enables time syncing with the NTP protocol, so I can be sure my
 | 
			
		||||
computer’s time is correct. The service first needs to be enabled:
 | 
			
		||||
#+BEGIN_SRC fish
 | 
			
		||||
  printf "\n# Enabling timesync ###########################################################\n\n"
 | 
			
		||||
  sudo systemctl enable --now systemd-timesyncd
 | 
			
		||||
printf "\n# Enabling timesync ###########################################################\n\n"
 | 
			
		||||
sudo systemctl enable --now systemd-timesyncd
 | 
			
		||||
#+END_SRC
 | 
			
		||||
 | 
			
		||||
Now, let systemd know I want to use the NTP protocol to keep my computer’s time
 | 
			
		||||
synced.
 | 
			
		||||
#+BEGIN_SRC fish
 | 
			
		||||
  sudo timedatectl set-ntp true
 | 
			
		||||
sudo timedatectl set-ntp true
 | 
			
		||||
#+END_SRC
 | 
			
		||||
 | 
			
		||||
*** Docker
 | 
			
		||||
@ -507,17 +511,17 @@ synced.
 | 
			
		||||
:END:
 | 
			
		||||
First, let’s activate Docker on startup.
 | 
			
		||||
#+BEGIN_SRC fish
 | 
			
		||||
  printf "\n# Enabling and starting Docker ################################################\n\n"
 | 
			
		||||
  sudo systemctl enable --now docker
 | 
			
		||||
printf "\n# Enabling and starting Docker ################################################\n\n"
 | 
			
		||||
sudo systemctl enable --now docker
 | 
			
		||||
#+END_SRC
 | 
			
		||||
 | 
			
		||||
Now, if we wish it, we can be added to the =docker= group so we won’t have to
 | 
			
		||||
type =sudo= each time we call Docker or Docker Compose.
 | 
			
		||||
#+BEGIN_SRC fish
 | 
			
		||||
  read --prompt "echo 'Do you wish to be added to the `docker` group? (Y/n): ' " -l adddockergroup
 | 
			
		||||
  if test $adddockergroup = 'y' || test $adddockergroup = "Y" || test $adddockergroup = ''
 | 
			
		||||
      sudo usermod -aG docker $USER
 | 
			
		||||
  end
 | 
			
		||||
read --prompt "echo 'Do you wish to be added to the `docker` group? (Y/n): ' " -l adddockergroup
 | 
			
		||||
if test $adddockergroup = 'y' || test $adddockergroup = "Y" || test $adddockergroup = ''
 | 
			
		||||
    sudo usermod -aG docker $USER
 | 
			
		||||
end
 | 
			
		||||
#+END_SRC
 | 
			
		||||
 | 
			
		||||
*** Emacs
 | 
			
		||||
@ -529,8 +533,8 @@ in. However, the service won’t be started immediately, I personally prefer to
 | 
			
		||||
start a standalone instance in which installing and compiling the Emacs packages
 | 
			
		||||
will happen, and then once that is done I will start the service.
 | 
			
		||||
#+BEGIN_SRC fish
 | 
			
		||||
  printf "\n# Enabling Emacs as user service ##############################################\n\n"
 | 
			
		||||
  systemctl --user enable emacs
 | 
			
		||||
printf "\n# Enabling Emacs as user service ##############################################\n\n"
 | 
			
		||||
systemctl --user enable emacs
 | 
			
		||||
#+END_SRC
 | 
			
		||||
 | 
			
		||||
*** Mpd
 | 
			
		||||
@ -540,9 +544,9 @@ will happen, and then once that is done I will start the service.
 | 
			
		||||
Mpd will also use as a user service in order to get rid of some lines of code in
 | 
			
		||||
my configuration.
 | 
			
		||||
#+BEGIN_SRC fish
 | 
			
		||||
  printf "\n# Enabling Mpd as a user service ##############################################\n\n"
 | 
			
		||||
  mkdir -p ~/.config/mpd/playlists
 | 
			
		||||
  systemctl --user enable --now mpd
 | 
			
		||||
printf "\n# Enabling Mpd as a user service ##############################################\n\n"
 | 
			
		||||
mkdir -p ~/.config/mpd/playlists
 | 
			
		||||
systemctl --user enable --now mpd
 | 
			
		||||
#+END_SRC
 | 
			
		||||
 | 
			
		||||
*** SSH server
 | 
			
		||||
@ -552,11 +556,11 @@ my configuration.
 | 
			
		||||
Maybe we want to activate an SSH server on our machine. If so, we can enable it.
 | 
			
		||||
Let’s ask the question.
 | 
			
		||||
#+BEGIN_SRC fish
 | 
			
		||||
  whiptail --yesno 'Do you want to activate the ssh server?' 8 50
 | 
			
		||||
  if test $status -eq 0
 | 
			
		||||
      printf "\n# Enabling ssh server #########################################################\n\n"
 | 
			
		||||
      sudo systemctl enable --now sshd
 | 
			
		||||
  end
 | 
			
		||||
whiptail --yesno 'Do you want to activate the ssh server?' 8 50
 | 
			
		||||
if test $status -eq 0
 | 
			
		||||
    printf "\n# Enabling ssh server #########################################################\n\n"
 | 
			
		||||
    sudo systemctl enable --now sshd
 | 
			
		||||
end
 | 
			
		||||
#+END_SRC
 | 
			
		||||
 | 
			
		||||
*** Acpilight
 | 
			
		||||
@ -568,7 +572,7 @@ actually no service to enable here, but we must ensure the user is part of the
 | 
			
		||||
~video~ group so we can modify the brightness of our screen without using
 | 
			
		||||
~sudo~.
 | 
			
		||||
#+BEGIN_SRC fish
 | 
			
		||||
  sudo usermod -aG video $USER
 | 
			
		||||
sudo usermod -aG video $USER
 | 
			
		||||
#+END_SRC
 | 
			
		||||
 | 
			
		||||
*** NordVPN
 | 
			
		||||
@ -579,7 +583,7 @@ Thanks to the AUR package ~nordvpn-bin~, I no longer have to manually maintain
 | 
			
		||||
my VPN connections with OpenVPN. However, it requires a service that we should
 | 
			
		||||
activate:
 | 
			
		||||
#+BEGIN_SRC fish
 | 
			
		||||
  sudo systemctl enable --now nordvpnd
 | 
			
		||||
sudo systemctl enable --now nordvpnd
 | 
			
		||||
#+END_SRC
 | 
			
		||||
 | 
			
		||||
Let’s also set its default protocol to UDP. This will allow me to use any port
 | 
			
		||||
@ -587,7 +591,7 @@ while connected to any WiFi as long as the 443 port is available. Because yes, I
 | 
			
		||||
do connect to a WiFi that blocks some important ports, such as the IMAP and SMTP
 | 
			
		||||
ports. Thanks University of Paris 8 for being SO paranoid.
 | 
			
		||||
#+BEGIN_SRC fish
 | 
			
		||||
  nordvpn s protocol tcp
 | 
			
		||||
nordvpn s protocol tcp
 | 
			
		||||
#+END_SRC
 | 
			
		||||
 | 
			
		||||
** Symlink some system config files
 | 
			
		||||
@ -596,16 +600,16 @@ ports. Thanks University of Paris 8 for being SO paranoid.
 | 
			
		||||
:END:
 | 
			
		||||
We have some files in [[file:ect/][etc/]] that are to be symlinked to =/etc=.
 | 
			
		||||
#+BEGIN_SRC fish
 | 
			
		||||
  for f in (find ~/.etc -type f)
 | 
			
		||||
      set dest (echo $f | sed -n 's|^.*etc\(.*\)$|/etc\1|p')
 | 
			
		||||
      sudo ln -s $f $dest
 | 
			
		||||
  end
 | 
			
		||||
for f in (find ~/.etc -type f)
 | 
			
		||||
    set dest (echo $f | sed -n 's|^.*etc\(.*\)$|/etc\1|p')
 | 
			
		||||
    sudo ln -s $f $dest
 | 
			
		||||
end
 | 
			
		||||
#+END_SRC
 | 
			
		||||
 | 
			
		||||
Let’s also symlink the ~plock~ script ([[file:bin.org::#Lock-635fcb38][source here]]) to ~/usr/bin~ so ~xss-lock~
 | 
			
		||||
can find it.
 | 
			
		||||
#+BEGIN_SRC fish
 | 
			
		||||
  sudo ln -s (which plock) /usr/bin/plock
 | 
			
		||||
sudo ln -s (which plock) /usr/bin/plock
 | 
			
		||||
#+END_SRC
 | 
			
		||||
 | 
			
		||||
** Install packages from git
 | 
			
		||||
@ -614,7 +618,7 @@ can find it.
 | 
			
		||||
:END:
 | 
			
		||||
Now, let’s install some packages from git directly.
 | 
			
		||||
#+BEGIN_SRC fish
 | 
			
		||||
  mkdir -p ~/fromGIT
 | 
			
		||||
mkdir -p ~/fromGIT
 | 
			
		||||
#+END_SRC
 | 
			
		||||
 | 
			
		||||
*** Reveal.JS
 | 
			
		||||
@ -624,9 +628,9 @@ Now, let’s install some packages from git directly.
 | 
			
		||||
I sometimes use Reveal.JS to make presentations, and I set its location in my
 | 
			
		||||
[[file:.spacemacs][dotspacemacs]] file to be in =~/fromGIT=, so let’s clone it there.
 | 
			
		||||
#+BEGIN_SRC fish
 | 
			
		||||
  printf "\n# Install Reveal.JS ###########################################################\n\n"
 | 
			
		||||
  cd ~/fromGIT
 | 
			
		||||
  git clone https://github.com/hakimel/reveal.js.git
 | 
			
		||||
printf "\n# Install Reveal.JS ###########################################################\n\n"
 | 
			
		||||
cd ~/fromGIT
 | 
			
		||||
git clone https://github.com/hakimel/reveal.js.git
 | 
			
		||||
#+END_SRC
 | 
			
		||||
 | 
			
		||||
** Install Rust
 | 
			
		||||
@ -641,14 +645,14 @@ When using Rust, I bounce between two toolchains, the ~stable~ toolchain and the
 | 
			
		||||
~nightly~ toolchain, although I try to stick with Rust Stable. To install them,
 | 
			
		||||
I will use ~rustup~ which has already been installed previously.
 | 
			
		||||
#+BEGIN_SRC fish
 | 
			
		||||
  printf "\n# Install the rust toolchains, nightly is the default one #####################\n\n"
 | 
			
		||||
  rustup default stable
 | 
			
		||||
printf "\n# Install the rust toolchains, nightly is the default one #####################\n\n"
 | 
			
		||||
rustup default stable
 | 
			
		||||
#+END_SRC
 | 
			
		||||
 | 
			
		||||
This will both download the stable toolchain and set it as the default one. Now
 | 
			
		||||
to install the nightly toolchain, let’s run this:
 | 
			
		||||
#+BEGIN_SRC fish
 | 
			
		||||
  rustup toolchain install nightly
 | 
			
		||||
rustup toolchain install nightly
 | 
			
		||||
#+END_SRC
 | 
			
		||||
 | 
			
		||||
*** Install some utilities
 | 
			
		||||
@ -658,8 +662,8 @@ to install the nightly toolchain, let’s run this:
 | 
			
		||||
We’ll need some utilities when developing Rust from Emacs, namely ~rustfmt~ and
 | 
			
		||||
~racer~. Let’s install them with ~cargo~.
 | 
			
		||||
#+BEGIN_SRC fish
 | 
			
		||||
  printf "\n# Add rust utilities ##########################################################\n\n"
 | 
			
		||||
  cargo install rustfmt racer
 | 
			
		||||
printf "\n# Add rust utilities ##########################################################\n\n"
 | 
			
		||||
cargo install rustfmt racer
 | 
			
		||||
#+END_SRC
 | 
			
		||||
 | 
			
		||||
We will also need some components for development purposes.
 | 
			
		||||
@ -672,9 +676,9 @@ We will also need some components for development purposes.
 | 
			
		||||
 | 
			
		||||
#+NAME: rust-components-gen
 | 
			
		||||
#+BEGIN_SRC emacs-lisp :var components=rust-components-table[,0]
 | 
			
		||||
  (mapconcat (lambda (x) (format "rustup component add %s" x))
 | 
			
		||||
             components
 | 
			
		||||
             "\n")
 | 
			
		||||
(mapconcat (lambda (x) (format "rustup component add %s" x))
 | 
			
		||||
           components
 | 
			
		||||
           "\n")
 | 
			
		||||
#+END_SRC
 | 
			
		||||
 | 
			
		||||
#+RESULTS[b3935b1c09d86fe506b43670f52960306a1e9809]:
 | 
			
		||||
@ -684,7 +688,7 @@ We will also need some components for development purposes.
 | 
			
		||||
 | 
			
		||||
Here is the code to do so:
 | 
			
		||||
#+BEGIN_SRC fish :noweb yes
 | 
			
		||||
  <<rust-components-gen()>>
 | 
			
		||||
<<rust-components-gen()>>
 | 
			
		||||
#+END_SRC
 | 
			
		||||
 | 
			
		||||
** Install some python packages
 | 
			
		||||
@ -703,8 +707,8 @@ working.
 | 
			
		||||
 | 
			
		||||
#+NAME: python-packages-gen
 | 
			
		||||
#+BEGIN_SRC emacs-lisp :var packages=python-packages-table[,0]
 | 
			
		||||
  (format "pip install --user %s"
 | 
			
		||||
          (string-join packages " "))
 | 
			
		||||
(format "pip install --user %s"
 | 
			
		||||
        (string-join packages " "))
 | 
			
		||||
#+END_SRC
 | 
			
		||||
 | 
			
		||||
#+RESULTS[29652be1076ffac01e34189067efa8fe9abda9d9]: python-packages-gen
 | 
			
		||||
@ -712,8 +716,8 @@ working.
 | 
			
		||||
 | 
			
		||||
Let’s install them locally for our user.
 | 
			
		||||
#+BEGIN_SRC fish :noweb yes
 | 
			
		||||
  printf "\n# Installing Python packages ##################################################\n\n"
 | 
			
		||||
  <<python-packages-gen()>>
 | 
			
		||||
printf "\n# Installing Python packages ##################################################\n\n"
 | 
			
		||||
<<python-packages-gen()>>
 | 
			
		||||
#+END_SRC
 | 
			
		||||
 | 
			
		||||
** Set up Chicken (Scheme interpreter/compiler)
 | 
			
		||||
@ -723,14 +727,14 @@ Let’s install them locally for our user.
 | 
			
		||||
Chicken needs to be set up before being used. First, we need to install its
 | 
			
		||||
documentation.
 | 
			
		||||
#+BEGIN_SRC fish
 | 
			
		||||
  printf "\n# Setting up Chicken ##########################################################\n\n"
 | 
			
		||||
  chicken-install -s apropos chicken-doc
 | 
			
		||||
printf "\n# Setting up Chicken ##########################################################\n\n"
 | 
			
		||||
chicken-install -s apropos chicken-doc
 | 
			
		||||
#+END_SRC
 | 
			
		||||
 | 
			
		||||
Then, we’ll complete the documentation like so:
 | 
			
		||||
#+BEGIN_SRC fish
 | 
			
		||||
  cd (chicken-csi -b -e "(import (chicken platform))" -p "(chicken-home)")
 | 
			
		||||
  curl https://3e8.org/pub/chicken-doc/chicken-doc-repo.tgz | sudo tar zx
 | 
			
		||||
cd (chicken-csi -b -e "(import (chicken platform))" -p "(chicken-home)")
 | 
			
		||||
curl https://3e8.org/pub/chicken-doc/chicken-doc-repo.tgz | sudo tar zx
 | 
			
		||||
#+END_SRC
 | 
			
		||||
 | 
			
		||||
** Set up our fish shell
 | 
			
		||||
@ -746,8 +750,8 @@ order to improve the user experience.
 | 
			
		||||
:END:
 | 
			
		||||
We will be using ~fisher~ as our extensions manager for Fish. Let’s install it.
 | 
			
		||||
#+BEGIN_SRC fish
 | 
			
		||||
  printf "\n# Installing fisher ###########################################################\n\n"
 | 
			
		||||
  curl https://git.io/fisher --create-dirs -sLo ~/.config/fish/functions/fisher.fish
 | 
			
		||||
printf "\n# Installing fisher ###########################################################\n\n"
 | 
			
		||||
curl https://git.io/fisher --create-dirs -sLo ~/.config/fish/functions/fisher.fish
 | 
			
		||||
#+END_SRC
 | 
			
		||||
 | 
			
		||||
*** Install our extensions
 | 
			
		||||
@ -770,9 +774,9 @@ I generally use the following extensions in my Fish shell.
 | 
			
		||||
 | 
			
		||||
#+NAME: fish-extensions-gen
 | 
			
		||||
#+BEGIN_SRC emacs-lisp :var extensions=fish-extensions-table[,0]
 | 
			
		||||
  (mapconcat (lambda (x) (format "fisher add %s" x))
 | 
			
		||||
             extensions
 | 
			
		||||
             "\n")
 | 
			
		||||
(mapconcat (lambda (x) (format "fisher add %s" x))
 | 
			
		||||
           extensions
 | 
			
		||||
           "\n")
 | 
			
		||||
#+END_SRC
 | 
			
		||||
 | 
			
		||||
#+RESULTS[a88b321ba9148acc8c28c7fb1aaf924c23b6b072]: fish-extensions-gen
 | 
			
		||||
@ -786,6 +790,6 @@ I generally use the following extensions in my Fish shell.
 | 
			
		||||
: fisher add oh-my-fish/theme-bobthefish
 | 
			
		||||
 | 
			
		||||
#+BEGIN_SRC fish :noweb yes
 | 
			
		||||
  printf "\n# Installing Fisher Extensions ################################################\n\n"
 | 
			
		||||
  <<fish-extensions-gen()>>
 | 
			
		||||
printf "\n# Installing Fisher Extensions ################################################\n\n"
 | 
			
		||||
<<fish-extensions-gen()>>
 | 
			
		||||
#+END_SRC
 | 
			
		||||
 | 
			
		||||
							
								
								
									
										3621
									
								
								org/config/emacs.org
									
									
									
									
									
								
							
							
						
						
									
										3621
									
								
								org/config/emacs.org
									
									
									
									
									
								
							
										
											
												File diff suppressed because it is too large
												Load Diff
											
										
									
								
							@ -18,9 +18,9 @@ abbreviations.
 | 
			
		||||
Just in case, we might need sometimes to declare the fish function =fish_title=
 | 
			
		||||
as =true=, so let’s do so.
 | 
			
		||||
#+BEGIN_SRC fish
 | 
			
		||||
  function fish_title
 | 
			
		||||
      true
 | 
			
		||||
  end
 | 
			
		||||
function fish_title
 | 
			
		||||
    true
 | 
			
		||||
end
 | 
			
		||||
#+END_SRC
 | 
			
		||||
 | 
			
		||||
* Fish from within Emacs
 | 
			
		||||
@ -30,9 +30,9 @@ as =true=, so let’s do so.
 | 
			
		||||
I sometimes call fish from within emacs, with =M-x ansi-term=. In this case, the
 | 
			
		||||
variable =TERM= needs to have the value =eterm-color=.
 | 
			
		||||
#+BEGIN_SRC fish
 | 
			
		||||
  if test -n "$EMACS"
 | 
			
		||||
      set -x TERM eterm-color
 | 
			
		||||
  end
 | 
			
		||||
if test -n "$EMACS"
 | 
			
		||||
    set -x TERM eterm-color
 | 
			
		||||
end
 | 
			
		||||
#+END_SRC
 | 
			
		||||
 | 
			
		||||
* Tramp remote access
 | 
			
		||||
@ -44,14 +44,14 @@ precise shell appearance: a simple =$= followed by a space after which to put
 | 
			
		||||
the commands it needs to execute, and nothing else. Due to this, let’s
 | 
			
		||||
deactivate and redefine some of the functions defining the appearance of fish.
 | 
			
		||||
#+BEGIN_SRC fish
 | 
			
		||||
  if test "$TERM" = "dumb"
 | 
			
		||||
      function fish_prompt
 | 
			
		||||
          echo "\$ "
 | 
			
		||||
      end
 | 
			
		||||
      function fish_right_prompt; end
 | 
			
		||||
      function fish_greeting; end
 | 
			
		||||
      function fish_title; end
 | 
			
		||||
  end
 | 
			
		||||
if test "$TERM" = "dumb"
 | 
			
		||||
    function fish_prompt
 | 
			
		||||
        echo "\$ "
 | 
			
		||||
    end
 | 
			
		||||
    function fish_right_prompt; end
 | 
			
		||||
    function fish_greeting; end
 | 
			
		||||
    function fish_title; end
 | 
			
		||||
end
 | 
			
		||||
#+END_SRC
 | 
			
		||||
 | 
			
		||||
* Regular fish shell appearance
 | 
			
		||||
@ -63,88 +63,88 @@ when I’m the one using it: the ~fish_greeting~ function. I use it to give me a
 | 
			
		||||
overview of my computer’s status, including its hostname, uptime, disks usage,
 | 
			
		||||
ram usage, swap usage, and networking.
 | 
			
		||||
#+BEGIN_SRC fish
 | 
			
		||||
  set RED '\033[0;31m'
 | 
			
		||||
  set GREEN '\033[0;32m'
 | 
			
		||||
  set NC '\033[0m'
 | 
			
		||||
set RED '\033[0;31m'
 | 
			
		||||
set GREEN '\033[0;32m'
 | 
			
		||||
set NC '\033[0m'
 | 
			
		||||
 | 
			
		||||
  function display_slider # used total
 | 
			
		||||
      set -l slider_length 38
 | 
			
		||||
      set -l used $argv[1]
 | 
			
		||||
      set -l total $argv[2]
 | 
			
		||||
      set -l used_slider (math -s0 "($used * $slider_length) / $total")
 | 
			
		||||
      set -l unused_slider (math -s0 "$slider_length - $used_slider")
 | 
			
		||||
      echo -en "["
 | 
			
		||||
      echo -en $RED
 | 
			
		||||
      echo -en (string repeat -n $used_slider '=')
 | 
			
		||||
      echo -en $GREEN
 | 
			
		||||
      echo -en (string repeat -n $unused_slider '=')
 | 
			
		||||
      echo -en $NC
 | 
			
		||||
      echo -en "]"
 | 
			
		||||
  end
 | 
			
		||||
function display_slider # used total
 | 
			
		||||
    set -l slider_length 38
 | 
			
		||||
    set -l used $argv[1]
 | 
			
		||||
    set -l total $argv[2]
 | 
			
		||||
    set -l used_slider (math -s0 "($used * $slider_length) / $total")
 | 
			
		||||
    set -l unused_slider (math -s0 "$slider_length - $used_slider")
 | 
			
		||||
    echo -en "["
 | 
			
		||||
    echo -en $RED
 | 
			
		||||
    echo -en (string repeat -n $used_slider '=')
 | 
			
		||||
    echo -en $GREEN
 | 
			
		||||
    echo -en (string repeat -n $unused_slider '=')
 | 
			
		||||
    echo -en $NC
 | 
			
		||||
    echo -en "]"
 | 
			
		||||
end
 | 
			
		||||
 | 
			
		||||
  function fish_greeting
 | 
			
		||||
      set -l ruler_length 79
 | 
			
		||||
      set -l ruler (string repeat -n $ruler_length "=")
 | 
			
		||||
function fish_greeting
 | 
			
		||||
    set -l ruler_length 79
 | 
			
		||||
    set -l ruler (string repeat -n $ruler_length "=")
 | 
			
		||||
 | 
			
		||||
      set -l osname (cat /etc/os-release | grep -i pretty_name | sed 's/.*"\(.*\)".*/\1/')
 | 
			
		||||
      set -l uptime (uptime -p | sed 's/up //')
 | 
			
		||||
    set -l osname (cat /etc/os-release | grep -i pretty_name | sed 's/.*"\(.*\)".*/\1/')
 | 
			
		||||
    set -l uptime (uptime -p | sed 's/up //')
 | 
			
		||||
 | 
			
		||||
      set -l root (df -Ph | grep -E "/\$")
 | 
			
		||||
      set -l root_p (echo $root | awk '{print $5}' | tr -d '%')
 | 
			
		||||
      set -l root_used (echo $root | awk '{print $3}')
 | 
			
		||||
      set -l root_total (echo $root | awk '{print $2}')
 | 
			
		||||
    set -l root (df -Ph | grep -E "/\$")
 | 
			
		||||
    set -l root_p (echo $root | awk '{print $5}' | tr -d '%')
 | 
			
		||||
    set -l root_used (echo $root | awk '{print $3}')
 | 
			
		||||
    set -l root_total (echo $root | awk '{print $2}')
 | 
			
		||||
 | 
			
		||||
      set -l ram (free -tm | grep Mem)
 | 
			
		||||
      set -l ram_total (echo $ram | awk '{print $2}')
 | 
			
		||||
      set -l ram_used (echo $ram | awk '{print $3}')
 | 
			
		||||
      set -l ram_p (math -s0 "$ram_used / $ram_total * 100")
 | 
			
		||||
    set -l ram (free -tm | grep Mem)
 | 
			
		||||
    set -l ram_total (echo $ram | awk '{print $2}')
 | 
			
		||||
    set -l ram_used (echo $ram | awk '{print $3}')
 | 
			
		||||
    set -l ram_p (math -s0 "$ram_used / $ram_total * 100")
 | 
			
		||||
 | 
			
		||||
      set -l swap (free -tm | grep Swap)
 | 
			
		||||
      set -l swap_total (echo $swap | awk '{print $2}')
 | 
			
		||||
      set -l swap_used (echo $swap | awk '{print $3}')
 | 
			
		||||
      set -l swap_p (math -s0 "$swap_used / $swap_total * 100")
 | 
			
		||||
    set -l swap (free -tm | grep Swap)
 | 
			
		||||
    set -l swap_total (echo $swap | awk '{print $2}')
 | 
			
		||||
    set -l swap_used (echo $swap | awk '{print $3}')
 | 
			
		||||
    set -l swap_p (math -s0 "$swap_used / $swap_total * 100")
 | 
			
		||||
 | 
			
		||||
      set -l connections (nmcli c s | grep -E "wifi|ethernet" | grep -v '\-\-')
 | 
			
		||||
      set -l wifi (echo $connections | grep "wifi" | awk '{print $1}')
 | 
			
		||||
      set -l ethernet (test "$connections" = "*ethernet*" && echo -e $GREEN"UP"$NC || echo -e $RED"DOWN"$NC)
 | 
			
		||||
      set -l wifi (test -n wifi && echo -e $GREEN$wifi$NC || echo - $RED"DOWN"$NC)
 | 
			
		||||
    set -l connections (nmcli c s | grep -E "wifi|ethernet" | grep -v '\-\-')
 | 
			
		||||
    set -l wifi (echo $connections | grep "wifi" | awk '{print $1}')
 | 
			
		||||
    set -l ethernet (test "$connections" = "*ethernet*" && echo -e $GREEN"UP"$NC || echo -e $RED"DOWN"$NC)
 | 
			
		||||
    set -l wifi (test -n wifi && echo -e $GREEN$wifi$NC || echo - $RED"DOWN"$NC)
 | 
			
		||||
 | 
			
		||||
      echo $ruler
 | 
			
		||||
      printf "OS......: %-30sKernel: %s %s\n" $osname (uname -s) (uname -r)
 | 
			
		||||
      printf "Hostname: %-30sUptime: %s\n" (hostname) $uptime
 | 
			
		||||
      printf "Ethernet: %-41sWifi..: %s\n" $ethernet $wifi
 | 
			
		||||
      printf "Disks...: %-6s %s %6s / %6s (%2d%%)\n" "/" (display_slider $root_p 100) $root_used $root_total $root_p
 | 
			
		||||
    echo $ruler
 | 
			
		||||
    printf "OS......: %-30sKernel: %s %s\n" $osname (uname -s) (uname -r)
 | 
			
		||||
    printf "Hostname: %-30sUptime: %s\n" (hostname) $uptime
 | 
			
		||||
    printf "Ethernet: %-41sWifi..: %s\n" $ethernet $wifi
 | 
			
		||||
    printf "Disks...: %-6s %s %6s / %6s (%2d%%)\n" "/" (display_slider $root_p 100) $root_used $root_total $root_p
 | 
			
		||||
 | 
			
		||||
      # loop other mountpoints
 | 
			
		||||
      for mp in (df -Ph 2> /dev/null | egrep "sd|tank|nvme" | egrep -v "boot|/\$")
 | 
			
		||||
          set -l mp_p (echo $mp | awk '{print $5}' | tr -d '%')
 | 
			
		||||
          set -l mp_used (echo $mp | awk '{print $3}')
 | 
			
		||||
          set -l mp_total (echo $mp | awk '{print $2}')
 | 
			
		||||
          set -l mp_name (echo $mp | awk '{print $6}')
 | 
			
		||||
          printf "          %-6s %s %6s / %6s (%2d%%)\n" $mp_name (display_slider $mp_p 100) $mp_used $mp_total $mp_p
 | 
			
		||||
      end
 | 
			
		||||
    # loop other mountpoints
 | 
			
		||||
    for mp in (df -Ph 2> /dev/null | egrep "sd|tank|nvme" | egrep -v "boot|/\$")
 | 
			
		||||
        set -l mp_p (echo $mp | awk '{print $5}' | tr -d '%')
 | 
			
		||||
        set -l mp_used (echo $mp | awk '{print $3}')
 | 
			
		||||
        set -l mp_total (echo $mp | awk '{print $2}')
 | 
			
		||||
        set -l mp_name (echo $mp | awk '{print $6}')
 | 
			
		||||
        printf "          %-6s %s %6s / %6s (%2d%%)\n" $mp_name (display_slider $mp_p 100) $mp_used $mp_total $mp_p
 | 
			
		||||
    end
 | 
			
		||||
 | 
			
		||||
      printf "Ram.....:        %s %5dM / %5dM (%2d%%)\n" (display_slider $ram_used $ram_total) $ram_used $ram_total $ram_p
 | 
			
		||||
      printf "Swap....:        %s %5dM / %5dM (%2d%%)\n" (display_slider $swap_used $swap_total) $swap_used $swap_total $swap_p
 | 
			
		||||
      echo $ruler
 | 
			
		||||
  end
 | 
			
		||||
    printf "Ram.....:        %s %5dM / %5dM (%2d%%)\n" (display_slider $ram_used $ram_total) $ram_used $ram_total $ram_p
 | 
			
		||||
    printf "Swap....:        %s %5dM / %5dM (%2d%%)\n" (display_slider $swap_used $swap_total) $swap_used $swap_total $swap_p
 | 
			
		||||
    echo $ruler
 | 
			
		||||
end
 | 
			
		||||
#+END_SRC
 | 
			
		||||
 | 
			
		||||
The theme I use for fish is [[https://github.com/oh-my-fish/theme-bobthefish][bobthefish]], which by default puts a really long
 | 
			
		||||
timestamp to the right of the prompt. I want something shorter, so here is the
 | 
			
		||||
variable to set, using the format specified in ~date(1)~.
 | 
			
		||||
#+BEGIN_SRC fish
 | 
			
		||||
  set -g theme_date_format "+%g-%m-%d %H:%M:%S"
 | 
			
		||||
set -g theme_date_format "+%g-%m-%d %H:%M:%S"
 | 
			
		||||
#+END_SRC
 | 
			
		||||
 | 
			
		||||
I also wish to have a kinda different newline prompt, so let’s set it:
 | 
			
		||||
#+BEGIN_SRC fish
 | 
			
		||||
  set -g theme_newline_prompt 'λ '
 | 
			
		||||
set -g theme_newline_prompt 'λ '
 | 
			
		||||
#+END_SRC
 | 
			
		||||
 | 
			
		||||
Finally, let’s set our prompt’s theme to the Nord theme.
 | 
			
		||||
#+BEGIN_SRC fish
 | 
			
		||||
  set -g theme_color_scheme nord
 | 
			
		||||
set -g theme_color_scheme nord
 | 
			
		||||
#+END_SRC
 | 
			
		||||
 | 
			
		||||
* Global variables
 | 
			
		||||
@ -154,24 +154,24 @@ Finally, let’s set our prompt’s theme to the Nord theme.
 | 
			
		||||
In order to keep some other code clean, I set the ~$BROWSER~ variable so I don’t
 | 
			
		||||
have to call my web browser directly but rather with this variable.
 | 
			
		||||
#+BEGIN_SRC fish
 | 
			
		||||
  set -gx BROWSER firefox
 | 
			
		||||
set -gx BROWSER firefox
 | 
			
		||||
#+END_SRC
 | 
			
		||||
 | 
			
		||||
Sometimes, software will rely on =SUDO_ASKPASS= to get a GUI from which it can
 | 
			
		||||
get the sudo password. So, let’s declare it.
 | 
			
		||||
#+BEGIN_SRC fish
 | 
			
		||||
  set -gx SUDO_ASKPASS ~/.local/bin/askpass
 | 
			
		||||
set -gx SUDO_ASKPASS ~/.local/bin/askpass
 | 
			
		||||
#+END_SRC
 | 
			
		||||
 | 
			
		||||
In general, I prefer using ~bat~ to ~less~, although the former relies on the
 | 
			
		||||
latter, but ~bat~ provides nice wrapping around ~less~, including syntax
 | 
			
		||||
highlighting. Let’s set the manpager to bat then:
 | 
			
		||||
#+BEGIN_SRC fish
 | 
			
		||||
  set -x MANPAGER "sh -c 'col -bx | bat -l man -p'"
 | 
			
		||||
set -x MANPAGER "sh -c 'col -bx | bat -l man -p'"
 | 
			
		||||
#+END_SRC
 | 
			
		||||
 | 
			
		||||
#+begin_src fish
 | 
			
		||||
  set -x XMODIFIERS
 | 
			
		||||
set -x XMODIFIERS
 | 
			
		||||
#+end_src
 | 
			
		||||
 | 
			
		||||
** Development
 | 
			
		||||
@ -182,8 +182,8 @@ Now, let’s declare our editor of choice, EmacsClient; not Emacs itself since i
 | 
			
		||||
will most often be just quick edits, nothing too heavy, if it is called from the
 | 
			
		||||
~EDITOR~ variable (from Git, for example), or from the ~VISUAL~ variable.
 | 
			
		||||
#+BEGIN_SRC fish
 | 
			
		||||
  set -gx EDITOR emacsclient -c
 | 
			
		||||
  set -gx VISUAL emacsclient -c
 | 
			
		||||
set -gx EDITOR emacsclient -c
 | 
			
		||||
set -gx VISUAL emacsclient -c
 | 
			
		||||
#+END_SRC
 | 
			
		||||
 | 
			
		||||
We also need to set the path to the Dart SDK.
 | 
			
		||||
@ -198,21 +198,21 @@ set -gx ANDROID_HOME $HOME/Android/Sdk
 | 
			
		||||
 | 
			
		||||
Still related to Dart and Flutter development,
 | 
			
		||||
#+BEGIN_SRC fish
 | 
			
		||||
  set -gx CHROME_EXECUTABLE /usr/bin/chromium
 | 
			
		||||
set -gx CHROME_EXECUTABLE /usr/bin/chromium
 | 
			
		||||
#+END_SRC
 | 
			
		||||
 | 
			
		||||
Next, we have two variables from Deno, the Node.js destroyer. Its base directory
 | 
			
		||||
will be set in my XDG config directory, and its binaries will be located in my
 | 
			
		||||
local binaries directory (see below).
 | 
			
		||||
#+BEGIN_SRC fish
 | 
			
		||||
  set -gx DENO_DIR $HOME/.config/deno
 | 
			
		||||
  set -gx DENO_INSTALL_ROOT $HOME/.local/bin/deno
 | 
			
		||||
set -gx DENO_DIR $HOME/.config/deno
 | 
			
		||||
set -gx DENO_INSTALL_ROOT $HOME/.local/bin/deno
 | 
			
		||||
#+END_SRC
 | 
			
		||||
 | 
			
		||||
Finally, some development packages require the =PKG_CONFIG_PATH= to be set, so
 | 
			
		||||
let’s do so.
 | 
			
		||||
#+BEGIN_SRC fish
 | 
			
		||||
  set -gx PKG_CONFIG_PATH /usr/local/lib/pkgconfig/ $PKG_CONFIG_PATH
 | 
			
		||||
set -gx PKG_CONFIG_PATH /usr/local/lib/pkgconfig/ $PKG_CONFIG_PATH
 | 
			
		||||
#+END_SRC
 | 
			
		||||
 | 
			
		||||
** ~$PATH~
 | 
			
		||||
@ -237,8 +237,8 @@ my own executables, and some more.
 | 
			
		||||
 | 
			
		||||
#+NAME: generate-extra-paths
 | 
			
		||||
#+BEGIN_SRC emacs-lisp :var paths=extra-paths[,0] :exports none :cache yes
 | 
			
		||||
  (mapconcat #'identity
 | 
			
		||||
             paths " \\\n")
 | 
			
		||||
(mapconcat #'identity
 | 
			
		||||
           paths " \\\n")
 | 
			
		||||
#+END_SRC
 | 
			
		||||
 | 
			
		||||
#+RESULTS[3fd24377f29513d4c7edcd9621d0462665efb403]: generate-extra-paths
 | 
			
		||||
@ -251,8 +251,8 @@ my own executables, and some more.
 | 
			
		||||
 | 
			
		||||
So, let’s set our user paths:
 | 
			
		||||
#+BEGIN_SRC fish :noweb yes
 | 
			
		||||
  set -g fish_user_paths \
 | 
			
		||||
  <<generate-extra-paths()>>
 | 
			
		||||
set -g fish_user_paths \
 | 
			
		||||
<<generate-extra-paths()>>
 | 
			
		||||
#+END_SRC
 | 
			
		||||
 | 
			
		||||
* Abbreviations
 | 
			
		||||
@ -261,12 +261,12 @@ So, let’s set our user paths:
 | 
			
		||||
:END:
 | 
			
		||||
#+NAME: generate-abbr
 | 
			
		||||
#+BEGIN_SRC emacs-lisp :var table=[] :exports none :tangle no
 | 
			
		||||
  (replace-regexp-in-string "\\\\vert[{}]*"
 | 
			
		||||
                            "|"
 | 
			
		||||
                            (mapconcat (lambda (x) (format "abbr %s '%s'" (car x) (cadr x)))
 | 
			
		||||
                                       table
 | 
			
		||||
                                       "\n")
 | 
			
		||||
                            t t)
 | 
			
		||||
(replace-regexp-in-string "\\\\vert[{}]*"
 | 
			
		||||
                          "|"
 | 
			
		||||
                          (mapconcat (lambda (x) (format "abbr %s '%s'" (car x) (cadr x)))
 | 
			
		||||
                                     table
 | 
			
		||||
                                     "\n")
 | 
			
		||||
                          t t)
 | 
			
		||||
#+END_SRC
 | 
			
		||||
 | 
			
		||||
Abbreviations are a great way to keep correctly track of which commands are run
 | 
			
		||||
@ -306,7 +306,7 @@ running right now, and =pscpu10= limits that to the top 10 threads. Similarly,
 | 
			
		||||
| psmem10      | ps auxf \vert sort -nr -k 4 \vert head -10         |
 | 
			
		||||
 | 
			
		||||
#+begin_SRC fish
 | 
			
		||||
  <<generate-abbr(table=mgmt-abbr)>>
 | 
			
		||||
<<generate-abbr(table=mgmt-abbr)>>
 | 
			
		||||
#+END_SRC
 | 
			
		||||
 | 
			
		||||
** System management (packages and services)
 | 
			
		||||
@ -332,7 +332,7 @@ can type =search=. Otherwise, if I want to include AUR results, I’ll use =paru
 | 
			
		||||
| purge        | paru -Sc         |
 | 
			
		||||
 | 
			
		||||
#+BEGIN_SRC fish
 | 
			
		||||
  <<generate-abbr(table=pm-abbr)>>
 | 
			
		||||
<<generate-abbr(table=pm-abbr)>>
 | 
			
		||||
#+END_SRC
 | 
			
		||||
 | 
			
		||||
*** Service management
 | 
			
		||||
@ -349,7 +349,7 @@ system services, I can instead type a simple capital =S=.
 | 
			
		||||
| suser        | systemctl --user |
 | 
			
		||||
 | 
			
		||||
#+BEGIN_SRC fish
 | 
			
		||||
  <<generate-abbr(table=service-abbr)>>
 | 
			
		||||
<<generate-abbr(table=service-abbr)>>
 | 
			
		||||
#+END_SRC
 | 
			
		||||
 | 
			
		||||
** Development
 | 
			
		||||
@ -373,7 +373,7 @@ configuration for debug or release profiles.
 | 
			
		||||
 | 
			
		||||
Here is the corresponding fish configuration:
 | 
			
		||||
#+BEGIN_SRC fish
 | 
			
		||||
  <<generate-abbr(table=abbr-cmake)>>
 | 
			
		||||
<<generate-abbr(table=abbr-cmake)>>
 | 
			
		||||
#+END_SRC
 | 
			
		||||
 | 
			
		||||
*** Docker
 | 
			
		||||
@ -398,7 +398,7 @@ full command, so I use these instead.
 | 
			
		||||
 | 
			
		||||
Here is the corresponding fish configuration:
 | 
			
		||||
#+BEGIN_SRC fish
 | 
			
		||||
  <<generate-abbr(table=abbr-docker)>>
 | 
			
		||||
<<generate-abbr(table=abbr-docker)>>
 | 
			
		||||
#+END_SRC
 | 
			
		||||
 | 
			
		||||
*** Text editors
 | 
			
		||||
@ -419,7 +419,7 @@ In case we want to launch Emacs in GUI mode anyways, ~egui~ is available too.
 | 
			
		||||
 | 
			
		||||
Here is the corresponding fish configuration:
 | 
			
		||||
#+BEGIN_SRC fish :noweb yes
 | 
			
		||||
  <<generate-abbr(table=abbr-text-ed)>>
 | 
			
		||||
<<generate-abbr(table=abbr-text-ed)>>
 | 
			
		||||
#+END_SRC
 | 
			
		||||
 | 
			
		||||
*** Compilation
 | 
			
		||||
@ -438,7 +438,7 @@ with the ~-Wall~ flag activated.
 | 
			
		||||
 | 
			
		||||
Here is the corresponding fish configuration:
 | 
			
		||||
#+BEGIN_SRC fish
 | 
			
		||||
  <<generate-abbr(table=abbr-comp)>>
 | 
			
		||||
<<generate-abbr(table=abbr-comp)>>
 | 
			
		||||
#+END_SRC
 | 
			
		||||
 | 
			
		||||
*** Git
 | 
			
		||||
@ -455,7 +455,7 @@ covered.
 | 
			
		||||
 | 
			
		||||
Here is the corresponding fish configuration:
 | 
			
		||||
#+BEGIN_SRC fish
 | 
			
		||||
  <<generate-abbr(table=abbr-git)>>
 | 
			
		||||
<<generate-abbr(table=abbr-git)>>
 | 
			
		||||
#+END_SRC
 | 
			
		||||
 | 
			
		||||
** LaTeX
 | 
			
		||||
@ -475,7 +475,7 @@ abbreviation. Same goes for ~texhash~ which must be run as sudo.
 | 
			
		||||
 | 
			
		||||
Here is the corresponding fish configuration:
 | 
			
		||||
#+BEGIN_SRC fish
 | 
			
		||||
  <<generate-abbr(table=latex-abbr)>>
 | 
			
		||||
<<generate-abbr(table=latex-abbr)>>
 | 
			
		||||
#+END_SRC
 | 
			
		||||
 | 
			
		||||
** Some security measures
 | 
			
		||||
@ -507,7 +507,7 @@ accidentally removing the root folder. I added the same option to =chgrp=,
 | 
			
		||||
 | 
			
		||||
Here is the corresponding fish configuration:
 | 
			
		||||
#+BEGIN_SRC fish
 | 
			
		||||
  <<generate-abbr(table=sec-abbr)>>
 | 
			
		||||
<<generate-abbr(table=sec-abbr)>>
 | 
			
		||||
#+END_SRC
 | 
			
		||||
 | 
			
		||||
** Typos
 | 
			
		||||
@ -530,7 +530,7 @@ So, let's just replace the former by the latter. I'm also very bad at typing
 | 
			
		||||
 | 
			
		||||
Here is the corresponding fish configuration:
 | 
			
		||||
#+BEGIN_SRC fish
 | 
			
		||||
  <<generate-abbr(table=typo-abbr)>>
 | 
			
		||||
<<generate-abbr(table=typo-abbr)>>
 | 
			
		||||
#+END_SRC
 | 
			
		||||
 | 
			
		||||
** Misc
 | 
			
		||||
@ -548,33 +548,33 @@ Here you will find various commands related to media in general. the first one
 | 
			
		||||
is a command to play some chillhop from the [[https://www.youtube.com/user/Chillhopdotcom][Chillhop YouTube channel]]'s
 | 
			
		||||
livestream.
 | 
			
		||||
#+BEGIN_SRC fish
 | 
			
		||||
  abbr chill 'mpv --force-window=no --no-video "https://www.youtube.com/user/Chillhopdotcom/live" &'
 | 
			
		||||
abbr chill 'mpv --force-window=no --no-video "https://www.youtube.com/user/Chillhopdotcom/live" &'
 | 
			
		||||
#+END_SRC
 | 
			
		||||
 | 
			
		||||
When it comes to mpv, I do not want to force it to open a graphical window if
 | 
			
		||||
for example I want to listen to an audio file. I also do not want any border on
 | 
			
		||||
that window. So, I declared this abbreviation.
 | 
			
		||||
#+BEGIN_SRC fish
 | 
			
		||||
  abbr mpv 'mpv --no-border --force-window=no'
 | 
			
		||||
abbr mpv 'mpv --no-border --force-window=no'
 | 
			
		||||
#+END_SRC
 | 
			
		||||
 | 
			
		||||
When I want to download a song from YouTube, I'll just use the command ~flac
 | 
			
		||||
videoIdentifier~ to get it through ~youtube-dl~.
 | 
			
		||||
#+BEGIN_SRC fish
 | 
			
		||||
  abbr flac 'youtube-dl -x --audio-format flac --audio-quality 0 -o "~/Music/%(uploader)s/%(title)s.%(ext)s"'
 | 
			
		||||
abbr flac 'youtube-dl -x --audio-format flac --audio-quality 0 -o "~/Music/%(uploader)s/%(title)s.%(ext)s"'
 | 
			
		||||
#+END_SRC
 | 
			
		||||
 | 
			
		||||
Some sane default options for ~sxiv~, a simple X image Viewer. This includes
 | 
			
		||||
playing GIFs and not displaying the filename below. Sxiv will also open in
 | 
			
		||||
fullscreen and will fit the displayed image to the frame.
 | 
			
		||||
#+BEGIN_SRC fish
 | 
			
		||||
  abbr sxiv 'sxiv -abfs f'
 | 
			
		||||
abbr sxiv 'sxiv -abfs f'
 | 
			
		||||
#+END_SRC
 | 
			
		||||
 | 
			
		||||
Finally, let's declare the following abbreviation that will launch an mpv
 | 
			
		||||
instance displaying my webcam:
 | 
			
		||||
#+BEGIN_SRC fish
 | 
			
		||||
  abbr webcam 'devour mpv --demuxer-lavf-format=video4linux2 --demuxer-lavf-o-set=input_format=mjpeg av://v4l2:/dev/video0'
 | 
			
		||||
abbr webcam 'devour mpv --demuxer-lavf-format=video4linux2 --demuxer-lavf-o-set=input_format=mjpeg av://v4l2:/dev/video0'
 | 
			
		||||
#+END_SRC
 | 
			
		||||
 | 
			
		||||
*** Sudo
 | 
			
		||||
@ -585,7 +585,7 @@ First, I make it so that ~sudo~ comes with the ~-A~ switch in order to call my
 | 
			
		||||
custom graphical script for getting my password (see [[file:bin.org::#Askpass-d0d7a8c0][askpass]]). I also made it so
 | 
			
		||||
~please~ is an equivalent to ~sudo -A~ as a joke.
 | 
			
		||||
#+BEGIN_SRC fish
 | 
			
		||||
  abbr please 'sudo -A'
 | 
			
		||||
abbr please 'sudo -A'
 | 
			
		||||
#+END_SRC
 | 
			
		||||
 | 
			
		||||
*** History
 | 
			
		||||
@ -595,7 +595,7 @@ custom graphical script for getting my password (see [[file:bin.org::#Askpass-d0
 | 
			
		||||
I find it more intuitive and faster to just write ~hist~ instead of ~history~,
 | 
			
		||||
so let's declare that.
 | 
			
		||||
#+BEGIN_SRC fish
 | 
			
		||||
  abbr hist history
 | 
			
		||||
abbr hist history
 | 
			
		||||
#+END_SRC
 | 
			
		||||
 | 
			
		||||
*** Compression
 | 
			
		||||
@ -614,7 +614,7 @@ management]]).
 | 
			
		||||
| untar        | tar -xvzf |
 | 
			
		||||
 | 
			
		||||
#+BEGIN_SRC fish
 | 
			
		||||
  <<generate-abbr(table=tar-abbr)>>
 | 
			
		||||
<<generate-abbr(table=tar-abbr)>>
 | 
			
		||||
#+END_SRC
 | 
			
		||||
 | 
			
		||||
*** exa
 | 
			
		||||
@ -628,7 +628,7 @@ management]]).
 | 
			
		||||
| lsl          | exa -halg@ --group-directories-first --git |
 | 
			
		||||
 | 
			
		||||
#+BEGIN_SRC fish
 | 
			
		||||
  <<generate-abbr(table=exa-abbr)>>
 | 
			
		||||
<<generate-abbr(table=exa-abbr)>>
 | 
			
		||||
#+END_SRC
 | 
			
		||||
 | 
			
		||||
*** Network Management
 | 
			
		||||
@ -638,7 +638,7 @@ management]]).
 | 
			
		||||
First, we have just =nmcli= with sane default options, that is a pretty output
 | 
			
		||||
with colors.
 | 
			
		||||
#+BEGIN_SRC fish
 | 
			
		||||
  abbr nmcli 'nmcli -p -c auto'
 | 
			
		||||
abbr nmcli 'nmcli -p -c auto'
 | 
			
		||||
#+END_SRC
 | 
			
		||||
 | 
			
		||||
*** NordVPN
 | 
			
		||||
@ -662,7 +662,7 @@ the US.
 | 
			
		||||
| ncu          | nordvpn c United_States |
 | 
			
		||||
 | 
			
		||||
#+BEGIN_SRC fish
 | 
			
		||||
  <<generate-abbr(table=nordvpn-abbr)>>
 | 
			
		||||
<<generate-abbr(table=nordvpn-abbr)>>
 | 
			
		||||
#+END_SRC
 | 
			
		||||
 | 
			
		||||
*** Wget
 | 
			
		||||
@ -671,7 +671,7 @@ the US.
 | 
			
		||||
:END:
 | 
			
		||||
By default, continue a download that was interupted.
 | 
			
		||||
#+BEGIN_SRC fish
 | 
			
		||||
  abbr wget 'wget -c'
 | 
			
		||||
abbr wget 'wget -c'
 | 
			
		||||
#+END_SRC
 | 
			
		||||
 | 
			
		||||
* Last thing before we’re done
 | 
			
		||||
 | 
			
		||||
@ -126,23 +126,23 @@ This file is tangled at ~$HOME/.gtkrc-2.0~. This is an equivalent for the GTK3
 | 
			
		||||
configuration file you will see below, and it shares most of its settings.
 | 
			
		||||
First, let’s select the Nordic theme for GTK2. Let’s also set the icon theme.
 | 
			
		||||
#+BEGIN_SRC conf-unix
 | 
			
		||||
  # -*- mode: unix-config -*-
 | 
			
		||||
  gtk-theme-name="Nordic"
 | 
			
		||||
  gtk-icon-theme-name="Flat-Remix-Dark"
 | 
			
		||||
# -*- mode: unix-config -*-
 | 
			
		||||
gtk-theme-name="Nordic"
 | 
			
		||||
gtk-icon-theme-name="Flat-Remix-Dark"
 | 
			
		||||
#+END_SRC
 | 
			
		||||
 | 
			
		||||
#+BEGIN_SRC conf-unix
 | 
			
		||||
  gtk-xft-antialias=1
 | 
			
		||||
  gtk-xft-hinting=1
 | 
			
		||||
  gtk-xft-hintstyle="hintslight"
 | 
			
		||||
gtk-xft-antialias=1
 | 
			
		||||
gtk-xft-hinting=1
 | 
			
		||||
gtk-xft-hintstyle="hintslight"
 | 
			
		||||
#+END_SRC
 | 
			
		||||
 | 
			
		||||
This changes the shortcuts in menu, let’s also make the menus snappier.
 | 
			
		||||
#+BEGIN_SRC conf-unix
 | 
			
		||||
  gtk-can-change-accels=1
 | 
			
		||||
  gtk-menu-bar-popup-delay=0
 | 
			
		||||
  gtk-menu-popdown-delay=0
 | 
			
		||||
  gtk-menu-popup-delay=0
 | 
			
		||||
gtk-can-change-accels=1
 | 
			
		||||
gtk-menu-bar-popup-delay=0
 | 
			
		||||
gtk-menu-popdown-delay=0
 | 
			
		||||
gtk-menu-popup-delay=0
 | 
			
		||||
#+END_SRC
 | 
			
		||||
 | 
			
		||||
***** Filechooser
 | 
			
		||||
@ -151,60 +151,60 @@ This changes the shortcuts in menu, let’s also make the menus snappier.
 | 
			
		||||
:CUSTOM_ID: Features-Graphical_tweaks-GTK_Settings-GTK2-Filechooser-389f040d
 | 
			
		||||
:END:
 | 
			
		||||
#+BEGIN_SRC conf-unix
 | 
			
		||||
  [Filechooser Settings]
 | 
			
		||||
[Filechooser Settings]
 | 
			
		||||
#+END_SRC
 | 
			
		||||
 | 
			
		||||
The first option alows me to open the file chooser in the current working
 | 
			
		||||
directory:
 | 
			
		||||
#+BEGIN_SRC conf-unix
 | 
			
		||||
  StartupMode=cwd
 | 
			
		||||
StartupMode=cwd
 | 
			
		||||
#+END_SRC
 | 
			
		||||
 | 
			
		||||
Next, setting the location mode to ~path-bar~ will show the path as buttons that
 | 
			
		||||
can be clicked rather than the full path.
 | 
			
		||||
#+BEGIN_SRC conf-unix
 | 
			
		||||
  LocationMode=path-bar
 | 
			
		||||
LocationMode=path-bar
 | 
			
		||||
#+END_SRC
 | 
			
		||||
 | 
			
		||||
With this configuration, by default we won’t see hidden files.
 | 
			
		||||
#+BEGIN_SRC conf-unix
 | 
			
		||||
  ShowHidden=true
 | 
			
		||||
ShowHidden=true
 | 
			
		||||
#+END_SRC
 | 
			
		||||
 | 
			
		||||
And we'll also see the size of the visible files.
 | 
			
		||||
#+BEGIN_SRC conf-unix
 | 
			
		||||
  ShowSizeColumn=true
 | 
			
		||||
ShowSizeColumn=true
 | 
			
		||||
#+END_SRC
 | 
			
		||||
 | 
			
		||||
Now, let’s choose the geometry of our file picker. These two first lines set
 | 
			
		||||
where the file picker appears:
 | 
			
		||||
#+BEGIN_SRC conf-unix
 | 
			
		||||
  GeometryX=566
 | 
			
		||||
  GeometryY=202
 | 
			
		||||
GeometryX=566
 | 
			
		||||
GeometryY=202
 | 
			
		||||
#+END_SRC
 | 
			
		||||
 | 
			
		||||
And these two describe the size of the window:
 | 
			
		||||
#+BEGIN_SRC conf-unix
 | 
			
		||||
  GeometryWidth=800
 | 
			
		||||
  GeometryHeight=400
 | 
			
		||||
GeometryWidth=800
 | 
			
		||||
GeometryHeight=400
 | 
			
		||||
#+END_SRC
 | 
			
		||||
 | 
			
		||||
With these two lines, we set how our files are sorted: by name, and in the
 | 
			
		||||
ascending order.
 | 
			
		||||
#+BEGIN_SRC conf-unix
 | 
			
		||||
  SortColumn=name
 | 
			
		||||
  SortOrder=ascending
 | 
			
		||||
SortColumn=name
 | 
			
		||||
SortOrder=ascending
 | 
			
		||||
#+END_SRC
 | 
			
		||||
 | 
			
		||||
Our default view mode is a list of files:
 | 
			
		||||
#+BEGIN_SRC conf-unix
 | 
			
		||||
  ViewMode=list-view
 | 
			
		||||
ViewMode=list-view
 | 
			
		||||
#+END_SRC
 | 
			
		||||
 | 
			
		||||
And finally, setting our icon view scale to ~-1~ sets the icon view to the max
 | 
			
		||||
size.
 | 
			
		||||
#+BEGIN_SRC conf-unix
 | 
			
		||||
  IconViewScale=-1
 | 
			
		||||
IconViewScale=-1
 | 
			
		||||
#+END_SRC
 | 
			
		||||
 | 
			
		||||
**** GTK3
 | 
			
		||||
@ -215,44 +215,44 @@ size.
 | 
			
		||||
The following file helps me choosing the aspect of various GTK+ 3 software,
 | 
			
		||||
including their theme and icons. First, let’s declare the header:
 | 
			
		||||
#+BEGIN_SRC conf-unix
 | 
			
		||||
  [Settings]
 | 
			
		||||
[Settings]
 | 
			
		||||
#+END_SRC
 | 
			
		||||
 | 
			
		||||
Now, let’s hint to GTK that I prefer dark themes. This can have an influence
 | 
			
		||||
also on some websites that can detect this preference and therefore set their
 | 
			
		||||
own theme to dark by themselves.
 | 
			
		||||
#+BEGIN_SRC conf-unix
 | 
			
		||||
  gtk-application-prefer-dark-theme = true
 | 
			
		||||
gtk-application-prefer-dark-theme = true
 | 
			
		||||
#+END_SRC
 | 
			
		||||
 | 
			
		||||
Next, the icon theme is the Flat Remix Dark icon theme:
 | 
			
		||||
#+BEGIN_SRC conf-unix
 | 
			
		||||
  gtk-icon-theme-name = Flat-Remix-Dark
 | 
			
		||||
gtk-icon-theme-name = Flat-Remix-Dark
 | 
			
		||||
#+END_SRC
 | 
			
		||||
 | 
			
		||||
Now, the general theme for GTK3 is Nordic.
 | 
			
		||||
#+BEGIN_SRC conf-unix
 | 
			
		||||
  gtk-theme-name = Nordic
 | 
			
		||||
gtk-theme-name = Nordic
 | 
			
		||||
#+END_SRC
 | 
			
		||||
 | 
			
		||||
#+BEGIN_SRC conf-unix
 | 
			
		||||
  gtk-can-change-accels=1
 | 
			
		||||
  gtk-menu-bar-popup-delay=0
 | 
			
		||||
  gtk-menu-popdown-delay=0
 | 
			
		||||
  gtk-menu-popup-delay=0
 | 
			
		||||
gtk-can-change-accels=1
 | 
			
		||||
gtk-menu-bar-popup-delay=0
 | 
			
		||||
gtk-menu-popdown-delay=0
 | 
			
		||||
gtk-menu-popup-delay=0
 | 
			
		||||
#+END_SRC
 | 
			
		||||
 | 
			
		||||
#+BEGIN_SRC conf-unix
 | 
			
		||||
  gtk-xft-antialias=1
 | 
			
		||||
  gtk-xft-hinting=1
 | 
			
		||||
  gtk-xft-hintstyle=hintslight
 | 
			
		||||
  # gtk-xft-rgba=rgb
 | 
			
		||||
gtk-xft-antialias=1
 | 
			
		||||
gtk-xft-hinting=1
 | 
			
		||||
gtk-xft-hintstyle=hintslight
 | 
			
		||||
# gtk-xft-rgba=rgb
 | 
			
		||||
#+END_SRC
 | 
			
		||||
 | 
			
		||||
Since window decorations are handled by my WMs, I will leave this variable
 | 
			
		||||
empty.
 | 
			
		||||
#+BEGIN_SRC conf-unix
 | 
			
		||||
  gtk-decoration-layout=
 | 
			
		||||
gtk-decoration-layout=
 | 
			
		||||
#+END_SRC
 | 
			
		||||
 | 
			
		||||
*** Picom (Compton)
 | 
			
		||||
@ -271,45 +271,45 @@ You can find my Picom configuration [[file:picom.org][here]].
 | 
			
		||||
The main body in my Xresources declaration is the declaration of my
 | 
			
		||||
color theme. It is based on the [[https://www.nordtheme.com/][Nord]] theme, from their [[https://github.com/arcticicestudio/nord-xresources/][Git repository]].
 | 
			
		||||
#+BEGIN_SRC conf
 | 
			
		||||
  #define nord0 #2E3440
 | 
			
		||||
  #define nord1 #3B4252
 | 
			
		||||
  #define nord2 #434C5E
 | 
			
		||||
  #define nord3 #4C566A
 | 
			
		||||
  #define nord4 #D8DEE9
 | 
			
		||||
  #define nord5 #E5E9F0
 | 
			
		||||
  #define nord6 #ECEFF4
 | 
			
		||||
  #define nord7 #8FBCBB
 | 
			
		||||
  #define nord8 #88C0D0
 | 
			
		||||
  #define nord9 #81A1C1
 | 
			
		||||
  #define nord10 #5E81AC
 | 
			
		||||
  #define nord11 #BF616A
 | 
			
		||||
  #define nord12 #D08770
 | 
			
		||||
  #define nord13 #EBCB8B
 | 
			
		||||
  #define nord14 #A3BE8C
 | 
			
		||||
  #define nord15 #B48EAD
 | 
			
		||||
#define nord0 #2E3440
 | 
			
		||||
#define nord1 #3B4252
 | 
			
		||||
#define nord2 #434C5E
 | 
			
		||||
#define nord3 #4C566A
 | 
			
		||||
#define nord4 #D8DEE9
 | 
			
		||||
#define nord5 #E5E9F0
 | 
			
		||||
#define nord6 #ECEFF4
 | 
			
		||||
#define nord7 #8FBCBB
 | 
			
		||||
#define nord8 #88C0D0
 | 
			
		||||
#define nord9 #81A1C1
 | 
			
		||||
#define nord10 #5E81AC
 | 
			
		||||
#define nord11 #BF616A
 | 
			
		||||
#define nord12 #D08770
 | 
			
		||||
#define nord13 #EBCB8B
 | 
			
		||||
#define nord14 #A3BE8C
 | 
			
		||||
#define nord15 #B48EAD
 | 
			
		||||
 | 
			
		||||
  ,*.foreground:   nord4
 | 
			
		||||
  ,*.background:   nord0
 | 
			
		||||
  ,*.cursorColor:  nord4
 | 
			
		||||
  ,*fading: 35
 | 
			
		||||
  ,*fadeColor: nord3
 | 
			
		||||
,*.foreground:   nord4
 | 
			
		||||
,*.background:   nord0
 | 
			
		||||
,*.cursorColor:  nord4
 | 
			
		||||
,*fading: 35
 | 
			
		||||
,*fadeColor: nord3
 | 
			
		||||
 | 
			
		||||
  ,*.color0: nord1
 | 
			
		||||
  ,*.color1: nord11
 | 
			
		||||
  ,*.color2: nord14
 | 
			
		||||
  ,*.color3: nord13
 | 
			
		||||
  ,*.color4: nord9
 | 
			
		||||
  ,*.color5: nord15
 | 
			
		||||
  ,*.color6: nord8
 | 
			
		||||
  ,*.color7: nord5
 | 
			
		||||
  ,*.color8: nord3
 | 
			
		||||
  ,*.color9: nord11
 | 
			
		||||
  ,*.color10: nord14
 | 
			
		||||
  ,*.color11: nord13
 | 
			
		||||
  ,*.color12: nord9
 | 
			
		||||
  ,*.color13: nord15
 | 
			
		||||
  ,*.color14: nord7
 | 
			
		||||
  ,*.color15: nord6
 | 
			
		||||
,*.color0: nord1
 | 
			
		||||
,*.color1: nord11
 | 
			
		||||
,*.color2: nord14
 | 
			
		||||
,*.color3: nord13
 | 
			
		||||
,*.color4: nord9
 | 
			
		||||
,*.color5: nord15
 | 
			
		||||
,*.color6: nord8
 | 
			
		||||
,*.color7: nord5
 | 
			
		||||
,*.color8: nord3
 | 
			
		||||
,*.color9: nord11
 | 
			
		||||
,*.color10: nord14
 | 
			
		||||
,*.color11: nord13
 | 
			
		||||
,*.color12: nord9
 | 
			
		||||
,*.color13: nord15
 | 
			
		||||
,*.color14: nord7
 | 
			
		||||
,*.color15: nord6
 | 
			
		||||
#+END_SRC
 | 
			
		||||
 | 
			
		||||
** Text and source code editing
 | 
			
		||||
@ -389,10 +389,10 @@ You can find my tmux configuration in [[file:tmux.org][tmux.org]]. It depends on
 | 
			
		||||
:END:
 | 
			
		||||
This file gets inserted automatically at the end of my emails.
 | 
			
		||||
#+BEGIN_SRC text
 | 
			
		||||
  Lucien “Phundrak” Cartier-Tilet
 | 
			
		||||
  https://phundrak.com (Français)
 | 
			
		||||
  https://phundrak.com/en (English)
 | 
			
		||||
  Sent from GNU/Emacs
 | 
			
		||||
Lucien “Phundrak” Cartier-Tilet
 | 
			
		||||
https://phundrak.com (Français)
 | 
			
		||||
https://phundrak.com/en (English)
 | 
			
		||||
Sent from GNU/Emacs
 | 
			
		||||
#+END_SRC
 | 
			
		||||
 | 
			
		||||
*** Global gitignore
 | 
			
		||||
@ -405,14 +405,14 @@ of always adding them, let git now that some elements are to be ignored by
 | 
			
		||||
default, hence the [[file:.gitignore_global][~/.gitignore_global]] file. First, we don’t want nano’s backup
 | 
			
		||||
files.
 | 
			
		||||
#+BEGIN_SRC text
 | 
			
		||||
  ~*
 | 
			
		||||
~*
 | 
			
		||||
#+END_SRC
 | 
			
		||||
 | 
			
		||||
And object files and output binaries generated by =gcc= and the likes aren’t
 | 
			
		||||
welcome either.
 | 
			
		||||
#+BEGIN_SRC text
 | 
			
		||||
  ,*.out
 | 
			
		||||
  ,*.o
 | 
			
		||||
,*.out
 | 
			
		||||
,*.o
 | 
			
		||||
#+END_SRC
 | 
			
		||||
 | 
			
		||||
*** Paru
 | 
			
		||||
@ -428,19 +428,19 @@ is running, but if it ever happens it will be already concerning enough they
 | 
			
		||||
managed to. I also make use of [[file:bin.org::#Emacs-stuff-Dired-2eeca9da][my custom script dired]] so I can use Emacs’ Dired
 | 
			
		||||
as the file manager for ~paru~.
 | 
			
		||||
#+BEGIN_SRC conf :tangle ~/.config/paru/paru.conf
 | 
			
		||||
  [options]
 | 
			
		||||
  BottomUp
 | 
			
		||||
  Devel
 | 
			
		||||
  DevelSuffixes = -git -cvs -svn -bzr -darcs -always
 | 
			
		||||
  NewsOnUpgrade
 | 
			
		||||
  PgpFetch
 | 
			
		||||
  Provides
 | 
			
		||||
  RemoveMake
 | 
			
		||||
  SudoLoop
 | 
			
		||||
  UpgradeMenu
 | 
			
		||||
[options]
 | 
			
		||||
BottomUp
 | 
			
		||||
Devel
 | 
			
		||||
DevelSuffixes = -git -cvs -svn -bzr -darcs -always
 | 
			
		||||
NewsOnUpgrade
 | 
			
		||||
PgpFetch
 | 
			
		||||
Provides
 | 
			
		||||
RemoveMake
 | 
			
		||||
SudoLoop
 | 
			
		||||
UpgradeMenu
 | 
			
		||||
 | 
			
		||||
  [bin]
 | 
			
		||||
  FileManager = dired
 | 
			
		||||
[bin]
 | 
			
		||||
FileManager = dired
 | 
			
		||||
#+END_SRC
 | 
			
		||||
 | 
			
		||||
* Installation
 | 
			
		||||
 | 
			
		||||
@ -26,9 +26,9 @@ The ~print_info~ function is the function called by Neofetch in order to print
 | 
			
		||||
the system information it could fetch. In this function, we’ll choose what to
 | 
			
		||||
display, and how. This function looks like this:
 | 
			
		||||
#+BEGIN_SRC sh :tangle no
 | 
			
		||||
  print_info() {
 | 
			
		||||
      # Print information here…
 | 
			
		||||
  }
 | 
			
		||||
print_info() {
 | 
			
		||||
    # Print information here…
 | 
			
		||||
}
 | 
			
		||||
#+END_SRC
 | 
			
		||||
 | 
			
		||||
Generally, what we will display will be shown through the ~info~ function,
 | 
			
		||||
@ -58,16 +58,16 @@ interesting information; ~info "Memory" memory~ will look like
 | 
			
		||||
 | 
			
		||||
#+NAME: info-elements-gen
 | 
			
		||||
#+BEGIN_SRC emacs-lisp :var table=info-elements-table :cache yes
 | 
			
		||||
  (mapconcat (lambda (x)
 | 
			
		||||
               (let ((prefix      (car x))
 | 
			
		||||
                     (information (cadr x)))
 | 
			
		||||
                (format "info %s%s"
 | 
			
		||||
                        (if (not (string= prefix ""))
 | 
			
		||||
                            (format "\"%s\" " prefix)
 | 
			
		||||
                          "")
 | 
			
		||||
                        information)))
 | 
			
		||||
             table
 | 
			
		||||
             "\n")
 | 
			
		||||
(mapconcat (lambda (x)
 | 
			
		||||
             (let ((prefix      (car x))
 | 
			
		||||
                   (information (cadr x)))
 | 
			
		||||
              (format "info %s%s"
 | 
			
		||||
                      (if (not (string= prefix ""))
 | 
			
		||||
                          (format "\"%s\" " prefix)
 | 
			
		||||
                        "")
 | 
			
		||||
                      information)))
 | 
			
		||||
           table
 | 
			
		||||
           "\n")
 | 
			
		||||
#+END_SRC
 | 
			
		||||
 | 
			
		||||
#+RESULTS[83eb4aaa554df955ad996157d911eec3a9251628]: info-elements-gen
 | 
			
		||||
@ -90,9 +90,9 @@ info "Memory" memory
 | 
			
		||||
 | 
			
		||||
Hence, the function looks like so:
 | 
			
		||||
#+BEGIN_SRC sh
 | 
			
		||||
  print_info() {
 | 
			
		||||
      <<info-elements-gen()>>
 | 
			
		||||
  }
 | 
			
		||||
print_info() {
 | 
			
		||||
    <<info-elements-gen()>>
 | 
			
		||||
}
 | 
			
		||||
#+END_SRC
 | 
			
		||||
 | 
			
		||||
Each of these modules can be tuned with the variables presented below.
 | 
			
		||||
@ -130,7 +130,7 @@ This variable can shorten the output of the ~distro~ function.
 | 
			
		||||
  - on :: ~Arch Linux~
 | 
			
		||||
  - off :: ~Arch~
 | 
			
		||||
#+begin_src sh
 | 
			
		||||
  distro_shorthand="off"
 | 
			
		||||
distro_shorthand="off"
 | 
			
		||||
#+end_src
 | 
			
		||||
 | 
			
		||||
It is possible to display when the distro has been installed on the computer.
 | 
			
		||||
@ -164,7 +164,7 @@ terminal emulator I use.
 | 
			
		||||
  - ~viu~
 | 
			
		||||
- flag :: ~--backend~
 | 
			
		||||
#+BEGIN_SRC sh
 | 
			
		||||
  image_backend="kitty"
 | 
			
		||||
image_backend="kitty"
 | 
			
		||||
#+END_SRC
 | 
			
		||||
 | 
			
		||||
Now, since I indicated I wanted an image engine, I’ll indicate neofetch which
 | 
			
		||||
@ -182,7 +182,7 @@ image mode, your wallpaper will be used.
 | 
			
		||||
  - ~command output (neofetch --ascii "$(fortune | cowsay -W 30)")~
 | 
			
		||||
- Flag :: ~--source~
 | 
			
		||||
#+BEGIN_SRC sh
 | 
			
		||||
  image_source="$HOME/org/config/img/leon.png"
 | 
			
		||||
image_source="$HOME/org/config/img/leon.png"
 | 
			
		||||
#+END_SRC
 | 
			
		||||
 | 
			
		||||
The default image size will probably not be correct since it is half the
 | 
			
		||||
@ -195,7 +195,7 @@ terminal width and I have an ultrawide monitor, so I’ll need to set it manuall
 | 
			
		||||
  - ~none~
 | 
			
		||||
- Flag :: ~--image-size~ or ~--size~
 | 
			
		||||
#+BEGIN_SRC sh
 | 
			
		||||
  image_size="224px"
 | 
			
		||||
image_size="224px"
 | 
			
		||||
#+END_SRC
 | 
			
		||||
 | 
			
		||||
**** Kernel
 | 
			
		||||
@ -213,7 +213,7 @@ The variable below can shorten the output ofh the ~kernel~ function.
 | 
			
		||||
  - on :: ~4.8.9-1-ARCH~
 | 
			
		||||
  - off :: ~Linux 4.8.9-1-ARCH~
 | 
			
		||||
#+begin_src sh
 | 
			
		||||
  kernel_shorthand="off"
 | 
			
		||||
kernel_shorthand="off"
 | 
			
		||||
#+end_src
 | 
			
		||||
 | 
			
		||||
**** OS Architecture
 | 
			
		||||
@ -230,7 +230,7 @@ This variable can show or hide the OS architecture in the ~distro~ output.
 | 
			
		||||
  - on :: ~Arch Linux x86_64~
 | 
			
		||||
  - off :: ~Arch Linux~
 | 
			
		||||
#+begin_src sh
 | 
			
		||||
  os_arch="off"
 | 
			
		||||
os_arch="off"
 | 
			
		||||
#+end_src
 | 
			
		||||
 | 
			
		||||
**** Packages
 | 
			
		||||
@ -246,7 +246,7 @@ It is possible to show or hide Package Manager names.
 | 
			
		||||
  - tiny :: ~'908 (pacman, flatpak, snap)'~
 | 
			
		||||
  - off :: ~'908'~
 | 
			
		||||
#+BEGIN_SRC sh
 | 
			
		||||
  package_managers="on"
 | 
			
		||||
package_managers="on"
 | 
			
		||||
#+END_SRC
 | 
			
		||||
 | 
			
		||||
**** Shell
 | 
			
		||||
@ -284,7 +284,7 @@ This allows to show the shell’s version in the output of ~shell~.
 | 
			
		||||
  - on :: ~bash 4.4.5~
 | 
			
		||||
  - off :: ~bash~
 | 
			
		||||
#+begin_src sh
 | 
			
		||||
  shell_version="off"
 | 
			
		||||
shell_version="off"
 | 
			
		||||
#+end_src
 | 
			
		||||
 | 
			
		||||
*** Uptime
 | 
			
		||||
@ -304,7 +304,7 @@ it a bit, while ~tiny~ shortens it greatly.
 | 
			
		||||
  - off :: ~2 days, 10 hours, 3 minutes~
 | 
			
		||||
  - tiny :: ~2d 10h 3m~
 | 
			
		||||
#+begin_src sh
 | 
			
		||||
  uptime_shorthand="on"
 | 
			
		||||
uptime_shorthand="on"
 | 
			
		||||
#+end_src
 | 
			
		||||
 | 
			
		||||
*** IP address
 | 
			
		||||
@ -317,20 +317,20 @@ It is possible to display the machine’s public IP address with the function
 | 
			
		||||
- Value :: ~"url"~
 | 
			
		||||
- Flag :: ~--ip_host~
 | 
			
		||||
#+begin_src sh
 | 
			
		||||
  public_ip_host="http://ident.me"
 | 
			
		||||
public_ip_host="http://ident.me"
 | 
			
		||||
#+end_src
 | 
			
		||||
 | 
			
		||||
- Default value :: ~""~
 | 
			
		||||
- Values ::
 | 
			
		||||
  - ~""~
 | 
			
		||||
  - ~""~
 | 
			
		||||
- Flag :: ~""~
 | 
			
		||||
- Supports ::
 | 
			
		||||
- Examples ::
 | 
			
		||||
  - on :: ~~
 | 
			
		||||
  - off :: ~~
 | 
			
		||||
#+begin_src sh
 | 
			
		||||
#+end_src
 | 
			
		||||
# - Default value :: ~""~
 | 
			
		||||
# - Values ::
 | 
			
		||||
#   - ~""~
 | 
			
		||||
#   - ~""~
 | 
			
		||||
# - Flag :: ~""~
 | 
			
		||||
# - Supports ::
 | 
			
		||||
# - Examples ::
 | 
			
		||||
#   - on :: ~~
 | 
			
		||||
#   - off :: ~~
 | 
			
		||||
# #+begin_src sh
 | 
			
		||||
# #+end_src
 | 
			
		||||
 | 
			
		||||
*** Theming
 | 
			
		||||
:PROPERTIES:
 | 
			
		||||
@ -354,7 +354,7 @@ With this value, it is possible to shorten the output of the computer’s themin
 | 
			
		||||
  - on :: ~Numix, Adwaita~
 | 
			
		||||
  - off :: ~Numix [GTK2], Adwaita [GTK3]~
 | 
			
		||||
#+begin_src sh
 | 
			
		||||
  gtk_shorthand="on"
 | 
			
		||||
gtk_shorthand="on"
 | 
			
		||||
#+end_src
 | 
			
		||||
 | 
			
		||||
**** Enable or disable theming display for GTK2
 | 
			
		||||
@ -372,7 +372,7 @@ this variable.
 | 
			
		||||
  - on ::  ~Numix [GTK2], Adwaita [GTK3]~
 | 
			
		||||
  - off :: ~Adwaita [GTK3]~
 | 
			
		||||
#+begin_src sh
 | 
			
		||||
  gtk2="off"
 | 
			
		||||
gtk2="off"
 | 
			
		||||
#+end_src
 | 
			
		||||
 | 
			
		||||
**** Enable or disable theming display for GTK3
 | 
			
		||||
@ -389,7 +389,7 @@ The same variable as above is also available for GTK3.
 | 
			
		||||
  - on ::  ~Numix [GTK2], Adwaita [GTK3]~
 | 
			
		||||
  - off :: ~Numix [GTK2]~
 | 
			
		||||
#+begin_src sh
 | 
			
		||||
  gtk3="off"
 | 
			
		||||
gtk3="off"
 | 
			
		||||
#+end_src
 | 
			
		||||
 | 
			
		||||
** Hardware
 | 
			
		||||
@ -415,7 +415,7 @@ With this variables, it is possible to show or hide the brand of a CPU in the
 | 
			
		||||
  - on :: ~Intel i7-6500U~
 | 
			
		||||
  - off :: ~i7-6500U~
 | 
			
		||||
#+begin_src sh
 | 
			
		||||
  cpu_brand="off"
 | 
			
		||||
cpu_brand="off"
 | 
			
		||||
#+end_src
 | 
			
		||||
 | 
			
		||||
**** CPU speed
 | 
			
		||||
@ -432,7 +432,7 @@ With this variable, it is possible to show or hide the speed of the CPU.
 | 
			
		||||
  - on :: ~Intel i7-6500U (4) @ 3.1GHz~
 | 
			
		||||
  - off :: ~Intel i7-6500U (4)~
 | 
			
		||||
#+begin_src sh
 | 
			
		||||
  cpu_speed="off"
 | 
			
		||||
cpu_speed="off"
 | 
			
		||||
#+end_src
 | 
			
		||||
 | 
			
		||||
**** CPU speed type
 | 
			
		||||
@ -451,7 +451,7 @@ a value.
 | 
			
		||||
- Flag :: ~--speed_type~
 | 
			
		||||
- Supports :: Linux with ~cpufreq~
 | 
			
		||||
#+begin_src sh
 | 
			
		||||
  speed_type="bios_limit"
 | 
			
		||||
speed_type="bios_limit"
 | 
			
		||||
#+end_src
 | 
			
		||||
 | 
			
		||||
**** CPU speed shorthand
 | 
			
		||||
@ -469,7 +469,7 @@ supported in systems with CPU speed below 1GHz.
 | 
			
		||||
  - on :: ~i7-6500U (4) @ 3.1GHz~
 | 
			
		||||
  - off :: ~i7-6500U (4) @ 3.100GHz~
 | 
			
		||||
#+begin_src sh
 | 
			
		||||
  speed_shorthand="on"
 | 
			
		||||
speed_shorthand="on"
 | 
			
		||||
#+end_src
 | 
			
		||||
 | 
			
		||||
**** CPU cores
 | 
			
		||||
@ -490,7 +490,7 @@ available in the CPU.
 | 
			
		||||
  - physical :: ~Intel i7-6500U (2) @ 3.1GHz~ (All physical cores)
 | 
			
		||||
  - off :: ~Intel i7-6500U @ 3.1GHz~
 | 
			
		||||
#+begin_src sh
 | 
			
		||||
  cpu_cores="off"
 | 
			
		||||
cpu_cores="off"
 | 
			
		||||
#+end_src
 | 
			
		||||
 | 
			
		||||
**** CPU temperature
 | 
			
		||||
@ -513,7 +513,7 @@ only supports newer Intel processors.
 | 
			
		||||
  - F :: ~Intel i7-6500U (4) @ 3.1GHz [82.0°F]~
 | 
			
		||||
  - off :: ~Intel i7-6500U (4) @ 3.1GHz~
 | 
			
		||||
#+begin_src sh
 | 
			
		||||
  cpu_temp="off"
 | 
			
		||||
cpu_temp="off"
 | 
			
		||||
#+end_src
 | 
			
		||||
 | 
			
		||||
*** GPU
 | 
			
		||||
@ -539,7 +539,7 @@ of ~gpu~.
 | 
			
		||||
  - on :: ~AMD HD 7950~
 | 
			
		||||
  - off :: ~HD 7950~
 | 
			
		||||
#+begin_src sh
 | 
			
		||||
  gpu_brand="off"
 | 
			
		||||
gpu_brand="off"
 | 
			
		||||
#+end_src
 | 
			
		||||
 | 
			
		||||
**** Which GPU to display
 | 
			
		||||
@ -557,14 +557,14 @@ This allows the user to choose which GPU appears in the output of the function
 | 
			
		||||
- Supports :: Linux
 | 
			
		||||
- Examples ::
 | 
			
		||||
  - all ::
 | 
			
		||||
    #+BEGIN_SRC text
 | 
			
		||||
    GPU1: AMD HD 7950
 | 
			
		||||
    GPU2: Intel Integrated Graphics
 | 
			
		||||
    #+END_SRC
 | 
			
		||||
#+BEGIN_SRC text
 | 
			
		||||
GPU1: AMD HD 7950
 | 
			
		||||
GPU2: Intel Integrated Graphics
 | 
			
		||||
#+END_SRC
 | 
			
		||||
  - dedicated :: ~GPU1: AMD HD 7950~
 | 
			
		||||
  - integrated :: ~GPU1: Intel Integrated Graphics~
 | 
			
		||||
#+begin_src sh
 | 
			
		||||
  gpu_type="all"
 | 
			
		||||
gpu_type="all"
 | 
			
		||||
#+end_src
 | 
			
		||||
 | 
			
		||||
*** Resolution
 | 
			
		||||
@ -583,5 +583,5 @@ individually. It is possible to display the refresh rate or to hide it.
 | 
			
		||||
  - on :: ~1920x1080 @ 60Hz~
 | 
			
		||||
  - off :: ~1920x1080~
 | 
			
		||||
#+begin_src sh
 | 
			
		||||
  refresh_rate="off"
 | 
			
		||||
refresh_rate="off"
 | 
			
		||||
#+end_src
 | 
			
		||||
 | 
			
		||||
@ -22,13 +22,13 @@ The following enables client-side shadows on windows. Note desktop windows
 | 
			
		||||
(windows with ~_NET_WM_WINDOW_TYPE_DESKTOP~) never get shadow, unless explicitly
 | 
			
		||||
requested using the wintypes option.
 | 
			
		||||
#+BEGIN_SRC conf
 | 
			
		||||
  shadow = true;
 | 
			
		||||
shadow = true;
 | 
			
		||||
#+END_SRC
 | 
			
		||||
 | 
			
		||||
The blur radius radius for shadows is measured in pixels, and it defaults to
 | 
			
		||||
12px.
 | 
			
		||||
#+BEGIN_SRC conf
 | 
			
		||||
  shadow-radius = 17;
 | 
			
		||||
shadow-radius = 17;
 | 
			
		||||
#+END_SRC
 | 
			
		||||
 | 
			
		||||
Picom can also apply some level of opacity on shadows.
 | 
			
		||||
@ -36,14 +36,14 @@ Picom can also apply some level of opacity on shadows.
 | 
			
		||||
| Min value     | ~0.0~  |
 | 
			
		||||
| Max value     | ~1.0~  |
 | 
			
		||||
#+BEGIN_SRC conf
 | 
			
		||||
  shadow-opacity = 0.6
 | 
			
		||||
shadow-opacity = 0.6
 | 
			
		||||
#+END_SRC
 | 
			
		||||
 | 
			
		||||
The left and top offsets for shadows are expressed in pixels.
 | 
			
		||||
| Default value | ~-15~ |
 | 
			
		||||
#+BEGIN_SRC conf
 | 
			
		||||
  shadow-offset-x = -12;
 | 
			
		||||
  shadow-offset-y = -12;
 | 
			
		||||
shadow-offset-x = -12;
 | 
			
		||||
shadow-offset-y = -12;
 | 
			
		||||
#+END_SRC
 | 
			
		||||
 | 
			
		||||
It is possible to set the color of the shadow with the string contained in
 | 
			
		||||
@ -51,39 +51,39 @@ It is possible to set the color of the shadow with the string contained in
 | 
			
		||||
config, but this value will override any value in ~shadow-red~, ~shadow-green~,
 | 
			
		||||
or ~shadow-blue~.
 | 
			
		||||
#+BEGIN_SRC conf
 | 
			
		||||
  shadow-color = "#000000"
 | 
			
		||||
shadow-color = "#000000"
 | 
			
		||||
#+END_SRC
 | 
			
		||||
 | 
			
		||||
It is possible to specify a list  of conditions of windows that should have no
 | 
			
		||||
shadow.
 | 
			
		||||
| Default value | ~[]~ |
 | 
			
		||||
#+BEGIN_SRC conf
 | 
			
		||||
  shadow-exclude = [
 | 
			
		||||
    "name = 'Notification'",
 | 
			
		||||
    "class_g = 'Conky'",
 | 
			
		||||
    "class_g ?= 'Notify-osd'",
 | 
			
		||||
    "class_g = 'Cairo-clock'",
 | 
			
		||||
    "_GTK_FRAME_EXTENTS@:c"
 | 
			
		||||
  ];
 | 
			
		||||
shadow-exclude = [
 | 
			
		||||
  "name = 'Notification'",
 | 
			
		||||
  "class_g = 'Conky'",
 | 
			
		||||
  "class_g ?= 'Notify-osd'",
 | 
			
		||||
  "class_g = 'Cairo-clock'",
 | 
			
		||||
  "_GTK_FRAME_EXTENTS@:c"
 | 
			
		||||
];
 | 
			
		||||
#+END_SRC
 | 
			
		||||
 | 
			
		||||
It is also possible to specify an X geometry that describes the region in which
 | 
			
		||||
shadows should not be painted in, such as a dock window region. For example,
 | 
			
		||||
#+BEGIN_SRC conf :tangle no
 | 
			
		||||
  # shadow-exclude-reg = "x10+0+0"
 | 
			
		||||
# shadow-exclude-reg = "x10+0+0"
 | 
			
		||||
#+END_SRC
 | 
			
		||||
would make the 10 pixels at the bottom of the screen not have any shadow painted
 | 
			
		||||
on.
 | 
			
		||||
| Default value | ~""~ |
 | 
			
		||||
#+BEGIN_SRC conf :tangle no
 | 
			
		||||
  shadow-exclude-reg = ""
 | 
			
		||||
shadow-exclude-reg = ""
 | 
			
		||||
#+END_SRC
 | 
			
		||||
 | 
			
		||||
Finally, it is also possible to crop the shadow of a window fully on a
 | 
			
		||||
particular Xinerama screen to the screen.
 | 
			
		||||
- Default value :: ~false~
 | 
			
		||||
#+BEGIN_SRC conf
 | 
			
		||||
  xinerama-shadow-crop = false
 | 
			
		||||
xinerama-shadow-crop = false
 | 
			
		||||
#+END_SRC
 | 
			
		||||
 | 
			
		||||
** Deprecated options
 | 
			
		||||
@ -98,7 +98,7 @@ This option is deprecated, and users should use the ~wintypes~ option in their
 | 
			
		||||
config file instead.
 | 
			
		||||
| Default value | ~false~ |
 | 
			
		||||
#+BEGIN_SRC conf
 | 
			
		||||
  no-dock-shadow = false;
 | 
			
		||||
no-dock-shadow = false;
 | 
			
		||||
#+END_SRC
 | 
			
		||||
 | 
			
		||||
This option allows Picom not to draw on drag-and-drop windows. This option is
 | 
			
		||||
@ -106,7 +106,7 @@ deprecated, and users should use the ~wintypes~ option in their config file
 | 
			
		||||
instead.
 | 
			
		||||
| Default value | ~false~ |
 | 
			
		||||
#+BEGIN_SRC conf
 | 
			
		||||
  no-dnd-shadow = false;
 | 
			
		||||
no-dnd-shadow = false;
 | 
			
		||||
#+END_SRC
 | 
			
		||||
 | 
			
		||||
~shadow-ignore-shaped~ is also deprecated. It used to indicate Picom not to
 | 
			
		||||
@ -114,15 +114,15 @@ paint shadows on shaped windows. Note shaped windows here means windows setting
 | 
			
		||||
their shape through X Shape extension. Those using ARGB background are beyond
 | 
			
		||||
Picom’s control. Since it is deprecated, you could instead use
 | 
			
		||||
#+BEGIN_SRC conf :tangle no
 | 
			
		||||
  shadow-exclude = 'bounding_shaped'
 | 
			
		||||
shadow-exclude = 'bounding_shaped'
 | 
			
		||||
#+END_SRC
 | 
			
		||||
or
 | 
			
		||||
#+BEGIN_SRC conf :tangle no
 | 
			
		||||
  shadow-exclude = 'bounding_shaped && !rounded_corners'
 | 
			
		||||
shadow-exclude = 'bounding_shaped && !rounded_corners'
 | 
			
		||||
#+END_SRC
 | 
			
		||||
| Default value | ~""~ |
 | 
			
		||||
#+BEGIN_SRC conf :tangle no
 | 
			
		||||
  shadow-ignore-shaped = ""
 | 
			
		||||
shadow-ignore-shaped = ""
 | 
			
		||||
#+END_SRC
 | 
			
		||||
 | 
			
		||||
* Rounded corners
 | 
			
		||||
@ -131,15 +131,15 @@ or
 | 
			
		||||
:END:
 | 
			
		||||
Here we can see the declaration of the corners’ radius:
 | 
			
		||||
#+BEGIN_SRC conf
 | 
			
		||||
  corner-radius = 9.0;
 | 
			
		||||
corner-radius = 9.0;
 | 
			
		||||
#+END_SRC
 | 
			
		||||
 | 
			
		||||
It is also possible to exclude some windows from getting their corners rounded.
 | 
			
		||||
I personally excluded any window generated by AwesomeWM.
 | 
			
		||||
#+BEGIN_SRC conf
 | 
			
		||||
  rounded-corners-exclude = [
 | 
			
		||||
    "_NET_WM_WINDOW_TYPE@[0]:a = '_NET_WM_WINDOW_TYPE_DOCK'"
 | 
			
		||||
  ];
 | 
			
		||||
rounded-corners-exclude = [
 | 
			
		||||
  "_NET_WM_WINDOW_TYPE@[0]:a = '_NET_WM_WINDOW_TYPE_DOCK'"
 | 
			
		||||
];
 | 
			
		||||
#+END_SRC
 | 
			
		||||
 | 
			
		||||
* Fading
 | 
			
		||||
@ -152,7 +152,7 @@ feature on or off. However, its behavior can be changed with
 | 
			
		||||
~no-fading-openclose~.
 | 
			
		||||
| Default value | ~false~ |
 | 
			
		||||
#+BEGIN_SRC conf
 | 
			
		||||
  fading = true
 | 
			
		||||
fading = true
 | 
			
		||||
#+END_SRC
 | 
			
		||||
 | 
			
		||||
These values controls the opacity change between steps while fading in and out.
 | 
			
		||||
@ -160,35 +160,35 @@ These values controls the opacity change between steps while fading in and out.
 | 
			
		||||
| Min value     | ~0.01~                             |
 | 
			
		||||
| Max value     | ~1.0~                              |
 | 
			
		||||
#+BEGIN_SRC conf
 | 
			
		||||
  fade-in-step = 0.09;
 | 
			
		||||
  fade-out-step = 0.08;
 | 
			
		||||
fade-in-step = 0.09;
 | 
			
		||||
fade-out-step = 0.08;
 | 
			
		||||
#+END_SRC
 | 
			
		||||
 | 
			
		||||
This value represents the time between steps in fade steps, in milliseconds.
 | 
			
		||||
| Default value | ~10~ |
 | 
			
		||||
| Min value     | ~1~  |
 | 
			
		||||
#+BEGIN_SRC conf
 | 
			
		||||
  fade-delta = 20;
 | 
			
		||||
fade-delta = 20;
 | 
			
		||||
#+END_SRC
 | 
			
		||||
 | 
			
		||||
It is possible to exclude some windows that should not be faded with a specified
 | 
			
		||||
list of conditions.
 | 
			
		||||
| Default value | ~[]~ |
 | 
			
		||||
#+BEGIN_SRC conf
 | 
			
		||||
  fade-exclude = [ "class_g = 'mpv'" ];
 | 
			
		||||
fade-exclude = [ "class_g = 'mpv'" ];
 | 
			
		||||
#+END_SRC
 | 
			
		||||
 | 
			
		||||
This option allows Picom not to create any fade on windows opening or closing.
 | 
			
		||||
| Default value | ~false~ |
 | 
			
		||||
#+BEGIN_SRC conf
 | 
			
		||||
  no-fading-openclose = true;
 | 
			
		||||
no-fading-openclose = true;
 | 
			
		||||
#+END_SRC
 | 
			
		||||
 | 
			
		||||
Finally, this option is a workaround for Openbox, Fluxbox and others by not
 | 
			
		||||
fading destroyed ARGB windows with WM frame.
 | 
			
		||||
| Default value | ~false~ |
 | 
			
		||||
#+BEGIN_SRC conf
 | 
			
		||||
  no-fading-destroyed-argb = false
 | 
			
		||||
no-fading-destroyed-argb = false
 | 
			
		||||
#+END_SRC
 | 
			
		||||
 | 
			
		||||
* Transparency and opacity
 | 
			
		||||
@ -202,7 +202,7 @@ describes the opacity of inactive windows.
 | 
			
		||||
| Min value     | ~0.1~ |
 | 
			
		||||
| Max value     | ~1.0~ |
 | 
			
		||||
#+BEGIN_SRC conf
 | 
			
		||||
  inactive-opacity = 0.6;
 | 
			
		||||
inactive-opacity = 0.6;
 | 
			
		||||
#+END_SRC
 | 
			
		||||
 | 
			
		||||
On the other hand, it is possible to declare a default opacity for active
 | 
			
		||||
@ -211,7 +211,7 @@ windows.
 | 
			
		||||
| Min value     | ~0.1~ |
 | 
			
		||||
| Max value     | ~1.0~ |
 | 
			
		||||
#+BEGIN_SRC conf
 | 
			
		||||
  active-opacity = 1;
 | 
			
		||||
active-opacity = 1;
 | 
			
		||||
#+END_SRC
 | 
			
		||||
 | 
			
		||||
This however describes the opacity of window titlebars and borders.
 | 
			
		||||
@ -219,7 +219,7 @@ This however describes the opacity of window titlebars and borders.
 | 
			
		||||
| Min value     | ~0.1~ |
 | 
			
		||||
| Max value     | ~1.0~ |
 | 
			
		||||
#+BEGIN_SRC conf
 | 
			
		||||
  frame-opacity = 1.0;
 | 
			
		||||
frame-opacity = 1.0;
 | 
			
		||||
#+END_SRC
 | 
			
		||||
 | 
			
		||||
~menu-opacity~ describes the opacity for dropdown menus and popup menus.
 | 
			
		||||
@ -227,14 +227,14 @@ This however describes the opacity of window titlebars and borders.
 | 
			
		||||
| Min value     | ~0.1~ |
 | 
			
		||||
| Max value     | ~1.0~ |
 | 
			
		||||
#+BEGIN_SRC conf
 | 
			
		||||
  # menu-opacity = 0.9;
 | 
			
		||||
# menu-opacity = 0.9;
 | 
			
		||||
#+END_SRC
 | 
			
		||||
 | 
			
		||||
~inactive-opacity-override~ allows the user to let inactive opacity set by ~-i~
 | 
			
		||||
override the ~_NET_WM_OPACITY_ values of windows.
 | 
			
		||||
| Default value | ~true~ |
 | 
			
		||||
#+BEGIN_SRC conf
 | 
			
		||||
  inactive-opacity-override = true;
 | 
			
		||||
inactive-opacity-override = true;
 | 
			
		||||
#+END_SRC
 | 
			
		||||
 | 
			
		||||
While it is possible to alter opacity on inactive windows, it is also possible
 | 
			
		||||
@ -243,7 +243,7 @@ to dim them.
 | 
			
		||||
| Min value     | ~0.1~ |
 | 
			
		||||
| Max value     | ~1.0~ |
 | 
			
		||||
#+BEGIN_SRC conf
 | 
			
		||||
  # inactive-dim = 1.0
 | 
			
		||||
# inactive-dim = 1.0
 | 
			
		||||
#+END_SRC
 | 
			
		||||
 | 
			
		||||
It is also possible to use a fixed inactive dim value, instead of adjusting
 | 
			
		||||
@ -252,18 +252,18 @@ according to window opacity.
 | 
			
		||||
| Min value     | ~0.1~ |
 | 
			
		||||
| Max value     | ~1.0~ |
 | 
			
		||||
#+BEGIN_SRC conf
 | 
			
		||||
  # inactive-dim-fixed = 1.0
 | 
			
		||||
# inactive-dim-fixed = 1.0
 | 
			
		||||
#+END_SRC
 | 
			
		||||
 | 
			
		||||
It is also possible to specify a list of conditions of windows that should
 | 
			
		||||
always be considered focused.
 | 
			
		||||
| Default value | ~[]~ |
 | 
			
		||||
#+BEGIN_SRC conf
 | 
			
		||||
  focus-exclude = [
 | 
			
		||||
    "class_g = 'mpv'",
 | 
			
		||||
    "class_g = 'qemu'",
 | 
			
		||||
    "class_g = 'Qemu-system-x86_64'"
 | 
			
		||||
  ];
 | 
			
		||||
focus-exclude = [
 | 
			
		||||
  "class_g = 'mpv'",
 | 
			
		||||
  "class_g = 'qemu'",
 | 
			
		||||
  "class_g = 'Qemu-system-x86_64'"
 | 
			
		||||
];
 | 
			
		||||
#+END_SRC
 | 
			
		||||
 | 
			
		||||
The user can also specify a list of opacity rules, in the format
 | 
			
		||||
@ -272,7 +272,7 @@ over this. Note we don't make any guarantee about possible conflicts with other
 | 
			
		||||
programs that set ~_NET_WM_WINDOW_OPACITY~ on frame or client windows.
 | 
			
		||||
| Default value | ~[]~ |
 | 
			
		||||
#+BEGIN_SRC conf
 | 
			
		||||
  opacity-rule = [];
 | 
			
		||||
opacity-rule = [];
 | 
			
		||||
#+END_SRC
 | 
			
		||||
 | 
			
		||||
* Background blurring
 | 
			
		||||
@ -282,13 +282,13 @@ programs that set ~_NET_WM_WINDOW_OPACITY~ on frame or client windows.
 | 
			
		||||
The following are the parameters for background blurring, see the \*BLUR\*
 | 
			
		||||
section for more information.
 | 
			
		||||
#+BEGIN_SRC conf
 | 
			
		||||
  blur: {
 | 
			
		||||
    method = "dual_kawase";
 | 
			
		||||
    strength = 7;
 | 
			
		||||
    background = false;
 | 
			
		||||
    background-frame = false;
 | 
			
		||||
    background-fixed = true;
 | 
			
		||||
  }
 | 
			
		||||
blur: {
 | 
			
		||||
  method = "dual_kawase";
 | 
			
		||||
  strength = 7;
 | 
			
		||||
  background = false;
 | 
			
		||||
  background-frame = false;
 | 
			
		||||
  background-fixed = true;
 | 
			
		||||
}
 | 
			
		||||
#+END_SRC
 | 
			
		||||
 | 
			
		||||
This value enables or disables the blur for the background of semi-transparent
 | 
			
		||||
@ -296,39 +296,39 @@ or ARGB windows. It has bad performances though, with driver-dependent behavior.
 | 
			
		||||
The name of the switch may change without prior notifications.
 | 
			
		||||
| Default value | ~false~ |
 | 
			
		||||
#+BEGIN_SRC conf
 | 
			
		||||
  blur-background = true;
 | 
			
		||||
blur-background = true;
 | 
			
		||||
#+END_SRC
 | 
			
		||||
 | 
			
		||||
Blur background of windows when the window frame is not opaque. If true, this
 | 
			
		||||
implies the value ~true~ for ~blur-background~.
 | 
			
		||||
| Default value | ~false~ |
 | 
			
		||||
#+BEGIN_SRC conf
 | 
			
		||||
  blur-background-frame = true;
 | 
			
		||||
blur-background-frame = true;
 | 
			
		||||
#+END_SRC
 | 
			
		||||
 | 
			
		||||
The following determines whether to use fixed blur strength rather than
 | 
			
		||||
adjusting according to window opacity.
 | 
			
		||||
| Default value | ~false~ |
 | 
			
		||||
#+BEGIN_SRC conf
 | 
			
		||||
  blur-background-fixed = false;
 | 
			
		||||
blur-background-fixed = false;
 | 
			
		||||
#+END_SRC
 | 
			
		||||
 | 
			
		||||
Specify the blur convolution kernel, with the format
 | 
			
		||||
~"5,5,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1"~.
 | 
			
		||||
| Default value | ~""~ |
 | 
			
		||||
#+BEGIN_SRC conf
 | 
			
		||||
  # blur-kern = "3x3box";
 | 
			
		||||
# blur-kern = "3x3box";
 | 
			
		||||
#+END_SRC
 | 
			
		||||
 | 
			
		||||
It is possible to write exclude conditions for background blur.
 | 
			
		||||
| Default value | ~[]~ |
 | 
			
		||||
#+BEGIN_SRC conf
 | 
			
		||||
  blur-background-exclude = [
 | 
			
		||||
    "window_type = 'desktop'",
 | 
			
		||||
    "class_g = 'Polybar'",
 | 
			
		||||
    "class_g = 'discord-overlay'",
 | 
			
		||||
    "_GTK_FRAME_EXTENTS@:c"
 | 
			
		||||
  ];
 | 
			
		||||
blur-background-exclude = [
 | 
			
		||||
  "window_type = 'desktop'",
 | 
			
		||||
  "class_g = 'Polybar'",
 | 
			
		||||
  "class_g = 'discord-overlay'",
 | 
			
		||||
  "_GTK_FRAME_EXTENTS@:c"
 | 
			
		||||
];
 | 
			
		||||
#+END_SRC
 | 
			
		||||
 | 
			
		||||
* General settings
 | 
			
		||||
@ -339,74 +339,74 @@ Daemonize process. Fork to background after initialization. Causes issues with
 | 
			
		||||
certain (badly-written) drivers.
 | 
			
		||||
| Default value | ~false~ |
 | 
			
		||||
#+BEGIN_SRC conf
 | 
			
		||||
  daemon = true;
 | 
			
		||||
daemon = true;
 | 
			
		||||
#+END_SRC
 | 
			
		||||
 | 
			
		||||
Picom has three backends it can use: ~xrender~, ~glx~, and ~xr_glx_hybrid~. GLX
 | 
			
		||||
backend is typically much faster but depends on a sane driver.
 | 
			
		||||
| Default value | ~xrender~ |
 | 
			
		||||
#+BEGIN_SRC conf
 | 
			
		||||
  backend = "glx";
 | 
			
		||||
backend = "glx";
 | 
			
		||||
#+END_SRC
 | 
			
		||||
 | 
			
		||||
This enables or disables VSync.
 | 
			
		||||
| Default value | ~false~ |
 | 
			
		||||
#+BEGIN_SRC conf
 | 
			
		||||
  vsync = true;
 | 
			
		||||
vsync = true;
 | 
			
		||||
#+END_SRC
 | 
			
		||||
 | 
			
		||||
Enable remote control via D-Bus. See the *D-BUS API* section below for more
 | 
			
		||||
details.
 | 
			
		||||
| Default value | ~false~ |
 | 
			
		||||
#+BEGIN_SRC conf
 | 
			
		||||
  dbus = false;
 | 
			
		||||
dbus = false;
 | 
			
		||||
#+END_SRC
 | 
			
		||||
 | 
			
		||||
Try to detect WM windows (a non-override-redirect window with no child that has
 | 
			
		||||
~WM_STATE~) and markz them as active.
 | 
			
		||||
| Default value | ~false~ |
 | 
			
		||||
#+BEGIN_SRC conf
 | 
			
		||||
  mark-wmwin-focused = true;
 | 
			
		||||
mark-wmwin-focused = true;
 | 
			
		||||
#+END_SRC
 | 
			
		||||
 | 
			
		||||
Mark override-redirect windows that doesn't have a child window with ~WM_STATE~
 | 
			
		||||
focused.
 | 
			
		||||
| Default value | ~false~ |
 | 
			
		||||
#+BEGIN_SRC conf
 | 
			
		||||
  mark-ovredir-focused = true;
 | 
			
		||||
mark-ovredir-focused = true;
 | 
			
		||||
#+END_SRC
 | 
			
		||||
 | 
			
		||||
Try to detect windows with rounded corners and don't consider them shaped
 | 
			
		||||
windows. The accuracy is not very high, unfortunately.
 | 
			
		||||
| Default value | ~false~ |
 | 
			
		||||
#+BEGIN_SRC conf
 | 
			
		||||
  detect-rounded-corners = true;
 | 
			
		||||
detect-rounded-corners = true;
 | 
			
		||||
#+END_SRC
 | 
			
		||||
 | 
			
		||||
Detect ~_NET_WM_OPACITY~ on client windows, useful for window managers not
 | 
			
		||||
passing ~_NET_WM_OPACITY~ of client windows to frame windows.
 | 
			
		||||
| Default value | ~false~ |
 | 
			
		||||
#+BEGIN_SRC conf
 | 
			
		||||
  detect-client-opacity = true;
 | 
			
		||||
detect-client-opacity = true;
 | 
			
		||||
#+END_SRC
 | 
			
		||||
 | 
			
		||||
Specify refresh rate of the screen. If not specified or 0, picom will try
 | 
			
		||||
detecting this with X RandR extension.
 | 
			
		||||
| Default value | ~60~ |
 | 
			
		||||
#+BEGIN_SRC conf
 | 
			
		||||
  refresh-rate = 120;
 | 
			
		||||
refresh-rate = 120;
 | 
			
		||||
#+END_SRC
 | 
			
		||||
 | 
			
		||||
Limit picom to repaint at most once every 1 / ~refresh_rate~ second to boost
 | 
			
		||||
performance. This should not be used with
 | 
			
		||||
#+BEGIN_SRC text :tangle no
 | 
			
		||||
  vsync drm/opengl/opengl-oml
 | 
			
		||||
vsync drm/opengl/opengl-oml
 | 
			
		||||
#+END_SRC
 | 
			
		||||
as they essentially does sw-opti's job already, unless you wish to specify a
 | 
			
		||||
lower refresh rate than the actual value.
 | 
			
		||||
| Default value | ~""~ |
 | 
			
		||||
#+BEGIN_SRC conf
 | 
			
		||||
  # sw-opti =;
 | 
			
		||||
# sw-opti =;
 | 
			
		||||
#+END_SRC
 | 
			
		||||
 | 
			
		||||
Use EWMH ~_NET_ACTIVE_WINDOW~ to determine currently focused window, rather than
 | 
			
		||||
@ -414,7 +414,7 @@ listening to ~FocusIn~/~FocusOut~ event. Might have more accuracy, provided that
 | 
			
		||||
the WM supports it.
 | 
			
		||||
| Default value | ~false~ |
 | 
			
		||||
#+BEGIN_SRC conf
 | 
			
		||||
  # use-ewmh-active-win = false;
 | 
			
		||||
# use-ewmh-active-win = false;
 | 
			
		||||
#+END_SRC
 | 
			
		||||
 | 
			
		||||
Unredirect all windows if a full-screen opaque window is detected, to maximize
 | 
			
		||||
@ -423,27 +423,27 @@ redirecting/unredirecting windows. paint-on-overlay may make the flickering less
 | 
			
		||||
obvious.
 | 
			
		||||
| Default value | ~false~ |
 | 
			
		||||
#+BEGIN_SRC conf
 | 
			
		||||
  unredir-if-possible = false;
 | 
			
		||||
unredir-if-possible = false;
 | 
			
		||||
#+END_SRC
 | 
			
		||||
 | 
			
		||||
Delay before unredirecting the window, in milliseconds.
 | 
			
		||||
| Default value | ~0~ |
 | 
			
		||||
#+BEGIN_SRC conf
 | 
			
		||||
  unredir-if-possible-delay = 0;
 | 
			
		||||
unredir-if-possible-delay = 0;
 | 
			
		||||
#+END_SRC
 | 
			
		||||
 | 
			
		||||
Conditions of windows that shouldn't be considered full-screen for unredirecting
 | 
			
		||||
screen.
 | 
			
		||||
| Default value | ~[]~ |
 | 
			
		||||
#+BEGIN_SRC conf
 | 
			
		||||
  unredir-if-possible-exclude = [];
 | 
			
		||||
unredir-if-possible-exclude = [];
 | 
			
		||||
#+END_SRC
 | 
			
		||||
 | 
			
		||||
Use ~WM_TRANSIENT_FOR~ to group windows, and consider windows in the same group
 | 
			
		||||
focused at the same time.
 | 
			
		||||
| Default value | ~false~ |
 | 
			
		||||
#+BEGIN_SRC conf
 | 
			
		||||
  detect-transient = true;
 | 
			
		||||
detect-transient = true;
 | 
			
		||||
#+END_SRC
 | 
			
		||||
 | 
			
		||||
Use ~WM_CLIENT_LEADER~ to group windows, and consider windows in the same group
 | 
			
		||||
@ -451,7 +451,7 @@ focused at the same time. ~WM_TRANSIENT_FOR~ has higher priority if
 | 
			
		||||
detect-transient is enabled, too.
 | 
			
		||||
| Default value | ~false~ |
 | 
			
		||||
#+BEGIN_SRC conf
 | 
			
		||||
  detect-client-leader = true;
 | 
			
		||||
detect-client-leader = true;
 | 
			
		||||
#+END_SRC
 | 
			
		||||
 | 
			
		||||
Resize damaged region by a specific number of pixels. A positive value enlarges
 | 
			
		||||
@ -465,14 +465,14 @@ you use ~--resize-damage 2~, and so on). May or may not work with
 | 
			
		||||
~--glx-no-stencil~. Shrinking doesn't function correctly.
 | 
			
		||||
| Default value | ~1~ |
 | 
			
		||||
#+BEGIN_SRC conf
 | 
			
		||||
  resize-damage = 1;
 | 
			
		||||
resize-damage = 1;
 | 
			
		||||
#+END_SRC
 | 
			
		||||
 | 
			
		||||
Specify a list of conditions of windows that should be painted with inverted
 | 
			
		||||
color. Resource-hogging, and is not well tested.
 | 
			
		||||
| Default value | ~[]~ |
 | 
			
		||||
#+BEGIN_SRC conf
 | 
			
		||||
  invert-color-include = [];
 | 
			
		||||
invert-color-include = [];
 | 
			
		||||
#+END_SRC
 | 
			
		||||
 | 
			
		||||
Disable the use of damage information. This cause the whole screen to be redrawn
 | 
			
		||||
@ -481,7 +481,7 @@ degrades the performance, but might fix some artifacts. The opposing option is
 | 
			
		||||
use-damage
 | 
			
		||||
| Default value | ~false~ |
 | 
			
		||||
#+BEGIN_SRC conf
 | 
			
		||||
  use-damage = false;
 | 
			
		||||
use-damage = false;
 | 
			
		||||
#+END_SRC
 | 
			
		||||
 | 
			
		||||
Use X Sync fence to sync clients' draw calls, to make sure all draw calls are
 | 
			
		||||
@ -489,21 +489,21 @@ finished before picom starts drawing. Needed on nvidia-drivers with GLX backend
 | 
			
		||||
for some users.
 | 
			
		||||
| Default value | ~false~ |
 | 
			
		||||
#+BEGIN_SRC conf
 | 
			
		||||
  xrender-sync-fence = false;
 | 
			
		||||
xrender-sync-fence = false;
 | 
			
		||||
#+END_SRC
 | 
			
		||||
 | 
			
		||||
Force all windows to be painted with blending. Useful if you have a
 | 
			
		||||
glx-fshader-win that could turn opaque pixels transparent.
 | 
			
		||||
| Default value | ~false~ |
 | 
			
		||||
#+BEGIN_SRC conf
 | 
			
		||||
  force-win-blend = false;
 | 
			
		||||
force-win-blend = false;
 | 
			
		||||
#+END_SRC
 | 
			
		||||
 | 
			
		||||
Do not use EWMH to detect fullscreen windows. Reverts to checking if a window is
 | 
			
		||||
fullscreen based only on its size and coordinates.
 | 
			
		||||
| Default value | ~false~ |
 | 
			
		||||
#+BEGIN_SRC conf
 | 
			
		||||
  no-ewmh-fullscreen = false;
 | 
			
		||||
no-ewmh-fullscreen = false;
 | 
			
		||||
#+END_SRC
 | 
			
		||||
 | 
			
		||||
Dimming bright windows so their brightness doesn't exceed this set value.
 | 
			
		||||
@ -512,14 +512,14 @@ this could comes with a performance hit. Setting this to 1.0 disables this
 | 
			
		||||
behaviour. Requires ~--use-damage~ to be disabled.
 | 
			
		||||
| Default value | ~1.0~ |
 | 
			
		||||
#+BEGIN_SRC conf
 | 
			
		||||
  max-brightness = 1.0;
 | 
			
		||||
max-brightness = 1.0;
 | 
			
		||||
#+END_SRC
 | 
			
		||||
 | 
			
		||||
Make transparent windows clip other windows like non-transparent windows do,
 | 
			
		||||
instead of blending on top of them.
 | 
			
		||||
| Default value | ~false~ |
 | 
			
		||||
#+BEGIN_SRC conf
 | 
			
		||||
  transparent-clipping = false;
 | 
			
		||||
transparent-clipping = false;
 | 
			
		||||
#+END_SRC
 | 
			
		||||
 | 
			
		||||
Set the log level. Possible values are:
 | 
			
		||||
@ -533,7 +533,7 @@ level, it's better to log into a file using ~--log-file~, since it can generate
 | 
			
		||||
a huge stream of logs.
 | 
			
		||||
| Default value | ~"debug"~ |
 | 
			
		||||
#+BEGIN_SRC conf
 | 
			
		||||
  log-level = "warn";
 | 
			
		||||
log-level = "warn";
 | 
			
		||||
#+END_SRC
 | 
			
		||||
 | 
			
		||||
Set the log file. If ~--log-file~ is never specified, logs will be written to
 | 
			
		||||
@ -542,19 +542,19 @@ early logs might still be written to the stderr. When setting this option from
 | 
			
		||||
the config file, it is recommended to use an absolute path.
 | 
			
		||||
| Default value | ~''~ |
 | 
			
		||||
#+BEGIN_SRC conf
 | 
			
		||||
  # log-file = '/path/to/your/log/file';
 | 
			
		||||
# log-file = '/path/to/your/log/file';
 | 
			
		||||
#+END_SRC
 | 
			
		||||
 | 
			
		||||
Show all X errors (for debugging)
 | 
			
		||||
| Default value | ~false~ |
 | 
			
		||||
#+BEGIN_SRC conf
 | 
			
		||||
  # show-all-xerrors = false;
 | 
			
		||||
# show-all-xerrors = false;
 | 
			
		||||
#+END_SRC
 | 
			
		||||
 | 
			
		||||
Write process ID to a file.
 | 
			
		||||
| Default value | ~''~ |
 | 
			
		||||
#+BEGIN_SRC conf
 | 
			
		||||
  # write-pid-path = '/path/to/your/log/file';
 | 
			
		||||
# write-pid-path = '/path/to/your/log/file';
 | 
			
		||||
#+END_SRC
 | 
			
		||||
 | 
			
		||||
Window type settings. ~WINDOW_TYPE~ is one of the 15 window types defined in
 | 
			
		||||
@ -588,14 +588,14 @@ Following per window-type options are available:
 | 
			
		||||
  unredir-if-possible set, and doesn't want certain window to cause unnecessary
 | 
			
		||||
  screen redirection, you can set this to `true`.
 | 
			
		||||
#+BEGIN_SRC conf
 | 
			
		||||
  wintypes:
 | 
			
		||||
  {
 | 
			
		||||
    tooltip = { fade = true; shadow = true; opacity = 0.75; focus = true; full-shadow = false; };
 | 
			
		||||
    dock = { shadow = false; }
 | 
			
		||||
    dnd = { shadow = false; }
 | 
			
		||||
    popup_menu = { opacity = 0.8; }
 | 
			
		||||
    dropdown_menu = { opacity = 0.8; }
 | 
			
		||||
  };
 | 
			
		||||
wintypes:
 | 
			
		||||
{
 | 
			
		||||
  tooltip = { fade = true; shadow = true; opacity = 0.75; focus = true; full-shadow = false; };
 | 
			
		||||
  dock = { shadow = false; }
 | 
			
		||||
  dnd = { shadow = false; }
 | 
			
		||||
  popup_menu = { opacity = 0.8; }
 | 
			
		||||
  dropdown_menu = { opacity = 0.8; }
 | 
			
		||||
};
 | 
			
		||||
#+END_SRC
 | 
			
		||||
 | 
			
		||||
** GLX backend-specific options
 | 
			
		||||
@ -608,7 +608,7 @@ practically happened) and may not work with blur-background. Tests show a 15%
 | 
			
		||||
performance boost. Recommended.
 | 
			
		||||
| Default value | ~false~ |
 | 
			
		||||
#+BEGIN_SRC conf
 | 
			
		||||
  glx-no-stencil = true;
 | 
			
		||||
glx-no-stencil = true;
 | 
			
		||||
#+END_SRC
 | 
			
		||||
 | 
			
		||||
Avoid rebinding pixmap on window damage. Probably could improve performance on
 | 
			
		||||
@ -616,7 +616,7 @@ rapid window content changes, but is known to break things on some drivers
 | 
			
		||||
(LLVMpipe, xf86-video-intel, etc.). Recommended if it works.
 | 
			
		||||
| Default value | ~false~ |
 | 
			
		||||
#+BEGIN_SRC conf
 | 
			
		||||
  glx-no-rebind-pixmap = false;
 | 
			
		||||
glx-no-rebind-pixmap = false;
 | 
			
		||||
#+END_SRC
 | 
			
		||||
 | 
			
		||||
Use specified GLSL fragment shader for rendering window contents. See
 | 
			
		||||
@ -624,5 +624,5 @@ Use specified GLSL fragment shader for rendering window contents. See
 | 
			
		||||
~compton-fake-transparency-fshader-win.glsl~ in the source tree for examples.
 | 
			
		||||
| Default value | ~''~ |
 | 
			
		||||
#+BEGIN_SRC conf :tangle no
 | 
			
		||||
  glx-fshader-win = '';
 | 
			
		||||
glx-fshader-win = '';
 | 
			
		||||
#+END_SRC
 | 
			
		||||
 | 
			
		||||
@ -20,23 +20,23 @@ you can find how my Rust code is always formatted.
 | 
			
		||||
:END:
 | 
			
		||||
First, we are using the 2018 edition of Rust.
 | 
			
		||||
#+BEGIN_SRC toml
 | 
			
		||||
  edition = "2018"
 | 
			
		||||
edition = "2018"
 | 
			
		||||
#+END_SRC
 | 
			
		||||
Put single-expression functions on a single line.
 | 
			
		||||
#+BEGIN_SRC toml
 | 
			
		||||
  fn_single_line = true
 | 
			
		||||
fn_single_line = true
 | 
			
		||||
#+END_SRC
 | 
			
		||||
Format string literals where necessary.
 | 
			
		||||
#+BEGIN_SRC toml
 | 
			
		||||
  format_strings = true
 | 
			
		||||
format_strings = true
 | 
			
		||||
#+END_SRC
 | 
			
		||||
Maximum width of each line
 | 
			
		||||
#+BEGIN_SRC toml
 | 
			
		||||
  max_width = 80
 | 
			
		||||
max_width = 80
 | 
			
		||||
#+END_SRC
 | 
			
		||||
Merge multiple imports into a single nested import.
 | 
			
		||||
#+BEGIN_SRC toml
 | 
			
		||||
  merge_imports = true
 | 
			
		||||
merge_imports = true
 | 
			
		||||
#+END_SRC
 | 
			
		||||
 | 
			
		||||
* Structs and Enums
 | 
			
		||||
@ -50,15 +50,15 @@ purpose of alignment.
 | 
			
		||||
Note that this is not how much whitespace is inserted, but instead the longest
 | 
			
		||||
variant name that doesn't get ignored when aligning.
 | 
			
		||||
#+BEGIN_SRC toml
 | 
			
		||||
  enum_discrim_align_threshold = 20
 | 
			
		||||
enum_discrim_align_threshold = 20
 | 
			
		||||
#+END_SRC
 | 
			
		||||
The maximum diff of width between struct fields to be aligned with each other.
 | 
			
		||||
#+BEGIN_SRC toml
 | 
			
		||||
  struct_field_align_threshold = 20
 | 
			
		||||
struct_field_align_threshold = 20
 | 
			
		||||
#+END_SRC
 | 
			
		||||
Reorder impl items. ~type~ and ~const~ are put first, then macros and methods.
 | 
			
		||||
#+BEGIN_SRC toml
 | 
			
		||||
  reorder_impl_items = true
 | 
			
		||||
reorder_impl_items = true
 | 
			
		||||
#+END_SRC
 | 
			
		||||
 | 
			
		||||
* Comments
 | 
			
		||||
@ -67,19 +67,19 @@ Reorder impl items. ~type~ and ~const~ are put first, then macros and methods.
 | 
			
		||||
:END:
 | 
			
		||||
Convert ~/* */~ comments to ~//~ comments where possible.
 | 
			
		||||
#+BEGIN_SRC toml
 | 
			
		||||
  normalize_comments = true
 | 
			
		||||
normalize_comments = true
 | 
			
		||||
#+END_SRC
 | 
			
		||||
Break comments to fit on the line.
 | 
			
		||||
#+BEGIN_SRC toml
 | 
			
		||||
  wrap_comments = true
 | 
			
		||||
wrap_comments = true
 | 
			
		||||
#+END_SRC
 | 
			
		||||
Report ~FIXME~ items in comments.
 | 
			
		||||
#+BEGIN_SRC toml
 | 
			
		||||
  report_fixme = "Always"
 | 
			
		||||
report_fixme = "Always"
 | 
			
		||||
#+END_SRC
 | 
			
		||||
Report ~TODO~ items in comments.
 | 
			
		||||
#+BEGIN_SRC toml
 | 
			
		||||
  todo = "Always"
 | 
			
		||||
todo = "Always"
 | 
			
		||||
#+END_SRC
 | 
			
		||||
 | 
			
		||||
* Documentation
 | 
			
		||||
@ -88,11 +88,11 @@ Report ~TODO~ items in comments.
 | 
			
		||||
:END:
 | 
			
		||||
Format code snippet included in doc comments.
 | 
			
		||||
#+BEGIN_SRC toml
 | 
			
		||||
  format_code_in_doc_comments = true
 | 
			
		||||
format_code_in_doc_comments = true
 | 
			
		||||
#+END_SRC
 | 
			
		||||
Convert ~#![doc]~ and ~#[doc]~ attributes to ~//!~ and ~///~ doc comments.
 | 
			
		||||
#+BEGIN_SRC toml
 | 
			
		||||
  normalize_doc_attributes = true
 | 
			
		||||
normalize_doc_attributes = true
 | 
			
		||||
#+END_SRC
 | 
			
		||||
 | 
			
		||||
* Whitespace
 | 
			
		||||
@ -101,13 +101,13 @@ Convert ~#![doc]~ and ~#[doc]~ attributes to ~//!~ and ~///~ doc comments.
 | 
			
		||||
:END:
 | 
			
		||||
Use tab characters for indentation, spaces for alignment.
 | 
			
		||||
#+BEGIN_SRC toml
 | 
			
		||||
  hard_tabs = false
 | 
			
		||||
hard_tabs = false
 | 
			
		||||
#+END_SRC
 | 
			
		||||
Number of spaces per tab.
 | 
			
		||||
#+BEGIN_SRC toml
 | 
			
		||||
  tab_spaces = 4
 | 
			
		||||
tab_spaces = 4
 | 
			
		||||
#+END_SRC
 | 
			
		||||
I want newlines to always be Unix style.
 | 
			
		||||
#+BEGIN_SRC toml
 | 
			
		||||
  newline_style = "Unix"
 | 
			
		||||
newline_style = "Unix"
 | 
			
		||||
#+END_SRC
 | 
			
		||||
 | 
			
		||||
										
											
												File diff suppressed because it is too large
												Load Diff
											
										
									
								
							@ -92,11 +92,11 @@ different locations, but I chose an Emacs-like configuration: put
 | 
			
		||||
everything in ~~/.stumpwm.d/~. We begin by indicating quicklisp how to
 | 
			
		||||
properly initialize:
 | 
			
		||||
#+begin_src lisp
 | 
			
		||||
  #-quicklisp
 | 
			
		||||
  (let ((quicklisp-init (merge-pathnames "quicklisp/setup.lisp"
 | 
			
		||||
                                         (user-homedir-pathname))))
 | 
			
		||||
    (when (probe-file quicklisp-init)
 | 
			
		||||
      (load quicklisp-init)))
 | 
			
		||||
#-quicklisp
 | 
			
		||||
(let ((quicklisp-init (merge-pathnames "quicklisp/setup.lisp"
 | 
			
		||||
                                       (user-homedir-pathname))))
 | 
			
		||||
  (when (probe-file quicklisp-init)
 | 
			
		||||
    (load quicklisp-init)))
 | 
			
		||||
#+end_src
 | 
			
		||||
 | 
			
		||||
Then, our first StumpWM-related code is declaring we are using the
 | 
			
		||||
@ -104,15 +104,15 @@ Then, our first StumpWM-related code is declaring we are using the
 | 
			
		||||
us to avoid using the prefix ~stumpwm:~ each time we are using a
 | 
			
		||||
function or a variable from this package.
 | 
			
		||||
#+begin_src lisp
 | 
			
		||||
  (in-package :stumpwm)
 | 
			
		||||
  (setf *default-package* :stumpwm)
 | 
			
		||||
(in-package :stumpwm)
 | 
			
		||||
(setf *default-package* :stumpwm)
 | 
			
		||||
#+end_src
 | 
			
		||||
 | 
			
		||||
Since I install StumpWM with my package manager (I use the AUR’s
 | 
			
		||||
~stumpwm-git~ package), StumpWM’s modules are installed to
 | 
			
		||||
~/usr/share/stupmwm/contrib/utils/~, let’s indicate that to StumpWM.
 | 
			
		||||
#+begin_src lisp
 | 
			
		||||
  (set-module-dir "/usr/share/stupmwm/contrib/")
 | 
			
		||||
(set-module-dir "/usr/share/stupmwm/contrib/")
 | 
			
		||||
#+end_src
 | 
			
		||||
 | 
			
		||||
A startup message can be used when initializing StumpWM. For now,
 | 
			
		||||
@ -125,8 +125,8 @@ The first thing I want to do after that is to set some decent cursor
 | 
			
		||||
pointer as well as get a bunch of stuff started. To see what’s in the
 | 
			
		||||
~autostart~ script, [[file:bin.org::#Autostart-a99e99e7][see here]].
 | 
			
		||||
#+begin_src lisp
 | 
			
		||||
  (run-shell-command "xsetroot -cursor_name left_ptr")
 | 
			
		||||
  (run-shell-command "autostart")
 | 
			
		||||
(run-shell-command "xsetroot -cursor_name left_ptr")
 | 
			
		||||
(run-shell-command "autostart")
 | 
			
		||||
#+end_src
 | 
			
		||||
 | 
			
		||||
Now, we’ll load a couple of my custom files that will be described below:
 | 
			
		||||
@ -142,10 +142,10 @@ Now, we’ll load a couple of my custom files that will be described below:
 | 
			
		||||
#+name: gen-load-files
 | 
			
		||||
#+headers: :wrap src lisp
 | 
			
		||||
#+begin_src emacs-lisp :var files=first-loaded-files
 | 
			
		||||
  (mapconcat (lambda (file)
 | 
			
		||||
               (format "(load \"~/.stumpwm.d/%s\")" (car file)))
 | 
			
		||||
             files
 | 
			
		||||
             "\n")
 | 
			
		||||
(mapconcat (lambda (file)
 | 
			
		||||
             (format "(load \"~/.stumpwm.d/%s\")" (car file)))
 | 
			
		||||
           files
 | 
			
		||||
           "\n")
 | 
			
		||||
#+end_src
 | 
			
		||||
 | 
			
		||||
This is equivalent to the Common Lisp code:
 | 
			
		||||
@ -161,8 +161,8 @@ This is equivalent to the Common Lisp code:
 | 
			
		||||
Once the modeline file is loaded, let’s indicate StumpWM to activate
 | 
			
		||||
it:
 | 
			
		||||
#+begin_src lisp
 | 
			
		||||
  (when *initializing*
 | 
			
		||||
    (mode-line))
 | 
			
		||||
(when *initializing*
 | 
			
		||||
  (mode-line))
 | 
			
		||||
#+end_src
 | 
			
		||||
 | 
			
		||||
Another thing I want to set is how focus is linked to my mouse: only
 | 
			
		||||
@ -170,8 +170,8 @@ on click. I /HATE/ it when focus follows my mouse like some damn dog
 | 
			
		||||
after its ball. Also, the meta key will be used to move floating
 | 
			
		||||
windows.
 | 
			
		||||
#+begin_src lisp
 | 
			
		||||
  (setf *mouse-focus-policy*    :click
 | 
			
		||||
        ,*float-window-modifier* :META)
 | 
			
		||||
(setf *mouse-focus-policy*    :click
 | 
			
		||||
      ,*float-window-modifier* :META)
 | 
			
		||||
#+end_src
 | 
			
		||||
 | 
			
		||||
Next, some modules will be loaded from the ~stumpwm-contrib~ package
 | 
			
		||||
@ -190,10 +190,10 @@ including a short description of what they are for:
 | 
			
		||||
#+name: gen-load-modules
 | 
			
		||||
#+headers: :wrap src lisp
 | 
			
		||||
#+begin_src emacs-lisp :var modules=loaded-modules
 | 
			
		||||
  (mapconcat (lambda (module)
 | 
			
		||||
               (format "(load-module \"%s\")" (car module)))
 | 
			
		||||
             modules
 | 
			
		||||
             "\n")
 | 
			
		||||
(mapconcat (lambda (module)
 | 
			
		||||
             (format "(load-module \"%s\")" (car module)))
 | 
			
		||||
           modules
 | 
			
		||||
           "\n")
 | 
			
		||||
#+end_src
 | 
			
		||||
 | 
			
		||||
#+RESULTS[508e36f9747f1da901bbee63582416a8a6ba2c2f]: gen-load-modules
 | 
			
		||||
@ -208,7 +208,7 @@ including a short description of what they are for:
 | 
			
		||||
 | 
			
		||||
Finally, we can notify the user everything is ready.
 | 
			
		||||
#+begin_src lisp
 | 
			
		||||
  (setf *startup-message* "StumpWM is ready!")
 | 
			
		||||
(setf *startup-message* "StumpWM is ready!")
 | 
			
		||||
#+end_src
 | 
			
		||||
 | 
			
		||||
And it’s done! We can now move on to the creation of the other CLisp files.
 | 
			
		||||
@ -223,42 +223,42 @@ me invoking too many Firefox instances. Either Firefox is not already
 | 
			
		||||
running and an instance is launched, or one already is and we are
 | 
			
		||||
brought to it. This is done like so:
 | 
			
		||||
#+begin_src lisp
 | 
			
		||||
  (defcommand firefox () ()
 | 
			
		||||
              "Run or raise Firefox."
 | 
			
		||||
              (run-or-raise "firefox" '(:class "Firefox") t nil))
 | 
			
		||||
(defcommand firefox () ()
 | 
			
		||||
            "Run or raise Firefox."
 | 
			
		||||
            (run-or-raise "firefox" '(:class "Firefox") t nil))
 | 
			
		||||
#+end_src
 | 
			
		||||
 | 
			
		||||
Next, this command will not only close the current window, but it will
 | 
			
		||||
also close the current frame.
 | 
			
		||||
#+begin_src lisp
 | 
			
		||||
  (defcommand delete-window-and-frame () ()
 | 
			
		||||
              "Delete the current frame with its window."
 | 
			
		||||
              (delete-window)
 | 
			
		||||
              (remove-split))
 | 
			
		||||
(defcommand delete-window-and-frame () ()
 | 
			
		||||
            "Delete the current frame with its window."
 | 
			
		||||
            (delete-window)
 | 
			
		||||
            (remove-split))
 | 
			
		||||
#+end_src
 | 
			
		||||
 | 
			
		||||
The two following commands will create a new frame to the right and
 | 
			
		||||
below the current frame respectively, then focus it.
 | 
			
		||||
#+begin_src lisp
 | 
			
		||||
  (defcommand hsplit-and-focus () ()
 | 
			
		||||
              "Create a new frame on the right and focus it."
 | 
			
		||||
              (hsplit)
 | 
			
		||||
              (move-focus :right))
 | 
			
		||||
(defcommand hsplit-and-focus () ()
 | 
			
		||||
            "Create a new frame on the right and focus it."
 | 
			
		||||
            (hsplit)
 | 
			
		||||
            (move-focus :right))
 | 
			
		||||
 | 
			
		||||
  (defcommand vsplit-and-focus () ()
 | 
			
		||||
              "Create a new frame below and move focus to it."
 | 
			
		||||
              (vsplit)
 | 
			
		||||
              (move-focus :down))
 | 
			
		||||
(defcommand vsplit-and-focus () ()
 | 
			
		||||
            "Create a new frame below and move focus to it."
 | 
			
		||||
            (vsplit)
 | 
			
		||||
            (move-focus :down))
 | 
			
		||||
#+end_src
 | 
			
		||||
 | 
			
		||||
Now, let’s create a command for invoking the terminal, optionally with
 | 
			
		||||
a program.
 | 
			
		||||
#+begin_src lisp
 | 
			
		||||
  (defcommand term (&optional program) ()
 | 
			
		||||
              "Invoke a terminal, possibly with a @arg{program}."
 | 
			
		||||
              (run-shell-command (if program
 | 
			
		||||
                                     (format nil "kitty ~A" program)
 | 
			
		||||
                                     "kitty")))
 | 
			
		||||
(defcommand term (&optional program) ()
 | 
			
		||||
            "Invoke a terminal, possibly with a @arg{program}."
 | 
			
		||||
            (run-shell-command (if program
 | 
			
		||||
                                   (format nil "kitty ~A" program)
 | 
			
		||||
                                   "kitty")))
 | 
			
		||||
#+end_src
 | 
			
		||||
 | 
			
		||||
And done! Next!
 | 
			
		||||
@ -297,10 +297,10 @@ code looks like so:
 | 
			
		||||
#+name: gen-colors
 | 
			
		||||
#+headers: :wrap src lisp
 | 
			
		||||
#+begin_src emacs-lisp :var colors=nord-colors
 | 
			
		||||
  (mapconcat (lambda (color)
 | 
			
		||||
               (format "(defvar phundrak-%s \"%s\")" (car color) (cadr color)))
 | 
			
		||||
             colors
 | 
			
		||||
             "\n")
 | 
			
		||||
(mapconcat (lambda (color)
 | 
			
		||||
             (format "(defvar phundrak-%s \"%s\")" (car color) (cadr color)))
 | 
			
		||||
           colors
 | 
			
		||||
           "\n")
 | 
			
		||||
#+end_src
 | 
			
		||||
 | 
			
		||||
#+RESULTS[08b3db7a2b4f31d641bcd096ff265eae06879244]: gen-colors
 | 
			
		||||
@ -332,45 +332,45 @@ And with that we’re done!
 | 
			
		||||
:END:
 | 
			
		||||
The modeline is pretty easy. First, let’s load the ~colors.lisp~ file we just created:
 | 
			
		||||
#+begin_src lisp
 | 
			
		||||
  (load "~/.stumpwm.d/colors.lisp")
 | 
			
		||||
(load "~/.stumpwm.d/colors.lisp")
 | 
			
		||||
#+end_src
 | 
			
		||||
 | 
			
		||||
Next, we can set some colors for the modeline. Let’s set the
 | 
			
		||||
background of the modeline to Nord1 and the foreground to Nord5, I
 | 
			
		||||
think this is a pretty good combination.
 | 
			
		||||
#+begin_src lisp
 | 
			
		||||
  (setf *mode-line-background-color* phundrak-nord1
 | 
			
		||||
        ,*mode-line-foreground-color* phundrak-nord5)
 | 
			
		||||
(setf *mode-line-background-color* phundrak-nord1
 | 
			
		||||
      ,*mode-line-foreground-color* phundrak-nord5)
 | 
			
		||||
#+end_src
 | 
			
		||||
 | 
			
		||||
We /could/ also use some borders in the modeline. But we won’t. Let’s
 | 
			
		||||
still set its color to Nord1, just in case.
 | 
			
		||||
#+begin_src lisp
 | 
			
		||||
  (setf *mode-line-border-color* phundrak-nord1
 | 
			
		||||
        ,*mode-line-border-width* 0)
 | 
			
		||||
(setf *mode-line-border-color* phundrak-nord1
 | 
			
		||||
      ,*mode-line-border-width* 0)
 | 
			
		||||
#+end_src
 | 
			
		||||
 | 
			
		||||
The timeout of the modeline indicates how often it refreshes in
 | 
			
		||||
seconds. I think one second is good.
 | 
			
		||||
#+begin_src lisp
 | 
			
		||||
  (setf *mode-line-timeout* 1)
 | 
			
		||||
(setf *mode-line-timeout* 1)
 | 
			
		||||
#+end_src
 | 
			
		||||
 | 
			
		||||
Next we get to the content of the modeline. This format follows the
 | 
			
		||||
format indicated in the manpage of ~date~.
 | 
			
		||||
#+begin_src lisp
 | 
			
		||||
  (setf *time-modeline-string* "%F %H:%M")
 | 
			
		||||
(setf *time-modeline-string* "%F %H:%M")
 | 
			
		||||
#+end_src
 | 
			
		||||
 | 
			
		||||
Let’s also indicate how the groupname is displayed.
 | 
			
		||||
#+begin_src lisp
 | 
			
		||||
  (setf *group-format* "%t")
 | 
			
		||||
(setf *group-format* "%t")
 | 
			
		||||
#+end_src
 | 
			
		||||
 | 
			
		||||
The window format should display first its window number, then its
 | 
			
		||||
titled, limited to 30 characters.
 | 
			
		||||
#+begin_src lisp
 | 
			
		||||
  (setf *window-format* "%n: %30t")
 | 
			
		||||
(setf *window-format* "%n: %30t")
 | 
			
		||||
#+end_src
 | 
			
		||||
 | 
			
		||||
Here are some modules that we will load for the modeline:
 | 
			
		||||
@ -384,10 +384,10 @@ Here are some modules that we will load for the modeline:
 | 
			
		||||
#+name: gen-load-modeline-modules
 | 
			
		||||
#+headers: :wrap src lisp
 | 
			
		||||
#+begin_src emacs-lisp :var modules=modeline-modules
 | 
			
		||||
  (mapconcat (lambda (module)
 | 
			
		||||
               (format "(load-module \"%s\")" (car module)))
 | 
			
		||||
             modules
 | 
			
		||||
             "\n")
 | 
			
		||||
(mapconcat (lambda (module)
 | 
			
		||||
             (format "(load-module \"%s\")" (car module)))
 | 
			
		||||
           modules
 | 
			
		||||
           "\n")
 | 
			
		||||
#+end_src
 | 
			
		||||
 | 
			
		||||
#+RESULTS[75023085d7c69ae09044826218830e6b678d5959]: gen-load-modeline-modules
 | 
			
		||||
@ -405,7 +405,7 @@ highlighted, and ~%u~ will display urgent windows if there are any. ~%d~
 | 
			
		||||
on the other hand will display the date in the format set above, while
 | 
			
		||||
~%B~ will display the battery level of the laptop.
 | 
			
		||||
#+begin_src lisp
 | 
			
		||||
  (setf *screen-mode-line-format* (list "%g %v %u ^> %C | %M | %B | %d"))
 | 
			
		||||
(setf *screen-mode-line-format* (list "%g %v %u ^> %C | %M | %B | %d"))
 | 
			
		||||
#+end_src
 | 
			
		||||
 | 
			
		||||
This variable as you can see is a list of elements, although here I am
 | 
			
		||||
@ -455,22 +455,22 @@ is the list of groups I will be using:
 | 
			
		||||
#+name: gen-groups
 | 
			
		||||
#+headers: :exports none
 | 
			
		||||
#+begin_src emacs-lisp :var groups=list-groups
 | 
			
		||||
  (let ((make-group (lambda (group &optional first-p)
 | 
			
		||||
                      (let ((group-name (car group))
 | 
			
		||||
                            (group-type (nth 3 group)))
 | 
			
		||||
                        (format "(%s \"%s\")"
 | 
			
		||||
                                (if first-p
 | 
			
		||||
                                    "grename"
 | 
			
		||||
                                  (pcase group-type
 | 
			
		||||
                                    ("Dynamic"  "gnewbg-dynamic")
 | 
			
		||||
                                    ("Floating" "gnewbg-float")
 | 
			
		||||
                                    (otherwise  "gnewbg")))
 | 
			
		||||
                                group-name)))))
 | 
			
		||||
    (string-join `(,(funcall make-group (car groups) t)
 | 
			
		||||
                   ,@(mapcar (lambda (group)
 | 
			
		||||
                               (funcall make-group group))
 | 
			
		||||
                             (cdr groups)))
 | 
			
		||||
                 "\n"))
 | 
			
		||||
(let ((make-group (lambda (group &optional first-p)
 | 
			
		||||
                    (let ((group-name (car group))
 | 
			
		||||
                          (group-type (nth 3 group)))
 | 
			
		||||
                      (format "(%s \"%s\")"
 | 
			
		||||
                              (if first-p
 | 
			
		||||
                                  "grename"
 | 
			
		||||
                                (pcase group-type
 | 
			
		||||
                                  ("Dynamic"  "gnewbg-dynamic")
 | 
			
		||||
                                  ("Floating" "gnewbg-float")
 | 
			
		||||
                                  (otherwise  "gnewbg")))
 | 
			
		||||
                              group-name)))))
 | 
			
		||||
  (string-join `(,(funcall make-group (car groups) t)
 | 
			
		||||
                 ,@(mapcar (lambda (group)
 | 
			
		||||
                             (funcall make-group group))
 | 
			
		||||
                           (cdr groups)))
 | 
			
		||||
               "\n"))
 | 
			
		||||
#+end_src
 | 
			
		||||
 | 
			
		||||
#+RESULTS[22540ee038b7206f965b7ca48521e93bdccb5de8]: gen-groups
 | 
			
		||||
@ -485,8 +485,8 @@ is the list of groups I will be using:
 | 
			
		||||
 | 
			
		||||
Groups are specified this way:
 | 
			
		||||
#+begin_src lisp
 | 
			
		||||
  (when *initializing*
 | 
			
		||||
    <<gen-groups()>>)
 | 
			
		||||
(when *initializing*
 | 
			
		||||
  <<gen-groups()>>)
 | 
			
		||||
#+end_src
 | 
			
		||||
 | 
			
		||||
By default, if nothing is specified as per the group type, my groups
 | 
			
		||||
@ -496,7 +496,7 @@ also be dynamic tiling groups or floating groups.
 | 
			
		||||
Next, let’s make sure no previous window placement rule is in place,
 | 
			
		||||
this will avoid unexpected and hard-to-debug behavior.
 | 
			
		||||
#+begin_src lisp
 | 
			
		||||
  (clear-window-placement-rules)
 | 
			
		||||
(clear-window-placement-rules)
 | 
			
		||||
#+end_src
 | 
			
		||||
 | 
			
		||||
As you can see in the table [[list-groups]] above, I also indicated my
 | 
			
		||||
@ -505,27 +505,27 @@ class, so it will be pretty straightforward to the corresponding code.
 | 
			
		||||
#+name: gen-rules
 | 
			
		||||
#+headers: :wrap src lisp
 | 
			
		||||
#+begin_src emacs-lisp :var rules=list-groups
 | 
			
		||||
  (require 'seq)
 | 
			
		||||
  (let ((output "")
 | 
			
		||||
        (rules (seq-filter (lambda (rule) rule)
 | 
			
		||||
                           (mapcar (lambda (line)
 | 
			
		||||
                                     (let ((classes (caddr line)))
 | 
			
		||||
                                       (unless (string= "" classes)
 | 
			
		||||
                                         (cons
 | 
			
		||||
                                          (split-string classes "," t "[[:space:]]*")
 | 
			
		||||
                                          (car line)))))
 | 
			
		||||
                                   rules))))
 | 
			
		||||
    (progn
 | 
			
		||||
      (seq-do (lambda (rule)
 | 
			
		||||
                (let ((classes (car rule))
 | 
			
		||||
                      (group   (cdr rule)))
 | 
			
		||||
                  (dolist (class classes)
 | 
			
		||||
                    (setf output (format "%s\n%s"
 | 
			
		||||
                                         `(define-frame-preference ,(format "\"%s\"" group)
 | 
			
		||||
                                            (nil t t :class ,(format "\"%s\"" class)))
 | 
			
		||||
                                         output)))))
 | 
			
		||||
              rules)
 | 
			
		||||
      output))
 | 
			
		||||
(require 'seq)
 | 
			
		||||
(let ((output "")
 | 
			
		||||
      (rules (seq-filter (lambda (rule) rule)
 | 
			
		||||
                         (mapcar (lambda (line)
 | 
			
		||||
                                   (let ((classes (caddr line)))
 | 
			
		||||
                                     (unless (string= "" classes)
 | 
			
		||||
                                       (cons
 | 
			
		||||
                                        (split-string classes "," t "[[:space:]]*")
 | 
			
		||||
                                        (car line)))))
 | 
			
		||||
                                 rules))))
 | 
			
		||||
  (progn
 | 
			
		||||
    (seq-do (lambda (rule)
 | 
			
		||||
              (let ((classes (car rule))
 | 
			
		||||
                    (group   (cdr rule)))
 | 
			
		||||
                (dolist (class classes)
 | 
			
		||||
                  (setf output (format "%s\n%s"
 | 
			
		||||
                                       `(define-frame-preference ,(format "\"%s\"" group)
 | 
			
		||||
                                          (nil t t :class ,(format "\"%s\"" class)))
 | 
			
		||||
                                       output)))))
 | 
			
		||||
            rules)
 | 
			
		||||
    output))
 | 
			
		||||
#+end_src
 | 
			
		||||
 | 
			
		||||
This can be written this way:
 | 
			
		||||
@ -550,28 +550,28 @@ three terminal windows to open by default:
 | 
			
		||||
- and two terminals
 | 
			
		||||
This can be done like so:
 | 
			
		||||
#+begin_src lisp
 | 
			
		||||
  (defun my-term-init (current-group _last-group)
 | 
			
		||||
    "Create terminals in the first group when none are already there."
 | 
			
		||||
    (let ((term-group (select-group (current-screen) "2"))
 | 
			
		||||
          (windows    (group-windows current-group)))
 | 
			
		||||
      (when (and (equal current-group term-group)
 | 
			
		||||
                 (null windows))
 | 
			
		||||
        (unless (= 1 (length (group-frames current-group)))
 | 
			
		||||
          (only))
 | 
			
		||||
        (term "htop")
 | 
			
		||||
        (term)
 | 
			
		||||
        (term))))
 | 
			
		||||
(defun my-term-init (current-group _last-group)
 | 
			
		||||
  "Create terminals in the first group when none are already there."
 | 
			
		||||
  (let ((term-group (select-group (current-screen) "2"))
 | 
			
		||||
        (windows    (group-windows current-group)))
 | 
			
		||||
    (when (and (equal current-group term-group)
 | 
			
		||||
               (null windows))
 | 
			
		||||
      (unless (= 1 (length (group-frames current-group)))
 | 
			
		||||
        (only))
 | 
			
		||||
      (term "htop")
 | 
			
		||||
      (term)
 | 
			
		||||
      (term))))
 | 
			
		||||
#+end_src
 | 
			
		||||
 | 
			
		||||
Let’s add a hook for that now:
 | 
			
		||||
#+begin_src lisp
 | 
			
		||||
  (add-hook *focus-group-hook* 'my-term-init)
 | 
			
		||||
(add-hook *focus-group-hook* 'my-term-init)
 | 
			
		||||
#+end_src
 | 
			
		||||
 | 
			
		||||
By the way, dynamic groups should have a split ratio of half of the
 | 
			
		||||
available space.
 | 
			
		||||
#+begin_src lisp
 | 
			
		||||
  (setf *dynamic-group-master-split-ratio* 1/2)
 | 
			
		||||
(setf *dynamic-group-master-split-ratio* 1/2)
 | 
			
		||||
#+end_src
 | 
			
		||||
 | 
			
		||||
* Theme
 | 
			
		||||
@ -581,7 +581,7 @@ available space.
 | 
			
		||||
:END:
 | 
			
		||||
As in the modeline file, the first thing we’ll do is to load our colors.
 | 
			
		||||
#+begin_src lisp
 | 
			
		||||
  (load "~/.stumpwm.d/colors.lisp")
 | 
			
		||||
(load "~/.stumpwm.d/colors.lisp")
 | 
			
		||||
#+end_src
 | 
			
		||||
 | 
			
		||||
We can now go onto more serious business.
 | 
			
		||||
@ -599,9 +599,9 @@ There’s a quickfix available while we wait for ~clx-truetype~ to be once
 | 
			
		||||
again available: clone it in quicklisp’s local projects. You will
 | 
			
		||||
obviously need to have quicklisp installed (for that, follow the
 | 
			
		||||
[[https://www.quicklisp.org/beta/#installation][official instructions]]), then execute the following shell commands:
 | 
			
		||||
#+begin_src sh
 | 
			
		||||
  cd ~/quicklisp/local-projects/
 | 
			
		||||
  git clone https://github.com/lihebi/clx-truetype.git
 | 
			
		||||
#+begin_src sh :dir ~/quicklisp/local-projects
 | 
			
		||||
cd ~/quicklisp/local-projects/
 | 
			
		||||
git clone https://github.com/lihebi/clx-truetype.git
 | 
			
		||||
#+end_src
 | 
			
		||||
 | 
			
		||||
This will make ~clx-truetype~ available to quicklisp, and you can run
 | 
			
		||||
@ -611,8 +611,8 @@ issue (running it again is necessary to install its dependencies).
 | 
			
		||||
Now that this is out of the way, let’s add two lines so we can use TTF
 | 
			
		||||
fonts:
 | 
			
		||||
#+begin_src lisp
 | 
			
		||||
  (ql:quickload :clx-truetype)
 | 
			
		||||
  (load-module "ttf-fonts")
 | 
			
		||||
(ql:quickload :clx-truetype)
 | 
			
		||||
(load-module "ttf-fonts")
 | 
			
		||||
#+end_src
 | 
			
		||||
The documentation says we should be able to also use OTF fonts, but so
 | 
			
		||||
far I’ve had no luck loading one. Loading more than one font to use
 | 
			
		||||
@ -636,18 +636,18 @@ work).
 | 
			
		||||
#+name: gen-fonts
 | 
			
		||||
#+headers: :wrap src lisp
 | 
			
		||||
#+begin_src emacs-lisp :var fonts=list-fonts
 | 
			
		||||
  (format "(set-font `(%s))"
 | 
			
		||||
          (mapconcat (lambda (font)
 | 
			
		||||
                      (let ((family    (nth 0 font))
 | 
			
		||||
                            (subfamily (nth 1 font))
 | 
			
		||||
                            (size      (nth 2 font)))
 | 
			
		||||
                        (format ",%s" `(make-instance 'xft:font
 | 
			
		||||
                                                      :family ,(format "\"%s\"" family)
 | 
			
		||||
                                                      :subfamily ,(format "\"%s\"" subfamily)
 | 
			
		||||
                                                      :size ,size
 | 
			
		||||
                                                      :antialias t))))
 | 
			
		||||
                    fonts
 | 
			
		||||
                    "\n            "))
 | 
			
		||||
(format "(set-font `(%s))"
 | 
			
		||||
        (mapconcat (lambda (font)
 | 
			
		||||
                    (let ((family    (nth 0 font))
 | 
			
		||||
                          (subfamily (nth 1 font))
 | 
			
		||||
                          (size      (nth 2 font)))
 | 
			
		||||
                      (format ",%s" `(make-instance 'xft:font
 | 
			
		||||
                                                    :family ,(format "\"%s\"" family)
 | 
			
		||||
                                                    :subfamily ,(format "\"%s\"" subfamily)
 | 
			
		||||
                                                    :size ,size
 | 
			
		||||
                                                    :antialias t))))
 | 
			
		||||
                  fonts
 | 
			
		||||
                  "\n            "))
 | 
			
		||||
#+end_src
 | 
			
		||||
 | 
			
		||||
The code equivalent of this table can be seen below:
 | 
			
		||||
@ -671,17 +671,17 @@ We can now set a couple of colors for StumpWM. Not that we will see
 | 
			
		||||
them often since I don’t like borders on my windows, but in case I
 | 
			
		||||
want to get them back, they’ll be nice to have.
 | 
			
		||||
#+begin_src lisp
 | 
			
		||||
  (set-border-color        phundrak-nord1)
 | 
			
		||||
  (set-focus-color         phundrak-nord1)
 | 
			
		||||
  (set-unfocus-color       phundrak-nord3)
 | 
			
		||||
  (set-float-focus-color   phundrak-nord1)
 | 
			
		||||
  (set-float-unfocus-color phundrak-nord3)
 | 
			
		||||
(set-border-color        phundrak-nord1)
 | 
			
		||||
(set-focus-color         phundrak-nord1)
 | 
			
		||||
(set-unfocus-color       phundrak-nord3)
 | 
			
		||||
(set-float-focus-color   phundrak-nord1)
 | 
			
		||||
(set-float-unfocus-color phundrak-nord3)
 | 
			
		||||
#+end_src
 | 
			
		||||
 | 
			
		||||
Let’s also set the colors of the message and input windows:
 | 
			
		||||
#+begin_src lisp
 | 
			
		||||
  (set-fg-color phundrak-nord4)
 | 
			
		||||
  (set-bg-color phundrak-nord1)
 | 
			
		||||
(set-fg-color phundrak-nord4)
 | 
			
		||||
(set-bg-color phundrak-nord1)
 | 
			
		||||
#+end_src
 | 
			
		||||
 | 
			
		||||
As I said, I don’t like borders, so I’ll remove them. I’ll still keep
 | 
			
		||||
@ -689,11 +689,11 @@ the window’s title bar available when it’s floating, and this is also
 | 
			
		||||
where I can set the format of its title: its number as well as its
 | 
			
		||||
name, limited to thirty characters.
 | 
			
		||||
#+begin_src lisp
 | 
			
		||||
  (setf *normal-border-width*       0
 | 
			
		||||
        ,*float-window-border*       0
 | 
			
		||||
        ,*float-window-title-height* 15
 | 
			
		||||
        ,*window-border-style*       :none
 | 
			
		||||
        ,*window-format*             "%n:%30t")
 | 
			
		||||
(setf *normal-border-width*       0
 | 
			
		||||
      ,*float-window-border*       0
 | 
			
		||||
      ,*float-window-title-height* 15
 | 
			
		||||
      ,*window-border-style*       :none
 | 
			
		||||
      ,*window-format*             "%n:%30t")
 | 
			
		||||
#+end_src
 | 
			
		||||
 | 
			
		||||
** Message and Input Windows
 | 
			
		||||
@ -704,10 +704,10 @@ The Input windows as well as the message windows should both be at the
 | 
			
		||||
top of my screen. And I believe a padding of five pixels for the
 | 
			
		||||
message windows is good.
 | 
			
		||||
#+begin_src lisp
 | 
			
		||||
  (setf *input-window-gravity*     :top
 | 
			
		||||
        ,*message-window-padding*   10
 | 
			
		||||
        ,*message-window-y-padding* 10
 | 
			
		||||
        ,*message-window-gravity*   :top)
 | 
			
		||||
(setf *input-window-gravity*     :top
 | 
			
		||||
      ,*message-window-padding*   10
 | 
			
		||||
      ,*message-window-y-padding* 10
 | 
			
		||||
      ,*message-window-gravity*   :top)
 | 
			
		||||
#+end_src
 | 
			
		||||
 | 
			
		||||
** Gaps Between Frames
 | 
			
		||||
@ -719,21 +719,21 @@ plain ~i3~. In Awesome, I still have gaps. And in StumpWM, I shall still
 | 
			
		||||
use gaps. In order to use them, let’s load a module dedicated to gaps
 | 
			
		||||
in StumpWM:
 | 
			
		||||
#+begin_src lisp
 | 
			
		||||
  (load-module "swm-gaps")
 | 
			
		||||
(load-module "swm-gaps")
 | 
			
		||||
#+end_src
 | 
			
		||||
 | 
			
		||||
Now that this is done, I can now set some variables bound to this
 | 
			
		||||
package.
 | 
			
		||||
#+begin_src lisp
 | 
			
		||||
  (setf swm-gaps:*head-gaps-size*  0
 | 
			
		||||
        swm-gaps:*inner-gaps-size* 5
 | 
			
		||||
        swm-gaps:*outer-gaps-size* 15)
 | 
			
		||||
(setf swm-gaps:*head-gaps-size*  0
 | 
			
		||||
      swm-gaps:*inner-gaps-size* 5
 | 
			
		||||
      swm-gaps:*outer-gaps-size* 15)
 | 
			
		||||
#+end_src
 | 
			
		||||
 | 
			
		||||
Finally, let’s enable our gaps:
 | 
			
		||||
#+begin_src lisp
 | 
			
		||||
  (when *initializing*
 | 
			
		||||
    (swm-gaps:toggle-gaps))
 | 
			
		||||
(when *initializing*
 | 
			
		||||
  (swm-gaps:toggle-gaps))
 | 
			
		||||
#+end_src
 | 
			
		||||
 | 
			
		||||
* Keybinds
 | 
			
		||||
@ -745,7 +745,7 @@ Buckle up, this chapter is going to be *long*, because me loves LOTS of keybinds
 | 
			
		||||
 | 
			
		||||
First, let’s declare again we are using the default package ~stumpwm~:
 | 
			
		||||
#+begin_src lisp
 | 
			
		||||
  (in-package :stumpwm)
 | 
			
		||||
(in-package :stumpwm)
 | 
			
		||||
#+end_src
 | 
			
		||||
 | 
			
		||||
This will avoid us always repeating ~stumpwm:define-key~ or ~stumpwm:kbd~
 | 
			
		||||
@ -785,12 +785,12 @@ it with ~set-prefix-key~. I personally like to have my space key as a
 | 
			
		||||
leader key, but in order to not have it conflict with Emacs, I also
 | 
			
		||||
need to press the super key too.
 | 
			
		||||
#+begin_src lisp
 | 
			
		||||
  (set-prefix-key (kbd "s-SPC"))
 | 
			
		||||
(set-prefix-key (kbd "s-SPC"))
 | 
			
		||||
#+end_src
 | 
			
		||||
 | 
			
		||||
Also, let’s enable ~which-key~:
 | 
			
		||||
#+begin_src lisp
 | 
			
		||||
  (which-key-mode)
 | 
			
		||||
(which-key-mode)
 | 
			
		||||
#+end_src
 | 
			
		||||
 | 
			
		||||
Lastly, before we get more into details, keep in mind that I use the
 | 
			
		||||
@ -843,10 +843,10 @@ First, let’s create my ~rofi~ scripts keymap.
 | 
			
		||||
 | 
			
		||||
Here’s the equivalent in Common Lisp.
 | 
			
		||||
#+begin_src lisp
 | 
			
		||||
  (defvar *my-rofi-keymap*
 | 
			
		||||
    (let ((m (make-sparse-keymap)))
 | 
			
		||||
      <<keybinds-gen(map="m", keybinds=rofi-scripts)>>
 | 
			
		||||
      m))
 | 
			
		||||
(defvar *my-rofi-keymap*
 | 
			
		||||
  (let ((m (make-sparse-keymap)))
 | 
			
		||||
    <<keybinds-gen(map="m", keybinds=rofi-scripts)>>
 | 
			
		||||
    m))
 | 
			
		||||
#+end_src
 | 
			
		||||
 | 
			
		||||
Let’s also create a keymap for screenshots.
 | 
			
		||||
@ -861,10 +861,10 @@ Let’s also create a keymap for screenshots.
 | 
			
		||||
 | 
			
		||||
Here’s the equivalent in Common Lisp.
 | 
			
		||||
#+begin_src lisp
 | 
			
		||||
  (defvar *my-screenshot-keymap*
 | 
			
		||||
    (let ((m (make-sparse-keymap)))
 | 
			
		||||
      <<keybinds-gen(map="m", keybinds=screenshot-keymap)>>
 | 
			
		||||
      m))
 | 
			
		||||
(defvar *my-screenshot-keymap*
 | 
			
		||||
  (let ((m (make-sparse-keymap)))
 | 
			
		||||
    <<keybinds-gen(map="m", keybinds=screenshot-keymap)>>
 | 
			
		||||
    m))
 | 
			
		||||
#+end_src
 | 
			
		||||
 | 
			
		||||
We can now define our applications keymap which will reference both
 | 
			
		||||
@ -883,22 +883,22 @@ the above keymaps.
 | 
			
		||||
 | 
			
		||||
This translates to:
 | 
			
		||||
#+begin_src lisp
 | 
			
		||||
  (defvar *my-applications-keymap*
 | 
			
		||||
    (let ((m (make-sparse-keymap)))
 | 
			
		||||
      <<keybinds-gen(map="m", keybinds=application-keymap)>>
 | 
			
		||||
      m))
 | 
			
		||||
(defvar *my-applications-keymap*
 | 
			
		||||
  (let ((m (make-sparse-keymap)))
 | 
			
		||||
    <<keybinds-gen(map="m", keybinds=application-keymap)>>
 | 
			
		||||
    m))
 | 
			
		||||
#+end_src
 | 
			
		||||
 | 
			
		||||
The application keymap can now be bound to the root map like so:
 | 
			
		||||
#+begin_src lisp
 | 
			
		||||
  (define-key *root-map* (kbd "a") '*my-applications-keymap*)
 | 
			
		||||
(define-key *root-map* (kbd "a") '*my-applications-keymap*)
 | 
			
		||||
#+end_src
 | 
			
		||||
 | 
			
		||||
I will also bind to the top map ~s-RET~ in order to open a new terminal
 | 
			
		||||
window. The screenshot keymap is also bound to the ScreenPrint key.
 | 
			
		||||
#+begin_src lisp
 | 
			
		||||
  (define-key *top-map* (kbd "s-RET") "term")
 | 
			
		||||
  (define-key *top-map* (kbd "Print") '*my-screenshot-keymap*)
 | 
			
		||||
(define-key *top-map* (kbd "s-RET") "term")
 | 
			
		||||
(define-key *top-map* (kbd "Print") '*my-screenshot-keymap*)
 | 
			
		||||
#+end_src
 | 
			
		||||
 | 
			
		||||
** End of Session, Powering Off, and the Likes
 | 
			
		||||
@ -922,15 +922,15 @@ whishes to do.
 | 
			
		||||
 | 
			
		||||
This translates to:
 | 
			
		||||
#+begin_src lisp
 | 
			
		||||
  (defvar *my-end-session-keymap*
 | 
			
		||||
    (let ((m (make-sparse-keymap)))
 | 
			
		||||
      <<keybinds-gen(map="m", keybinds=end-session-keymap)>>
 | 
			
		||||
      m))
 | 
			
		||||
(defvar *my-end-session-keymap*
 | 
			
		||||
  (let ((m (make-sparse-keymap)))
 | 
			
		||||
    <<keybinds-gen(map="m", keybinds=end-session-keymap)>>
 | 
			
		||||
    m))
 | 
			
		||||
#+end_src
 | 
			
		||||
 | 
			
		||||
Which is bound in the root map to ~q~:
 | 
			
		||||
#+begin_src lisp
 | 
			
		||||
  (define-key *root-map* (kbd "q") '*my-end-session-keymap*)
 | 
			
		||||
(define-key *root-map* (kbd "q") '*my-end-session-keymap*)
 | 
			
		||||
#+end_src
 | 
			
		||||
 | 
			
		||||
** Groups
 | 
			
		||||
@ -945,21 +945,18 @@ this:
 | 
			
		||||
#+name: group-keybind-gen
 | 
			
		||||
#+header: :noweb no :results verbatim :exports none :var convert="no"
 | 
			
		||||
#+begin_src emacs-lisp :var groups=list-groups mod="s" action="gselect" map="*top-map*" convert="yes"
 | 
			
		||||
  (mapconcat (lambda (group)
 | 
			
		||||
               (let ((group-nbr (nth 1 group)))
 | 
			
		||||
                 (format "%S" `(define-key
 | 
			
		||||
                                 ,(make-symbol map)
 | 
			
		||||
                                 ;; (kbd ,(if (string= convert "yes")
 | 
			
		||||
                                 ;;           (format "%s-<<num-to-char(num=%s)>>" mod group-nbr)
 | 
			
		||||
                                 ;;         (number-to-string group-nbr)))
 | 
			
		||||
                                 (kbd ,(format "%s-%s"
 | 
			
		||||
                                               mod
 | 
			
		||||
                                               (if (string= "yes" convert)
 | 
			
		||||
                                                   (format "<<num-to-char(num=%s)>>" group-nbr)
 | 
			
		||||
                                                 (number-to-string group-nbr))))
 | 
			
		||||
                                 ,(format "%s %d" action group-nbr)))))
 | 
			
		||||
             groups
 | 
			
		||||
             "\n")
 | 
			
		||||
(mapconcat (lambda (group)
 | 
			
		||||
             (let ((group-nbr (nth 1 group)))
 | 
			
		||||
               (format "%S" `(define-key
 | 
			
		||||
                               ,(make-symbol map)
 | 
			
		||||
                               (kbd ,(format "%s-%s"
 | 
			
		||||
                                             mod
 | 
			
		||||
                                             (if (string= "yes" convert)
 | 
			
		||||
                                                 (format "<<num-to-char(num=%s)>>" group-nbr)
 | 
			
		||||
                                               (number-to-string group-nbr))))
 | 
			
		||||
                               ,(format "%s %d" action group-nbr)))))
 | 
			
		||||
           groups
 | 
			
		||||
           "\n")
 | 
			
		||||
#+end_src
 | 
			
		||||
 | 
			
		||||
#+RESULTS[09b139b0e127a88b3e4e2a05a609ccfcb7825b3c]: group-keybind-gen
 | 
			
		||||
@ -974,7 +971,7 @@ this:
 | 
			
		||||
 | 
			
		||||
#+header: :cache yes :noweb yes :wrap src lisp
 | 
			
		||||
#+begin_src emacs-lisp
 | 
			
		||||
  <<group-keybind-gen(mod="s", action="gselect", convert="yes")>>
 | 
			
		||||
<<group-keybind-gen(mod="s", action="gselect", convert="yes")>>
 | 
			
		||||
#+end_src
 | 
			
		||||
 | 
			
		||||
#+RESULTS[627ef5c7e456944dd624c322529699e11f2a041b]:
 | 
			
		||||
@ -995,7 +992,7 @@ of the group/. As mentioned before, due to my keyboard layout Shift +
 | 
			
		||||
/number/ is actually just /number/ for me (e.g. Shift + ~"~ results in ~1~),
 | 
			
		||||
so there’s no need to convert the group number to another character.
 | 
			
		||||
#+begin_src emacs-lisp :wrap src lisp
 | 
			
		||||
  <<group-keybind-gen(mod="s", action="gmove-and-follow", convert="no")>>
 | 
			
		||||
<<group-keybind-gen(mod="s", action="gmove-and-follow", convert="no")>>
 | 
			
		||||
#+end_src
 | 
			
		||||
 | 
			
		||||
#+RESULTS[6577510905e5cce124ff563a6d68a7f64fc8683c]:
 | 
			
		||||
@ -1012,7 +1009,7 @@ so there’s no need to convert the group number to another character.
 | 
			
		||||
If I want to send a window to another group without following it, I’ll
 | 
			
		||||
use ~s-S-C-<group number>~, which gives us the following:
 | 
			
		||||
#+begin_src emacs-lisp :wrap src lisp
 | 
			
		||||
  <<group-keybind-gen(mod="s-C", action="gmove-and-follow", convert="no")>>
 | 
			
		||||
<<group-keybind-gen(mod="s-C", action="gmove-and-follow", convert="no")>>
 | 
			
		||||
#+end_src
 | 
			
		||||
 | 
			
		||||
#+RESULTS[55852a5a035c23f078ba0a97120151c059fa955f]:
 | 
			
		||||
@ -1029,7 +1026,7 @@ use ~s-S-C-<group number>~, which gives us the following:
 | 
			
		||||
And if I want to bring the windows of another group into the current
 | 
			
		||||
group, I’ll use ~s-C-<group number>~:
 | 
			
		||||
#+begin_src emacs-lisp :wrap src lisp :exports results
 | 
			
		||||
  <<group-keybind-gen(mod="s-C", action="gmove-and-follow", convert="yes")>>
 | 
			
		||||
<<group-keybind-gen(mod="s-C", action="gmove-and-follow", convert="yes")>>
 | 
			
		||||
#+end_src
 | 
			
		||||
 | 
			
		||||
#+RESULTS[b536bb0359e6e9e10e98635c82bed3d348d75ac5]:
 | 
			
		||||
@ -1048,19 +1045,19 @@ StumpWM also has already a nice keymap for managing groups called
 | 
			
		||||
already bound, but since I plan on erasing ~*root-map*~ in the near
 | 
			
		||||
future before binding stuff to it, I prefer to bind it already)
 | 
			
		||||
#+begin_src lisp
 | 
			
		||||
  (define-key *root-map* (kbd "g") '*groups-map*)
 | 
			
		||||
(define-key *root-map* (kbd "g") '*groups-map*)
 | 
			
		||||
#+end_src
 | 
			
		||||
 | 
			
		||||
And a binding to ~vgroups~ is done on ~*groups-map*~ in order to regroup
 | 
			
		||||
similar keybinds.
 | 
			
		||||
#+begin_src lisp
 | 
			
		||||
  (define-key *groups-map* (kbd "G") "vgroups")
 | 
			
		||||
(define-key *groups-map* (kbd "G") "vgroups")
 | 
			
		||||
#+end_src
 | 
			
		||||
 | 
			
		||||
I grew accustomed to ~s-ESC~ bringing me to the previous group when
 | 
			
		||||
using AwesomeWM, so let’s define that:
 | 
			
		||||
#+begin_src lisp
 | 
			
		||||
  (define-key *top-map* (kbd "s-ESC") "gother")
 | 
			
		||||
(define-key *top-map* (kbd "s-ESC") "gother")
 | 
			
		||||
#+end_src
 | 
			
		||||
 | 
			
		||||
** Frames and Windows management
 | 
			
		||||
@ -1125,20 +1122,20 @@ ourselves in ~*my-frames-management-keymap*~, pressing ~F~ will bring us
 | 
			
		||||
in ~*my-frames-float-keymap*~.
 | 
			
		||||
 | 
			
		||||
#+begin_src lisp
 | 
			
		||||
  (defvar *my-frames-float-keymap*
 | 
			
		||||
    (let ((m (make-sparse-keymap)))
 | 
			
		||||
      <<keybinds-gen(map="m", keybinds=frames-float)>>
 | 
			
		||||
      m))
 | 
			
		||||
(defvar *my-frames-float-keymap*
 | 
			
		||||
  (let ((m (make-sparse-keymap)))
 | 
			
		||||
    <<keybinds-gen(map="m", keybinds=frames-float)>>
 | 
			
		||||
    m))
 | 
			
		||||
 | 
			
		||||
  (defvar *my-frames-management-keymap*
 | 
			
		||||
    (let ((m (make-sparse-keymap)))
 | 
			
		||||
      <<keybinds-gen(map="m", keybinds=frames-and-window-management)>>
 | 
			
		||||
      m))
 | 
			
		||||
(defvar *my-frames-management-keymap*
 | 
			
		||||
  (let ((m (make-sparse-keymap)))
 | 
			
		||||
    <<keybinds-gen(map="m", keybinds=frames-and-window-management)>>
 | 
			
		||||
    m))
 | 
			
		||||
#+end_src
 | 
			
		||||
 | 
			
		||||
Let’s bind ~*my-frames-management-keymap*~ in ~*root-keymap*~:
 | 
			
		||||
#+begin_src lisp
 | 
			
		||||
  (define-key *root-map* (kbd "w") '*my-frames-management-keymap*)
 | 
			
		||||
(define-key *root-map* (kbd "w") '*my-frames-management-keymap*)
 | 
			
		||||
#+end_src
 | 
			
		||||
 | 
			
		||||
That way, if we want for instance to split our current frame
 | 
			
		||||
@ -1163,7 +1160,7 @@ I also bound a couple of these functions to the top keymap for easier access:
 | 
			
		||||
 | 
			
		||||
This translates to:
 | 
			
		||||
#+begin_src lisp
 | 
			
		||||
  <<keybinds-gen(map="*top-map*", keybinds=top-window-map)>>
 | 
			
		||||
<<keybinds-gen(map="*top-map*", keybinds=top-window-map)>>
 | 
			
		||||
#+end_src
 | 
			
		||||
 | 
			
		||||
Being a [[https://bepo.fr/wiki/Accueil][bépo layout]] user, the ~hjkl~ keys don’t exactly fit me, as you
 | 
			
		||||
@ -1171,19 +1168,19 @@ might have noticed with my use of ~ctsr~ which is its equivalent. Due to
 | 
			
		||||
this, the interactive keymap for ~iresize~ is not ideal for me, let me
 | 
			
		||||
redefine it:
 | 
			
		||||
#+begin_src lisp
 | 
			
		||||
  (define-interactive-keymap (iresize tile-group) (:on-enter #'setup-iresize
 | 
			
		||||
                                                   :on-exit  #'resize-unhide
 | 
			
		||||
                                                   :abort-if #'abort-resize-p)
 | 
			
		||||
    ((kbd "c") "resize-direction left")
 | 
			
		||||
    ((kbd "t") "resize-direction down")
 | 
			
		||||
    ((kbd "s") "resize-direction up")
 | 
			
		||||
    ((kbd "r") "resize-direction right"))
 | 
			
		||||
(define-interactive-keymap (iresize tile-group) (:on-enter #'setup-iresize
 | 
			
		||||
                                                 :on-exit  #'resize-unhide
 | 
			
		||||
                                                 :abort-if #'abort-resize-p)
 | 
			
		||||
  ((kbd "c") "resize-direction left")
 | 
			
		||||
  ((kbd "t") "resize-direction down")
 | 
			
		||||
  ((kbd "s") "resize-direction up")
 | 
			
		||||
  ((kbd "r") "resize-direction right"))
 | 
			
		||||
#+end_src
 | 
			
		||||
 | 
			
		||||
As with groups management, I grew used to ~s-TAB~ in AwesomeWM bringing
 | 
			
		||||
me back to the previously focused window.
 | 
			
		||||
#+begin_src lisp
 | 
			
		||||
  (define-key *top-map* (kbd "s-TAB") "other-window")
 | 
			
		||||
(define-key *top-map* (kbd "s-TAB") "other-window")
 | 
			
		||||
#+end_src
 | 
			
		||||
 | 
			
		||||
** Windows management
 | 
			
		||||
@ -1206,12 +1203,12 @@ with Emacs’ buffers.
 | 
			
		||||
| ~p~        | ~prev~                    |
 | 
			
		||||
 | 
			
		||||
#+begin_src lisp
 | 
			
		||||
  (defvar *my-buffers-management-keymap*
 | 
			
		||||
    (let ((m (make-sparse-keymap)))
 | 
			
		||||
      <<keybinds-gen(map="m", keybinds=window-management)>>
 | 
			
		||||
      m))
 | 
			
		||||
(defvar *my-buffers-management-keymap*
 | 
			
		||||
  (let ((m (make-sparse-keymap)))
 | 
			
		||||
    <<keybinds-gen(map="m", keybinds=window-management)>>
 | 
			
		||||
    m))
 | 
			
		||||
 | 
			
		||||
  (define-key *root-map* (kbd "b") '*my-buffers-management-keymap*)
 | 
			
		||||
(define-key *root-map* (kbd "b") '*my-buffers-management-keymap*)
 | 
			
		||||
#+end_src
 | 
			
		||||
 | 
			
		||||
** Media and Media Control
 | 
			
		||||
@ -1236,7 +1233,7 @@ of MPD.
 | 
			
		||||
 | 
			
		||||
Cela donne le code suivant:
 | 
			
		||||
#+begin_src lisp
 | 
			
		||||
  <<interactive-gen(name="mpc-interactive", keys=inter-mpc)>>
 | 
			
		||||
<<interactive-gen(name="mpc-interactive", keys=inter-mpc)>>
 | 
			
		||||
#+end_src
 | 
			
		||||
 | 
			
		||||
Another one will be defined for the general audio of my computer. And
 | 
			
		||||
@ -1253,7 +1250,7 @@ for my screen’s backlight.
 | 
			
		||||
| ~m~    | ~exec amixer -q set Master 1+ toggle~  |
 | 
			
		||||
 | 
			
		||||
#+begin_src lisp
 | 
			
		||||
  <<interactive-gen(name="media-interactive", keys=inter-media)>>
 | 
			
		||||
<<interactive-gen(name="media-interactive", keys=inter-media)>>
 | 
			
		||||
#+end_src
 | 
			
		||||
 | 
			
		||||
Then, let’s declare a keymap for our media controls.
 | 
			
		||||
@ -1272,12 +1269,12 @@ Then, let’s declare a keymap for our media controls.
 | 
			
		||||
 | 
			
		||||
Let’s translate this table in CommonLisp:
 | 
			
		||||
#+begin_src lisp
 | 
			
		||||
  (defvar *my-media-keymap*
 | 
			
		||||
    (let ((m (make-sparse-keymap)))
 | 
			
		||||
      <<keybinds-gen(map="m", keybinds=media-management)>>
 | 
			
		||||
      m))
 | 
			
		||||
(defvar *my-media-keymap*
 | 
			
		||||
  (let ((m (make-sparse-keymap)))
 | 
			
		||||
    <<keybinds-gen(map="m", keybinds=media-management)>>
 | 
			
		||||
    m))
 | 
			
		||||
 | 
			
		||||
  (define-key *root-map* (kbd "m") '*my-media-keymap*)
 | 
			
		||||
(define-key *root-map* (kbd "m") '*my-media-keymap*)
 | 
			
		||||
#+end_src
 | 
			
		||||
 | 
			
		||||
I will also define on ~*top-map*~ some basic volume management keybinds
 | 
			
		||||
@ -1298,7 +1295,7 @@ media-related, but I’ll add keybinds for my screen’s backlight.
 | 
			
		||||
| ~XF86MonBrightnessUp~   | ~exec xbacklight -inc 2~               |
 | 
			
		||||
 | 
			
		||||
#+begin_src lisp
 | 
			
		||||
  <<keybinds-gen(map="*top-map*", keybinds=media-top-level)>>
 | 
			
		||||
<<keybinds-gen(map="*top-map*", keybinds=media-top-level)>>
 | 
			
		||||
#+end_src
 | 
			
		||||
 | 
			
		||||
** Misc
 | 
			
		||||
@ -1316,7 +1313,7 @@ anywhere else:
 | 
			
		||||
| ~r~        | ~reload~     |
 | 
			
		||||
 | 
			
		||||
#+begin_src lisp
 | 
			
		||||
  <<keybinds-gen(map="*root-map*", keybinds=misc-root-map)>>
 | 
			
		||||
<<keybinds-gen(map="*root-map*", keybinds=misc-root-map)>>
 | 
			
		||||
#+end_src
 | 
			
		||||
 | 
			
		||||
From time to time, I need to switch between different keyboard
 | 
			
		||||
@ -1330,12 +1327,12 @@ games and the bépo layout most of the time. I’ll use the command
 | 
			
		||||
| ~u~        | ~exec setxkbmap us~            |
 | 
			
		||||
 | 
			
		||||
#+begin_src lisp
 | 
			
		||||
  (defvar *my-keyboard-layout-keymap*
 | 
			
		||||
    (let ((m (make-sparse-keymap)))
 | 
			
		||||
      <<keybinds-gen(map="m", keybinds=keyboard-layout-map)>>
 | 
			
		||||
      m))
 | 
			
		||||
(defvar *my-keyboard-layout-keymap*
 | 
			
		||||
  (let ((m (make-sparse-keymap)))
 | 
			
		||||
    <<keybinds-gen(map="m", keybinds=keyboard-layout-map)>>
 | 
			
		||||
    m))
 | 
			
		||||
 | 
			
		||||
  (define-key *root-map* (kbd "k") '*my-keyboard-layout-keymap*)
 | 
			
		||||
(define-key *root-map* (kbd "k") '*my-keyboard-layout-keymap*)
 | 
			
		||||
#+end_src
 | 
			
		||||
 | 
			
		||||
* org functions                                                    :noexport:
 | 
			
		||||
@ -1345,54 +1342,54 @@ games and the bépo layout most of the time. I’ll use the command
 | 
			
		||||
 | 
			
		||||
#+name: keybinds-gen
 | 
			
		||||
#+begin_src emacs-lisp :var map="m" keybinds=frames-float
 | 
			
		||||
  (mapconcat (lambda (keybind)
 | 
			
		||||
               (format "%s" (let ((key      (let ((s (car keybind)))
 | 
			
		||||
                                              (substring-no-properties s 1 (1- (length s)))))
 | 
			
		||||
                                  (function (let ((s (cadr keybind)))
 | 
			
		||||
                                              (substring-no-properties s 1 (1- (length s))))))
 | 
			
		||||
                              `(define-key ,map
 | 
			
		||||
                                 (kbd ,(format "\"%s\"" key))
 | 
			
		||||
                                 ,(if (string-prefix-p "'" function t)
 | 
			
		||||
                                      function
 | 
			
		||||
                                    (format "\"%s\"" function))))))
 | 
			
		||||
             keybinds
 | 
			
		||||
             "\n")
 | 
			
		||||
(mapconcat (lambda (keybind)
 | 
			
		||||
             (format "%s" (let ((key      (let ((s (car keybind)))
 | 
			
		||||
                                            (substring-no-properties s 1 (1- (length s)))))
 | 
			
		||||
                                (function (let ((s (cadr keybind)))
 | 
			
		||||
                                            (substring-no-properties s 1 (1- (length s))))))
 | 
			
		||||
                            `(define-key ,map
 | 
			
		||||
                               (kbd ,(format "\"%s\"" key))
 | 
			
		||||
                               ,(if (string-prefix-p "'" function t)
 | 
			
		||||
                                    function
 | 
			
		||||
                                  (format "\"%s\"" function))))))
 | 
			
		||||
           keybinds
 | 
			
		||||
           "\n")
 | 
			
		||||
#+end_src
 | 
			
		||||
 | 
			
		||||
#+name: interactive-gen
 | 
			
		||||
#+begin_src emacs-lisp :var name="inter" keys=inter-mpc
 | 
			
		||||
  (format "%s"
 | 
			
		||||
          `(define-interactive-keymap ,name ()
 | 
			
		||||
             "\n "
 | 
			
		||||
             ,(mapconcat (lambda (keybind)
 | 
			
		||||
                           (format "%s"
 | 
			
		||||
                                   (let ((key     (let ((s (car keybind)))
 | 
			
		||||
                                                    (substring-no-properties s
 | 
			
		||||
                                                                             1
 | 
			
		||||
                                                                             (1- (length s)))))
 | 
			
		||||
                                         (command (let ((s (cadr keybind)))
 | 
			
		||||
                                                    (substring-no-properties s
 | 
			
		||||
                                                                             1
 | 
			
		||||
                                                                             (1- (length s))))))
 | 
			
		||||
                                     `((kbd ,(format "\"%s\"" key))
 | 
			
		||||
                                       ,(format "\"%s\"" command)))))
 | 
			
		||||
                         keys
 | 
			
		||||
                         "\n  ")))
 | 
			
		||||
(format "%s"
 | 
			
		||||
        `(define-interactive-keymap ,name ()
 | 
			
		||||
           "\n "
 | 
			
		||||
           ,(mapconcat (lambda (keybind)
 | 
			
		||||
                         (format "%s"
 | 
			
		||||
                                 (let ((key     (let ((s (car keybind)))
 | 
			
		||||
                                                  (substring-no-properties s
 | 
			
		||||
                                                                           1
 | 
			
		||||
                                                                           (1- (length s)))))
 | 
			
		||||
                                       (command (let ((s (cadr keybind)))
 | 
			
		||||
                                                  (substring-no-properties s
 | 
			
		||||
                                                                           1
 | 
			
		||||
                                                                           (1- (length s))))))
 | 
			
		||||
                                   `((kbd ,(format "\"%s\"" key))
 | 
			
		||||
                                     ,(format "\"%s\"" command)))))
 | 
			
		||||
                       keys
 | 
			
		||||
                       "\n  ")))
 | 
			
		||||
#+end_src
 | 
			
		||||
 | 
			
		||||
#+name: num-to-char
 | 
			
		||||
#+begin_src emacs-lisp :var table=number-to-char-table num=0
 | 
			
		||||
  (let ((char (replace-regexp-in-string (regexp-quote "~")
 | 
			
		||||
                                        ""
 | 
			
		||||
                                        (let* ((row (assoc num table))
 | 
			
		||||
                                               (char (cadr row))
 | 
			
		||||
                                               (lispchar (caddr row)))
 | 
			
		||||
                                          (if (string= "" lispchar)
 | 
			
		||||
                                              char
 | 
			
		||||
                                            lispchar)))))
 | 
			
		||||
    (if (string= char "\"")
 | 
			
		||||
        "\\\""
 | 
			
		||||
      char))
 | 
			
		||||
(let ((char (replace-regexp-in-string (regexp-quote "~")
 | 
			
		||||
                                      ""
 | 
			
		||||
                                      (let* ((row (assoc num table))
 | 
			
		||||
                                             (char (cadr row))
 | 
			
		||||
                                             (lispchar (caddr row)))
 | 
			
		||||
                                        (if (string= "" lispchar)
 | 
			
		||||
                                            char
 | 
			
		||||
                                          lispchar)))))
 | 
			
		||||
  (if (string= char "\"")
 | 
			
		||||
      "\\\""
 | 
			
		||||
    char))
 | 
			
		||||
#+end_src
 | 
			
		||||
 | 
			
		||||
#+RESULTS[6934c27c10c3f968f70b0112d4639298e519fe61]: num-to-char
 | 
			
		||||
 | 
			
		||||
@ -24,12 +24,14 @@ Whether if a new *window* will retain the current path. Possible values are:
 | 
			
		||||
#+BEGIN_SRC conf-unix
 | 
			
		||||
tmux_conf_new_window_retain_current_path=true
 | 
			
		||||
#+END_SRC
 | 
			
		||||
 | 
			
		||||
Whether if a new *pane* should retain the current path. Possible values are:
 | 
			
		||||
- ~true~ (default)
 | 
			
		||||
- ~false~
 | 
			
		||||
#+BEGIN_SRC conf-unix
 | 
			
		||||
tmux_conf_new_window_retain_current_path=true
 | 
			
		||||
#+END_SRC
 | 
			
		||||
 | 
			
		||||
Whether or not tmux should attempt to reconnect to the current ssh session. This
 | 
			
		||||
is still experimental. Possible values are:
 | 
			
		||||
- ~true~
 | 
			
		||||
@ -37,6 +39,7 @@ is still experimental. Possible values are:
 | 
			
		||||
#+BEGIN_SRC conf-unix
 | 
			
		||||
tmux_conf_new_pane_reconnect_ssh=true
 | 
			
		||||
#+END_SRC
 | 
			
		||||
 | 
			
		||||
Whether tmux should prompt for new session name when creating a new one.
 | 
			
		||||
Possible values are:
 | 
			
		||||
- ~true~
 | 
			
		||||
@ -56,18 +59,21 @@ Possible values are:
 | 
			
		||||
#+BEGIN_SRC conf-unix
 | 
			
		||||
tmux_conf_theme_24b_colour=false
 | 
			
		||||
#+END_SRC
 | 
			
		||||
 | 
			
		||||
These variables are for chosing the window style. I use the default one.
 | 
			
		||||
#+BEGIN_SRC conf-unix
 | 
			
		||||
  tmux_conf_theme_window_fg='default'
 | 
			
		||||
  tmux_conf_theme_window_bg='default'
 | 
			
		||||
tmux_conf_theme_window_fg='default'
 | 
			
		||||
tmux_conf_theme_window_bg='default'
 | 
			
		||||
#+END_SRC
 | 
			
		||||
 | 
			
		||||
Whether the focused pane should be highlighted (only available in tmux >= 2.1).
 | 
			
		||||
Possible values are:
 | 
			
		||||
- ~true~
 | 
			
		||||
- ~false~ (default)
 | 
			
		||||
#+BEGIN_SRC conf-unix
 | 
			
		||||
  tmux_conf_theme_highlight_focused_pane=false
 | 
			
		||||
tmux_conf_theme_highlight_focused_pane=false
 | 
			
		||||
#+END_SRC
 | 
			
		||||
 | 
			
		||||
Set the terminal title. Built-in variables are:
 | 
			
		||||
- =#{circled_window_index}=
 | 
			
		||||
- =#{circled_session_name}=
 | 
			
		||||
@ -76,16 +82,17 @@ Set the terminal title. Built-in variables are:
 | 
			
		||||
- =#{username}=
 | 
			
		||||
- =#{username_ssh}=
 | 
			
		||||
#+BEGIN_SRC conf-unix
 | 
			
		||||
  tmux_conf_theme_terminal_title='#h ❐ #S ● #I #W'
 | 
			
		||||
tmux_conf_theme_terminal_title='#h ❐ #S ● #I #W'
 | 
			
		||||
#+END_SRC
 | 
			
		||||
 | 
			
		||||
These variables set the left/right separators between sections. With the current
 | 
			
		||||
values, you don’t need to install Powerline, but only fonts patched with
 | 
			
		||||
Powerline symbols or the standalone PowerlineSymbols.otf font.
 | 
			
		||||
#+BEGIN_SRC conf-unix
 | 
			
		||||
  tmux_conf_theme_left_separator_main='\uE0B0'
 | 
			
		||||
  tmux_conf_theme_left_separator_sub='\uE0B1'
 | 
			
		||||
  tmux_conf_theme_right_separator_main='\uE0B2'
 | 
			
		||||
  tmux_conf_theme_right_separator_sub='\uE0B3'
 | 
			
		||||
tmux_conf_theme_left_separator_main='\uE0B0'
 | 
			
		||||
tmux_conf_theme_left_separator_sub='\uE0B1'
 | 
			
		||||
tmux_conf_theme_right_separator_main='\uE0B2'
 | 
			
		||||
tmux_conf_theme_right_separator_sub='\uE0B3'
 | 
			
		||||
#+END_SRC
 | 
			
		||||
 | 
			
		||||
** Colors and style
 | 
			
		||||
@ -103,45 +110,52 @@ Choose the style of the pane borders. Possible values are:
 | 
			
		||||
#+BEGIN_SRC conf-unix
 | 
			
		||||
tmux_conf_theme_pane_border_style=thin
 | 
			
		||||
#+END_SRC
 | 
			
		||||
 | 
			
		||||
Declare what the colors of the focused pane should be. The first variable
 | 
			
		||||
specifies the foreground color, the other the background color.
 | 
			
		||||
#+BEGIN_SRC conf-unix
 | 
			
		||||
  tmux_conf_theme_focused_pane_fg='default'
 | 
			
		||||
  tmux_conf_theme_focused_pane_bg='#0087d7'
 | 
			
		||||
tmux_conf_theme_focused_pane_fg='default'
 | 
			
		||||
tmux_conf_theme_focused_pane_bg='#0087d7'
 | 
			
		||||
#+END_SRC
 | 
			
		||||
 | 
			
		||||
Here you  can set  the colors  of the pane  borders.
 | 
			
		||||
#+BEGIN_SRC conf-unix
 | 
			
		||||
  tmux_conf_theme_pane_border='#444444'
 | 
			
		||||
  tmux_conf_theme_pane_active_border='#00afff'
 | 
			
		||||
tmux_conf_theme_pane_border='#444444'
 | 
			
		||||
tmux_conf_theme_pane_active_border='#00afff'
 | 
			
		||||
#+END_SRC
 | 
			
		||||
 | 
			
		||||
With these variables, you can set the colors for the pane indicators.
 | 
			
		||||
#+BEGIN_SRC conf-unix
 | 
			
		||||
  tmux_conf_theme_pane_indicator='#00afff'
 | 
			
		||||
  tmux_conf_theme_pane_active_indicator='#00afff'
 | 
			
		||||
tmux_conf_theme_pane_indicator='#00afff'
 | 
			
		||||
tmux_conf_theme_pane_active_indicator='#00afff'
 | 
			
		||||
#+END_SRC
 | 
			
		||||
 | 
			
		||||
These variables set the colors and the style of the status line.
 | 
			
		||||
#+BEGIN_SRC conf-unix
 | 
			
		||||
  tmux_conf_theme_message_fg='#000000'
 | 
			
		||||
  tmux_conf_theme_message_bg='#ffff00'
 | 
			
		||||
  tmux_conf_theme_message_attr='bold'
 | 
			
		||||
tmux_conf_theme_message_fg='#000000'
 | 
			
		||||
tmux_conf_theme_message_bg='#ffff00'
 | 
			
		||||
tmux_conf_theme_message_attr='bold'
 | 
			
		||||
#+END_SRC
 | 
			
		||||
 | 
			
		||||
Same as above for the status line command style.
 | 
			
		||||
#+BEGIN_SRC conf-unix
 | 
			
		||||
  tmux_conf_theme_message_command_fg='#ffff00'
 | 
			
		||||
  tmux_conf_theme_message_command_bg='#000000'
 | 
			
		||||
  tmux_conf_theme_message_command_attr='bold'
 | 
			
		||||
tmux_conf_theme_message_command_fg='#ffff00'
 | 
			
		||||
tmux_conf_theme_message_command_bg='#000000'
 | 
			
		||||
tmux_conf_theme_message_command_attr='bold'
 | 
			
		||||
#+END_SRC
 | 
			
		||||
 | 
			
		||||
These variables set the style of the window modes.
 | 
			
		||||
#+BEGIN_SRC conf-unix
 | 
			
		||||
  tmux_conf_theme_mode_fg='#000000'
 | 
			
		||||
  tmux_conf_theme_mode_bg='#ffff00'
 | 
			
		||||
  tmux_conf_theme_mode_attr='bold'
 | 
			
		||||
tmux_conf_theme_mode_fg='#000000'
 | 
			
		||||
tmux_conf_theme_mode_bg='#ffff00'
 | 
			
		||||
tmux_conf_theme_mode_attr='bold'
 | 
			
		||||
#+END_SRC
 | 
			
		||||
 | 
			
		||||
Set the style of the status line.
 | 
			
		||||
#+BEGIN_SRC conf-unix
 | 
			
		||||
  tmux_conf_theme_status_fg='#8a8a8a'
 | 
			
		||||
  tmux_conf_theme_status_bg='#080808'
 | 
			
		||||
  tmux_conf_theme_status_attr='none'
 | 
			
		||||
tmux_conf_theme_status_fg='#8a8a8a'
 | 
			
		||||
tmux_conf_theme_status_bg='#080808'
 | 
			
		||||
tmux_conf_theme_status_attr='none'
 | 
			
		||||
#+END_SRC
 | 
			
		||||
 | 
			
		||||
** Window status bar
 | 
			
		||||
@ -152,10 +166,11 @@ The following variables are to set the window’s status style and format.
 | 
			
		||||
 | 
			
		||||
Sets the colors and style of the window status.
 | 
			
		||||
#+BEGIN_SRC conf-unix
 | 
			
		||||
  tmux_conf_theme_window_status_fg='#8a8a8a'
 | 
			
		||||
  tmux_conf_theme_window_status_bg='#080808'
 | 
			
		||||
  tmux_conf_theme_window_status_attr='none'
 | 
			
		||||
tmux_conf_theme_window_status_fg='#8a8a8a'
 | 
			
		||||
tmux_conf_theme_window_status_bg='#080808'
 | 
			
		||||
tmux_conf_theme_window_status_attr='none'
 | 
			
		||||
#+END_SRC
 | 
			
		||||
 | 
			
		||||
Sets the format of the window status. Built-in variables are:
 | 
			
		||||
- =#{circled_window_index}=
 | 
			
		||||
- =#{circled_session_name}=
 | 
			
		||||
@ -166,12 +181,14 @@ Sets the format of the window status. Built-in variables are:
 | 
			
		||||
#+BEGIN_SRC conf-unix
 | 
			
		||||
tmux_conf_theme_window_status_format='#I #W'
 | 
			
		||||
#+END_SRC
 | 
			
		||||
 | 
			
		||||
Sets the colors and style of the current window status.
 | 
			
		||||
#+BEGIN_SRC conf-unix
 | 
			
		||||
  tmux_conf_theme_window_status_current_fg='#000000'
 | 
			
		||||
  tmux_conf_theme_window_status_current_bg='#00afff'
 | 
			
		||||
  tmux_conf_theme_window_status_current_attr='bold'
 | 
			
		||||
tmux_conf_theme_window_status_current_fg='#000000'
 | 
			
		||||
tmux_conf_theme_window_status_current_bg='#00afff'
 | 
			
		||||
tmux_conf_theme_window_status_current_attr='bold'
 | 
			
		||||
#+END_SRC
 | 
			
		||||
 | 
			
		||||
Sets the format of the currentwindow status. Built-in variables are:
 | 
			
		||||
- =#{circled_window_index}=
 | 
			
		||||
- =#{circled_session_name}=
 | 
			
		||||
@ -180,26 +197,30 @@ Sets the format of the currentwindow status. Built-in variables are:
 | 
			
		||||
- =#{username}=
 | 
			
		||||
- =#{username_ssh}=
 | 
			
		||||
#+BEGIN_SRC conf-unix
 | 
			
		||||
  tmux_conf_theme_window_status_current_format='#I #W'
 | 
			
		||||
tmux_conf_theme_window_status_current_format='#I #W'
 | 
			
		||||
#+END_SRC
 | 
			
		||||
Sets the window activity status style.
 | 
			
		||||
 | 
			
		||||
#+BEGIN_SRC conf-unix
 | 
			
		||||
  tmux_conf_theme_window_status_activity_fg='default'
 | 
			
		||||
  tmux_conf_theme_window_status_activity_bg='default'
 | 
			
		||||
  tmux_conf_theme_window_status_activity_attr='underscore'
 | 
			
		||||
tmux_conf_theme_window_status_activity_fg='default'
 | 
			
		||||
tmux_conf_theme_window_status_activity_bg='default'
 | 
			
		||||
tmux_conf_theme_window_status_activity_attr='underscore'
 | 
			
		||||
#+END_SRC
 | 
			
		||||
 | 
			
		||||
Sets the window bell status style.
 | 
			
		||||
#+BEGIN_SRC conf-unix
 | 
			
		||||
  tmux_conf_theme_window_status_bell_fg='#ffff00'
 | 
			
		||||
  tmux_conf_theme_window_status_bell_bg='default'
 | 
			
		||||
  tmux_conf_theme_window_status_bell_attr='blink,bold'
 | 
			
		||||
tmux_conf_theme_window_status_bell_fg='#ffff00'
 | 
			
		||||
tmux_conf_theme_window_status_bell_bg='default'
 | 
			
		||||
tmux_conf_theme_window_status_bell_attr='blink,bold'
 | 
			
		||||
#+END_SRC
 | 
			
		||||
 | 
			
		||||
Sets the window last status style.
 | 
			
		||||
#+BEGIN_SRC conf-unix
 | 
			
		||||
  tmux_conf_theme_window_status_last_fg='#00afff'
 | 
			
		||||
  tmux_conf_theme_window_status_last_bg='default'
 | 
			
		||||
  tmux_conf_theme_window_status_last_attr='none'
 | 
			
		||||
tmux_conf_theme_window_status_last_fg='#00afff'
 | 
			
		||||
tmux_conf_theme_window_status_last_bg='default'
 | 
			
		||||
tmux_conf_theme_window_status_last_attr='none'
 | 
			
		||||
#+END_SRC
 | 
			
		||||
 | 
			
		||||
Sets the left and right content of the status bar of tmux. Sections should be
 | 
			
		||||
separated with =|=, subsections with =,=. The built-in values are:
 | 
			
		||||
- =#{battery_bar}=
 | 
			
		||||
@ -223,100 +244,112 @@ separated with =|=, subsections with =,=. The built-in values are:
 | 
			
		||||
- =#{username}=
 | 
			
		||||
- =#{username_ssh}=
 | 
			
		||||
#+BEGIN_SRC conf-unix
 | 
			
		||||
  tmux_conf_theme_status_left=' ❐ #S | ↑#{?uptime_y, #{uptime_y}y,}#{?uptime_d, #{uptime_d}d,}#{?uptime_h, #{uptime_h}h,}#{?uptime_m, #{uptime_m}m,} '
 | 
			
		||||
  tmux_conf_theme_status_right='#{prefix}#{pairing}#{synchronized} #{?battery_status, #{battery_status},}#{?battery_bar, #{battery_bar},}#{?battery_percentage, #{battery_percentage},} , %R , %d %b | #{username}#{root} | #{hostname} '
 | 
			
		||||
tmux_conf_theme_status_left=' ❐ #S | ↑#{?uptime_y, #{uptime_y}y,}#{?uptime_d, #{uptime_d}d,}#{?uptime_h, #{uptime_h}h,}#{?uptime_m, #{uptime_m}m,} '
 | 
			
		||||
tmux_conf_theme_status_right='#{prefix}#{pairing}#{synchronized} #{?battery_status, #{battery_status},}#{?battery_bar, #{battery_bar},}#{?battery_percentage, #{battery_percentage},} , %R , %d %b | #{username}#{root} | #{hostname} '
 | 
			
		||||
#+END_SRC
 | 
			
		||||
 | 
			
		||||
Sets the left status style and colors.
 | 
			
		||||
#+BEGIN_SRC conf-unix
 | 
			
		||||
  tmux_conf_theme_status_left_fg='#000000,#e4e4e4,#e4e4e4'
 | 
			
		||||
  tmux_conf_theme_status_left_bg='#ffff00,#ff00af,#00afff'
 | 
			
		||||
  tmux_conf_theme_status_left_attr='bold,none,none'
 | 
			
		||||
tmux_conf_theme_status_left_fg='#000000,#e4e4e4,#e4e4e4'
 | 
			
		||||
tmux_conf_theme_status_left_bg='#ffff00,#ff00af,#00afff'
 | 
			
		||||
tmux_conf_theme_status_left_attr='bold,none,none'
 | 
			
		||||
#+END_SRC
 | 
			
		||||
 | 
			
		||||
Sets the right status style and colors.
 | 
			
		||||
#+BEGIN_SRC conf-unix
 | 
			
		||||
  tmux_conf_theme_status_right_fg='#8a8a8a,#e4e4e4,#000000'
 | 
			
		||||
  tmux_conf_theme_status_right_bg='#080808,#d70000,#e4e4e4'
 | 
			
		||||
  tmux_conf_theme_status_right_attr='none,none,bold'
 | 
			
		||||
tmux_conf_theme_status_right_fg='#8a8a8a,#e4e4e4,#000000'
 | 
			
		||||
tmux_conf_theme_status_right_bg='#080808,#d70000,#e4e4e4'
 | 
			
		||||
tmux_conf_theme_status_right_attr='none,none,bold'
 | 
			
		||||
#+END_SRC
 | 
			
		||||
 | 
			
		||||
Set the pairing indicator, its style and its attribute.
 | 
			
		||||
#+BEGIN_SRC conf-unix
 | 
			
		||||
  tmux_conf_theme_pairing='👓 '          # U+1F453
 | 
			
		||||
  tmux_conf_theme_pairing_fg='none'
 | 
			
		||||
  tmux_conf_theme_pairing_bg='none'
 | 
			
		||||
  tmux_conf_theme_pairing_attr='none'
 | 
			
		||||
tmux_conf_theme_pairing='👓 '          # U+1F453
 | 
			
		||||
tmux_conf_theme_pairing_fg='none'
 | 
			
		||||
tmux_conf_theme_pairing_bg='none'
 | 
			
		||||
tmux_conf_theme_pairing_attr='none'
 | 
			
		||||
#+END_SRC
 | 
			
		||||
 | 
			
		||||
Set the pairing indicator, its style and its attribute.
 | 
			
		||||
#+BEGIN_SRC conf-unix
 | 
			
		||||
  # prefix indicator
 | 
			
		||||
  tmux_conf_theme_prefix='⌨ '            # U+2328
 | 
			
		||||
  tmux_conf_theme_prefix_fg='none'
 | 
			
		||||
  tmux_conf_theme_prefix_bg='none'
 | 
			
		||||
  tmux_conf_theme_prefix_attr='none'
 | 
			
		||||
tmux_conf_theme_prefix='⌨ '            # U+2328
 | 
			
		||||
tmux_conf_theme_prefix_fg='none'
 | 
			
		||||
tmux_conf_theme_prefix_bg='none'
 | 
			
		||||
tmux_conf_theme_prefix_attr='none'
 | 
			
		||||
#+END_SRC
 | 
			
		||||
 | 
			
		||||
Set the root indicator, its style and its attribute.
 | 
			
		||||
#+BEGIN_SRC conf-unix
 | 
			
		||||
  tmux_conf_theme_root='!'
 | 
			
		||||
  tmux_conf_theme_root_fg='none'
 | 
			
		||||
  tmux_conf_theme_root_bg='none'
 | 
			
		||||
  tmux_conf_theme_root_attr='bold,blink'
 | 
			
		||||
tmux_conf_theme_root='!'
 | 
			
		||||
tmux_conf_theme_root_fg='none'
 | 
			
		||||
tmux_conf_theme_root_bg='none'
 | 
			
		||||
tmux_conf_theme_root_attr='bold,blink'
 | 
			
		||||
#+END_SRC
 | 
			
		||||
 | 
			
		||||
Set the synchronized indicator, its style and its attribute.
 | 
			
		||||
#+BEGIN_SRC conf-unix
 | 
			
		||||
  tmux_conf_theme_synchronized='🔒'     # U+1F512
 | 
			
		||||
  tmux_conf_theme_synchronized_fg='none'
 | 
			
		||||
  tmux_conf_theme_synchronized_bg='none'
 | 
			
		||||
  tmux_conf_theme_synchronized_attr='none'
 | 
			
		||||
tmux_conf_theme_synchronized='🔒'     # U+1F512
 | 
			
		||||
tmux_conf_theme_synchronized_fg='none'
 | 
			
		||||
tmux_conf_theme_synchronized_bg='none'
 | 
			
		||||
tmux_conf_theme_synchronized_attr='none'
 | 
			
		||||
#+END_SRC
 | 
			
		||||
 | 
			
		||||
Set the battery bar symbols.
 | 
			
		||||
#+BEGIN_SRC conf-unix
 | 
			
		||||
  tmux_conf_battery_bar_symbol_full='◼'
 | 
			
		||||
  tmux_conf_battery_bar_symbol_empty='◻'
 | 
			
		||||
tmux_conf_battery_bar_symbol_full='◼'
 | 
			
		||||
tmux_conf_battery_bar_symbol_empty='◻'
 | 
			
		||||
#+END_SRC
 | 
			
		||||
 | 
			
		||||
Set the battery bar length in terms of amount of symbols. Possible values are:
 | 
			
		||||
- =auto=
 | 
			
		||||
- an integer number, e.g. 5
 | 
			
		||||
#+BEGIN_SRC conf-unix
 | 
			
		||||
  tmux_conf_battery_bar_length='auto'
 | 
			
		||||
tmux_conf_battery_bar_length='auto'
 | 
			
		||||
#+END_SRC
 | 
			
		||||
 | 
			
		||||
Set the battery bar palette. Possible values are:
 | 
			
		||||
- =gradient= (default)
 | 
			
		||||
- =heat=
 | 
			
		||||
- =color_full_fg,color_empty_fg,color_bg= with each being an hexadecimal RGB
 | 
			
		||||
  value preceded by a pound symbol =#=.
 | 
			
		||||
#+BEGIN_SRC conf-unix
 | 
			
		||||
  tmux_conf_battery_bar_palette='gradient'
 | 
			
		||||
  #tmux_conf_battery_bar_palette='#d70000,#e4e4e4,#000000'
 | 
			
		||||
tmux_conf_battery_bar_palette='gradient'
 | 
			
		||||
#tmux_conf_battery_bar_palette='#d70000,#e4e4e4,#000000'
 | 
			
		||||
#+END_SRC
 | 
			
		||||
 | 
			
		||||
Set the hbar palette. Possible values are:
 | 
			
		||||
- =gradient= (default)
 | 
			
		||||
- =heat=
 | 
			
		||||
- =color_full_fg,color_empty_fg,color_bg= with each being an hexadecimal RGB
 | 
			
		||||
  value preceded by a pound symbol =#=.
 | 
			
		||||
#+BEGIN_SRC conf-unix
 | 
			
		||||
  tmux_conf_battery_hbar_palette='gradient'
 | 
			
		||||
tmux_conf_battery_hbar_palette='gradient'
 | 
			
		||||
#+END_SRC
 | 
			
		||||
 | 
			
		||||
Set the vbar palette. Possible values are:
 | 
			
		||||
- =gradient= (default)
 | 
			
		||||
- =heat=
 | 
			
		||||
- =color_full_fg,color_empty_fg,color_bg= with each being an hexadecimal RGB
 | 
			
		||||
  value preceded by a pound symbol =#=.
 | 
			
		||||
#+BEGIN_SRC conf-unix
 | 
			
		||||
  tmux_conf_battery_vbar_palette='gradient'
 | 
			
		||||
tmux_conf_battery_vbar_palette='gradient'
 | 
			
		||||
#+END_SRC
 | 
			
		||||
Set symbols used to indicate whether the battery is charging or discharging.
 | 
			
		||||
 | 
			
		||||
#+BEGIN_SRC conf-unix
 | 
			
		||||
  tmux_conf_battery_status_charging='⚡ '    # U+26A1
 | 
			
		||||
  tmux_conf_battery_status_discharging='🔋 ' # U+1F50B
 | 
			
		||||
  # tmux_conf_battery_status_charging='↑'       # U+2191
 | 
			
		||||
  # tmux_conf_battery_status_discharging='↓'    # U+2193
 | 
			
		||||
  #tmux_conf_battery_status_charging='🔌 '    # U+1F50C
 | 
			
		||||
tmux_conf_battery_status_charging='⚡ '    # U+26A1
 | 
			
		||||
tmux_conf_battery_status_discharging='🔋 ' # U+1F50B
 | 
			
		||||
# tmux_conf_battery_status_charging='↑'       # U+2191
 | 
			
		||||
# tmux_conf_battery_status_discharging='↓'    # U+2193
 | 
			
		||||
#tmux_conf_battery_status_charging='🔌 '    # U+1F50C
 | 
			
		||||
#+END_SRC
 | 
			
		||||
 | 
			
		||||
Set the clock style. If it is displayed on the right side of the status bar, it
 | 
			
		||||
might be better to use =%I:%M %p= rather than =%R= in
 | 
			
		||||
=tmux_conf_theme_status_right=.
 | 
			
		||||
#+BEGIN_SRC conf-unix
 | 
			
		||||
  tmux_conf_theme_clock_colour='#00afff'
 | 
			
		||||
  tmux_conf_theme_clock_style='24'
 | 
			
		||||
tmux_conf_theme_clock_colour='#00afff'
 | 
			
		||||
tmux_conf_theme_clock_style='24'
 | 
			
		||||
#+END_SRC
 | 
			
		||||
 | 
			
		||||
* Clipboard
 | 
			
		||||
@ -328,7 +361,7 @@ Possible values are:
 | 
			
		||||
- ~true~
 | 
			
		||||
- ~false~ (default)
 | 
			
		||||
#+BEGIN_SRC conf-unix
 | 
			
		||||
  tmux_conf_copy_to_os_clipboard=false
 | 
			
		||||
tmux_conf_copy_to_os_clipboard=false
 | 
			
		||||
#+END_SRC
 | 
			
		||||
 | 
			
		||||
* User customizations
 | 
			
		||||
@ -338,29 +371,33 @@ Possible values are:
 | 
			
		||||
Here we can override or undo some setting from settings from tmux. First, we can
 | 
			
		||||
increase the history size.
 | 
			
		||||
#+BEGIN_SRC conf-unix
 | 
			
		||||
  set -g history-limit 10000
 | 
			
		||||
set -g history-limit 10000
 | 
			
		||||
#+END_SRC
 | 
			
		||||
 | 
			
		||||
We can also start with mouse mode enabled. But I don’t.
 | 
			
		||||
#+BEGIN_SRC conf-unix
 | 
			
		||||
  #set -g mouse on
 | 
			
		||||
#set -g mouse on
 | 
			
		||||
#+END_SRC
 | 
			
		||||
 | 
			
		||||
Whether or not Vi mode should be enabled. But really, we should rather export
 | 
			
		||||
the =VISUAL= or =EDITOR= environment variables, see the tmux manual. Although I
 | 
			
		||||
don’t, as said in my dotfish, I prefer to use Emacs.
 | 
			
		||||
#+BEGIN_SRC conf-unix
 | 
			
		||||
  #set -g status-keys vi
 | 
			
		||||
  #set -g mode-keys vi
 | 
			
		||||
#set -g status-keys vi
 | 
			
		||||
#set -g mode-keys vi
 | 
			
		||||
#+END_SRC
 | 
			
		||||
 | 
			
		||||
Replace =C-b= by =C-a= instead of using both prefixes. I personally prefer to
 | 
			
		||||
just use =C-b=, hence why the lines are commented.
 | 
			
		||||
#+BEGIN_SRC conf-unix
 | 
			
		||||
  # set -gu prefix2
 | 
			
		||||
  # unbind C-a
 | 
			
		||||
  # unbind C-b
 | 
			
		||||
  # set -g prefix C-a
 | 
			
		||||
  # bind C-a send-prefix
 | 
			
		||||
# set -gu prefix2
 | 
			
		||||
# unbind C-a
 | 
			
		||||
# unbind C-b
 | 
			
		||||
# set -g prefix C-a
 | 
			
		||||
# bind C-a send-prefix
 | 
			
		||||
#+END_SRC
 | 
			
		||||
 | 
			
		||||
Move the status line to the top.
 | 
			
		||||
#+BEGIN_SRC conf-unix
 | 
			
		||||
  #set -g status-position top
 | 
			
		||||
#set -g status-position top
 | 
			
		||||
#+END_SRC
 | 
			
		||||
 | 
			
		||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user