New laptop part 2: Core tools
Introduction
Continuing the framework laptop blog post series, where I first wrote about my impression of the framework laptop, then about what I had to do to fix EndeavourOS / Archlinux on it. Now this post is about making this laptop “mine” and ready for daily use by adding the necessary tools. I’m not covering my i3wm setup, that will be for a dedicated post.
TLDR; browse my dotfiles on sourcehut :).
Software installation and configuration
Installing core utilities
Starting with the basics:
pacman -S ripgrep mupdf htop dfc bat mplayer
- bat: An awesome cat (and
moreto some extent) replacement - dfc: A df replacement
- mupdf: A minimal pdf viewer
- ripgrep: A “recursively searches directories for a regex pattern”
- mplayer: Do I need to say it?
XDG_CONFIG_HOME
For some reason, the environment variable XDG_CONFIG_HOME was not set by default, to fix this, I edited ~/.profile and added:
export XDG_CONFIG_HOME="$HOME/.config"
Ssh
As many people, I have many ssh keys, all with a passphrase. In order to avoid having to enter each passphrase each time I use ssh (or git, rsync, …), I would need to enter my passphrase. As said on Archlinux wiki:
An SSH agent is a program which caches your decrypted private keys and provides them to SSH client programs on your behalf. In this arrangement, you must only provide your passphrase once, when adding your private key to the agent’s cache. This facility can be of great convenience when making frequent SSH connections. – https://wiki.archlinux.org/title/SSH_keys#SSH_agents
I’m using the default built-in agent ssh-agent. To enable it via systemd, create the file ~/.config/systemd/user/ssh-agent.service with the following content:
[Unit]
Description=SSH key agent
[Service]
Type=simple
Environment=SSH_AUTH_SOCK=%t/ssh-agent.socket
# DISPLAY required for ssh-askpass to work
Environment=DISPLAY=:0
ExecStart=/usr/bin/ssh-agent -D -a $SSH_AUTH_SOCK
[Install]
WantedBy=default.target
And of course, add the different keys to the ssh agent, so for each key:
ssh-add ~/.ssh/<key>
Zsh
I use zsh with oh-my-zsh, so to install it:
# Install zsh
sudo pacman -S zsh
# Install oh-my-zsh
sh -c "$(curl -fsSL https://raw.githubusercontent.com/ohmyzsh/ohmyzsh/master/tools/install.sh)"
# To make it the default shell:
chsh -s /usr/bin/zsh
My ~/.zshrc.
Tmux
I’m using Tmux TPM to manage tmux plugins.
# Install tmux
sudo pacman -S tmux
# Install TPM
git clone https://github.com/tmux-plugins/tpm ~/.config/tmux/plugins/tpm
Edit tmux config ~/.config/tmux/tmux.conf file to add plugins to the config. Here is what I added:
# List of plugins
set -g @plugin 'tmux-plugins/tpm'
set -g @plugin 'tmux-plugins/tmux-sensible'
set -g @plugin 'tmux-plugins/tmux-logging'
set -g @plugin 'ChanderG/tmux-notify'
set -g @plugin 'tmux-plugins/tmux-pain-control'
set -g @plugin 'tmux-plugins/tmux-urlview'
# use $XDG_CONFIG_HOME
set-environment -g TMUX_PLUGIN_MANAGER_PATH '~/.config/tmux/plugins/'
# Less aggressive interval than tmux-sensible:
set -g status-interval 15
# Initialize TMUX plugin manager (keep this line at the very bottom of tmux.conf)
run '~/.config/tmux/plugins/tpm/tpm'
#+end_quote
For =tmux-urlview= to work, install either =extract_url= or =urlview=. The later hasn't been updated since 2013, the former since 2018, so I installed the former.
#+begin_src shell
yay -S extract_url
For some reason, it doesn’t work with my config in ~/.config/tmux/tmux.conf, so I added an alias in my ~/.zshrc:
alias tmux="tmux -f ~/.config/tmux/tmux.conf"
My full tmux.conf.
Clipboard
I installed rofi-greenclip via aur:
yay -S rofi-greenclip
And use it in a keybind in my i3wm config:
bindsym $mod+c exec --no-startup-id rofi -modi "clipboard:greenclip print" -show clipboard -config ~/.config/rofi/rofidmenu.rasi
Redshift
To reduce eyes fatigue, I use RedShift:
yay -S redshift-gtk
mkdir ~/.config/redshift/ && cd ~/.config/redshift/
wget https://raw.githubusercontent.com/jonls/redshift/master/redshift.conf.sample
mv redshift.conf.sample redshift.conf
Edit config file, mainly latitude and longitude.
Conclusion
That’s it for this post, next one should be about my i3wm configuration. As said in the intro, you can find the dotfiles on sourcehut.
From the « Frame.work laptop setup »: collection:
- New laptop part 7: Firefox extensions
- New laptop part 6: Managing multi screens with i3wm and autorandr
- New laptop part 5b: Prevent sleep / hibernation when home and in charge
- New laptop part 5: power management
- New laptop part 4: Dracula theme
- New laptop part 3: i3wm configuration
- New laptop part 2: Core tools
- New laptop part 1: EndeavourOS / Archlinux on the FrameWork laptop
- New laptop part 0: Discovering the FrameWork laptop