From dcd0d1f54f6856a4fa56709f06a62e0d96532bf7 Mon Sep 17 00:00:00 2001 From: Thomas Dehaeze Date: Sun, 6 Feb 2022 21:43:01 +0100 Subject: [PATCH] Update install file for ubuntu --- install.org | 983 +++++++++------------------------------------------- 1 file changed, 169 insertions(+), 814 deletions(-) diff --git a/install.org b/install.org index b2b36f0..df68c4e 100644 --- a/install.org +++ b/install.org @@ -1,59 +1,26 @@ #+TITLE: Installation #+SETUPFILE: ./setup/org-setup-file.org -* =yay= - Package Manager -https://github.com/Jguer/yay - -Installation: -#+begin_src bash - sudo pacman -S yay -#+end_src - -#+caption: =yay= - Cheatsheet -| Command | Usage | -|---------------------+-----------------------------| -| =yay= | Perform system upgrade | -| =yay -Ss = | Search | -| =yay -S = | Install | -| =yay -Si = | Get informations | -| =yay -Rs = | Uninstall | -| =yay -Yc= | Clean unneeded dependencies | - -To check all installed packages: -#+begin_src bash - pacman -Qq | fzf --preview 'pacman -Qil {}' --layout=reverse --bind 'enter:execute(pacman -Qil {} | less)' -#+end_src +* TODO [#A] Issues to handle * =git= - Version Control System Installation: #+begin_src bash - yay -S git +sudo apt install git #+end_src [[file:git.org][Git]] Configuration: - =~/.gitconfig= - =~/.gitignore_global= -[[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: -#+begin_src bash - yay -S diff-so-fancy -#+end_src - -And configured with the following command: -#+begin_src bash - git config --global core.pager "diff-so-fancy | less --tabs=4 -RFX" -#+end_src - -=pass= can be used as credential helper for git repositories. - * =alacritty= - Terminal [[https://github.com/alacritty/alacritty][Alacritty]] is a very nice keyboard-centric terminal. It can be installed like so: #+begin_src bash - yay -S alacritty +sudo add-apt-repository ppa:aslatter/ppa +sudo apt install alacritty #+end_src Its configuration file is described [[file:alacritty.org][here]]. @@ -73,7 +40,7 @@ https://wiki.archlinux.org/index.php/Bash Installation: #+begin_src bash - yay -S bash bash-completion zsh +sudo apt install bash bash-completion zsh #+end_src [[file:bash.org][Bash]] configuration: @@ -87,7 +54,7 @@ https://github.com/tmux/tmux Installation: #+begin_src bash - yay -S tmux +sudo apt install tmux #+end_src [[file:tmux.org][TMUX]] configuration @@ -113,12 +80,14 @@ Ressources: * Fonts My font of choice is =nerd-fonts-hack= which can be installed as so: #+begin_src bash - yay -S nerd-fonts-hack +git clone --depth 1 https://github.com/ryanoasis/nerd-fonts +cd nerd-fonts +./install.sh Hack #+end_src For emojis, use: #+begin_src bash - yay -S noto-fonts-emoji +sudo apt install fonts-noto-color-emoji #+end_src Default font used: @@ -129,13 +98,11 @@ Default font used: To list all fonts available: #+begin_src bash - fc-list +fc-list #+end_src -To select fonts using a GUI, =gtk2fontsel= can be used: -#+begin_src bash - yay -S gtk2fontsel -#+end_src +* TODO Syncthing +https://leandeep.com/installer-syncthing-sur-ubuntu-20.04/ * =emacs= and =vim= - Text Editors ** Neovim @@ -143,21 +110,29 @@ I use [[https://github.com/neovim/neovim][Neovim]] for all the small edits. Installation: #+begin_src bash - yay -S neovim +sudo apt install neovim #+end_src The Neovim configuration can be found [[file:vim.org][here]]. +Simlink the Vim config to Neovim: +#+begin_src bash +mkdir ~/.config/nvim +ln -s ~/.vimrc ~/.config/nvim/init.vim +#+end_src + 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' +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 +nvim +PlugInstall +#+end_src + +#+begin_src bash +nvim +UpdateRemotePlugins #+end_src ** Emacs @@ -165,36 +140,39 @@ I use [[https://www.gnu.org/software/emacs/][Emacs]] and the [[https://github.co Install Emacs: #+begin_src bash - yay -S emacs +sudo snap install emacs --edge --classic #+end_src 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 +git clone --depth 1 https://github.com/hlissner/doom-emacs ~/.emacs.d +#+end_src + +#+begin_src bash +~/.emacs.d/bin/doom install #+end_src The Emacs configuration can be found [[./doom.org][here]]. SpellCheck with Aspell: #+begin_src bash - yay -S aspell aspell-en aspell-fr +sudo apt install aspell aspell-en aspell-fr #+end_src * SSH setup Generate a new SSH key: #+begin_src bash - ssh-keygen -t rsa -b 4096 -C "dehaeze.thomas@gmail.com" +ssh-keygen -t rsa -b 4096 -C "dehaeze.thomas@gmail.com" #+end_src Start the ssh-agent in the background: #+begin_src bash - eval "$(ssh-agent -s)" +eval "$(ssh-agent -s)" #+end_src Add the SSH key to the ssh-agent: #+begin_src bash - ssh-add ~/.ssh/id_rsa +ssh-add ~/.ssh/id_rsa #+end_src * GnuPG @@ -202,23 +180,23 @@ https://gnupg.org/ Install the gnupg package: #+begin_src bash - yay -S gnupg +sudo apt install gnupg #+end_src Create a key pair: #+begin_src bash - gpg --full-gen-key +gpg --full-gen-key #+end_src To configure the =gpg-agent= to cache the passphrase, edit the following file =~/.gnupg/gpg-agent.conf=: #+begin_src conf - default-cache-ttl 60480000 - max-cache-ttl 60480000 +default-cache-ttl 60480000 +max-cache-ttl 60480000 #+end_src Install =Gnome-Keyring= to automatically unlock the GnuPG keys: #+begin_src bash - yay -S gnome-keyring +sudo apt install gnome-keyring #+end_src * =rofi= - Application Launcher @@ -226,24 +204,24 @@ Install =Gnome-Keyring= to automatically unlock the GnuPG keys: Installation: #+begin_src bash - yay -S dmenu rofi rofi-calc +sudo apt install dmenu rofi #+end_src 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. For that to work, we need to add the following code to =~/.profile=: #+begin_src bash - export SUDO_ASKPASS=~/.local/bin/askpass-rofi +export SUDO_ASKPASS=~/.local/bin/askpass-rofi #+end_src -The =askpass= script is: +The =askpass-rofi= script is: #+begin_src bash - #!/bin/sh +#!/bin/sh - rofi -dmenu \ - -password \ - -no-fixed-num-lines \ - -p "$(printf "$1" | sed s/://)" +rofi -dmenu \ + -password \ + -no-fixed-num-lines \ + -p "$(printf "$1" | sed s/://)" #+end_src * =pass= - Password Manager @@ -251,29 +229,30 @@ https://www.passwordstore.org/ Installation: #+begin_src bash - yay -S pass +sudo apt install pass #+end_src -Initialize the password store as a git repository #+begin_src bash - pass git init - pass git remote add origin https://github.com/tdehaeze/pass.git +git clone https://git.tdehaeze.xyz/tdehaeze/pass.git ~/.password-store #+end_src Gui Manager: [[https://github.com/IJHack/qtpass][qtpass]] #+begin_src bash - yay -S qtpass +sudo apt install qtpass #+end_src Integration with Rofi: [[https://github.com/carnager/rofi-pass][rofi-pass]] #+begin_src bash - yay -S rofi-pass +cd ~/.local/soft/ +git clone https://github.com/carnager/rofi-pass +cd rofi-pass +sudo make install #+end_src Then we can add a shortcut to =rofi-pass= on i3 config. Integration with Git: [[https://github.com/languitar/pass-git-helper][pass-git-helper]] #+begin_src bash - yay -S pass-git-helper +sudo apt install 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=: @@ -304,85 +283,34 @@ Bitwarden https://github.com/bitwarden/cli yay -Ss bitwarden-bin bitwarden-cli-bin #+end_src -* =buku= - Bookmark Manager -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 - wget https://raw.githubusercontent.com/carnager/buku_run/master/buku_run -o ~/.local/bin/buku_run - chmod +x ~/.local/bin/buku_run -#+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 - cd ~/.local/share/buku/bookmarks.db - git init -#+end_src - -Then we create a script that will automatically add =bookmarks.db= and push to some repository: =buku_git_push=. - -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 - systemctl --user start --now bukugit.timer -#+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 - bukuserver run --host 127.0.0.1 --port 5001 -#+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/ - * =qutebrowser= - Browser https://github.com/qutebrowser/qutebrowser ** Installation #+begin_src bash - yay -S qutebrowser +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 +#+end_src + +Then it can be launched using [[file:binaries-private.org::#qutebrowser][file:~/.config/literate-dotfiles/binaries-private.org::#qutebrowser]] +#+begin_src bash +~/.local/soft/qutebrowser/.venv/bin/python3 -m qutebrowser +#+end_src + +And upgraded with: +#+begin_src bash +cd ~/.local/soft/qutebrowser/ +mkvenv.py --update #+end_src ** View Pdf inside qutebrowser with pdfjs *** Installation #+begin_src bash - yay -S pdfjs +sudo apt install pdf.js-common #+end_src *** Usage @@ -398,29 +326,21 @@ When opening a pdf file on qutebrowser, you'll be ask for options: Add the key-binding on =~/.config/qutebrowser/config.py= #+begin_src - config.bind(',p', 'spawn --userscript password_fill') +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 +** TODO Spell Checking #+begin_src bash - /usr/share/qutebrowser/scripts/dictcli.py install fr-FR - /usr/share/qutebrowser/scripts/dictcli.py install en-US +./scripts/dictcli.py install fr-FR +./scripts/dictcli.py install en-US #+end_src ** =firefox= #+begin_src bash - yay -S firefox-developer-edition +sudo apt install firefox #+end_src Addons: @@ -431,7 +351,7 @@ Addons: * =xrandr= - Monitor Manager #+begin_src bash - yay -S xorg-xrandr arandr +sudo apt install arandr #+end_src [[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). @@ -443,7 +363,7 @@ https://wiki.archlinux.org/index.php/PulseAudio Installation: #+begin_src bash - yay -S pulseaudio pulseaudio-alsa pulseaudio-bluetooth +sudo apt install pulseaudio pulseaudio-module-bluetooth #+end_src If sound is not working, should run =pulseaudio --kill= to kill the deamon and then =pulseaudio --daemonize= to run it again. @@ -454,7 +374,7 @@ https://www.freedesktop.org/wiki/Software/PulseAudio/Documentation/User/Running/ =pavucontrol= is used as a sound manager: #+begin_src bash - yay -S pavucontrol + sudo apt install pavucontrol #+end_src ** =mopidy= - Audio Server @@ -462,16 +382,17 @@ https://github.com/mopidy/mopidy https://medium.com/@theos.space/using-mopidy-with-spotify-and-ncmpcpp-44352f4a2ce8 #+begin_src bash - yay -S mopidy +sudo apt install mopidy #+end_src #+begin_src bash - python3 -m pip install --user mopidy-mpd mopidy-jellyfin mopidy-spotify +sudo apt install python3-pip +python3 -m pip install --use mopidy-jellyfin #+end_src To update local files: #+begin_src bash - mopidy local scan +mopidy local scan #+end_src If mopidy is used, MPD should be disabled. (=systemctl disable --user mpd.service=) @@ -481,70 +402,21 @@ https://wiki.archlinux.org/index.php/Ncmpcpp Installation: #+begin_src bash - yay -S ncmpcpp +sudo apt install ncmpcpp #+end_src The main config is located here: =~/.ncmpcpp/config=. The key bindings can be configured here: =~/.ncmpcpp/bindings=. -** =beets= - Library Manager -https://github.com/beetbox/beets - -Installation; -#+begin_src bash - yay -S beets -#+end_src - -Configuration folder: =~/.config/beets/= - -| Command | Usage | -|------------------------+-------------------------------| -| =beet import = | Import folder to Music folder | - * Movies ** =mpv= - Media Player Installation: #+begin_src bash - yay -S mpv + sudo apt install mpv #+end_src The configuration is set in =/.config/mpv/input.conf=. -** =catt= - Chromecast -https://github.com/skorokithakis/catt - -Installation: -#+begin_src bash - yay -S catt -#+end_src - -Usage to cast videos to chromecast -| 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 | - -Usage for controlling the device -| 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 ** =khard= - Google Conctacts https://github.com/scheibler/khard @@ -562,159 +434,17 @@ To search with Khard: =khard = ** =mu= - Index Emails #+begin_src bash - yay -Ss mu +sudo apt install maildir-utils #+end_src This looks for contacts in all indexed emails. =mu cfind = -* =weechat= - Chat Application -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 - /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 -#+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. - * =redshift= http://jonls.dk/redshift/ #+begin_src bash - yay -S redshift + sudo apt install redshift #+end_src * Mail Setup @@ -726,7 +456,7 @@ https://wiki.archlinux.org/index.php/Isync *** Installation #+begin_src bash - yay -S isync +sudo apt install isync #+end_src *** Configuration @@ -757,7 +487,7 @@ https://marlam.de/msmtp/ *** Installation #+begin_src bash - yay -S msmtp +sudo apt install msmtp #+end_src ** =mu= - Mail Index, Search and Tagging @@ -768,17 +498,17 @@ https://github.com/neomutt/neomutt *** Installation #+begin_src bash - yay -S neomutt +sudo apt install neomutt #+end_src *** Display html mails #+begin_src bash - yay -S w3m + sudo apt install w3m #+end_src *** Open Url from mail #+begin_src bash - yay -S urlview + sudo apt install urlview #+end_src *** Ressources @@ -798,7 +528,7 @@ Configuration files: https://github.com/ranger/ranger *** Installation #+begin_src bash -yay -S ranger +sudo apt install ranger #+end_src *** Configuration @@ -820,12 +550,12 @@ https://www.youtube.com/watch?v=GYW9i_u5PYs ** Installation #+begin_src bash - yay -S sxiv +sudo apt install sxiv #+end_src ** Open Gif #+begin_src bash - sxiv -a file.gif +sxiv -a file.gif #+end_src ** Cheatsheet @@ -840,7 +570,7 @@ https://www.youtube.com/watch?v=GYW9i_u5PYs * =sxhkd= - HotKey Manager #+begin_src bash - yay -S sxhkd +sudo apt install sxhkd #+end_src Configuration file: [[file:sxhkd.org][SXHKD]]. @@ -850,7 +580,8 @@ Configuration file: [[file:sxhkd.org][SXHKD]]. ** Installation #+begin_src bash - yay -S i3-gaps +sudo add-apt-repository -y ppa:regolith-linux/stable +sudo apt install i3-gaps #+end_src ** Configuration @@ -863,7 +594,14 @@ https://polybar.github.io/ ** Installation #+begin_src bash - yay -S polybar +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 #+end_src * =picom= - Compositor @@ -873,7 +611,7 @@ https://wiki.archlinux.org/index.php/Picom ** Installation #+begin_src bash - yay -S picom +sudo apt install picom #+end_src ** Configuration @@ -882,7 +620,7 @@ https://wiki.archlinux.org/index.php/Picom ** Automatic run as daemon Compton is run from =.xprofile= config in the background: #+begin_src bash - picom --daemon +picom --daemon #+end_src * =dunst= - Notification Manager @@ -891,7 +629,7 @@ https://wiki.archlinux.org/index.php/Dunst ** Installation #+begin_src bash - yay -S dunst dunstify +sudo apt install dunst notify-send #+end_src ** Configuration @@ -899,63 +637,16 @@ https://wiki.archlinux.org/index.php/Dunst ** Usage #+begin_src bash - dunstify --replace=16549 "AppName" "Message" + notify-send "AppName" "Message" #+end_src The number =--replace= can be used with an ID to merge notifications from the same application for instance. -* Office Suite -** =libreoffice= -#+begin_src bash - yay -S libreoffice-fresh libreoffice-fresh-fr -#+end_src - -** =wps= Office -#+begin_src bash - yay -S wps-office wps-office-extension-french-dictionary ttf-wps-fonts -#+end_src - -** =sc-im= - Minimap SpreadSheet -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 - -* =blueman= - Bluetooth Manager -Bluetooth manager: https://github.com/blueman-project/blueman - -#+begin_src bash - yay -Ss blueman -#+end_src - -* =udiskie= - Automatically Mount devices -udiskie - Mount and unmount disks (https://github.com/coldfix/udiskie) - -#+begin_src bash - yay -S udiskie -#+end_src - -Automatically run =udiskie= on startup. - * LaTeX Installation #+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 +sudo apt install texlive-full #+end_src Every custom class or packages can be put under =~/.local/share/texmf/tex/latex/local/= folder. @@ -967,7 +658,7 @@ https://github.com/sharkdp/insect Installation #+begin_src bash - yay -S insect + sudo apt install insect #+end_src | Command | Usage | @@ -981,7 +672,7 @@ https://wiki.archlinux.org/index.php/MATLAB#Installation Installation #+begin_src bash - yay -S matlab + sudo apt install matlab #+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]]. @@ -992,47 +683,13 @@ https://wiki.archlinux.org/index.php/SageMath Installation #+begin_src bash - yay -S sagemath + sudo apt install sagemath #+end_src Run =sage -n jupyter= to run jupyter notebooks ** Python and Jupyter-notebook -* Download Manager -** =aria2= and =aria2p= -#+begin_src bash - yay -S aria2 -#+end_src - -#+begin_src bash - python3 -m pip install --user aria2p[tui] -#+end_src - -** =transmission= and =tremc= -#+begin_src bash - yay -S tremc -#+end_src - -** =youtube-dl= -#+begin_src bash - yay -S youtube-dl -#+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/ - -=~/.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 [[file:calendar-contact.org][Link]] to configuration @@ -1041,11 +698,11 @@ https://github.com/pimutils/vdirsyncer Installation: #+begin_src bash - yay -S vdirsyncer python-requests-oauthlib +sudo apt install vdirsyncer python-requests-oauthlib-doc #+end_src #+begin_src bash - sudo pip install requests-oauthlib +sudo pip install requests-oauthlib #+end_src | Command | Usage | @@ -1054,17 +711,17 @@ Installation: Setup the =google_calendar=: #+begin_src bash - vdirsyncer discover google_calendar +vdirsyncer discover radicale_calendar #+end_src And start the =systemd= timer that automatically synchronize the calendars; #+begin_src bash - systemctl --user enable --now vdirsyncer.timer +systemctl --user enable --now vdirsyncer.timer #+end_src To check the status of the service: #+begin_src bash - systemctl --user status vdirsyncer.service +systemctl --user status vdirsyncer.service #+end_src ** =khal= - Calendar Client @@ -1072,50 +729,26 @@ https://github.com/pimutils/khal Installation: #+begin_src bash - yay -S khal +sudo apt install khal #+end_src Import ICS files: #+begin_src bash - khal import even.ics +khal import even.ics #+end_src -* =newsboat= - RSS Reader -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 - -Installation: -#+begin_src bash - yay -S newboat -#+end_src - -Configuration: -https://newsboat.org/releases/2.12/docs/newsboat.html -=~/.newsboat/= - -https://newsboat.org/releases/2.12/docs/newsboat.html#available-operations - -* =orgmode= - Task Manager * =zathura= - PDF Reader https://pwmt.org/projects/zathura/ ** Installation #+begin_src bash - yay -S zathura +sudo apt install zathura #+end_src Then add dependecies to view specific files: #+begin_src bash - yay -S zathura-pdf-mupdf zathura-djvu zathura-ps zathura-cb +sudo apt install 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= @@ -1147,12 +780,12 @@ pdfpc is a great tool for showing pdf presentations. It support: *** Installation #+begin_src bash - yay -S pdfpc + sudo apt install 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 + sudo apt install gst-plugins-ugly gst-plugins-good gst-plugins-base-libs gst-plugins-base gst-plugins-bad gst-libav #+end_src *** Usage @@ -1172,137 +805,60 @@ Add "type=x11" in =/etc/pam.d/system-login=: - When executing =loginctl session-status | grep Service= X11 should appear as initialized. - =echo $XDG_SESSION_TYPE= should show =x11= instead of =tty= now -* =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=. - -*** Gui Manager - -To customize the look of the system using GUI application, run ~lxappearance~. - -Installation: -#+begin_src bash - yay -S lxappearance -#+end_src - -*** Icons and themes -#+begin_src bash - yay -S zukitwo-themes faenza-icon-theme -#+end_src - -#+begin_src bash - yay -S arc-gtk-theme -#+end_src - -** QT Themes -Run ~qt5ct~ to manage QT Themes. - -* =droidcam= - Use Android phone as webcam -#+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 - * =inkscape= - Graphical Editor - https://inkscape.org/ - Tikz #+begin_src bash - yay -S inkscape +sudo add-apt-repository ppa:inkscape.dev/stable +sudo apt update +sudo apt install inkscape #+end_src -* =kdenlive= - Video Editor -[[https://kdenlive.org/fr/][kdenlive]] - +* TODO =wireguard= - VPN #+begin_src bash - yay -S kdenlive +sudo apt install wireguard-tools #+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 -#+begin_src bash - yay -S anydesk-bin -#+end_src - -* =wireguard= - VPN -#+begin_src bash - yay -S wireguard-tools -#+end_src - -* =nordvpn= - VPN -https://aur.archlinux.org/packages/nordvpn-bin/ -https://wiki.archlinux.org/index.php/NordVPN - -Installation: -#+begin_src bash - yay -S nordvpn-bin -#+end_src - -Configuration: -#+begin_src bash - sudo systemctl enable --now nordvpnd.service -#+end_src - -| Command | Usage | -|---------------------------+-------| -| =nordvpn login= | | -| =nordvpn connect country= | | -| =nordvpn disconnect= | | -| =nordvpn status= | | -| =nordvpn countries= | | - * Others +** Things to install +#+begin_src bash +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 +#+end_src + +Diff so fancy +#+begin_src bash +sudo add-apt-repository ppa:aos1/diff-so-fancy +sudo apt-get update +sudo apt install diff-so-fancy +#+end_src + +#+begin_src bash +cd ~/.local/bin +wget https://raw.githubusercontent.com/carnager/rofi-pass/master/rofi-pass +chmod +x rofi-pass +#+end_src + +For image preview in =ranger=: +#+begin_src bash +sudo pip3 install ueberzug +#+end_src + ** =maim=/=flameshot= - Take Screenshots - https://github.com/naelstrof/maim - https://github.com/lupoDharkael/flameshot #+begin_src bash - yay -S maim flameshot -#+end_src - -** =screenkey= - Show pressed keys -#+begin_src bash - yay -S screenkey -#+end_src - -** =croc= - File transfer -https://github.com/schollz/croc - -#+begin_src bash - yay -S croc +sudo apt install maim flameshot #+end_src ** Find Files #+begin_src bash - yay -S fd ripgrep fzf +sudo apt install fd-find ripgrep fzf #+end_src ** PDF/Image Utilities @@ -1311,7 +867,7 @@ https://github.com/schollz/croc - https://github.com/Airblader/unclutter-xfixes #+begin_src bash - yay -S pdf2svg pdftk unclutter pdfarranger imagemagick +sudo apt install pdf2svg pdftk unclutter pdfarranger imagemagick #+end_src ** Trash @@ -1319,29 +875,18 @@ https://github.com/schollz/croc It is integrated with =ranger= and =pcmanFM=. #+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 +sudo apt install trash-cli #+end_src * Printer https://wiki.archlinux.org/index.php/CUPS Web based administration: http://localhost:631/ +To install the ESRF printer: +#+begin_src bash +lpadmin -p ctb127c1u -v ipp://cups.esrf.fr/printers/ctb127c1u -E +#+end_src + =system-config-printer= Check the queue @@ -1371,188 +916,6 @@ Stats about the printer 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/ - -=sudo gparted= to format disks - -Using command line: -- https://www.digitalocean.com/community/tutorials/how-to-partition-and-format-storage-devices-in-linux - -* Useful commands -** 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 | -| [[https://github.com/sharkdp/bat][bat]] | cat alternative | -| [[https://github.com/dalance/procs][procs]] | ps alternative | -| [[https://github.com/chmln/sd][sd]] | sed alternative | - - -| =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 | - -* After Install -Enable TRIM (SSD only) -#+begin_src bash - sudo systemctl enable --now fstrim.timer -#+end_src - -Set the fastest mirror for Pacman -#+begin_src bash - sudo pacman-mirrors --fasttrack -#+end_src - -* 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= - -* Some notes - Systemd -To improve the startup time. - -#+begin_src bash - sudo systemctl disable apparmor - sudo systemctl disable snapd - sudo systemctl disable systemd-backlight@backlight\:intel_backlight.service -#+end_src - -To see next timers -#+begin_src matlab - systemctl --user list-timers -#+end_src - -* Resources -** 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/ - * List of all the install programs ** Mutt | =neomutt= | Teaching an Old Dog New Tricks | @@ -1568,14 +931,6 @@ To see next timers | =ripmime= | Extract attachments out of MIME encoded email packages | | =shared= | mime-info - Database of common MIME types | -** Micro controllers -| =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 | - ** File Management | =grep= | GNU grep, egrep and fgrep | | =pdfgrep= | Search PDFs for strings matching a regular expression |