Dotfiles - Manjaro Linux on Macbook Pro
Table of Contents
- 1. Ressources
- 2. TODO Make one org file for each configuration and reference from this file
- 3. TODO Create a makefile or script to automatically tangle all the config files
- 4. Package Manager: yay
- 5. Git Setup
- 6. TODO Dotfile Manager: yadm
- 7. Terminal
- 8. TODO Shell: Bash
- 9. TODO Terminal Multiplexer: Tmux
- 10. TODO Fonts
- 11. Text Editors
- 12. SSH setup
- 13. GnuPG
- 14. Password Manager: Pass
- 15. Bookmark Manager: Buku
- 16. TODO Browser: qutebrowser
- 16.1. Installation
- 16.2. View Pdf inside qutebrowser with pdfjs
- 16.3. TODO Make it default browser
- 16.4. Integration with Pass: the password manager
- 16.5. TODO Integration with Buku
- 16.6. TODO Sage Bookmarks to Emacs Org Mode
- 16.7. TODO Chromecast integration
- 16.8. TODO Adblocker
- 16.9. TODO Ressources
- 17. Monitors
- 18. Music Setup
- 19. TODO Movies
- 20. TODO Contact Manager
- 21. TODO Chat Application
- 22. Redshift
- 23. TODO Mail Setup
- 23.1. Synchronize Mailboxes - Mbsync
- 23.2. Send Mails - Msmtp
- 23.3. Mail Indexer - Notmuch
- 23.4. TODO Mail Index, Search and Tagging - Mu
- 23.5. TODO Mail Client - NeoMutt
- 23.5.1. Installation
- 23.5.2. TODO Vim Bindings
- 23.5.3. TODO Mailcap configuration
- 23.5.4. Display html mails
- 23.5.5. Open PDF from mail
- 23.5.6. TODO Integrate with contact manager
- 23.5.7. TODO Integration with org-mode
- 23.5.8. TODO Send HTML mails using Markdown
- 23.5.9. Attachments
- 23.5.10. Open Url from mail
- 23.5.11. TODO View emails while composing
- 23.5.12. TODO Searching mails with notmuch
- 23.5.13. TODO Cheatsheet
- 23.5.14. TODO Integration with calendar application
- 23.5.15. Ressources
- 23.6. TODO Mu4e
- 23.7. TODO Notification system
- 24. TODO File Manager
- 25. TODO Image viewer
- 26. TODO Windows Manager - i3
- 27. TODO Custom bar - Polybar
- 28. TODO Compositor - Compton
- 29. TODO Notification Manager - Dunst
- 30. Managing Theme
- 31. Launcher - Rofi
- 32. TODO Advanced config
- 32.1. TODO Deactivate startup mac sound
- 32.2. TODO Webcam
- 32.3. TODO Trackpad
- 32.4. TODO Startup programs
- 32.5. TODO Printer
- 32.6. TODO Kernel Management
- 32.7. TODO Power Consumption
- 32.8. TODO Power Management Tool: TLP and Powertop
- 32.9. TODO Suspend / Hibernate
- 32.10. TODO Lid open/close
- 32.11. TODO Mount devices
- 32.12. TODO NAS Synology
- 32.13. TODO Format disks
- 32.14. TODO Bluetooth
- 32.15. TODO Wifi
- 32.16. TODO Temperature and Fan control
- 32.17. TODO Refind / Grub
- 32.18. TODO Lock Screen
- 33. TODO LaTeX
- 34. Mathematical Software
- 35. TODO Cloud Backup / Sync - Rclone
- 36. Download Manager
- 37. TODO Default Applications
- 38. TODO Desktop files
- 39. TODO Bibliography Management
- 40. TODO Calendar
- 41. TODO Presentation software
- 42. TODO RSS Reader
- 43. TODO Task Manager
- 44. Background manager: nitrogen
- 45. PDF Reader: Zathura
- 46. TODO Theme manager
- 47. TODO Graphical Editor
- 48. TODO System monitor: conky
- 49. TODO Bugs
- 50. TODO Games on Linux
- 51. TODO VPN Setup
- 52. Others
- 53. TODO Usefull commands
- 54. TODO Custom scripts
- 55. TODO Bash Snippets
1 Ressources
1.1 Dotfiles
1.2 Linux Softwares
1.3 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/
1.4 Ricing
1.5 Others
1.6 TODO to read
2 TODO Make one org file for each configuration and reference from this file
[X]
git[X]
termite[X]
bash[X]
tmux[ ]
emacs[X]
vim[X]
buku[X]
qutebrowser[X]
music[X]
mails[X]
ranger[X]
i3[X]
polybar[X]
compton[X]
dunst[X]
rofi[X]
zathura[X]
newsboat
3 TODO Create a makefile or script to automatically tangle all the config files
4 Package Manager: yay
4.1 Installation
sudo pacman -S yay
4.2 CheatSheet
Command | Usage |
---|---|
yay -Ss <package> |
Search |
yay -S <package> |
Install |
yay -Si <package> |
Get informations |
yay -Rs <package> |
Uninstall |
yay -Yc <package> |
Clean unneeded dependencies |
yay -Syu --devel --timeupdate |
Perform system upgrade |
5 Git Setup
5.1 Installation
yay -S git
5.2 Configuration
~/.gitconfig
~/.gitignore_global
5.3 Diff-So-Fancy
5.3.1 Installation
yay -S diff-so-fancy
5.3.2 Configuration
git config --global core.pager "diff-so-fancy | less --tabs=4 -RFX"
5.4 TODO Github interface - Hub
5.4.1 Installation
yay -S hub
5.5 Credential Helper setup with Pass
This is explained in a further part: Integration of Pass with Git.
6 TODO Dotfile Manager: yadm
6.1 Installation
yay -S yadm-git
6.2 TODO Managing Yadm with Magit on Emacs
6.3 TODO Switch from YADM to litterate dotfiles
7 Terminal
7.1 Termite
7.1.1 Installation
yay -S termite
7.1.2 Configuration
~/.config/termite/config
7.1.3 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 |
7.2 TODO Unicode Rxvt
7.2.1 Installation
yay -S rxvt-unicode
7.2.2 Configuration
Most of Urxvt configuration is done in ~/.Xresources
8 TODO Shell: Bash
8.1 Bash Completion
yay -S bash-completion
8.2 TODO Configuration
~/.bashrc
~/.bash_profile
~/.config/bash/
~/.profile
9 TODO Terminal Multiplexer: Tmux
9.1 Installation
yay -S tmux
9.2 Session Manager - Tmuxinator
9.2.1 Installation
yay -S tmuxinator
9.2.2 Special sessions
Sessions are created using tmuxinator new session_name
and edited using tmuxinator edit session_name
.
9.2.3 Mux: run terminal and tmux session
~/bin/mux
To open a terminal and run tmux session automatically, run mux <session-name>
.
This is used with rofi.
9.3 TODO Multiple Tmux configuration
- one with no line for neomutt
- one complete for coding
9.4 TODO Configuration: theme
9.5 TODO To check
9.6 TODO Cheatsheet
Command | Usage |
---|---|
10 TODO Fonts
10.1 Installation
yay -S ttf-inconsolata nerd-font-complete ttf-linux-libertine
10.2 TODO Default fonts
SauceCodePro Nerd Font Mono
Maybe use:
- Monospace Font: Inconsolata
- Serif Font: Libertine
- Sans Font: Linux Biolinum
10.3 Emojis
yay -S ttf-emojione
10.4 Cheatsheet
Command | Usage |
---|---|
fc-list |
List all fonts available |
11 Text Editors
11.1 Neovim
11.1.1 Installation
yay -S neovim
11.1.2 Configuration
11.1.3 Vim Anywhere with i3
https://github.com/cknadler/vim-anywhere
yay -S vim-anywhere-git
Then, add the following to the i3 config: bindsym $mod+t exec vim-anywhere nvim termite
11.1.4 Matlab Setup
11.2 Emacs
11.2.1 Installation
yay -S emacs
11.2.2 Emacs Client/Server
Add a systemd service to automatically run Emacs deamon in the background on startup:
~/.config/systemd/user/emacs.service
Then run:
systemctl enable --user emacs systemctl start --user emacs
In order to open the emacs client: emacsclient -create-frame --alternate-editor
""=
Then, add a shortcut to i3 config to open an emacsclient.
11.2.3 Configuration
11.2.4 SpellCheck with Aspell
yay -S aspell aspell-en aspell-fr
12 SSH setup
12.1 Generating a new SSH key
ssh-keygen -t rsa -b 4096 -C "dehaeze.thomas@gmail.com"
12.2 Start the ssh-agent in the background
eval "$(ssh-agent -s)"
12.3 Add the SSH key to the ssh-agent
ssh-add ~/.ssh/id_rsa
13 GnuPG
13.1 Install the gnupg package:
yay -S gnupg
13.2 Create a key pair
gpg --full-gen-key
13.3 Configure the gpg-agent to cache the passphrase
Edit the following file ~/.gnupg/gpg-agent.conf
max-cache-ttl 60480000 default-cache-ttl 60480000
14 Password Manager: Pass
14.1 Install the pass package
yay -S pass
14.2 TODO Connect the GPG key
14.3 Initialize the password store as a git repository
pass git init pass git remote add origin https://github.com/tdehaeze/pass.git
14.4 Gui Manager
https://github.com/IJHack/qtpass
yay -S qtpass
14.5 IOs app
14.6 Integration with Rofi
14.6.1 Installation
yay -S rofi-pass
Then we can add a shortcut to rofi-pass
on i3 config.
14.7 Integration with Browsers
This is explained here.
14.8 Integration with Git
14.8.1 Installation
yay -S pass-git-helper
14.8.2 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
:
[github.com*] target=github.com/tdehaeze
Then, add the credential helper on the git configuration file ~/.gitconfig
and add the default username for the repositories adresses.
[credential] helper = !pass-git-helper $@ [credential "https://github.com"] username = tdehaeze
14.9 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"
15 Bookmark Manager: Buku
15.1 Installation
yaourt -S buku
15.2 Integration with Rofi
15.2.1 Installation
wget https://raw.githubusercontent.com/carnager/buku_run/master/buku_run -o ~/bin/buku_run chmod +x ~/bin/buku_run
15.2.2 Configuration
The configuration file is here: ~/.config/buku_run/config
15.2.3 Key binding with i3
Custom key binding in i3 config file ~/.i3/config
:
bindsym $mod+Shift+f exec --no-startup-id buku_run
15.3 Integration with qutebrowser
15.4 Synchronization with a git repository
The database is stored in ~/.local/share/buku/bookmarks.db
.
We initialize a git repository in this folder:
cd ~/.local/share/buku/bookmarks.db
git init
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
systemctl start --user bukugit.timer systemctl enable --user bukugit.timer
15.5 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' ''
15.6 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 |
16 TODO Browser: qutebrowser
16.1 Installation
yay -S qutebrowser
16.2 View Pdf inside qutebrowser with pdfjs
16.2.1 Installation
yay -S pdfjs
16.2.2 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 |
16.3 TODO Make it default browser
16.4 Integration with Pass: the password manager
Add the key-binding on ~/.config/qutebrowser/config.py
config.bind('<Ctrl-p>', 'spawn --userscript password_fill')
The password_fill
script can be found on github.com.
It is configured using the ~/.config/qutebrowser/password_fill_rc
file.
16.5 TODO Integration with Buku
Custom key binding in ~/.config/qutebrowser/config.py
# Add current page to Buku (Bookmark Manager) config.bind('B', 'spawn buku -a {url}')
16.5.1 TODO Add an option to specify title, modify url? add tags?
16.6 TODO Sage Bookmarks to Emacs Org Mode
16.7 TODO Chromecast integration
16.8 TODO Adblocker
16.9 TODO Ressources
17 Monitors
https://github.com/Ventto/mons https://wiki.archlinux.org/index.php/Xrandr gui: https://christian.amsuess.com/tools/arandr/
17.1 TODO cscreen script
18 Music Setup
18.1 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/
18.2 Audio Server - MPD
18.2.1 Installation
yay -S mpd
18.2.2 Automatic Startup
systemctl start --user mpd.service systemctl enable --user mpd.service
18.2.3 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 |
18.3 MPD Client - ncmpcpp
18.3.1 Installation
yay -S ncmpcpp
18.3.2 Config
The main config is located here: ~/.ncmpcpp/config
.
The key bindings can be configured here: ~/.ncmpcpp/bindings
.
18.3.3 Cheatsheet
https://pkgbuild.com/~jelle/ncmpcpp/
Command | Usage |
18.4 Library Manager - beets
18.4.1 Installation
yay -S beets
18.4.2 Configuration
Configuration folder: ~/.config/beets/
18.4.3 Cheatsheet
Command | Usage |
---|---|
beet import <folder> |
Import folder to Music folder |
19 TODO Movies
19.1 Media Player - MPV
19.1.1 Installation
yay -S mpv
19.1.2 Key Bindings
The configuration is set in /.config/mpv/input.conf
.
19.1.3 TODO CheatSheet
Command | Usage |
19.2 Chromecast
19.2.1 Installation
yay -S install castnow-git
19.2.2 Cast from youtube
youtube-dl -o - https://youtu.be/BaW_jenozKc | castnow --quiet -
19.2.3 Cast using local file
// start playback of a local video file castnow ./myvideo.mp4 // start playback of video and mp3 files in the local directory castnow ./mydirectory/ // playback 3 videos after each other castnow video1.mp4 video2.mp4 video3.mp4
19.2.4 Cast from torrent
// start playback of an mp4 file over the web castnow http://commondatastorage.googleapis.com/gtv-videos-bucket/ED_1280.mp4 // start playback of a video over torrent castnow <url-to-torrent-file OR magnet> // start playback of a video over torrent with local subtitles castnow <url-to-torrent-file OR magnet> --subtitles </local/path/to/subtitles.srt>
19.2.5 TODO Cast from qutebrowser on youtube
This is explained here: Chromecast integration.
19.2.6 Alternative - mkchromecast
19.2.6.1 Installation
yay -S mkchromecast
19.2.6.2 TODO Usage
mkchromecast –video -i video.mkv
19.3 TODO Popcorn Time or similar
19.4 TODO Movie Collection Manager - Filebot
https://github.com/filebot/filebot This is paid software, I should uninstall it and find alternative
19.4.1 Installation
yay -S bilebot
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:
sudo ln -s /usr/lib/jvm/java-8-openjdk/jre/bin/java /usr/lib/jvm/java-8-openjdk/bin/java
19.4.2 Usage
19.4.3 Configuration
Configuration folder: ~/.config/filebot/
19.4.4 Documentation
19.5 Subtitle Manager
19.5.1 subdl
19.6 TODO Youtube
20 TODO 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/
20.1 GooBook - Contacts from Google
20.1.1 Installation
yay -S goobook-git
And Then
goobook authenticate
20.1.2 Usage
goobook query name
20.2 TODO lbdb
20.2.1 Installation
yay -S lbdb
20.3 TODO Use Vdirsyncer for contact synchronization
20.4 TODO Mu
This looks for contacts in your emails.
mu cfind <name>
20.5 TODO Integration with Mutt
21 TODO Chat Application
21.1 Gui Chat Application - Franz
21.1.1 Installation
Download the AppImage and run it.
21.2 TODO Terminal Based - Slack-Term
21.2.1 Installation
21.3 TODO Using Emacs
23 TODO Mail Setup
23.1 Synchronize Mailboxes - Mbsync
23.1.1 Installation
yay -S isync
23.1.2 TODO Configuration
~/.mbsyncrc
23.1.3 Automation using systemd
23.1.3.1 Retreive New mails
~/scripts/checkmail.sh
~/.config/systemd/user/checkmail.service
~/.config/systemd/user/checkmail.timer
systemctl --user enable checkmail.timer systemctl --user start checkmail.timer
23.1.3.2 Synchronize all the mailboxes
~/.config/systemd/user/syncmail.service
~/.config/systemd/user/syncmail.timer
systemctl --user enable syncmail.timer systemctl --user start syncmail.timer
23.1.3.3 Alternative
23.3 Mail Indexer - Notmuch
23.3.1 Installation
yay -S notmuch
23.3.2 Configuration
Configuration file: ~/.notmuch-config
23.3.3 Cheatsheet
Command | Usage |
---|---|
notmuch setup |
Initial Setup |
notmuch new |
Incorporate new email into notmuch database |
23.4 TODO Mail Index, Search and Tagging - Mu
23.5 TODO Mail Client - NeoMutt
23.5.1 Installation
yay -S neomutt
23.5.2 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
23.5.3 TODO Mailcap configuration
23.5.4 Display html mails
yay -S w3m
23.5.5 Open PDF from mail
~/scripts/openfile.sh
23.5.6 TODO Integrate with contact manager
23.5.7 TODO Integration with org-mode
23.5.8 TODO Send HTML mails using Markdown
23.5.9 Attachments
23.5.9.1 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 <enter>
to add them all
23.5.9.2 TODO Add attachment using GUI file manager
23.5.9.3 Cheatsheet
Command | Usage |
---|---|
<spc> |
Open the file |
23.5.10 Open Url from mail
yay -S urlview
23.5.11 TODO View emails while composing
23.5.12 TODO Searching mails with notmuch
23.5.13 TODO Cheatsheet
Command | Usage |
---|---|
23.5.14 TODO Integration with calendar application
23.6 TODO Mu4e
23.7 TODO Notification system
A script (~/scripts/checkmail.sh
) is used to retreive new mails and use notify=send
is there are new received mails.
24 TODO File Manager
24.1 TODO Ranger
24.1.1 Installation
yay -S ranger
24.1.2 Configuration
The configuration file is ~/.config/ranger/rc.conf
.
24.1.3 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 (Github Issue).
It works better with Urxvt.
24.1.4 TODO Cheatsheet
Command | Usage |
---|---|
X |
Extract archive |
Z |
Compress file or folder |
24.2 TODO nnn
24.2.1 Installation
yay -S nnn
24.3 TODO GUI File Manager: pcmanfm
25 TODO Image viewer
25.1 Feh - Minimal Image Viewer
25.1.1 Installation
yay -S feh
25.1.2 Cheatsheet
Command | Usage |
---|---|
f |
Fullscreen |
m |
Show menu |
spc |
next image |
bspc |
previous image |
w |
Fit image |
25.2 TODO Vimiv
25.2.1 Installation
yay -S vimiv
25.2.2 TODO Cheatsheet
25.3 TODO sxiv
25.3.1 Installation
yay -S sxiv
26 TODO Windows Manager - i3
26.1 TODO Installation
yay -S i3-gaps
26.2 TODO Packages to install/understand
artwork-i3 i3-wallpapers
26.3 TODO Configuration
~/.i3/config
26.4 TODO 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.
26.4.1 Figures / Matlab
26.5 TODO 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
26.6 TODO CheatSheet
Command | Usage |
27 TODO Custom bar - Polybar
27.1 Installation
yay -S polybar
27.2 TODO Configuration
~/.config/polybar/config
Polybar is launched automatically from i3 config.
27.3 TODO Add custom modules
[ ]
show passwords[ ]
show bibliography[ ]
show bookmarks[ ]
switch theme (dark/light)[ ]
suspend, restart, hibernate, lock
27.4 Display unread emails
Let's say we want to display unread emails, and when clicking on that we open our mail client.
[module/unread_mail] type = custom/script label-font = 2 format-underline = ${colors.background} click-left = termite -e "tmuxinator start neomutt" & format = <label> exec = ~/.config/polybar/scripts/unread_mails.sh interval = 1
A custom script ~/.config/polybar/scripts/unread_mails.sh
is just returning the unread emails.
27.5 TODO Create multiple bars
27.6 TODO Add Conky to polybar
28 TODO Compositor - Compton
28.1 Installation
28.2 TODO Configuration
~/.config/compton.conf
28.3 Automatic run as daemon
Compton is run from i3 config in the background (-b
option)
exec --no-startup-id compton -b
29 TODO Notification Manager - Dunst
29.1 Installation
yay -S dunst
29.2 Configuration
~/.config/dunst/dunstrc
29.3 TODO Special notifications
[ ]
Mails[ ]
New messages on slack
29.4 TODO How to merge similar notifications like new mails?
30 Managing Theme
30.1 GTK Themes
Gtk2 themes are managed using the file ~/.gtkrc-2.0
while Gtk3 themes are managed using ~/.config/gtk-3.0/settings.ini
.
30.1.1 Gui Manager
To customize the look of the system using GUI application, run lxappearance
.
Installation:
yay -S lxappearance
30.1.2 Icons and themes
yay -S zukitwo-themes faenza-icon-theme
30.2 QT Themes
Run qt5ct
to manage QT Themes.
30.3 XFT Themes
Some configuration are located in ~/.Xresources
.
31 Launcher - Rofi
31.1 Installation
yay -S rofi
31.2 Setup rofi as a dmenu replacement
Setup rofi as a dmenu replacement in ~/.i3/config
:
bindsym $mod+d exec --no-startup-id rofi -show run
31.3 Run sudo commands with rofi
https://github.com/DaveDavenport/rofi/issues/584#issuecomment-384555551
Use sudo -A
, that will open a rofi prompt to ask for the password.
For that to work, we need to add the following code to ~/.profile
:
export SUDO_ASKPASS=~/bin/askpass-rofi
The askpass
script is:
#!/bin/sh # Take password prompt from STDIN, print password to STDOUT # the sed piece just removes the colon from the provided # prompt: rofi -p already gives us a colon rofi -dmenu \ -password \ -no-fixed-num-lines \ -p "$(printf "$1" | sed s/://)"
32 TODO Advanced config
32.1 TODO Deactivate startup mac sound
sudo nvram SystemAudioVolume=%80
32.2 TODO Webcam
https://github.com/patjak/bcwc_pcie/wiki/Get-Started
Explain how this is working now
32.3 TODO Trackpad
The configuration is here: /etc/X11/xorg.conf.d/30-touchpad.conf
32.4 TODO Startup programs
Should I use i3 or systemd for that? https://www.reddit.com/r/linux/comments/132gle/eli5_the_systemd_vs_initupstart_controversy/
32.5 TODO Printer
https://wiki.archlinux.org/index.php/CUPS http://localhost:631/
system-config-printer
32.5.1 TODO How to store pin number for the printer?
32.5.2 TODO CheatSheet
Command | Usage |
32.6 TODO Kernel Management
32.6.1 TODO Cheatsheet
Command | Usage |
---|---|
mhwd-kernel -li |
Determine which kernel is used |
== | Change current kernel |
32.7 TODO Power Consumption
32.8 TODO Power Management Tool: TLP and Powertop
32.9 TODO Suspend / Hibernate
https://bbs.archlinux.org/viewtopic.php?id=215091 https://loicpefferkorn.net/2015/01/arch-linux-sur-macbook-pro-retina-2014-avec-dm-crypt-lvm-et-hibernation/
https://medium.com/@tigersoldier/macbook-pro-2015-with-arch-linux-4f8d3a2c0de5
To work around this problem, disable the driver before suspend: sudo rmmod brcmfmac
On wake up, re-enable the driver: sudo modprobe brcmfmac
32.9.1 Current behavior
Actually, it seems that the first suspend is working. After that the macbook go out of the suspend after few seconds
32.10 TODO Lid open/close
Should automatic show lock screen
/etc/systemd/logind.conf
32.11 TODO Mount devices
- udiskie - Mount and unmount disks (https://github.com/coldfix/udiskie)
https://wiki.archlinux.org/index.php/Udisks https://wiki.archlinux.org/index.php/USB_storage_devices https://wiki.manjaro.org/index.php?title=ExFAT_file_system AUR package: bash mount
32.12 TODO NAS Synology
32.12.1 Script to mount and umount
32.12.2 TODO Automatic Backup of folders?
AUR package: synology backup
32.12.3 TODO Automatic Mount of NAS folder
32.12.4 TODO Install beets on the nas?
32.13 TODO Format disks
sudo gparted
to format disks ()
32.14 TODO Bluetooth
Bluetooth: Gui: https://github.com/blueman-project/blueman
32.14.1 TODO Bluetooth mouse MX Anywhere
32.14.2 TODO Bluetooth headset
32.15 TODO Wifi
32.16 TODO Temperature and Fan control
https://github.com/dgraziotin/mbpfan
https://0xadada.pub/2016/03/05/install-encrypted-arch-linux-on-apple-macbook-pro/#fine-tuning
Fan are controlled by mbpfan. The config file is /etc/mbpfan.conf
# Enable Automated Power Regulation sudo pacman -S tlp sudo systemctl enable tlp sudo systemctl enable tlp-sleep sudo tlp start # Enable thermald (overheat shutoff) yaourt -S thermald sudo systemctl enable thermald sudo systemctl start thermald
32.17 TODO Refind / Grub
https://github.com/EvanPurkhiser/rEFInd-minimal https://www.pclosmag.com/html/Issues/200709/page07.html
32.17.1 TODO Switch from Refind to Grub
32.18 TODO Lock Screen
32.18.1 Installation
yay -S betterlockscreen
33 TODO LaTeX
33.1 Installation
yay -S texlive-most
Biber support for the bibliography:
yay -S biber
Support for source code using minted:
yay -S minted
33.2 Personnal classes/packages
Every custom class or packages can be put under ~/texmf/tex/latex/local/
folder.
In order for LaTeX to be aware of new packages/classes, run sudo texhash
each time a new custom package is added.
33.3 TODO From screenshot to latex math formula
33.3.1 Installation
yay -S mathpix-snipping-tool
33.3.2 Usage
First, you have to run mathpix-snipping-tool
. That will add something in the tray.
Then, use <ctrl><alt>m
and then select a part of the screen to convert that area to latex formula.
33.3.3 TODO Think of a better way to run that program. Maybe disable the tray icon and add some polybar script that automatically run the program, and ask for selection of the screen.
33.4 TODO Custom script to select latex symbol
https://github.com/superluserdo/Latex-picker Maybe use that script for other things?
33.5 Awesome LaTeX
34 Mathematical Software
34.1 Insect
34.1.1 Installation
yay -S insect
34.1.2 Usage
Command | Usage |
---|---|
3 m/s to km/h |
Convert Unit |
34.2 Matlab
34.2.1 Installation
yay -S matlab
34.3 SageMath
34.3.1 Installation
yay -S sagemath
34.3.2 Usage
Run sage -n jupyter
to run jupyter notebooks
35 TODO Cloud Backup / Sync - Rclone
https://github.com/ncw/rclone https://rclone.org/docs/ gui: https://martins.ninja/RcloneBrowser/
Rclone is used to manage the online drives like Google Drive and Dropbox.
35.1 Installation
yay -S rclone
35.2 Cheatsheet
Command | Usage |
---|---|
rclone config |
Configuration |
rclone listremotes |
List configured remotes |
rclone about |
Informations about the remote |
rclone copy |
Copy files from source to dest |
rclone sync |
Make source and dest identical, modifying destination only |
rclone check |
Check if the files in the source and destination match |
rclone ls |
List all the objects in the path |
rclone size |
Return the total size and number of objects in remote:path |
rclone cleanup |
Clean up the remote if possible |
35.3 Usefull commands
Command | Usage |
---|---|
rclone sync ~/gdrive/ gdrive:/ -P |
Make Google Drive files to same as local ones |
rclone copy gdrive:/directory/ ~/gdrive/directory/ -P |
Copy directory from Google Drive to local |
rclone lsf gdrive:/ --max-depth 1 |
List files and directory |
35.3.1 Progress bar for long synchronizations
Use --progress --stats-one-line
.
36 Download Manager
36.1 CLI Download Manager - Aria2
36.1.1 Installation
yay -S aria2
36.2 TODO Torrent Client - deluge
36.2.1 Installation
yay -S deluge
36.2.2 Configuration
~/.config/deluge/
36.2.3 Command Line Interface
https://whatbox.ca/wiki/deluge_console_documentation
Start the daemon using deluge -d
.
Then run the CLI client using deluge-console
.
36.2.4 GUI Client
deluge
36.2.5 Alternatives
36.3 TODO CLI Torrent Client - btpd
37 TODO Default Applications
https://wiki.archlinux.org/index.php/Default_applications https://www.guyrutenberg.com/2018/01/20/set-default-application-using-xdg-mime/
37.1 Mailcap file
37.2 TODO XDG-OPEN
~/.config/mimeapps.list
37.3 TODO Make QuteBrowser the default browser
38 TODO Desktop files
~/.local/share/applications/
39 TODO Bibliography Management
40 TODO Calendar
40.1 TODO Vdirsyncer - Sync calendars
40.1.1 Installation
yay -S vdirsyncer
sudo pip install requests-oauthlib
40.1.2 Cheatsheet
Command | Usage |
---|---|
vdirsyncer sync |
Synchronize |
40.1.3 Automation - Systemd
http://vdirsyncer.pimutils.org/en/stable/tutorials/systemd-timer.html?highlight=systemd
systemctl --user enable vdirsyncer.timer systemctl --user start vdirsyncer.timer
To check the status of the service:
systemctl --user status vdirsyncer.service
40.2 TODO Calendar Client - Khal
40.2.1 Installation
yay -S khal
40.2.2 TODO Cheatsheet
Command | Usage |
40.3 TODO Calendar Client - Calcurse
40.3.1 Installation
yay -S calcurse
40.4 TODO gcalcli
41 TODO Presentation software
41.1 Beamer
41.2 Org Mode
41.3 Presentation setup on computer
41.4 PowerPoint Viewer
41.5 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
41.5.1 Installation
yay -S pdfpc
41.5.2 Video support
yay -S gst-plugins-ugly gst-plugins-good gst-plugins-base-libs gst-plugins-base gst-plugins-bad gst-libav
41.5.3 Usage
pdfpc filename.pdf
42 TODO RSS Reader
GUI:
With Emacs:
42.1 Newboat
42.1.1 Installation
yay -S newboat
42.1.2 Configuration
42.1.3 TODO Automatic Retrival of Feeds
Make a systemd service.
42.1.4 CheatSheet
43 TODO Task Manager
43.1 OrgMode and Emacs
44 Background manager: nitrogen
44.1 Configuration
~/.config/nitrogen/nitrogen.cfg
44.2 Wallpapers
~/scripts/wallpaper.sh
: script to automatically change wallpaper each x minutes.
45 PDF Reader: Zathura
45.1 Installation
yay -S zathura
Then add dependecies to view specific files:
yay -S zathura-pdf-mupdf zathura-djvu zathura-ps zathura-cb
It seems that mupdf is better that poppler to view pdf.
45.2 Configuration
~/.config/zathura/zathurarc
45.3 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 |
46 TODO Theme manager
The idea would be to have a command that changes the theme of all the system.
There would be at least one light and one dark theme. Applications that could change:
[ ]
terminal: https://github.com/khamer/base16-termite. TODO: this does not seems to work. Some is takken from config of termite, some from xresources. Also when reload the terminal is does not make the colors well: https://github.com/thestinger/termite/issues/273
It seems the color is due to this part of the script. Should then source this file somehow.
BASE16_SHELL="$HOME/.base16-manager/chriskempson/base16-shell/" [ -n "$PS1" ] && \ [ -s "$BASE16_SHELL/profile_helper.sh" ] && \ eval "$("$BASE16_SHELL/profile_helper.sh")"
[X]
shell: https://github.com/chriskempson/base16-shell[X]
ranger: uses colors of the shell[X]
vim: https://github.com/chriskempson/base16-vim[ ]
emacs: https://github.com/belak/base16-emacs[X]
zathura: https://github.com/nicodebo/base16-zathura[ ]
neomutt: https://github.com/josephholsten/base16-mutt[X]
ncmpcpp: uses colors of terminal (termite) defined in~/.config/termite/config
[X]
polybar: uses colors of Xresources:~/.Xressources.d/colors
[ ]
dunst: https://github.com/khamer/base16-dunst[ ]
fzf: https://github.com/nicodebo/base16-fzf[ ]
i3: https://github.com/khamer/base16-i3[ ]
qutebrowser: https://github.com/theova/base16-qutebrowser[ ]
rofi: https://gitlab.com/0xdec/base16-rofi[ ]
background: use custom script[ ]
tmux[ ]
GUI file manager?
Possible theme managers:
46.1 TODO Theme script
~/bin/theme
46.2 TODO Base16
https://github.com/chriskempson/base16 http://chriskempson.com/projects/base16/ https://www.youtube.com/watch?v=QcOxU1sOOuw
46.2.1 Base16 Philosophy
Define colors according to rules: http://chriskempson.com/projects/base16/ Then we can use these colors multiple applications.
46.2.2 Base16-shell
https://github.com/chriskempson/base16-shell
This changes the shell colors. This should be added to ~/.bashrc
:
# Base16 Shell BASE16_SHELL="$HOME/.config/base16-shell/" [ -n "$PS1" ] && \ [ -s "$BASE16_SHELL/profile_helper.sh" ] && \ eval "$("$BASE16_SHELL/profile_helper.sh")"
46.2.3 Base16-manager
https://github.com/AuditeMarlow/base16-manager
This help changes many applications colors at once.
47 TODO Graphical Editor
48 TODO System monitor: conky
49 TODO Bugs
49.1 TODO Why the cursor is turning when on the background image?
50 TODO Games on Linux
51 TODO VPN Setup
52 Others
52.1 Reddit on terminal: rtv
yay -S rtv
53 TODO Usefull commands
53.1 Find files or directories
53.2 Show informations about the machine
53.3 Separate PDF
pdfseparate -f 1 -l 6 file.pdf split%d.pdf
Will create split1.pdf
to split6.pdf
files corresponding to correct pages of file.pdf
.
53.4 Readline
https://wiki.archlinux.org/index.php/Keyboard_shortcuts
Keyboard | Shortcut Description |
---|---|
Ctrl+l | Clear the screen |
53.4.1 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 |
53.4.2 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 |
53.4.3 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 |
53.4.4 Completion
Keyboard | Shortcut Description |
---|---|
Tab |
Auto-complete a name |
Alt+? |
List all possible completions |
Alt+* |
Insert all possible completions |
53.5 Others
- tldr - Community-driven man pages
- transfer.sh - upload and share files from the command line
- https://github.com/chubin/wttr.in - weather in terminal
- https://github.com/michael-lazar/rtv
- trans
yay -S translate-shell
- awk https://linuxhandbook.com/awk-command-tutorial/
- install the software to convert image to latex code => create script to take screenshot and automatically export latex
- https://github.com/rupa/z
- https://github.com/nvbn/thefuck
- bash-sensible
- Also check at the end of this readme
- awman - Arch Wiki man pages - Arch wiki offline
- https://www.tecmint.com/linux-commands-cheat-sheet/
Command | Description |
---|---|
glances |
Moniteur d'activité |
meteo |
Get the meteo |
sudo cputhrottle PID %PROC |
Limiter l'accès au proc pour un processus |
asciinema |
Reccord you terminal |
nmap -sP “192.168.1.*" |
Check all ip addresses on local netword |
ncdu |
See what takes place on the disk |
rsync -a --progress source dest |
Copy folders with stats |
su -sh folder |
Return the size of the folder |
54 TODO Custom scripts
54.1 TODO Password completion with fzf
Make a script to use FZF for autocompletion of password (with pass program) and then send to current line or copy. Maybe use tmux pane for that.
55 TODO Bash Snippets
55.1 For loop
for file in ./*; do command ${file}; done