literate-dotfiles/install.org

1618 lines
46 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
2021-01-03 22:52:53 +01:00
* =yay= - Package Manager
2020-03-19 10:46:47 +01:00
https://github.com/Jguer/yay
2021-01-03 22:52:53 +01:00
Installation:
2020-03-19 10:46:47 +01:00
#+begin_src bash
2021-01-03 22:52:53 +01:00
sudo pacman -S yay
2020-03-19 10:46:47 +01:00
#+end_src
2021-01-03 22:52:53 +01:00
#+caption: =yay= - Cheatsheet
2020-03-19 10:46:47 +01:00
| Command | Usage |
|---------------------+-----------------------------|
| =yay= | Perform system upgrade |
| =yay -Ss <package>= | Search |
| =yay -S <package>= | Install |
| =yay -Si <package>= | Get informations |
| =yay -Rs <package>= | Uninstall |
| =yay -Yc= | Clean unneeded dependencies |
To check all installed packages:
2021-01-03 22:52:53 +01:00
#+begin_src bash
pacman -Qq | fzf --preview 'pacman -Qil {}' --layout=reverse --bind 'enter:execute(pacman -Qil {} | less)'
#+end_src
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
yay -S git
#+end_src
[[file:git.org][Git]] Configuration:
- =~/.gitconfig=
- =~/.gitignore_global=
2021-01-03 22:52:53 +01:00
[[https://github.com/so-fancy/diff-so-fancy][Diff-So-Fancy]] is a nice addition to have good-looking diffs.
It can be installed like so:
2020-03-19 10:46:47 +01:00
#+begin_src bash
yay -S diff-so-fancy
#+end_src
2021-01-03 22:52:53 +01:00
And configured with the following command:
2020-03-19 10:46:47 +01:00
#+begin_src bash
2021-01-01 20:12:34 +01:00
git config --global core.pager "diff-so-fancy | less --tabs=4 -RFX"
2020-03-19 10:46:47 +01:00
#+end_src
2021-01-03 22:52:53 +01:00
=pass= can be used as credential helper for git repositories.
2020-03-19 10:46:47 +01:00
2021-01-03 22:52:53 +01:00
* =termite= - Terminal
[[https://github.com/thestinger/termite][Termite]] is a very nice keyboard-centric terminal.
It can be installed like so:
2020-03-19 10:46:47 +01:00
#+begin_src bash
yay -S termite
#+end_src
2021-01-03 22:52:53 +01:00
Its configuration file is described [[file:termite.org][here]].
2020-03-19 10:46:47 +01:00
2021-01-03 22:52:53 +01:00
#+caption: =termite= - 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
yay -S bash bash-completion zsh
#+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
yay -S tmux
#+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
yay -S nerd-fonts-hack
#+end_src
2021-01-03 22:52:53 +01:00
For emojis, use:
2020-03-19 10:46:47 +01:00
#+begin_src bash
2020-03-30 00:07:44 +02:00
yay -S noto-fonts-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
fc-list
#+end_src
2020-03-19 10:46:47 +01:00
2021-01-03 22:52:53 +01:00
To select fonts using a GUI, =gtk2fontsel= can be used:
2020-03-19 10:46:47 +01:00
#+begin_src bash
yay -S gtk2fontsel
#+end_src
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
2021-01-03 22:52:53 +01:00
yay -S 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]].
Then install the plugin manager [[https://github.com/junegunn/vim-plug][plug]]:
#+begin_src bash
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'
#+end_src
And to install/setup all the plugins:
#+begin_src bash
nvim +PlugInstall
nvim +UpdateRemotePlugins
#+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
2021-01-03 22:52:53 +01:00
yay -S emacs
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
git clone --depth 1 https://github.com/hlissner/doom-emacs ~/.emacs.d
~/.emacs.d/bin/doom install
#+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
2021-01-03 22:52:53 +01:00
yay -S 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
ssh-keygen -t rsa -b 4096 -C "dehaeze.thomas@gmail.com"
#+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
eval "$(ssh-agent -s)"
#+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
ssh-add ~/.ssh/id_rsa
#+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
yay -S gnupg
#+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
gpg --full-gen-key
#+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
default-cache-ttl 60480000
max-cache-ttl 60480000
#+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
2021-01-03 22:52:53 +01:00
yay -S 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
yay -S dmenu rofi rofi-calc
#+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
export SUDO_ASKPASS=~/.local/bin/askpass-rofi
2020-03-19 10:46:47 +01:00
#+end_src
The =askpass= script is:
#+begin_src bash
#!/bin/sh
rofi -dmenu \
-password \
-no-fixed-num-lines \
-p "$(printf "$1" | sed s/://)"
#+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
2021-01-03 22:52:53 +01:00
yay -S pass
2020-03-19 10:46:47 +01:00
#+end_src
2021-01-03 22:52:53 +01:00
Initialize the password store as a git repository
2020-03-19 10:46:47 +01:00
#+begin_src bash
2021-01-03 22:52:53 +01:00
pass git init
pass git remote add origin https://github.com/tdehaeze/pass.git
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
2021-01-03 22:52:53 +01:00
yay -S 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
yay -S rofi-pass
#+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
yay -S pass-git-helper
#+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
2021-01-03 22:52:53 +01:00
* =buku= - Bookmark Manager
2020-03-19 10:46:47 +01:00
https://github.com/jarun/Buku
** Installation
#+begin_src bash
yay -S buku
#+end_src
** Integration with Rofi
https://github.com/carnager/buku_run
*** Installation
#+begin_src bash
2021-01-03 22:52:53 +01:00
wget https://raw.githubusercontent.com/carnager/buku_run/master/buku_run -o ~/.local/bin/buku_run
chmod +x ~/.local/bin/buku_run
2020-03-19 10:46:47 +01:00
#+end_src
*** Configuration
The configuration file is here: =~/.config/buku_run/config=
** Integration with qutebrowser
[[*Integration with Buku][Integration with Buku]]
** Synchronization with a git repository
The database is stored in =~/.local/share/buku/bookmarks.db=.
We initialize a git repository in this folder:
#+begin_src bash
2021-01-03 22:52:53 +01:00
cd ~/.local/share/buku/bookmarks.db
git init
2020-03-19 10:46:47 +01:00
#+end_src
Then we create a script that will automatically add =bookmarks.db= and push to some repository: =buku_git_push=.
2020-03-19 10:46:47 +01:00
To automatically run the script every day, a systemd unit is used: =~/.config/systemd/user/bukugit.timer= and =~/.config/systemd/user/bukugit.service=
#+begin_src bash
2021-01-03 22:52:53 +01:00
systemctl --user start --now bukugit.timer
2020-03-19 10:46:47 +01:00
#+end_src
** Import Bookmarks from Firefox and Chrome
From Firefox, export the bookmarks as html file.
Then import the bookmark file using =buku -i bookmarks.html=.
This will add a tag with current date to all bookmarks imported.
To remove them, use: =buku --replace '2018dec20' ''=
** Web Interface
Run:
#+begin_src bash
2021-01-03 22:52:53 +01:00
bukuserver run --host 127.0.0.1 --port 5001
2020-03-19 10:46:47 +01:00
#+end_src
And then browse to http://127.0.0.1:5001.
** Cheatsheet
| Command | Usage |
|--------------+------------------------|
| =buku= | Run buku interactively |
| =buku -p= | List all bookmarks |
| =buku -w id= | Edit bookmark |
| =buku -d id= | Delete bookmark |
| =buku -s <>= | Search bookmarks |
** Alternatives
- https://github.com/RadhiFadlillah/shiori
- https://karl-voit.at/2014/08/10/bookmarks-with-orgmode/
2021-01-03 22:52:53 +01:00
* =qutebrowser= - Browser
2020-03-19 10:46:47 +01:00
https://github.com/qutebrowser/qutebrowser
** Installation
#+begin_src bash
yay -S qutebrowser
#+end_src
** View Pdf inside qutebrowser with pdfjs
*** Installation
#+begin_src bash
yay -S pdfjs
#+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
config.bind(',p', 'spawn --userscript password_fill')
#+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.
** Integration with Buku
Custom key binding in =~/.config/qutebrowser/config.py=
#+begin_src
# Add current page to Buku (Bookmark Manager)
config.bind('B', 'spawn buku -a {url}')
#+end_src
** Spell Checking
#+begin_src bash
/usr/share/qutebrowser/scripts/dictcli.py install fr-FR
/usr/share/qutebrowser/scripts/dictcli.py install en-US
#+end_src
2021-01-03 22:52:53 +01:00
** =firefox=
2020-03-19 10:46:47 +01:00
#+begin_src bash
2021-01-03 22:52:53 +01:00
yay -S firefox-developer-edition
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
2021-01-03 22:52:53 +01:00
yay -S xorg-xrandr 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
yay -S pulseaudio pulseaudio-alsa pulseaudio-bluetooth
#+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
2021-01-03 22:52:53 +01:00
yay -S 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
2021-01-01 20:12:34 +01:00
yay -S mopidy
#+end_src
#+begin_src bash
python3 -m pip install --user mopidy-mpd mopidy-jellyfin mopidy-spotify
2020-03-19 10:46:47 +01:00
#+end_src
To update local files:
#+begin_src bash
mopidy local scan
#+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
2021-01-03 22:52:53 +01:00
yay -S 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=.
2021-01-03 22:52:53 +01:00
** =beets= - Library Manager
2020-03-19 10:46:47 +01:00
https://github.com/beetbox/beets
2021-01-03 22:52:53 +01:00
Installation;
2020-03-19 10:46:47 +01:00
#+begin_src bash
yay -S beets
#+end_src
Configuration folder: =~/.config/beets/=
| Command | Usage |
|------------------------+-------------------------------|
| =beet import <folder>= | Import folder to Music folder |
* Movies
2021-01-03 22:52:53 +01:00
** =mpv= - Media Player
Installation:
2020-03-19 10:46:47 +01:00
#+begin_src bash
2021-01-03 22:52:53 +01:00
yay -S mpv
2020-03-19 10:46:47 +01:00
#+end_src
The configuration is set in =/.config/mpv/input.conf=.
2021-01-03 22:52:53 +01:00
** =catt= - Chromecast
2020-03-19 10:46:47 +01:00
https://github.com/skorokithakis/catt
2021-01-03 22:52:53 +01:00
Installation:
2020-03-19 10:46:47 +01:00
#+begin_src bash
yay -S catt
#+end_src
2021-01-03 22:52:53 +01:00
Usage to cast videos to chromecast
2020-03-19 10:46:47 +01:00
| Command | Usage |
|----------------------------------------------------------+--------------------------|
| catt cast "https://www.youtube.com/watch?v=dQw4w9WgXcQ" | Cast youtube video |
| catt cast ./myvideo.mp4 | Cast local video |
| catt add ./myvideo.mp4 | Add a video to the queue |
| catt cast -s ./mysubtitle.srt /myvideo.mp4 | Add sub title |
| catt cast_site https://en.wikipedia.org/wiki/Rickrolling | Cast website |
2021-01-03 22:52:53 +01:00
Usage for controlling the device
2020-03-19 10:46:47 +01:00
| Command | Usage |
|--------------+---------------------------------------------------------------|
| ffwd | Fastforward a video by TIME duration |
| rewind | Rewind a video by TIME duration |
| seek | Seek the video to TIME position |
| scan | Scan the local network and show all Chromecasts and their IPs |
| status | Show some information about the currently-playing video |
| pause | Pause a video |
| play | Resume a video after it has been paused |
| stop | Stop playing |
| skip | Skip to end of content |
| save | Save the current state of the Chromecast for later use |
| restore | Return Chromecast to saved state |
| volume | Set the volume to LVL [0-100] |
| volumedown | Turn down volume by a DELTA increment |
| volumeup | Turn up volume by a DELTA increment |
* 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
yay -Ss mu
#+end_src
This looks for contacts in all indexed emails.
=mu cfind <name>=
2021-01-03 22:52:53 +01:00
* =weechat= - Chat Application
2020-03-19 10:46:47 +01:00
https://weechat.org/files/doc/stable/weechat_user.en.html
https://wiki.archlinux.org/index.php/WeeChat
https://gist.github.com/pascalpoitras/8406501
** Installation
#+begin_src bash
yay -S weechat
#+end_src
Then we install some dependencies
#+begin_src bash
yay -S tcl lua ruby
#+end_src
** Enable mouse support
#+begin_src text
/mouse enable
#+end_src
** Scripts
| highmon.pl | |
| colorize_nicks.py | |
| go.py | |
| autosort.py | |
| buddylist.pl | |
| colorize_lines.pl | |
| multiline.pl | |
** Theme
https://www.bfoliver.com/technology/2017/07/15/weechat/
https://alexjj.com/blog/2016/9/setting-up-weechat/
#+begin_src conf
2020-11-03 11:40:11 +01:00
/set weechat.look.prefix_same_nick "⤷"
/set weechat.look.prefix_error "⚠"
/set weechat.look.prefix_action "⚡"
/set weechat.look.bar_more_down "▼▼"
/set weechat.look.bar_more_left "◀◀"
/set weechat.look.bar_more_right "▶▶"
/set weechat.look.bar_more_up "▲▲"
/set weechat.look.prefix_suffix "╡"
/set weechat.color.chat_nick_colors red,green,brown,blue,magenta,cyan,white,lightred,lightgreen,yellow,lightblue,lightmagenta,lightcyan
/set weechat.color.separator 31
/set buffers.color.current_fg 31
/set buffers.color.current_bg white
/set buffers.color.hotlist_message_fg 229
/set buffers.color.hotlist_private_fg 121
/set buffers.color.hotlist_highlight_fg 163
/set buffers.color.number 239
/set buffers.color.number_char 245
/set weechat.bar.title.conditions "${inactive}"
/set weechat.bar.title.color_fg black
/set weechat.bar.title.color_bg 31 #Or white if 31 does nothing
2020-03-19 10:46:47 +01:00
#+end_src
** Configuration
https://hugo.md/post/the-perfect-weechat-setup-2/
https://robots.thoughtbot.com/weechat-for-slacks-irc-gateway
Use the command =/fset=
** Multi-line messages
Solution is provided here: https://github.com/wee-slack/wee-slack/issues/118
It uses [[https://weechat.org/scripts/source/multiline.pl.html/][multiline.pl]] script.
Then alt-enter is bound to insert a new line:
#+begin_src conf
/set plugins.var.perl.multiline.magic_paste_only on
/key bind meta-ctrl-M /input insert \x0a
#+end_src
And enter is bound to =magic_enter= that directly sends the message if its one line, and if its multiple line, waits a little bit and then sends the message:
#+begin_src conf
/key bind ctrl-M /input magic_enter
#+end_src
** Send message using =$EDITOR=
https://github.com/keith/edit-weechat
#+begin_src bash
mkdir -p ~/.weechat/python/autoload
cd ~/.weechat/python/autoload
wget https://raw.githubusercontent.com/keith/edit-weechat/master/edit.py
#+end_src
Then, on weechat, type =/edit=.
** CheatSheet
| Command | Usage |
|-----------+------------------|
| =Ctlr-N= | Next channel |
| =Ctlr-P= | Previous channel |
| =Esc-n= | Toggle nicklist |
| =alt-ent= | New line |
** Slack Integration
https://github.com/wee-slack/wee-slack
*** Installation
#+begin_src bash
yay -S python2-websocket-client
#+end_src
#+begin_src bash
cd ~/.weechat/python
wget https://raw.githubusercontent.com/wee-slack/wee-slack/master/wee_slack.py
ln -s ../wee_slack.py autoload
#+end_src
*** Add your Slack API key(s)
Log in to Slack:
#+begin_src conf
/slack register
#+end_src
This command prints a link you should open in your browser to authorize WeeChat with Slack. Once you've accomplished this, copy the "code" portion of the URL in the browser and pass it to this command:
#+begin_src conf
/slack register [CODE_FROM_URL]
#+end_src
Your Slack team is now added, and you can complete setup by restarting the wee-slack script.
#+begin_src conf
/python reload slack
#+end_src
If you don't want to store your API token in plaintext you can use the secure features of weechat:
#+begin_src conf
/secure passphrase this is a super secret password
/secure set slack_token [YOUR_SLACK_TOKEN]
/set plugins.var.python.slack.slack_api_token ${sec.data.slack_token}
#+end_src
** Aspell
https://blog.qoba.lt/using_aspell_in_weechat.html
** Notifications
https://github.com/s3rvac/weechat-notify-send
** Deamon and Client
Weechat is started with the systemd service =weechat=.
It runs weechat inside tmux.
2021-01-03 22:52:53 +01:00
* =redshift=
2020-03-19 10:46:47 +01:00
http://jonls.dk/redshift/
#+begin_src bash
yay -S redshift
#+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
yay -S isync
#+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
yay -S msmtp
#+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
yay -S neomutt
#+end_src
*** Display html mails
#+begin_src bash
yay -S w3m
#+end_src
*** Open Url from mail
#+begin_src bash
yay -S urlview
#+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
yay -S ranger
#+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
yay -S sxiv
#+end_src
2021-01-03 22:52:53 +01:00
** Open Gif
2020-03-19 10:46:47 +01:00
#+begin_src bash
sxiv -a file.gif
#+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
yay -S sxhkd
#+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
yay -S i3-gaps
#+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
yay -S polybar
#+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
yay -S picom
#+end_src
** Configuration
=~/.config/picom/picom.conf=
** Automatic run as daemon
Compton is run from =.xprofile= config in the background:
#+begin_src bash
picom --daemon
#+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
yay -S dunst dunstify
#+end_src
** Configuration
=~/.config/dunst/dunstrc=
** Usage
#+begin_src bash
dunstify --replace=16549 "AppName" "Message"
#+end_src
The number =--replace= can be used with an ID to merge notifications from the
same application for instance.
* Office Suite
2021-01-03 22:52:53 +01:00
** =libreoffice=
2020-03-19 10:46:47 +01:00
#+begin_src bash
2021-01-03 22:52:53 +01:00
yay -S libreoffice-fresh libreoffice-fresh-fr
2020-03-19 10:46:47 +01:00
#+end_src
2021-01-03 22:52:53 +01:00
** =wps= Office
#+begin_src bash
yay -S wps-office wps-office-extension-french-dictionary ttf-wps-fonts
#+end_src
2020-03-19 10:46:47 +01:00
2021-01-03 22:52:53 +01:00
** =sc-im= - Minimap SpreadSheet
2020-03-19 10:46:47 +01:00
https://github.com/andmarti1424/sc-im
https://www.youtube.com/watch?v=K_8_gazN7h0
It permits to open Excel files on the terminal very quickly.
#+begin_src bash
yay -S sc-im
#+end_src
2021-01-03 22:52:53 +01:00
* =blueman= - Bluetooth Manager
Bluetooth manager: https://github.com/blueman-project/blueman
2020-03-19 10:46:47 +01:00
#+begin_src bash
2021-01-03 22:52:53 +01:00
yay -Ss blueman
2020-03-19 10:46:47 +01:00
#+end_src
2021-01-03 22:52:53 +01:00
* =udiskie= - Automatically Mount devices
2020-03-19 10:46:47 +01:00
udiskie - Mount and unmount disks (https://github.com/coldfix/udiskie)
#+begin_src bash
yay -S udiskie
#+end_src
Automatically run =udiskie= on startup.
* LaTeX
2021-01-03 22:52:53 +01:00
Installation
2020-03-19 10:46:47 +01:00
#+begin_src bash
yay -S texlive-most
#+end_src
Biber support for the bibliography:
#+begin_src bash
yay -S biber
#+end_src
Support for source code using minted:
#+begin_src bash
yay -S minted
#+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
2021-01-03 22:52:53 +01:00
yay -S 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
2021-01-03 22:52:53 +01:00
yay -S 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
2021-01-03 22:52:53 +01:00
yay -S 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
* Download Manager
2021-01-03 22:52:53 +01:00
** =aria2= and =aria2p=
2020-03-19 10:46:47 +01:00
#+begin_src bash
2021-01-03 22:52:53 +01:00
yay -S aria2
2020-03-19 10:46:47 +01:00
#+end_src
#+begin_src bash
2021-01-03 22:52:53 +01:00
python3 -m pip install --user aria2p[tui]
2020-03-19 10:46:47 +01:00
#+end_src
2021-01-03 22:52:53 +01:00
** =transmission= and =tremc=
2020-03-19 10:46:47 +01:00
#+begin_src bash
2021-01-03 22:52:53 +01:00
yay -S tremc
2020-03-19 10:46:47 +01:00
#+end_src
2021-01-03 22:52:53 +01:00
** =youtube-dl=
2020-03-19 10:46:47 +01:00
#+begin_src bash
2021-01-03 22:52:53 +01:00
yay -S youtube-dl
2020-03-19 10:46:47 +01:00
#+end_src
* Default Applications
https://wiki.archlinux.org/index.php/Default_applications
https://www.guyrutenberg.com/2018/01/20/set-default-application-using-xdg-mime/
2021-01-03 22:52:53 +01:00
2020-03-19 10:46:47 +01:00
=~/.config/mimeapps.list=
* Desktop files
[[file:applications.org][Desktop Applications]]
=~/.local/share/applications/=
* Bibliography Management
I am using a plain bibtex file with =org-ref= ([[https://github.com/jkitchin/org-ref][link]]).
* 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
2021-01-01 20:12:34 +01:00
yay -S vdirsyncer python-requests-oauthlib
2020-03-19 10:46:47 +01:00
#+end_src
#+begin_src bash
sudo pip install requests-oauthlib
#+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
vdirsyncer discover google_calendar
#+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
2021-01-03 22:52:53 +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
systemctl --user status vdirsyncer.service
#+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
yay -S khal
#+end_src
2021-01-03 22:52:53 +01:00
Import ICS files:
2020-03-19 10:46:47 +01:00
#+begin_src bash
khal import even.ics
#+end_src
2021-01-03 22:52:53 +01:00
* =newsboat= - RSS Reader
2020-03-19 10:46:47 +01:00
GUI Alternatives:
- http://www.rssowl.org/
- https://github.com/jangernert/FeedReader
[[file:newsboat.org][Link]] to configuration.
https://github.com/newsboat/newsboat
https://wiki.archlinux.org/index.php/Newsboat
2021-01-03 22:52:53 +01:00
Installation:
2020-03-19 10:46:47 +01:00
#+begin_src bash
2021-01-03 22:52:53 +01:00
yay -S newboat
2020-03-19 10:46:47 +01:00
#+end_src
2021-01-03 22:52:53 +01:00
Configuration:
2020-03-19 10:46:47 +01:00
https://newsboat.org/releases/2.12/docs/newsboat.html
=~/.newsboat/=
https://newsboat.org/releases/2.12/docs/newsboat.html#available-operations
2021-01-03 22:52:53 +01:00
* =orgmode= - Task Manager
* =zathura= - PDF Reader
2020-03-19 10:46:47 +01:00
https://pwmt.org/projects/zathura/
** Installation
#+begin_src bash
yay -S zathura
#+end_src
Then add dependecies to view specific files:
#+begin_src bash
yay -S zathura-pdf-mupdf zathura-djvu zathura-ps zathura-cb
#+end_src
It seems that mupdf is better that poppler to view pdf.
** 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
yay -S pdfpc
#+end_src
*** Video support
#+begin_src bash
yay -S gst-plugins-ugly gst-plugins-good gst-plugins-base-libs gst-plugins-base gst-plugins-bad gst-libav
#+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
* =gtk=/=qt= - Managing Theme
** GTK Themes
Gtk2 themes are managed using the file =~/.gtkrc-2.0= while Gtk3 themes are managed using =~/.config/gtk-3.0/settings.ini=.
2020-03-19 10:46:47 +01:00
2021-01-03 22:52:53 +01:00
*** Gui Manager
2020-03-19 10:46:47 +01:00
2021-01-03 22:52:53 +01:00
To customize the look of the system using GUI application, run ~lxappearance~.
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
2021-01-03 22:52:53 +01:00
yay -S lxappearance
2020-03-19 10:46:47 +01:00
#+end_src
2021-01-03 22:52:53 +01:00
*** Icons and themes
2020-11-03 11:40:11 +01:00
#+begin_src bash
2021-01-03 22:52:53 +01:00
yay -S zukitwo-themes faenza-icon-theme
2020-11-03 11:40:11 +01:00
#+end_src
#+begin_src bash
2021-01-03 22:52:53 +01:00
yay -S arc-gtk-theme
2020-11-03 11:40:11 +01:00
#+end_src
2021-01-03 22:52:53 +01:00
** QT Themes
Run ~qt5ct~ to manage QT Themes.
* =droidcam= - Use Android phone as webcam
2021-01-01 20:12:34 +01:00
#+begin_src bash
yay -S droidcam
#+end_src
Install and run droidcam on the Android phone.
Once both are connected to the same network, run the following command:
#+begin_src bash
droidcam-cli -v -size=1280x720 192.168.1.51 4747
#+end_src
It will create a new video device accessible for all kinds of applications.
To view the flux using mpv:
#+begin_src bash
mpv av://v4l2:/dev/video0
#+end_src
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
yay -S inkscape
#+end_src
* =kdenlive= - Video Editor
[[https://kdenlive.org/fr/][kdenlive]]
#+begin_src bash
yay -S kdenlive
#+end_src
* =kazam= - Screen Recorder
* =obs-studio= - Live streaming and screen recording
https://github.com/obsproject/obs-studio/
#+begin_src bash
yay -Ss obs-studio
#+end_src
To share the screen as a webcam:
http://dlaw.me/webcam-spoofing-with-obs/
#+begin_src bash
yay -S obs-v4l2sink
yay -S v4l2loopback-dkms-git
sudo modprobe v4l2loopback exclusive_caps=1 video_nr=9
#+end_src
* =anydesk= - Remote Desktop
2021-01-01 20:12:34 +01:00
#+begin_src bash
yay -S anydesk-bin
#+end_src
2021-01-03 22:52:53 +01:00
* =wireguard= - VPN
2021-01-01 20:12:34 +01:00
#+begin_src bash
yay -S wireguard-tools
#+end_src
2021-01-03 22:52:53 +01:00
* =nordvpn= - VPN
2020-03-19 10:46:47 +01:00
https://aur.archlinux.org/packages/nordvpn-bin/
https://wiki.archlinux.org/index.php/NordVPN
2021-01-03 22:52:53 +01:00
Installation:
2020-03-19 10:46:47 +01:00
#+begin_src bash
yay -S nordvpn-bin
#+end_src
2021-01-03 22:52:53 +01:00
Configuration:
2020-03-19 10:46:47 +01:00
#+begin_src bash
2021-01-03 22:52:53 +01:00
sudo systemctl enable --now nordvpnd.service
2020-03-19 10:46:47 +01:00
#+end_src
| Command | Usage |
|---------------------------+-------|
| =nordvpn login= | |
| =nordvpn connect country= | |
| =nordvpn disconnect= | |
| =nordvpn status= | |
| =nordvpn countries= | |
* Others
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
2020-04-06 00:11:57 +02:00
yay -S maim flameshot
2020-03-19 10:46:47 +01:00
#+end_src
2021-01-03 22:52:53 +01:00
** =screenkey= - Show pressed keys
2021-01-01 20:12:34 +01:00
#+begin_src bash
yay -S screenkey
#+end_src
2021-01-03 22:52:53 +01:00
** =croc= - File transfer
2020-04-06 00:11:57 +02:00
https://github.com/schollz/croc
2020-03-19 10:46:47 +01:00
#+begin_src bash
2020-04-06 00:11:57 +02:00
yay -S croc
2020-03-19 10:46:47 +01:00
#+end_src
2021-01-03 22:52:53 +01:00
** Find Files
#+begin_src bash
yay -S fd ripgrep fzf
#+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
2021-01-03 22:52:53 +01:00
yay -S pdf2svg pdftk unclutter pdfarranger imagemagick
2020-03-19 10:46:47 +01:00
#+end_src
** Trash
=trash-cli= is used to manage the trash.
It is integrated with Ranger.
2021-01-03 22:52:53 +01:00
#+begin_src bash
yay -S trash-cli
#+end_src
** Google translate from the command line
#+begin_src bash
yay -S translate-shell
#+end_src
#+begin_src bash
trans englishwork en:fr
#+end_src
** Show information about the machine
[[https://github.com/dylanaraps/neofetch][neofetch]]
#+begin_src bash
yay -S neofetch
#+end_src
* Printer
https://wiki.archlinux.org/index.php/CUPS
Web based administration: http://localhost:631/
2020-03-19 10:46:47 +01:00
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
* Kernel Management
https://wiki.manjaro.org/index.php/Manjaro_Kernels
| Command | Usage |
|------------------------------------+---------------------------------------|
| =mhwd-kernel -li= | Determine which kernel is used |
| =sudo mhwd-kernel -i linux419= | Install new kernel |
| =sudo mhwd-kernel -i linux419 rmc= | Install new kernel and remove old one |
* Format disks
https://gparted.org/
2020-03-19 10:46:47 +01:00
2021-01-03 22:52:53 +01:00
=sudo gparted= to format disks
2020-03-19 10:46:47 +01:00
2021-01-03 22:52:53 +01:00
Using command line:
- https://www.digitalocean.com/community/tutorials/how-to-partition-and-format-storage-devices-in-linux
2020-03-19 10:46:47 +01:00
2021-04-25 19:10:57 +02:00
* Useful commands
2020-03-19 10:46:47 +01:00
** Readline
https://wiki.archlinux.org/index.php/Keyboard_shortcuts
| Keyboard | Shortcut Description |
|----------+----------------------|
| Ctrl+l | Clear the screen |
*** Cursor Movement
| Keyboard | Shortcut Description |
|----------+----------------------------------------|
| =Ctrl+b= | Move cursor one character to the left |
| =Ctrl+f= | Move cursor one character to the right |
| =Alt+b= | Move cursor one word to the left |
| =Alt+f= | Move cursor one word to the right |
| =Ctrl+a= | Move cursor to start of the line |
| =Ctrl+e= | Move cursor to end of the line |
*** Copy & Paste
| Keyboard | Shortcut Description |
|--------------+---------------------------------------------------|
| =Ctrl+u= | Cut everything from line start to cursor |
| =Ctrl+k= | Cut everything from the cursor to end of the line |
| =Alt+d= | Cut the current word after the cursor |
| =Ctrl+w= | Cut the current word before the cursor |
| =Ctrl+y= | Paste the previous cut text |
| =Alt+y= | Paste the second latest cut text |
| =Alt+Ctrl+y= | Paste the first argument of the previous command |
| =Alt+./= | Paste the last argument of the previous command |
*** History
| Keyboard | Shortcut Description |
|----------+---------------------------------------|
| =Ctrl+p= | Move to the previous line |
| =Ctrl+n= | Move to the next line |
| =Ctrl+s= | Search |
| =Ctrl+r= | Reverse search |
| =Ctrl+j= | End search |
| =Ctrl+g= | Abort search (restores original line) |
| =Alt+r= | Restores all changes made to line |
*** Completion
| Keyboard | Shortcut Description |
|----------+---------------------------------|
| =Tab= | Auto-complete a name |
| =Alt+?= | List all possible completions |
| =Alt+*= | Insert all possible completions |
** Others
| [[https://github.com/tldr-pages/tldr][tldr]] | Community-driven man pages |
| [[https://github.com/chubin/wttr.in][wttr.in]] | weather in terminal |
| [[https://github.com/michael-lazar/rtv][rtv]] | Reddit in terminal |
| awk | https://linuxhandbook.com/awk-command-tutorial/ |
| [[https://github.com/rupa/z][z]] | Jump around |
| [[https://github.com/nvbn/thefuck][thefuck]] | Magnificent app which corrects your previous console command |
| [[https://github.com/amanusk/s-tui/][s-tui]] | Terminal based CPU stress and monitoring utility |
| [[https://github.com/nicolargo/glances][glances]] | A top/htop alternative |
| [[https://github.com/asciinema/asciinema][asciinema]] | Reccord you terminal |
| [[https://dev.yorhel.nl/ncdu][ncdu]] | See what takes place on the disk |
2020-11-03 11:40:11 +01:00
| [[https://github.com/sharkdp/bat][bat]] | cat alternative |
| [[https://github.com/dalance/procs][procs]] | ps alternative |
| [[https://github.com/chmln/sd][sd]] | sed alternative |
2020-03-19 10:46:47 +01:00
| =meteo= | Get the meteo |
| =sudo cputhrottle PID %PROC= | Limiter l'accès au proc pour un processus |
| =nmap -sP “192.168.1.*"= | Check all ip addresses on local netword |
| =du -sh folder= | Return the size of the folder |
| =df -h= | Report disk usage |
** Archive and Extract
Use =apack= and =aunpack=:
| | |
|-------------------------------+-----------------------------------|
| =aunpack foobar.tar.gz= | extract all files from archive |
| =apack myarchive.zip foo bar= | create a zip archive of two files |
** Hardware
| =dmesg= | Detected hardware and boot messages |
| =lshw= | Display information on hardware |
| =lsusb -tv= | Show usb devices |
** Network
| =ip addr show= | Show all network interfaces and ip address |
| =ethtooo eth0= | Tool to show ethernet status |
| =netstat -tulp= | List all active listening ports |
2021-01-03 22:52:53 +01:00
* After Install
Enable TRIM (SSD only)
2020-11-16 13:48:44 +01:00
#+begin_src bash
sudo systemctl enable --now fstrim.timer
#+end_src
2021-01-03 22:52:53 +01:00
Set the fastest mirror for Pacman
2020-11-16 13:48:44 +01:00
#+begin_src bash
sudo pacman-mirrors --fasttrack
#+end_src
2021-01-03 22:52:53 +01:00
* Configuration for Laptops
** Power Management Tool: Powertop
https://wiki.archlinux.org/index.php/Powertop
https://wiki.manjaro.org/index.php?title=Power_Savings
=PowerTop= a diagnostic tool used to identify and report issues with power consumption and management.
#+begin_src bash
yay -S powertop
#+end_src
=TLP= is used for Power Management.
#+begin_src bash
yay -S tlp
sudo systemctl enable tlp
sudo systemctl start tlp
sudo systemctl enable tlp-sleep
sudo systemctl start tlp-sleep
sudo tlp start
#+end_src
=Thermald= is used to automatically handle CPU frequency scaling according to system load.
#+begin_src bash
yay -S thermald
sudo systemctl enable thermald
sudo systemctl start thermald
#+end_src
** Lid open/close
https://wiki.archlinux.org/index.php/Power_management
Should automatic show lock screen
=/etc/systemd/logind.conf=
2020-03-19 10:46:47 +01:00
* Some notes - Systemd
To improve the startup time.
#+begin_src bash
2020-11-16 13:48:44 +01:00
sudo systemctl disable apparmor
sudo systemctl disable snapd
sudo systemctl disable systemd-backlight@backlight\:intel_backlight.service
2020-03-19 10:46:47 +01:00
#+end_src
To see next timers
#+begin_src matlab
systemctl --user list-timers
#+end_src
2021-04-25 19:10:57 +02:00
* Resources
2020-03-19 10:46:47 +01:00
** Dotfiles
- https://github.com/LukeSmithxyz/voidrice
- https://github.com/wincent/wincent
- https://github.com/korolr/dotfiles
- https://github.com/Shougo/shougo-s-github
- https://github.com/addy-dclxvi/almighty-dotfiles
** Linux Softwares
- [[https://github.com/k4m4/terminals-are-sexy][terminalare.sexy]]
- [[https://www.reddit.com/r/vim/comments/3tluqr/my_list_of_applications_with_vi_keybindings/][the big list of vim like software]]
- https://github.com/jlevy/the-art-of-command-line
- https://github.com/herrbischoff/awesome-command-line-apps
- https://github.com/luongvo209/Awesome-Linux-Software
- https://wiki.archlinux.org/index.php/List_of_applications
- https://ambrevar.xyz/power-apps/
- https://enchiridion.red/2019/1/18/desktop-apps/
2019-01-31 09:41:03 +01:00
2021-01-03 22:52:53 +01:00
* 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
** Micro controllers
2021-01-03 22:52:53 +01:00
| =avrdude= | Atmel AVR MCU programmer |
| =bootloadhid= | USB boot loader for AVR microcontrollers |
| =dfu= | programmer - Device firmware update based USB programmer for Atmel chips |
| =platformio= | Ecosystem for IoT development (Arduino and ARM mbed compatible) |
| =micropython= | Python implementation for microcontrollers and constrained systems |
| =arduino= | mk - Makefile for Arduino sketches |
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 |