Skip to content

Latest commit

 

History

History
321 lines (232 loc) · 7.04 KB

LINUX.org

File metadata and controls

321 lines (232 loc) · 7.04 KB

Linux

This file documents the steps I’ve followed to install my daily machines, usually running either Arch or Fedora. Adapt accordingly.

Checklist

Install Core Dependencies and Packages

yay -S \
    cmake git openssh \
    highlight xclip \
    vi vim

Install Other Programs

yay -S \
    feh flameshot \
    duf ncdu thunar \
    btop htop \
    kitty neofetch ripgrep tree \
    deluge-gtk plex-media-server \
    gimp obs-studio flameshot \
    playerctl spotify

Configure Visudo

Run sudo visudo in order to customize sudoers settings. Customize the default editor to use and enable asterisk feedback in password prompts.

+Defaults editor=/usr/bin/vim
-Defaults env_reset
+Defaults env_reset, pwfeedback

Create Default Home Directories

If they are not already, create the initial home directories with xdg-user-dirs-update.

Shell

User Session

Edit ~/.profile to set the path for user binaries and increase the keyboard repeat rate.

if [ -d "$HOME/.local/bin" ] ; then
  PATH="$HOME/.local/bin:$PATH"
fi

if [ -d "$HOME/Scripts" ] ; then
  PATH="$HOME/Scripts:$PATH"
fi

xset r rate 200 40

Zsh

Install zsh then set it as your default shell.

chsh -s $(which zsh)
ln -s ~/.profile ~/.zprofile

See config/zsh.org.

Terminal

See config/kitty.org.

X

~/.Xresources

Increase the base DPI by 25%.

Xft.dpi: 144

~/.xprofile

[ -f "$HOME/.fehbg" ] && ~/.fehbg &
picom --daemon

Automatically Mount External Drives

Given an external hard drive Phoenix plugged in sdb.

sudo mkdir /media/Phoenix               # Create the mount point
sudo fdisk -l                           # Identify the drive
sudo blkid | grep sdb                   # Retrieve the UUID

Edit /etc/fstab to add the drive mount point.

+UUID=F8D2-30CF  /media/Phoenix  exfat  defaults  0  0

Confirm proper mouting with sudo mount -a.

Fonts

Font Dependencies

Other sections from this document will assume these fonts are already installed:

  • Cascadia Code
  • Google Sans or Product Sans
  • Roboto Slab
yay -S \
    ttf-google-sans \
    ttf-material-design-icons \
    ttf-roboto-slab

If manually installing the fonts, download their respective TTF or OTF files and move them to /usr/local/share/fonts/. Run fc-cache to ensure the font cache integrity.

Font Preferences

Set default fonts for monospace, serif and sans-serif classes.

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE fontconfig SYSTEM "urn:fontconfig:fonts.dtd">
<fontconfig>
  <match target="pattern">
    <test qual="any" name="family">
      <string>monospace</string>
    </test>
    <edit name="family" mode="assign" binding="same">
      <string>Cascadia Code</string>
    </edit>
  </match>
  <match target="pattern">
    <test qual="any" name="family">
      <string>sans-serif</string>
    </test>
    <edit name="family" mode="assign" binding="same">
      <string>Google Sans</string>
    </edit>
  </match>
  <match target="pattern">
    <test qual="any" name="family">
      <string>serif</string>
    </test>
    <edit name="family" mode="assign" binding="same">
      <string>Roboto Slab</string>
    </edit>
  </match>
</fontconfig>

Desktop

Background

Install feh and run it once to initialize the bootstrap executable.

feh --bg-fill ~/Pictures/Wallpapers/filename.ext

Compositor

See config/picom.org.

Window Manager

I use qtile daily but other historical configuration can be found below.

EXWM

See https://github.com/angrybacon/dotemacs/blob/master/DESKTOP.org.

Qtile

See config/qtile.org.

XMonad

See config/xmonad.org.

Default Applications

Prefer settings those through GUI but in case of failure, edit ~/.config/mimeapps.list.

[Default Applications]
audio/mp3=vlc.desktop
image/jpeg=feh.desktop
image/png=feh.desktop
text/html=brave-browser.desktop
video/mp4=vlc.desktop
video/x-flv=vlc.desktop;
video/x-matroska=vlc.desktop
x-scheme-handler/about=brave-browser.desktop
x-scheme-handler/http=brave-browser.desktop
x-scheme-handler/https=brave-browser.desktop
x-scheme-handler/mailto=brave-browser.desktop
x-scheme-handler/unknown=brave-browser.desktop

Notifications

See config/dunst.org.

Screenshots

See config/flameshot.org.

Emacs

Emacs now ships with native compilation by default almost everywhere. More details at http://akrl.sdf.org/gccemacs.html.

See https://github.com/angrybacon/dotemacs for my configuration.

Vim

I mostly use Emacs but sometimes Vim too so minor tweaks are enough.

See config/vim.org.

The above configuration tangles to /etc/vimrc.local. Load it from the system-wide configuration in /etc/vimrc.

+if filereadable("/etc/vimrc.local")
+  source /etc/vimrc.local
+endif

Git

Base Configuration

Default settings for all Git projects.

[user]
    email = [email protected]
    name = Mathieu Marques
[core]
    attributesfile = ~/.gitattributes
    excludesfile = ~/.gitignore
    ignorecase = false
[diff "lisp"]
    xfuncname = "^(((;;;+ )|\\(|([ \t]+\\(((cl-|el-patch-)?def(un|var|macro|method|custom)|gb/))).*)$"
[diff "org"]
    xfuncname = "^(\\*+ +.*)$"
[pull]
    rebase = true
[rebase]
    autosquash = true
*.el diff=lisp
*.org diff=org

Default ignore list for all Git projects.

.DS_Store
.dir-locals.el
.nvmrc
TODO.org

SSH

Create your public key and push it to the clipboard for further use.

ssh-keygen -t ed25519
xclip -sel clip < ~/.ssh/id_ed25519.pub

Media

This block exports to a script that resets the media folders with the right permissions.

chmod 775 ~/
find ~/Videos -type d \! -perm 775 -exec chmod 775 {} \; -print
find ~/Videos -type f \! -perm 664 -exec chmod 664 {} \; -print
notify-send --urgency=low "Cron" "Successfully updated permissions under ~/Videos/"

Run it at every hour of the day to ensure new files also have the right permissions.