#+TITLE: Dotfiles - Manjaro Linux on Macbook Pro
:DRAWER:
#+HTML_HEAD:
#+HTML_HEAD:
#+HTML_HEAD:
#+HTML_HEAD:
#+HTML_HEAD:
#+HTML_HEAD:
:END:
* Ressources
** Dotfiles
- https://github.com/LukeSmithxyz/voidrice
- https://github.com/wincent/wincent
- https://github.com/korolr/dotfiles
- https://github.com/Shougo/shougo-s-github
** 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/
** Macbook Pro
- https://medium.com/@philpl/arch-linux-running-on-my-macbook-2ea525ebefe3
- https://lobotuerto.com/blog/how-to-setup-manjaro-linux-i3-on-a-macbook-pro/
- https://mchladek.me/post/arch-mbp/
- https://0xadada.pub/2016/03/05/install-encrypted-arch-linux-on-apple-macbook-pro/
- https://loicpefferkorn.net/2015/01/arch-linux-sur-macbook-pro-retina-2014-avec-dm-crypt-lvm-et-hibernation/
** Ricing
- https://www.reddit.com/r/unixporn/comments/8monwi/i3gapspolybar_my_first_attempt_at_ricing/
** Others
- Font Art: http://www.patorjk.com/software/taag/#p=display&f=ANSI%20Shadow&t=config
- https://www.youtube.com/channel/UC2eYFnH61tmytImy1mTYvhA
** TODO to read
http://www.howardism.org/Technical/Emacs/literate-devops.html
* Package Manager: yay
https://github.com/Jguer/yay
** Installation
#+BEGIN_SRC bash :tangle ~/dotfiles-install.sh
sudo pacman -S yay
#+END_SRC
** 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 |
* Git Setup
https://git-scm.com/
** Installation
#+BEGIN_SRC bash :tangle ~/dotfiles-install.sh
yay -S git
#+END_SRC
** Configuration
- =~/.gitconfig=
- =~/.gitignore_global=
** Diff-So-Fancy
https://github.com/so-fancy/diff-so-fancy
*** Installation
#+begin_src bash
yay -S diff-so-fancy
#+end_src
*** Configuration
#+begin_src bash
git config --global core.pager "diff-so-fancy | less --tabs=4 -RFX"
#+end_src
** TODO Github interface - Hub
*** Installation
#+begin_src bash
yay -S hub
#+end_src
** Credential Helper setup with Pass
This is explained in a further part: [[*Integration with Git][Integration of Pass with Git]].
* Terminal
https://github.com/thestinger/termite
** Termite
*** Installation
#+BEGIN_SRC bash :tangle ~/dotfiles-install.sh
yay -S termite
#+END_SRC
*** Configuration
- =~/.config/termite/config=
*** Cheatsheet
| 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-shift-up= | scroll up a line |
| =ctrl-shift-down= | scroll down a line |
| =ctrl-+= | increase font size |
| =ctrl--= | decrease font size |
| =ctrl-== | reset font size to default |
** TODO [#C] Unicode Rxvt
*** Installation
#+BEGIN_SRC bash :tangle ~/dotfiles-install.sh
yay -S rxvt-unicode
#+END_SRC
*** Configuration
Most of Urxvt configuration is done in =~/.Xresources=
* TODO [#B] Shell: Bash
https://wiki.archlinux.org/index.php/Bash
** Bash Completion
#+BEGIN_SRC bash :tangle ~/dotfiles-install.sh
yay -S bash-completion
#+END_SRC
** TODO [#B] Configuration
- =~/.bashrc=
- =~/.bash_profile=
- =~/.config/bash/=
- =~/.profile=
* TODO [#B] Terminal Multiplexer: Tmux
https://github.com/tmux/tmux
** Installation
#+BEGIN_SRC bash :tangle ~/dotfiles-install.sh
yay -S tmux
#+END_SRC
** Session Manager - Tmuxinator
https://github.com/tmuxinator/tmuxinator
*** Installation
#+BEGIN_SRC bash
yay -S tmuxinator
#+END_SRC
*** Special sessions
Sessions are created using =tmuxinator new session_name= and edited using =tmuxinator edit session_name=.
*** Mux: run terminal and tmux session
=~/bin/mux=
To open a terminal and run tmux session automatically, run =mux =.
This is used with rofi.
** TODO [#A] Multiple Tmux configuration
- one with no line for neomutt
- one complete for coding
** TODO [#B] Configuration: theme
https://github.com/seebi/tmux-colors-solarized
** TODO [#A] To check
- 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
** TODO [#B] Cheatsheet
| Command | Usage |
|---------+-------|
| | |
* TODO [#C] Fonts
** Installation
#+BEGIN_SRC bash :tangle ~/dotfiles-install.sh
yay -S ttf-inconsolata nerd-font-complete ttf-linux-libertine
#+END_SRC
** TODO [#C] Default fonts
SauceCodePro Nerd Font Mono
Maybe use:
- Monospace Font: Inconsolata
- Serif Font: Libertine
- Sans Font: Linux Biolinum
** Nice fonts
- https://github.com/be5invis/Iosevka
** Emojis
#+BEGIN_SRC bash :tangle ~/dotfiles-install.sh
yay -S ttf-emojione
#+END_SRC
** Cheatsheet
| Command | Usage |
|-----------+--------------------------|
| =fc-list= | List all fonts available |
* Text Editors
** Neovim
https://github.com/neovim/neovim
*** Installation
#+BEGIN_SRC bash :tangle ~/dotfiles-install.sh
yay -S neovim
#+END_SRC
*** Configuration
[[file:.vim/readme.org]]
*** Vim Anywhere with i3
https://github.com/cknadler/vim-anywhere
#+BEGIN_SRC bash
yay -S vim-anywhere-git
#+END_SRC
Then, add the following to the i3 config: =bindsym $mod+t exec vim-anywhere nvim termite=
*** Matlab Setup
https://github.com/daeyun/vim-matlab/
*** Ressources
- https://thoughtbot.com/upcase/dive-into-neovim
- https://github.com/liuchengxu/vim-better-default
- https://github.com/liuchengxu/space-vim
** Emacs
https://www.gnu.org/software/emacs/
*** Installation
#+BEGIN_SRC bash :tangle ~/dotfiles-install.sh
yay -S emacs
#+END_SRC
*** TODO Emacs Client/Server - I removed the systemd service to just run it with i3 startup
Add a systemd service to automatically run Emacs deamon in the background on startup:
=~/.config/systemd/user/emacs.service=
Then run:
#+BEGIN_SRC bash
systemctl enable --user emacs
systemctl start --user emacs
#+END_SRC
In order to open the emacs client: =emacsclient -create-frame --alternate-editor=""=
Then, add a shortcut to i3 config to open an emacsclient.
*** Configuration
[[file:~/.spacemacs.d/spacemacs.org][file:~/.spacemacs.d/spacemacs.org]]
*** SpellCheck with Aspell
#+BEGIN_SRC bash :tangle ~/dotfiles-install.sh
yay -S aspell aspell-en aspell-fr
#+END_SRC
* SSH setup
** Generating a new SSH key
#+BEGIN_SRC bash
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)"
#+END_SRC
** Add the SSH key to the ssh-agent
#+BEGIN_SRC bash
ssh-add ~/.ssh/id_rsa
#+END_SRC
* GnuPG
https://gnupg.org/
** Install the gnupg package:
#+BEGIN_SRC bash
yay -S gnupg
#+END_SRC
** Create a key pair
#+BEGIN_SRC bash
gpg --full-gen-key
#+END_SRC
** Configure the gpg-agent to cache the passphrase
Edit the following file =~/.gnupg/gpg-agent.conf=
#+BEGIN_SRC
max-cache-ttl 60480000
default-cache-ttl 60480000
#+END_SRC
* Password Manager: Pass
https://www.passwordstore.org/
** Install the pass package
#+BEGIN_SRC bash
yay -S pass
#+END_SRC
** TODO Connect the GPG key
** 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
#+END_SRC
** Gui Manager
https://github.com/IJHack/qtpass
#+BEGIN_SRC bash
yay -S qtpass
#+END_SRC
** Integration with Rofi
https://github.com/carnager/rofi-pass
*** Installation
#+BEGIN_SRC bash
yay -S rofi-pass
#+END_SRC
Then we can add a shortcut to =rofi-pass= on i3 config.
*** Alternative
https://github.com/ibizaman/pass-clip
#+begin_src bash
yay -S pass-clip
#+end_src
** Integration with Browsers
This is explained [[*Integration with Pass: the password manager][here]].
** Integration with Git
https://github.com/languitar/pass-git-helper
*** Installation
#+BEGIN_SRC bash
yay -S pass-git-helper
#+END_SRC
*** Configuration
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"=
* Bookmark Manager: Buku
https://github.com/jarun/Buku
** Installation
#+BEGIN_SRC bash
yaourt -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 ~/bin/buku_run
chmod +x ~/bin/buku_run
#+END_SRC
*** Configuration
The configuration file is here: =~/.config/buku_run/config=
*** Key binding with i3
Custom key binding in i3 config file =~/.i3/config=:
#+BEGIN_SRC
bindsym $mod+Shift+f exec --no-startup-id buku_run
#+END_SRC
** 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: =~/scripts/buku_git_push.sh=.
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 start --user bukugit.timer
systemctl enable --user 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 =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 |
** TODO Alternatives
- https://github.com/RadhiFadlillah/shiori
- https://karl-voit.at/2014/08/10/bookmarks-with-orgmode/
* TODO Browser: qutebrowser
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 |
|------------+-------------------|
| == | Download the file |
| =Ctrl-x= | Download and open |
| =Ctrl-p= | Open with pdf.js |
| =Alt-y= | Yank the url |
** TODO Make it default browser
** Integration with Pass: the password manager
Add the key-binding on =~/.config/qutebrowser/config.py=
#+BEGIN_SRC
config.bind('', '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.
** TODO 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
*** TODO Add an option to specify title, modify url? add tags?
** TODO Save Bookmarks to Emacs Org Mode
https://www.reddit.com/r/emacs/comments/9ze1ln/capture_orgmode_bookmarks_from_qutebrowser_with/
** TODO Cast youtube to chromecast
** 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
** TODO Adblocker
https://github.com/qutebrowser/qutebrowser/issues/29
https://github.com/StevenBlack/hosts
** TODO Ressources
- [[https://github.com/qutebrowser/qutebrowser/tree/master/misc/userscripts][Userscript]]
* Monitors
https://github.com/Ventto/mons
https://wiki.archlinux.org/index.php/Xrandr
gui: https://christian.amsuess.com/tools/arandr/
** TODO cscreen script
* Music Setup
** Sound Server - Pulse Audio
https://wiki.archlinux.org/index.php/PulseAudio
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/
** Audio Server - MPD
https://wiki.archlinux.org/index.php/Music_Player_Daemon
*** Installation
#+BEGIN_SRC bash
yay -S mpd
#+END_SRC
*** Automatic Startup
#+BEGIN_SRC bash
systemctl start --user mpd.service
systemctl enable --user mpd.service
#+END_SRC
*** Command line interface to MPD - MPC
https://github.com/MusicPlayerDaemon/mpc
To install mpc: =yay -S mpc=.
| Command | Usage |
|--------------+--------------------|
| =mpc update= | Update the library |
| =mpc rescan= | Rescan the library |
** TODO Audio Server with Spotify - Mopidy
https://github.com/mopidy/mopidy
https://medium.com/@theos.space/using-mopidy-with-spotify-and-ncmpcpp-44352f4a2ce8
** MPD Client - ncmpcpp
https://wiki.archlinux.org/index.php/Ncmpcpp
*** Installation
#+BEGIN_SRC bash
yay -S ncmpcpp
#+END_SRC
*** Config
The main config is located here: =~/.ncmpcpp/config=.
The key bindings can be configured here: =~/.ncmpcpp/bindings=.
*** Cheatsheet
https://pkgbuild.com/~jelle/ncmpcpp/
| Command | Usage |
|---------+-------|
** Library Manager - beets
https://github.com/beetbox/beets
*** Installation
#+BEGIN_SRC bash
yay -S beets
#+END_SRC
*** Configuration
Configuration folder: =~/.config/beets/=
*** Cheatsheet
| Command | Usage |
|------------------------+-------------------------------|
| =beet import = | Import folder to Music folder |
* TODO [#C] Movies
** Media Player - MPV
*** Installation
#+BEGIN_SRC bash
yay -S mpv
#+END_SRC
*** Key Bindings
The configuration is set in =/.config/mpv/input.conf=.
*** TODO CheatSheet
| Command | Usage |
|---------+-------|
** TODO Chromecast with CATT
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 |
** TODO Popcorn Time or similar
** TODO [#C] Movie Collection Manager - Filebot
https://github.com/filebot/filebot
*This is paid software, I should uninstall it and find alternative*
*** Installation
#+BEGIN_SRC bash
yay -S bilebot
#+END_SRC
When runing =filebot=, if you obtain the following error:
=/usr/bin/filebot: line 22: /usr/lib/jvm/java-8-openjdk/bin/java: No such file or directory=.
You can simlink the java binary:
#+BEGIN_SRC bash
sudo ln -s /usr/lib/jvm/java-8-openjdk/jre/bin/java /usr/lib/jvm/java-8-openjdk/bin/java
#+END_SRC
*** Usage
*** Configuration
Configuration folder: =~/.config/filebot/=
*** Documentation
https://www.filebot.net/cli.html
*** TODO Alternative
https://github.com/Sonarr/Sonarr
https://github.com/Radarr/Radarr
https://github.com/tinyMediaManager/tinyMediaManager
** Subtitle Manager
*** subdl
** TODO Youtube
https://github.com/mps-youtube/mps-youtube
* TODO [#A] Contact Manager
https://wiki.archlinux.org/index.php/mutt#Contact_management
https://gitlab.com/goobook/goobook
https://github.com/hensmith/ppl
https://github.com/scheibler/khard
http://abook.sourceforge.net/
** GooBook - Contacts from Google
*** Installation
#+BEGIN_SRC bash
yay -S goobook-git
#+END_SRC
And Then
#+BEGIN_SRC bash
goobook authenticate
#+END_SRC
*** Usage
#+BEGIN_SRC bash
goobook query name
#+END_SRC
** TODO lbdb
*** Installation
#+BEGIN_SRC bash
yay -S lbdb
#+END_SRC
** TODO Use Vdirsyncer for contact synchronization
** TODO Mu
This looks for contacts in your emails.
=mu cfind =
** TODO Integration with Mutt
* TODO Chat Application
** Gui Chat Application - Franz
https://github.com/meetfranz/franz
*** Installation
Download the AppImage and run it.
** Weechat
https://weechat.org/files/doc/stable/weechat_user.en.html
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
*** TODO 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
*** TODO 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
Dependency:
#+begin_src bash
yay -S python2-websocket-client
#+end_src
** TODO Terminal Based - Slack-Term
https://github.com/erroneousboat/slack-term
*** Installation
** TODO Using Emacs
* Redshift
http://jonls.dk/redshift/
** Installation
#+BEGIN_SRC bash
yay -S redshift
#+END_SRC
* TODO [#A] Mail Setup
** Synchronize Mailboxes - Mbsync
http://isync.sourceforge.net/
https://wiki.archlinux.org/index.php/Isync
*** Installation
#+BEGIN_SRC bash
yay -S isync
#+END_SRC
*** TODO Configuration
=~/.mbsyncrc=
*** Automation using systemd
**** Retreive New mails
- =~/scripts/checkmail.sh=
- =~/.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
**** Alternative
https://github.com/rlue/little_red_flag
*** Documentation
https://bostonenginerd.com/posts/notmuch-of-a-mail-setup-part-1-mbsync-msmtp-and-systemd/
https://bostonenginerd.com/posts/notmuch-of-a-mail-setup-part-2-notmuch-and-emacs/
** Send Mails - Msmtp
https://marlam.de/msmtp/
*** Installation
#+BEGIN_SRC bash
yay -S msmtp
#+END_SRC
** Mail Indexer - Notmuch
https://notmuchmail.org/
https://wiki.archlinux.org/index.php/Notmuch
*** Installation
#+BEGIN_SRC bash
yay -S notmuch
#+END_SRC
*** Configuration
Configuration file: =~/.notmuch-config=
*** Cheatsheet
| Command | Usage |
|-----------------+---------------------------------------------|
| =notmuch setup= | Initial Setup |
| =notmuch new= | Incorporate new email into notmuch database |
** TODO [#B] Mail Index, Search and Tagging - Mu
https://github.com/djcb/mu
** TODO [#A] Mail Client - NeoMutt
https://github.com/neomutt/neomutt
*** Installation
#+BEGIN_SRC bash
yay -S neomutt
#+END_SRC
*** TODO Vim Bindings
Unding toutes les touches (https://github.com/iagox86/mutt/blob/master/keybindings.conf) et rebind tout pour faire un truc coherent et documenté
Rajouter les keybindings de vim https://github.com/neomutt/neomutt/issues/56#issuecomment-250780838
*** TODO Mailcap configuration
*** Display html mails
#+BEGIN_SRC bash
yay -S w3m
#+END_SRC
*** Open PDF from mail
=~/scripts/openfile.sh=
*** TODO [#B] Integrate with contact manager
*** TODO Integration with org-mode
https://www.donarmstrong.com/posts/org_mode_mutt_capture/
https://upsilon.cc/~zack/blog/posts/2010/02/integrating_Mutt_with_Org-mode/
*** TODO Send HTML mails using Markdown
https://unix.stackexchange.com/questions/108485/send-email-written-in-markdown-using-mutt/424162
https://github.com/Roguelazer/muttdown
*** Attachments
**** Attach multiple files at once
First, tag the files you want to send using =t=, then =;= to apply the action on all tagged files and finally == to add them all
**** TODO Add attachment using GUI file manager
**** Cheatsheet
| Command | Usage |
|---------+---------------|
| == | Open the file |
*** Open Url from mail
#+BEGIN_SRC bash
yay -S urlview
#+END_SRC
*** TODO View emails while composing
https://wiki.archlinux.org/index.php/Mutt#Display_another_email_while_composing
*** TODO Searching mails with notmuch
https://github.com/tsto/notmuchfs
*** TODO Cheatsheet
| Command | Usage |
|---------+-------|
| | |
*** TODO Integration with calendar application
http://jasonwryan.com/blog/2014/04/05/calendar/
https://gist.github.com/guiniol/5109c5bd953af950e0530b720507d704
=~/scripts/printics.sh=
*** 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
** TODO [#C] Mu4e
** TODO [#C] Notification system
A script (=~/scripts/checkmail.sh=) is used to retreive new mails and use =notify=send= is there are new received mails.
* TODO [#A] File Manager
** TODO [#A] 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.
*** TODO [#B] Cheatsheet
| Command | Usage |
|---------+-------------------------|
| =X= | Extract archive |
| =Z= | Compress file or folder |
** TODO nnn
https://github.com/jarun/nnn
https://www.youtube.com/watch?v=U2n5aGqou9E
*** Installation
#+BEGIN_SRC bash
yay -S nnn
#+END_SRC
** TODO [#C] GUI File Manager: pcmanfm
https://wiki.archlinux.org/index.php/PCManFM
* TODO [#B] Image viewer
** TODO Write a script to open any type of image using the corresponding program
| Filetype | png | pdf | svg |
|----------+-----+---------+---------|
| Program | feh | zathura | inkview |
** Feh - Minimal Image Viewer
https://feh.finalrewind.org/
*** Installation
#+BEGIN_SRC bash
yay -S feh
#+END_SRC
*** Cheatsheet
| Command | Usage |
|---------+----------------|
| =f= | Fullscreen |
| =m= | Show menu |
| =spc= | next image |
| =bspc= | previous image |
| =w= | Fit image |
** TODO Vimiv
https://github.com/karlch/vimiv
*** Installation
#+BEGIN_SRC bash
yay -S vimiv
#+END_SRC
*** TODO Cheatsheet
http://karlch.github.io/vimiv/docs/keybindings_commands#keybinding-cheatsheet
| Command | Usage |
|---------+-------|
** TODO sxiv
https://github.com/muennich/sxiv
https://www.youtube.com/watch?v=GYW9i_u5PYs
*** Installation
#+BEGIN_SRC bash
yay -S sxiv
#+END_SRC
* TODO [#B] Windows Manager - i3
** TODO Installation
#+BEGIN_SRC bash
yay -S i3-gaps
#+END_SRC
** TODO Packages to install/understand
artwork-i3
i3-wallpapers
** TODO Configuration
=~/.i3/config=
** TODO [#C] Specific config per workspace
https://github.com/i3/i3/blob/next/contrib/per-workspace-layout.pl
For instance, default to tabbed windows for workspace dealing with matlab figures.
*** Figures / Matlab
** TODO [#C] Scratchpad
This mode is activated using =cmd-s=.
| Command | Usage |
|---------+------------------------|
| =p= | Music Player - ncmpcpp |
| =m= | Mail Reader - neomutt |
| =c= | Calculator - insect |
To close the current Scratchpad, use =cmd-bsp=
** TODO [#B] CheatSheet
| Command | Usage |
|---------+-------|
* TODO [#B] Custom bar - Polybar
https://polybar.github.io/
** Installation
#+BEGIN_SRC bash
yay -S polybar
#+END_SRC
** TODO [#C] Configuration
=~/.config/polybar/config=
Polybar is launched automatically from i3 config.
** TODO [#B] Add custom modules
- [ ] show passwords
- [ ] show bibliography
- [ ] show bookmarks
- [ ] switch theme (dark/light)
- [ ] suspend, restart, hibernate, lock
** Display unread emails
Let's say we want to display unread emails, and when clicking on that we open our mail client.
#+BEGIN_SRC
[module/unread_mail]
type = custom/script
label-font = 2
format-underline = ${colors.background}
click-left = termite -e "tmuxinator start neomutt" &
format =