literate-dotfiles/install.org

973 lines
26 KiB
Org Mode
Raw Normal View History

2019-01-31 09:41:03 +01:00
#+TITLE: Installation
2021-01-01 20:12:34 +01:00
#+SETUPFILE: ./setup/org-setup-file.org
2019-01-31 09:41:03 +01:00
2022-02-06 21:43:01 +01:00
* TODO [#A] Issues to handle
2020-03-19 10:46:47 +01:00
2021-01-03 22:52:53 +01:00
* =git= - Version Control System
2020-03-19 10:46:47 +01:00
2021-01-03 22:52:53 +01:00
Installation:
2020-03-19 10:46:47 +01:00
#+begin_src bash
2022-02-06 21:43:01 +01:00
sudo apt install git
2020-03-19 10:46:47 +01:00
#+end_src
[[file:git.org][Git]] Configuration:
- =~/.gitconfig=
- =~/.gitignore_global=
2021-05-13 18:55:54 +02:00
* =alacritty= - Terminal
[[https://github.com/alacritty/alacritty][Alacritty]] is a very nice keyboard-centric terminal.
2021-01-03 22:52:53 +01:00
It can be installed like so:
2020-03-19 10:46:47 +01:00
#+begin_src bash
2022-02-06 21:43:01 +01:00
sudo add-apt-repository ppa:aslatter/ppa
sudo apt install alacritty
2020-03-19 10:46:47 +01:00
#+end_src
2021-05-13 18:55:54 +02:00
Its configuration file is described [[file:alacritty.org][here]].
2020-03-19 10:46:47 +01:00
2021-05-13 18:55:54 +02:00
#+caption: =alacritty= - Cheatsheet
2020-11-03 11:40:11 +01:00
| Command | Usage |
|--------------------+-------------------------|
| =ctrl-shift-x= | activate url hints mode |
| =ctrl-shift-c= | copy to CLIPBOARD |
| =ctrl-shift-v= | paste from CLIPBOARD |
| =ctrl-shift-space= | start selection mode |
| =ctrl += | increase font size |
| =ctrl -= | decrease font size |
2020-03-19 10:46:47 +01:00
2021-01-03 22:52:53 +01:00
* =bash= - Shell
2020-03-19 10:46:47 +01:00
https://wiki.archlinux.org/index.php/Bash
2021-01-03 22:52:53 +01:00
Installation:
2020-03-19 10:46:47 +01:00
#+begin_src bash
2022-02-06 21:43:01 +01:00
sudo apt install bash bash-completion zsh
2020-03-19 10:46:47 +01:00
#+end_src
[[file:bash.org][Bash]] configuration:
- =~/.bashrc=
- =~/.bash_profile=
- =~/.config/bash/=
- =~/.profile=
2021-01-03 22:52:53 +01:00
* =tmux= - Terminal Multiplexer
2020-03-19 10:46:47 +01:00
https://github.com/tmux/tmux
2021-01-03 22:52:53 +01:00
Installation:
2020-03-19 10:46:47 +01:00
#+begin_src bash
2022-02-06 21:43:01 +01:00
sudo apt install tmux
2020-03-19 10:46:47 +01:00
#+end_src
[[file:tmux.org][TMUX]] configuration
2021-01-03 22:52:53 +01:00
Ressources:
2020-03-19 10:46:47 +01:00
- https://github.com/gpakosz/.tmux
- https://gist.github.com/MohamedAlaa/2961058
- https://blog.bugsnag.com/tmux-and-vim/
- https://github.com/tmux-plugins/tmux-resurrect
- https://github.com/rothgar/awesome-tmux
- https://thoughtbot.com/upcase/tmux
2021-01-03 22:52:53 +01:00
#+caption: =tmux= - Cheatsheet
2020-03-19 10:46:47 +01:00
| Command | Usage |
|----------------+-------------------------------|
| =ctrl-spc= | Prefix |
| =c= | New pane |
| =/=, =-= | Split Vertically/Horizontally |
| =s= | Change session |
| =p=, =n= | Previous/Next Pane |
| =ctrl-h,j,k,l= | Move between windows |
* Fonts
2021-01-03 22:52:53 +01:00
My font of choice is =nerd-fonts-hack= which can be installed as so:
2020-03-19 10:46:47 +01:00
#+begin_src bash
2022-02-06 21:43:01 +01:00
git clone --depth 1 https://github.com/ryanoasis/nerd-fonts
cd nerd-fonts
./install.sh Hack
2020-03-19 10:46:47 +01:00
#+end_src
2021-01-03 22:52:53 +01:00
For emojis, use:
2020-03-19 10:46:47 +01:00
#+begin_src bash
2022-02-06 21:43:01 +01:00
sudo apt install fonts-noto-color-emoji
2020-03-19 10:46:47 +01:00
#+end_src
Default font used:
2021-04-25 19:10:57 +02:00
2020-03-19 10:46:47 +01:00
- Monospace Font: =Hack Nerd Font Mono=
- Serif Font: =Hack Nerd Font=
- Sans Font: =Hack Nerd Font=
2021-01-03 22:52:53 +01:00
To list all fonts available:
#+begin_src bash
2022-02-06 21:43:01 +01:00
fc-list
2021-01-03 22:52:53 +01:00
#+end_src
2020-03-19 10:46:47 +01:00
2022-02-06 21:43:01 +01:00
* TODO Syncthing
https://leandeep.com/installer-syncthing-sur-ubuntu-20.04/
2020-03-19 10:46:47 +01:00
2021-01-03 22:52:53 +01:00
* =emacs= and =vim= - Text Editors
2020-03-19 10:46:47 +01:00
** Neovim
2021-01-03 22:52:53 +01:00
I use [[https://github.com/neovim/neovim][Neovim]] for all the small edits.
2020-03-19 10:46:47 +01:00
2021-01-03 22:52:53 +01:00
Installation:
2020-03-19 10:46:47 +01:00
#+begin_src bash
2022-02-06 21:43:01 +01:00
sudo apt install neovim
2020-03-19 10:46:47 +01:00
#+end_src
2021-01-03 22:52:53 +01:00
The Neovim configuration can be found [[file:vim.org][here]].
2022-02-06 21:43:01 +01:00
Simlink the Vim config to Neovim:
#+begin_src bash
mkdir ~/.config/nvim
ln -s ~/.vimrc ~/.config/nvim/init.vim
#+end_src
2021-01-03 22:52:53 +01:00
Then install the plugin manager [[https://github.com/junegunn/vim-plug][plug]]:
#+begin_src bash
2022-02-06 21:43:01 +01:00
sh -c 'curl -fLo "${XDG_DATA_HOME:-$HOME/.local/share}"/nvim/site/autoload/plug.vim --create-dirs https://raw.githubusercontent.com/junegunn/vim-plug/master/plug.vim'
2021-01-03 22:52:53 +01:00
#+end_src
And to install/setup all the plugins:
#+begin_src bash
2022-02-06 21:43:01 +01:00
nvim +PlugInstall
#+end_src
#+begin_src bash
nvim +UpdateRemotePlugins
2021-01-03 22:52:53 +01:00
#+end_src
2020-03-19 10:46:47 +01:00
** Emacs
2021-01-03 22:52:53 +01:00
I use [[https://www.gnu.org/software/emacs/][Emacs]] and the [[https://github.com/hlissner/doom-emacs][Doom]] framework.
2020-03-19 10:46:47 +01:00
2021-01-03 22:52:53 +01:00
Install Emacs:
2020-03-19 10:46:47 +01:00
#+begin_src bash
2022-02-06 21:43:01 +01:00
sudo snap install emacs --edge --classic
2020-03-19 10:46:47 +01:00
#+end_src
2021-01-03 22:52:53 +01:00
And then the Doom framework:
#+begin_src bash
2022-02-06 21:43:01 +01:00
git clone --depth 1 https://github.com/hlissner/doom-emacs ~/.emacs.d
#+end_src
#+begin_src bash
~/.emacs.d/bin/doom install
2021-01-03 22:52:53 +01:00
#+end_src
2020-03-19 10:46:47 +01:00
2021-01-03 22:52:53 +01:00
The Emacs configuration can be found [[./doom.org][here]].
SpellCheck with Aspell:
2020-03-19 10:46:47 +01:00
#+begin_src bash
2022-02-06 21:43:01 +01:00
sudo apt install aspell aspell-en aspell-fr
2020-03-19 10:46:47 +01:00
#+end_src
* SSH setup
2021-01-03 22:52:53 +01:00
Generate a new SSH key:
2020-03-19 10:46:47 +01:00
#+begin_src bash
2022-02-06 21:43:01 +01:00
ssh-keygen -t rsa -b 4096 -C "dehaeze.thomas@gmail.com"
2020-03-19 10:46:47 +01:00
#+end_src
2021-01-03 22:52:53 +01:00
Start the ssh-agent in the background:
2020-03-19 10:46:47 +01:00
#+begin_src bash
2022-02-06 21:43:01 +01:00
eval "$(ssh-agent -s)"
2020-03-19 10:46:47 +01:00
#+end_src
2021-01-03 22:52:53 +01:00
Add the SSH key to the ssh-agent:
2020-03-19 10:46:47 +01:00
#+begin_src bash
2022-02-06 21:43:01 +01:00
ssh-add ~/.ssh/id_rsa
2020-03-19 10:46:47 +01:00
#+end_src
* GnuPG
https://gnupg.org/
2021-01-03 22:52:53 +01:00
Install the gnupg package:
2020-03-19 10:46:47 +01:00
#+begin_src bash
2022-02-06 21:43:01 +01:00
sudo apt install gnupg
2020-03-19 10:46:47 +01:00
#+end_src
2021-01-03 22:52:53 +01:00
Create a key pair:
2020-03-19 10:46:47 +01:00
#+begin_src bash
2022-02-06 21:43:01 +01:00
gpg --full-gen-key
2020-03-19 10:46:47 +01:00
#+end_src
2021-01-03 22:52:53 +01:00
To configure the =gpg-agent= to cache the passphrase, edit the following file =~/.gnupg/gpg-agent.conf=:
2020-03-19 10:46:47 +01:00
#+begin_src conf
2022-02-06 21:43:01 +01:00
default-cache-ttl 60480000
max-cache-ttl 60480000
2020-03-19 10:46:47 +01:00
#+end_src
2021-01-03 22:52:53 +01:00
Install =Gnome-Keyring= to automatically unlock the GnuPG keys:
2020-03-19 10:46:47 +01:00
#+begin_src bash
2022-02-06 21:43:01 +01:00
sudo apt install gnome-keyring
2020-03-19 10:46:47 +01:00
#+end_src
2021-01-03 22:52:53 +01:00
* =rofi= - Application Launcher
[[https://github.com/DaveDavenport/rofi][Rofi]] is a very nice alternative to [[https://tools.suckless.org/dmenu/][dmenu]].
2020-03-19 10:46:47 +01:00
2021-01-03 22:52:53 +01:00
Installation:
#+begin_src bash
2022-02-06 21:43:01 +01:00
sudo apt install dmenu rofi
2021-01-03 22:52:53 +01:00
#+end_src
2020-03-19 10:46:47 +01:00
2021-01-03 22:52:53 +01:00
To be able to run sudo commands with =rofi= ([[https://github.com/DaveDavenport/rofi/issues/584#issuecomment-384555551][github issue]]), the command =sudo -A= can be used: it opens a =rofi= prompt to ask for the password.
2020-03-19 10:46:47 +01:00
For that to work, we need to add the following code to =~/.profile=:
#+begin_src bash
2022-02-06 21:43:01 +01:00
export SUDO_ASKPASS=~/.local/bin/askpass-rofi
2020-03-19 10:46:47 +01:00
#+end_src
2022-02-06 21:43:01 +01:00
The =askpass-rofi= script is:
2020-03-19 10:46:47 +01:00
#+begin_src bash
2022-02-06 21:43:01 +01:00
#!/bin/sh
2020-03-19 10:46:47 +01:00
2022-02-06 21:43:01 +01:00
rofi -dmenu \
-password \
-no-fixed-num-lines \
-p "$(printf "$1" | sed s/://)"
2020-03-19 10:46:47 +01:00
#+end_src
2021-01-03 22:52:53 +01:00
* =pass= - Password Manager
2020-03-19 10:46:47 +01:00
https://www.passwordstore.org/
2021-01-03 22:52:53 +01:00
Installation:
2020-03-19 10:46:47 +01:00
#+begin_src bash
2022-02-06 21:43:01 +01:00
sudo apt install pass
2020-03-19 10:46:47 +01:00
#+end_src
#+begin_src bash
2022-02-06 21:43:01 +01:00
git clone https://git.tdehaeze.xyz/tdehaeze/pass.git ~/.password-store
2020-03-19 10:46:47 +01:00
#+end_src
2021-01-03 22:52:53 +01:00
Gui Manager: [[https://github.com/IJHack/qtpass][qtpass]]
2020-03-19 10:46:47 +01:00
#+begin_src bash
2022-02-06 21:43:01 +01:00
sudo apt install qtpass
2020-03-19 10:46:47 +01:00
#+end_src
2021-01-03 22:52:53 +01:00
Integration with Rofi: [[https://github.com/carnager/rofi-pass][rofi-pass]]
2020-03-19 10:46:47 +01:00
#+begin_src bash
2022-02-06 21:43:01 +01:00
cd ~/.local/soft/
git clone https://github.com/carnager/rofi-pass
cd rofi-pass
sudo make install
2020-03-19 10:46:47 +01:00
#+end_src
Then we can add a shortcut to =rofi-pass= on i3 config.
2021-01-03 22:52:53 +01:00
Integration with Git: [[https://github.com/languitar/pass-git-helper][pass-git-helper]]
2020-03-19 10:46:47 +01:00
#+begin_src bash
2022-02-06 21:43:01 +01:00
sudo apt install pass-git-helper
2020-03-19 10:46:47 +01:00
#+end_src
First, add the relation between repository addresses and entries in =pass=. This is done in the following config file =.config/pass-git-helper/git-pass-mapping.ini=:
#+begin_src
[github.com*]
target=github.com/tdehaeze
#+end_src
Then, add the credential helper on the git configuration file =~/.gitconfig= and add the default username for the repositories adresses.
#+begin_src
[credential]
helper = !pass-git-helper $@
[credential "https://github.com"]
username = tdehaeze
#+end_src
** Integration with other programs
Integrate pass in other programs is usually very easy, here are few examples:
- =~/.msmtprc=:
- =passwordeval "pass email/dehaeze.thomas@gmail.com"=
- =~/.mbsyncrc=
- =PassCmd "pass email/dehaeze.thomas@gmail.com"=
** Alternative - Bitwarden
Bitwarden https://github.com/bitwarden/cli
#+begin_src bash
yay -Ss bitwarden-bin bitwarden-cli-bin
#+end_src
2022-02-06 21:43:01 +01:00
* =qutebrowser= - Browser
https://github.com/qutebrowser/qutebrowser
2020-03-19 10:46:47 +01:00
** Installation
#+begin_src bash
2022-02-06 21:43:01 +01:00
mkdir ~/.local/soft
cd ~/.local/soft
git clone https://github.com/qutebrowser/qutebrowser.git
cd qutebrowser
sudo apt install --no-install-recommends git ca-certificates python3 python3-venv asciidoc libglib2.0-0 libgl1 libfontconfig1 libxcb-icccm4 libxcb-image0 libxcb-keysyms1 libxcb-randr0 libxcb-render-util0 libxcb-shape0 libxcb-xfixes0 libxcb-xinerama0 libxcb-xkb1 libxkbcommon-x11-0 libdbus-1-3 libyaml-dev gcc python3-dev libnss3
python3 scripts/mkvenv.py
2020-03-19 10:46:47 +01:00
#+end_src
2022-02-06 21:43:01 +01:00
Then it can be launched using [[file:binaries-private.org::#qutebrowser][file:~/.config/literate-dotfiles/binaries-private.org::#qutebrowser]]
2020-03-19 10:46:47 +01:00
#+begin_src bash
2022-02-06 21:43:01 +01:00
~/.local/soft/qutebrowser/.venv/bin/python3 -m qutebrowser
2020-03-19 10:46:47 +01:00
#+end_src
2022-02-06 21:43:01 +01:00
And upgraded with:
2020-03-19 10:46:47 +01:00
#+begin_src bash
2022-02-06 21:43:01 +01:00
cd ~/.local/soft/qutebrowser/
mkvenv.py --update
2020-03-19 10:46:47 +01:00
#+end_src
** View Pdf inside qutebrowser with pdfjs
*** Installation
#+begin_src bash
2022-02-06 21:43:01 +01:00
sudo apt install pdf.js-common
2020-03-19 10:46:47 +01:00
#+end_src
*** Usage
When opening a pdf file on qutebrowser, you'll be ask for options:
| Command | Usage |
|------------+-------------------|
| =<return>= | Download the file |
| =Ctrl-x= | Download and open |
| =Ctrl-p= | Open with pdf.js |
| =Alt-y= | Yank the url |
** Integration with Pass: the password manager
Add the key-binding on =~/.config/qutebrowser/config.py=
#+begin_src
2022-02-06 21:43:01 +01:00
config.bind(',p', 'spawn --userscript password_fill')
2020-03-19 10:46:47 +01:00
#+end_src
The =password_fill= script can be found on [[https://github.com/qutebrowser/qutebrowser/blob/master/misc/userscripts/password_fill][github.com]].
It is configured using the =~/.config/qutebrowser/password_fill_rc= file.
2022-02-06 21:43:01 +01:00
** TODO Spell Checking
2020-03-19 10:46:47 +01:00
#+begin_src bash
2022-02-06 21:43:01 +01:00
./scripts/dictcli.py install fr-FR
./scripts/dictcli.py install en-US
2020-03-19 10:46:47 +01:00
#+end_src
2021-01-03 22:52:53 +01:00
** =firefox=
2020-03-19 10:46:47 +01:00
#+begin_src bash
2022-02-06 21:43:01 +01:00
sudo apt install firefox
2020-03-19 10:46:47 +01:00
#+end_src
2021-01-03 22:52:53 +01:00
Addons:
- [[https://addons.mozilla.org/fr/firefox/addon/ublock-origin/][uBlock Origin]]
- [[https://addons.mozilla.org/en-US/firefox/addon/adblock-plus/][Adblock Plus]]
- [[https://addons.mozilla.org/fr/firefox/addon/bukubrow/][Bukurow]]
- [[https://addons.mozilla.org/fr/firefox/addon/i-dont-care-about-cookies/][I don't care about cookies]]
2020-03-19 10:46:47 +01:00
2021-01-03 22:52:53 +01:00
* =xrandr= - Monitor Manager
2020-03-19 10:46:47 +01:00
#+begin_src bash
2022-02-06 21:43:01 +01:00
sudo apt install arandr
2020-03-19 10:46:47 +01:00
#+end_src
2021-01-03 22:52:53 +01:00
[[https://wiki.archlinux.org/index.php/Xrandr][Xrandr]] is used in shell scripts ([[https://github.com/Ventto/mons][mons]] could be used as a layer on top of Xrandr).
[[https://christian.amsuess.com/tools/arandr/][Arandr]] is a GUI application to manage monitors.
2020-03-19 10:46:47 +01:00
* Music Setup
2021-01-03 22:52:53 +01:00
** =pulseaudio= - Sound Server
2020-03-19 10:46:47 +01:00
https://wiki.archlinux.org/index.php/PulseAudio
2021-01-03 22:52:53 +01:00
Installation:
2020-03-19 10:46:47 +01:00
#+begin_src bash
2022-02-06 21:43:01 +01:00
sudo apt install pulseaudio pulseaudio-module-bluetooth
2020-03-19 10:46:47 +01:00
#+end_src
If sound is not working, should run =pulseaudio --kill= to kill the deamon and then =pulseaudio --daemonize= to run it again.
https://www.freedesktop.org/wiki/Software/PulseAudio/Documentation/User/Running/
2021-01-03 22:52:53 +01:00
** =pavucontrol= - Sound Manager
=pavucontrol= is used as a sound manager:
2020-03-19 10:46:47 +01:00
#+begin_src bash
2022-02-06 21:43:01 +01:00
sudo apt install pavucontrol
2020-03-19 10:46:47 +01:00
#+end_src
2021-01-03 22:52:53 +01:00
** =mopidy= - Audio Server
2020-03-19 10:46:47 +01:00
https://github.com/mopidy/mopidy
https://medium.com/@theos.space/using-mopidy-with-spotify-and-ncmpcpp-44352f4a2ce8
#+begin_src bash
2022-02-06 21:43:01 +01:00
sudo apt install mopidy
2021-01-01 20:12:34 +01:00
#+end_src
#+begin_src bash
2022-02-06 21:43:01 +01:00
sudo apt install python3-pip
python3 -m pip install --use mopidy-jellyfin
2020-03-19 10:46:47 +01:00
#+end_src
To update local files:
#+begin_src bash
2022-02-06 21:43:01 +01:00
mopidy local scan
2020-03-19 10:46:47 +01:00
#+end_src
If mopidy is used, MPD should be disabled. (=systemctl disable --user mpd.service=)
2021-01-03 22:52:53 +01:00
** =ncmpcpp= - MPD Client
2020-03-19 10:46:47 +01:00
https://wiki.archlinux.org/index.php/Ncmpcpp
2021-01-03 22:52:53 +01:00
Installation:
2020-03-19 10:46:47 +01:00
#+begin_src bash
2022-02-06 21:43:01 +01:00
sudo apt install ncmpcpp
2020-03-19 10:46:47 +01:00
#+end_src
The main config is located here: =~/.ncmpcpp/config=.
The key bindings can be configured here: =~/.ncmpcpp/bindings=.
* Movies
2021-01-03 22:52:53 +01:00
** =mpv= - Media Player
Installation:
2020-03-19 10:46:47 +01:00
#+begin_src bash
2022-02-06 21:43:01 +01:00
sudo apt install mpv
2020-03-19 10:46:47 +01:00
#+end_src
The configuration is set in =/.config/mpv/input.conf=.
* Contact Manager
2021-01-03 22:52:53 +01:00
** =khard= - Google Conctacts
2020-03-19 10:46:47 +01:00
https://github.com/scheibler/khard
#+begin_src bash
yay -Ss khard
#+end_src
This is the command line interface for contact management.
Contact synchronization:
Vdirsyncer is used for contact synchronization with Google.
To search with Khard: =khard <conctact-name>=
2021-01-03 22:52:53 +01:00
** =mu= - Index Emails
2020-03-19 10:46:47 +01:00
#+begin_src bash
2022-02-06 21:43:01 +01:00
sudo apt install maildir-utils
2020-03-19 10:46:47 +01:00
#+end_src
This looks for contacts in all indexed emails.
=mu cfind <name>=
2021-01-03 22:52:53 +01:00
* =redshift=
2020-03-19 10:46:47 +01:00
http://jonls.dk/redshift/
#+begin_src bash
2022-02-06 21:43:01 +01:00
sudo apt install redshift
2020-03-19 10:46:47 +01:00
#+end_src
* Mail Setup
[[file:mail.org][Link]] to the mail setup.
2021-01-03 22:52:53 +01:00
** =mbsync= - Synchronize Mailboxes
2020-03-19 10:46:47 +01:00
http://isync.sourceforge.net/
https://wiki.archlinux.org/index.php/Isync
*** Installation
#+begin_src bash
2022-02-06 21:43:01 +01:00
sudo apt install isync
2020-03-19 10:46:47 +01:00
#+end_src
*** Configuration
=~/.mbsyncrc=
*** Automation using systemd
**** Retreive New mails
- =checkmail=
2020-03-19 10:46:47 +01:00
- =~/.config/systemd/user/checkmail.service=
- =~/.config/systemd/user/checkmail.timer=
#+begin_src bash
systemctl --user enable checkmail.timer
systemctl --user start checkmail.timer
#+end_src
**** Synchronize all the mailboxes
- =~/.config/systemd/user/syncmail.service=
- =~/.config/systemd/user/syncmail.timer=
#+begin_src bash
systemctl --user enable syncmail.timer
systemctl --user start syncmail.timer
#+end_src
2021-01-03 22:52:53 +01:00
** =msmtp= - Send Mails
2020-03-19 10:46:47 +01:00
https://marlam.de/msmtp/
*** Installation
#+begin_src bash
2022-02-06 21:43:01 +01:00
sudo apt install msmtp
2020-03-19 10:46:47 +01:00
#+end_src
2021-01-03 22:52:53 +01:00
** =mu= - Mail Index, Search and Tagging
2020-03-19 10:46:47 +01:00
https://github.com/djcb/mu
2021-01-03 22:52:53 +01:00
** =neomutt= - Mail Client
2020-03-19 10:46:47 +01:00
https://github.com/neomutt/neomutt
*** Installation
#+begin_src bash
2022-02-06 21:43:01 +01:00
sudo apt install neomutt
2020-03-19 10:46:47 +01:00
#+end_src
*** Display html mails
#+begin_src bash
2022-02-06 21:43:01 +01:00
sudo apt install w3m
2020-03-19 10:46:47 +01:00
#+end_src
*** Open Url from mail
#+begin_src bash
2022-02-06 21:43:01 +01:00
sudo apt install urlview
2020-03-19 10:46:47 +01:00
#+end_src
*** Ressources
- http://therandymon.com/woodnotes/mutt/using-mutt.html
- https://ankursinha.in/2017/12/16/transitioning-to-neomutt-and-friends-for-e-mail.html
- https://github.com/LukeSmithxyz/mutt-wizard
** Notification system
A script (=checkmail=) is used to retreive new mails and use =notify=send= is there are new received mails.
2020-03-19 10:46:47 +01:00
2021-01-03 22:52:53 +01:00
* =ranger=/=pcmanfm= - File Manager
2020-03-19 10:46:47 +01:00
Configuration files:
- GUI: [[file:pcmanfm.org][Pcmanfm]]
- Terminal based: [[file:ranger.org][Ranger]]
** Ranger
https://github.com/ranger/ranger
*** Installation
#+begin_src bash
2022-02-06 21:43:01 +01:00
sudo apt install ranger
2020-03-19 10:46:47 +01:00
#+end_src
*** Configuration
The configuration file is =~/.config/ranger/rc.conf=.
*** Display pdf
All the display of the files are defined in =~/.config/ranger/scope.sh=.
It seems that Ranger is not working well with Termite. The screen is not refreshing after viewing one image ([[https://github.com/ranger/ranger/issues/859][Github Issue]]).
It works better with Urxvt.
** GUI File Manager: pcmanfm
https://wiki.archlinux.org/index.php/PCManFM
2021-01-03 22:52:53 +01:00
* =sxiv= - Image viewer
2020-03-19 10:46:47 +01:00
https://github.com/muennich/sxiv
https://www.youtube.com/watch?v=GYW9i_u5PYs
2021-01-03 22:52:53 +01:00
** Installation
2020-03-19 10:46:47 +01:00
#+begin_src bash
2022-02-06 21:43:01 +01:00
sudo apt install sxiv
2020-03-19 10:46:47 +01:00
#+end_src
2021-01-03 22:52:53 +01:00
** Open Gif
2020-03-19 10:46:47 +01:00
#+begin_src bash
2022-02-06 21:43:01 +01:00
sxiv -a file.gif
2020-03-19 10:46:47 +01:00
#+end_src
2021-01-03 22:52:53 +01:00
** Cheatsheet
2020-03-19 10:46:47 +01:00
| Command | Usage |
|--------------+--------------------------|
| =-t= | Start in Thumbmail mode |
| =f= | Toggle fullscreen |
| =Return= | Switch to thumbmail mode |
| =<=, =>= | Rotate the image |
| =\vert=, =_= | Flip the image |
| =n=, =p= | Next, Previous image |
2021-01-03 22:52:53 +01:00
* =sxhkd= - HotKey Manager
2020-03-19 10:46:47 +01:00
#+begin_src bash
2022-02-06 21:43:01 +01:00
sudo apt install sxhkd
2020-03-19 10:46:47 +01:00
#+end_src
Configuration file: [[file:sxhkd.org][SXHKD]].
2021-01-03 22:52:53 +01:00
* =i3= - Windows Manager
2020-03-19 10:46:47 +01:00
[[file:i3.org][Link]] to the documentation
** Installation
#+begin_src bash
2022-02-06 21:43:01 +01:00
sudo add-apt-repository -y ppa:regolith-linux/stable
sudo apt install i3-gaps
2020-03-19 10:46:47 +01:00
#+end_src
** Configuration
=~/.i3/config=
2021-01-03 22:52:53 +01:00
* =polybar= - Top Bar
2020-03-19 10:46:47 +01:00
https://polybar.github.io/
[[file:polybar.org][Link]] to the documentation.
** Installation
#+begin_src bash
2022-02-06 21:43:01 +01:00
cd ~/.local/soft
git clone https://github.com/jaagr/polybar.git
cd polybar
# Install necessary
sudo apt install build-essential git cmake cmake-data pkg-config python3-sphinx python3-packaging libuv1-dev libcairo2-dev libxcb1-dev libxcb-util0-dev libxcb-randr0-dev libxcb-composite0-dev python3-xcbgen xcb-proto libxcb-image0-dev libxcb-ewmh-dev libxcb-icccm4-dev
# Install optional
sudo apt install libxcb-xkb-dev libxcb-xrm-dev libxcb-cursor-dev libasound2-dev libpulse-dev i3-wm libjsoncpp-dev libmpdclient-dev libcurl4-openssl-dev libnl-genl-3-dev
./build.sh
2020-03-19 10:46:47 +01:00
#+end_src
2021-01-03 22:52:53 +01:00
* =picom= - Compositor
2020-03-19 10:46:47 +01:00
https://wiki.archlinux.org/index.php/Picom
[[file:compositor.org][Link]] to the documentation.
** Installation
#+begin_src bash
2022-02-06 21:43:01 +01:00
sudo apt install picom
2020-03-19 10:46:47 +01:00
#+end_src
** Configuration
=~/.config/picom/picom.conf=
** Automatic run as daemon
Compton is run from =.xprofile= config in the background:
#+begin_src bash
2022-02-06 21:43:01 +01:00
picom --daemon
2020-03-19 10:46:47 +01:00
#+end_src
2021-01-03 22:52:53 +01:00
* =dunst= - Notification Manager
2020-03-19 10:46:47 +01:00
https://github.com/dunst-project/dunst
https://wiki.archlinux.org/index.php/Dunst
** Installation
#+begin_src bash
2022-02-06 21:43:01 +01:00
sudo apt install dunst notify-send
2020-03-19 10:46:47 +01:00
#+end_src
** Configuration
=~/.config/dunst/dunstrc=
** Usage
#+begin_src bash
2022-02-06 21:43:01 +01:00
notify-send "AppName" "Message"
2020-03-19 10:46:47 +01:00
#+end_src
The number =--replace= can be used with an ID to merge notifications from the
same application for instance.
* LaTeX
2021-01-03 22:52:53 +01:00
Installation
2020-03-19 10:46:47 +01:00
#+begin_src bash
2022-02-06 21:43:01 +01:00
sudo apt install texlive-full
2020-03-19 10:46:47 +01:00
#+end_src
2020-11-03 16:45:31 +01:00
Every custom class or packages can be put under =~/.local/share/texmf/tex/latex/local/= folder.
2020-03-19 10:46:47 +01:00
In order for LaTeX to be aware of new packages/classes, run =sudo texhash= each time a new custom package is added.
* Mathematical Software
** Insect
https://github.com/sharkdp/insect
2021-01-03 22:52:53 +01:00
Installation
2020-03-19 10:46:47 +01:00
#+begin_src bash
2022-02-06 21:43:01 +01:00
sudo apt install insect
2020-03-19 10:46:47 +01:00
#+end_src
| Command | Usage |
|-----------------+--------------|
| =3 m/s to km/h= | Convert Unit |
** Matlab
https://wiki.archlinux.org/index.php/MATLAB#Installation
[[file:matlab.org][Link]] to the configuration.
2021-01-03 22:52:53 +01:00
Installation
2020-03-19 10:46:47 +01:00
#+begin_src bash
2022-02-06 21:43:01 +01:00
sudo apt install matlab
2020-03-19 10:46:47 +01:00
#+end_src
If there is a problem when opening a Simulink file, check the solution [[https://fr.mathworks.com/matlabcentral/answers/361053-can-t-reload-usr-local-matlab-r2017b-bin-glnxa64-libmwdastudio-so][here]].
** SageMath
http://www.sagemath.org/
https://wiki.archlinux.org/index.php/SageMath
2021-01-03 22:52:53 +01:00
Installation
2020-03-19 10:46:47 +01:00
#+begin_src bash
2022-02-06 21:43:01 +01:00
sudo apt install sagemath
2020-03-19 10:46:47 +01:00
#+end_src
Run =sage -n jupyter= to run jupyter notebooks
2021-01-03 22:52:53 +01:00
** Python and Jupyter-notebook
2020-03-19 10:46:47 +01:00
* Calendar
2021-04-25 19:10:57 +02:00
[[file:calendar-contact.org][Link]] to configuration
2020-03-19 10:46:47 +01:00
2021-01-03 22:52:53 +01:00
** =vdirsyncer= - Sync calendars
2020-03-19 10:46:47 +01:00
https://github.com/pimutils/vdirsyncer
2021-01-03 22:52:53 +01:00
Installation:
2020-03-19 10:46:47 +01:00
#+begin_src bash
2022-02-06 21:43:01 +01:00
sudo apt install vdirsyncer python-requests-oauthlib-doc
2020-03-19 10:46:47 +01:00
#+end_src
#+begin_src bash
2022-02-06 21:43:01 +01:00
sudo pip install requests-oauthlib
2020-03-19 10:46:47 +01:00
#+end_src
| Command | Usage |
|-------------------+-------------|
| =vdirsyncer sync= | Synchronize |
2021-01-03 22:52:53 +01:00
Setup the =google_calendar=:
2020-03-19 10:46:47 +01:00
#+begin_src bash
2022-02-06 21:43:01 +01:00
vdirsyncer discover radicale_calendar
2020-03-19 10:46:47 +01:00
#+end_src
2021-01-03 22:52:53 +01:00
And start the =systemd= timer that automatically synchronize the calendars;
2020-03-19 10:46:47 +01:00
#+begin_src bash
2022-02-06 21:43:01 +01:00
systemctl --user enable --now vdirsyncer.timer
2020-03-19 10:46:47 +01:00
#+end_src
To check the status of the service:
#+begin_src bash
2022-02-06 21:43:01 +01:00
systemctl --user status vdirsyncer.service
2020-03-19 10:46:47 +01:00
#+end_src
2021-01-03 22:52:53 +01:00
** =khal= - Calendar Client
2020-03-19 10:46:47 +01:00
https://github.com/pimutils/khal
2021-01-03 22:52:53 +01:00
Installation:
2020-03-19 10:46:47 +01:00
#+begin_src bash
2022-02-06 21:43:01 +01:00
sudo apt install khal
2020-03-19 10:46:47 +01:00
#+end_src
2021-01-03 22:52:53 +01:00
Import ICS files:
2020-03-19 10:46:47 +01:00
#+begin_src bash
2022-02-06 21:43:01 +01:00
khal import even.ics
2020-03-19 10:46:47 +01:00
#+end_src
2021-01-03 22:52:53 +01:00
* =zathura= - PDF Reader
2020-03-19 10:46:47 +01:00
https://pwmt.org/projects/zathura/
** Installation
#+begin_src bash
2022-02-06 21:43:01 +01:00
sudo apt install zathura
2020-03-19 10:46:47 +01:00
#+end_src
Then add dependecies to view specific files:
#+begin_src bash
2022-02-06 21:43:01 +01:00
sudo apt install zathura-pdf-mupdf zathura-djvu zathura-ps zathura-cb
2020-03-19 10:46:47 +01:00
#+end_src
** Configuration
=~/.config/zathura/zathurarc=
** Cheatsheet
| Command | Usage |
|---------+----------------------------|
| =p= | Print the current pdf |
| =tab= | Show the outline |
| =r= | Reload |
| =J/K= | Next/previous page |
| =H/L= | Zoom in/out |
| =a= | Fit height |
| =s= | Fit width |
| =D= | Double page |
| =f= | Follow link |
| =i= | Night Mode |
| =<n>gg= | Go to page n |
| =mm= | Mark current location to m |
| ='m= | Goto location m |
** Multi-monitor pdf presentation - pdfpc
https://github.com/pdfpc/pdfpc
pdfpc is a great tool for showing pdf presentations. It support:
- screen splitting
- support for videos in pdf presentations
- support for notes
- support for annotations
*** Installation
#+begin_src bash
2022-02-06 21:43:01 +01:00
sudo apt install pdfpc
2020-03-19 10:46:47 +01:00
#+end_src
*** Video support
#+begin_src bash
2022-02-06 21:43:01 +01:00
sudo apt install gst-plugins-ugly gst-plugins-good gst-plugins-base-libs gst-plugins-base gst-plugins-bad gst-libav
2020-03-19 10:46:47 +01:00
#+end_src
*** Usage
#+begin_src bash
pdfpc filename.pdf
#+end_src
2021-01-03 22:52:53 +01:00
* Display Manager
Before, I was using =lightDM=, but a single tty is enough.
2021-01-01 20:12:34 +01:00
However, to make tools like Anydesk or Teamviewer to work:
Add "type=x11" in =/etc/pam.d/system-login=:
#+begin_src conf
2021-01-03 22:52:53 +01:00
-session optional pam_systemd.so type=x11
2021-01-01 20:12:34 +01:00
#+end_src
- When executing =loginctl session-status | grep Service= X11 should appear as initialized.
- =echo $XDG_SESSION_TYPE= should show =x11= instead of =tty= now
2021-01-03 22:52:53 +01:00
* =inkscape= - Graphical Editor
2020-03-19 10:46:47 +01:00
- https://inkscape.org/
- Tikz
2021-01-03 22:52:53 +01:00
#+begin_src bash
2022-02-06 21:43:01 +01:00
sudo add-apt-repository ppa:inkscape.dev/stable
sudo apt update
sudo apt install inkscape
2021-01-03 22:52:53 +01:00
#+end_src
2022-02-06 21:43:01 +01:00
* TODO =wireguard= - VPN
2021-01-03 22:52:53 +01:00
#+begin_src bash
2022-02-06 21:43:01 +01:00
sudo apt install wireguard-tools
2021-01-03 22:52:53 +01:00
#+end_src
2022-02-06 21:43:01 +01:00
* Others
** Things to install
2021-01-01 20:12:34 +01:00
#+begin_src bash
2022-02-06 21:43:01 +01:00
sudo apt install xwallpaper mpc mpv maim
sudo apt install freerdp2-x11 xsel xclip xdotool
sudo apt install unclutter xautolock redshift
sudo apt install atool unrar p7zip
2021-01-01 20:12:34 +01:00
#+end_src
2022-02-06 21:43:01 +01:00
Diff so fancy
2021-01-01 20:12:34 +01:00
#+begin_src bash
2022-02-06 21:43:01 +01:00
sudo add-apt-repository ppa:aos1/diff-so-fancy
sudo apt-get update
sudo apt install diff-so-fancy
2021-01-01 20:12:34 +01:00
#+end_src
2020-03-19 10:46:47 +01:00
#+begin_src bash
2022-02-06 21:43:01 +01:00
cd ~/.local/bin
wget https://raw.githubusercontent.com/carnager/rofi-pass/master/rofi-pass
chmod +x rofi-pass
2020-03-19 10:46:47 +01:00
#+end_src
2022-02-06 21:43:01 +01:00
For image preview in =ranger=:
2020-03-19 10:46:47 +01:00
#+begin_src bash
2022-02-06 21:43:01 +01:00
sudo pip3 install ueberzug
2020-03-19 10:46:47 +01:00
#+end_src
2021-01-03 22:52:53 +01:00
** =maim=/=flameshot= - Take Screenshots
2020-04-06 00:11:57 +02:00
- https://github.com/naelstrof/maim
- https://github.com/lupoDharkael/flameshot
2020-03-19 10:46:47 +01:00
#+begin_src bash
2022-02-06 21:43:01 +01:00
sudo apt install maim flameshot
2020-03-19 10:46:47 +01:00
#+end_src
2021-01-03 22:52:53 +01:00
** Find Files
#+begin_src bash
2022-02-06 21:43:01 +01:00
sudo apt install fd-find ripgrep fzf
2021-01-03 22:52:53 +01:00
#+end_src
** PDF/Image Utilities
2020-04-06 00:11:57 +02:00
- https://github.com/dawbarton/pdf2svg
- https://www.pdflabs.com/tools/pdftk-the-pdf-toolkit/
- https://github.com/Airblader/unclutter-xfixes
2020-03-19 10:46:47 +01:00
#+begin_src bash
2022-02-06 21:43:01 +01:00
sudo apt install pdf2svg pdftk unclutter pdfarranger imagemagick
2020-03-19 10:46:47 +01:00
#+end_src
** Trash
=trash-cli= is used to manage the trash.
2021-10-25 14:31:23 +02:00
It is integrated with =ranger= and =pcmanFM=.
2020-03-19 10:46:47 +01:00
2021-01-03 22:52:53 +01:00
#+begin_src bash
2022-02-06 21:43:01 +01:00
sudo apt install trash-cli
2021-01-03 22:52:53 +01:00
#+end_src
* Printer
https://wiki.archlinux.org/index.php/CUPS
Web based administration: http://localhost:631/
2020-03-19 10:46:47 +01:00
2022-02-06 21:43:01 +01:00
To install the ESRF printer:
#+begin_src bash
lpadmin -p ctb127c1u -v ipp://cups.esrf.fr/printers/ctb127c1u -E
#+end_src
2021-01-03 22:52:53 +01:00
=system-config-printer=
Check the queue
#+begin_src bash
lpq
lpq -a # on all queues
#+end_src
Clear the queue
#+begin_src bash
lprm # remove last entry only
lprm - # remove all entries
#+end_src
Print a file
#+begin_src bash
lpr -P printer_name filename.pdf
#+end_src
List available printers
#+begin_src bash
lpstat -a
#+end_src
Stats about the printer
#+begin_src bash
lpstat -p printer_name
#+end_src
* List of all the install programs
2020-03-19 10:46:47 +01:00
** Mutt
2021-01-03 22:52:53 +01:00
| =neomutt= | Teaching an Old Dog New Tricks |
| =msmtp= | SMTP client that can be used as an SMTP plugin for Mutt |
| =isync= | Synchronize a maildir with an IMAP server |
| =vdirsyncer= | Synchronize calendars and contacts |
| =abook= | Address book with mutt support |
2021-01-03 22:52:53 +01:00
| =urlview= | URL extractor/launcher |
| =w3m= | Pager/text based browser |
| =lynx= | Text mode web browser |
2021-01-03 22:52:53 +01:00
| =lbdb= | Little brother's database for the mutt mail reader |
| =mu= | Tool for searching e-mail messages stored in the maildir-format |
| =ripmime= | Extract attachments out of MIME encoded email packages |
| =shared= | mime-info - Database of common MIME types |
2019-01-31 09:41:03 +01:00
2020-03-19 10:46:47 +01:00
** File Management
2019-01-31 09:41:03 +01:00
| =grep= | GNU grep, egrep and fgrep |
| =pdfgrep= | Search PDFs for strings matching a regular expression |
| =the_platinum_searcher= | Multi-platform code-search similar to ack and ag |
| =the_silver_searcher= | Code-search similar to ack |
| =fdupes= | Identify or delete duplicate files |
| =findutils= | Collection of GNU find, xargs, and locate |
| =ranger= | File browser |
| =vifm= | Ncurses based file manager with vi like keybindings |
| =tree= | Display directories as trees (with optional color/HTML output) |
| =p7zip= | 7-Zip (high compression file archiver) implementation |
| =unrar= | Extract, view, and test RAR archives |
2020-01-28 21:28:56 +01:00
| =atool= =zip= | script for managing file archives of various types |
2019-01-31 09:41:03 +01:00
2020-03-19 10:46:47 +01:00
** File Downloader
2021-01-03 22:52:53 +01:00
| =wget= | Internet file retriever |
| =htop= | Improved top (interactive process viewer) |
| =httpie= | User-friendly cURL replacement (command-line HTTP client) |
| =curl= | Get a file from an HTTP, HTTPS or FTP server |
2019-01-31 09:41:03 +01:00
2020-03-19 10:46:47 +01:00
** Utils
2021-01-03 22:52:53 +01:00
| =binutils= | GNU Binary Utilities |
| =coreutils= | GNU File, Shell, and Text utilities |
| =gnome= | doc-utils - Documentation utilities for the GNOME project |
| =moreutils= | Collection of tools that nobody wrote when UNIX was young |
2019-01-31 09:41:03 +01:00
2020-03-19 10:46:47 +01:00
** A trier
2019-01-31 09:41:03 +01:00
| =asciinema= | Terminal session recorder |
| =automake= | tool for automatically generating Makefile |
| =cmake= | Cross-platform make |
| =cputhrottle= | Limit the CPU usage of a process |
| =ctags= | Reimplementation of ctags |
| =gdb= | GNU debugger |
| =ghostscript= | Interpreter for PostScript and PDF |
| =go= | Open source programming language to build simple/reliable/efficient software |
| =hugo= | Configurable static site generator |
| =markdown= | Text-to-HTML conversion tool |
| =pandoc= | Swiss-army knife of markup format conversion |
| =uni= | Query the Unicode database from the commandline |