dotfiles/README.md -rw-r--r-- 11.2 KiB
5e99a1a2Piotr Machura Update some outdated links 5 days ago

#Arch Linux Dotfiles

This is a repository containing the configuration of my personal Arch Linux system. The changes to my home directory are directly tracked on the "dots" branch, master branch is for this readme and license only.

#Cloning the repository

This section describes a full "dotfile installation", which should (ideally) come right after installing Arch and booting properly for the first time. Feel free to skip it and just clone the "dots" branch if you want only some of the configuration.

  1. Create an alias alias dots="/usr/bin/git --git-dir=$HOME/.config/dots --work-tree=$HOME"
  2. Clone the repo git clone --single-branch --branch dots --bare git@git.sr.ht:~piotr-machura/dotfiles $HOME/.config/dots
  3. Disable the showing of untracked files dots config --local status.showUntrackedFiles no
  4. Apply the configs dots reset --hard

Note: the cloned ~/.config/git/config contains a handy git alias, so that git dots will always access the configs repo directly. Feel free to unalias dots now.

Note 2: the --single-branch option only clones the "dots" branch, which is desirable since an accidental git checkout to the master branch would temporarily remove all of the installed dotfiles, causing great confusion.

#Package installation

Make sure the "multilib" repository and paralel downloads are enabled in /etc/pacman.conf.

The cloned repo contains a list of official packages located in ~/.local/share/pacman/pkg.txt and a list of AUR packages in ~/.local/share/pacman/aur.txt.

  1. Install official packages pacman -S --needed - < ~/.local/share/pacman/pkg.txt.
  2. Install the base devel group pacman -S base-devel.
  3. Install AUR packages using your favorite AUR helper paru -S --needed - < ~/.local/share/pacman/aur.txt.

Note: the AUR package list contains a base-devel meta package. You can run paru -D --asdeps $(pacman -Qqg base-devel) to set the base-devel install reason as dependency.


Enable the included pacman hooks to the system-wide location by creating an appropriate directory sudo mkdir /etc/pacman.d/hooks/ and linking the hooks sudo ln -f ~/.local/share/pacman/hooks/* /etc/pacman.d/hooks. The hooks also require that user's $HOME is kept when executing commands as root. This can be enabled in the sudoers file.


Defaults env_keep += "HOME"

or, alternatively the root's home directory can be changed to your user's in the /etc/passwd using vipw.

Important note: hard links do not work well across partitions, so if your /home is on a different drive just copy the hooks instead. Also, do not change root's home to anything that is on a different partition than the root (/) partition.

Another note: the package-list.hook contains some exceptions to the packages being tracked (microcode, video drivers etc.). Examine it and you'll quickly figure out how to exclude additional ones.

#Additional configuration

Some programs require manual configuration, since not everything can be kept in the repository. This section describes just that.


System-wide services enabled with systemctl enable <service name here> :

  • systemd-timesyncd.service
  • lightdm.service
  • ufw.service
  • docker.service
  • paccache.timer
  • plocate-updatedb.timer
  • bluetooth.service (optional)
  • NetworkManager.service (likely already enabled after installation)

In order to utilize the HHKB's power key to show the power menu the logind config file must be modified to include



and the service reloaded with

systemctl restart systemd-logind.service


  1. Enable the firewall ufw enable.
  2. Disallow any incoming traffic ufw default deny.
  3. Allow for file sync and torrents ufw allow syncthing, ufw allow Transmission.
  4. Disable logging ufw logging off.

The last step is optional, but without it ufw does clutter the systemd logs quite a bit.


The config is present in ~/.config/lightdm/lightdm-mini-greeter.conf. We will link it to the system-wide location shortly, but first:

#⚠️ Warning ⚠️

The greeter in use is the LightDM mini greeter. It requires specifying the user in config file. You have to change the user field in the cloned lightdm-mini-greeter.conf or you won't be able to log in.

After you change the user field you may link it to the system-wide location with sudo ln -f ~/.config/lightdm/lightdm-mini-greeter.conf /etc/lightdm. Again, simply copy it if your /home/ is on a different partition.

To enable the greeter uncomment the following lines



#Maven home

Maven uses ~/.m2 directory for downloaded artifacts by default, this can be changed by setting



By default the X11 screen saver will blank out the screen after ~10 minutes of inactivity. If, like me, you find this behavior annoying, create or edit


Section "ServerFlags"
    Option "BlankTime" "0"

If you experience screen tearing (especially when watching videos) edit the following

/etc/X11/xorg.conf.d/20-<intel or amd here>.conf

Section "Device"
    Identifier  "<Intel Graphics or AMD here>"
    Driver      "<intel or amdgpu here>"
    Option      "TearFree" "true"


The git config under ~/.config/git/config is set up to include an identity file, which contains user's personal info. This way the config can be distributed without distributing sensitive data like the email address and GPG key ID. Provide said identity file by creating


    name = <your name here>
    email = <your email here>
    signingKey = <your GPG keyid here>
    smtpserver = <your smtp server address here>
    smtpuser = <your email here>

While you're at it, move the current gpg directory to the desired location mv ~/.gnupg $GNUPGHOME.


Himalaya is a handy command line IMAP/SMTP tool. The required configuration file has the following format:


name = "<your name here>"
downloads-dir="<download dir here>"
signature-delimiter = "-- \n"
signature="<your name here>"

default = true
email = "<email address here>"

smtp-host = "<smtp server address here>"
smtp-port = 587
smtp-login = "<email address here>"
smtp-passwd-cmd = "gpg -d <your home directory>/.config/himalaya/pass.gpg"

imap-host = "<imap server address here>"
imap-port = 993
imap-login = "<email address here>"
imap-passwd-cmd = "gpg -d <your home directory>/.config/himalaya/pass.gpg"

And prepare the password file

echo "<your password here>" > ~/.config/himalaya/pass
gpg -e ~/.config/himalaya/pass
rm ~/.config/himalaya/passw

#GUI programs

Some GUI programs choose to keep absolutely everything in their config files - including useless stuff like last window position, geometry etc. Also I am pretty sure that (in the case of Thunar at least) there is a binary database somewhere, because simply editing its XML files often does not work. Therefore we are forced to configure them in their graphical interfaces.

#Themes and fonts

The UI font (and the mono space font) is JetBrains Mono, supplemented with Nerd Font glyphs. GTK+ theme is a very dark version of modified Materia and icon theme is Papirus Dark. The cursor theme is Breeze. Set it as system-wide default by editing


[Icon Theme]

The others should be enabled by default after installing the dotfiles. The only exception is the GTK2 theme, which requires linking (or copying) to the system-wide location

ln -s ~/.local/share/themes/Materia-black /usr/share/themes.


Ensure the following options are ticked under "Preferences":

  • "Draw frames around thumbnails"
  • "Date format: ISO8601"
  • "Open folders in new tabs on middle click"
  • "Enable volume management"

In the volume management settings ensure the following options are ticked:

  • "Mount removable drives when hot-plugged"
  • "Mount removable media when inserted"

Issue the following commands to enable some "hidden settings":

xfconf-query --channel thunar --property /misc-full-path-in-title --create --type bool --set true
xfconf-query --channel thunar --property /misc-image-size-in-statusbar --create --type bool --set true


In about:preferences, enable the following options:

  • "Open links in tabs instead of new windows"
  • "When you open a link, image or media switch to it immediately"
  • "Website apperance -> Dark"
  • "Provide search suggestions" (and other associated settings)
  • "Delete cookies and site data when LibreWolf is closed" (disable)
  • "Home -> Web search" (disable)

In about:config enable the following options:

  • toolkit.legacyUserProfileCustomizations.stylesheets
  • browser.compactmode.show
  • layout.css.system-ui.enabled (disable)

and link the user chrome to your profile folder:

cd ~/.librewolf/XXXXX.default-release
ln -s ../../.local/share/librewolf/chrome .

A fitting theme is matte black, combined with the compact density. Here are some essential extensions:


Extra functionality:

#Desktop files

The ~/.local/share/applications directory contains a local database of desktop entries for rofi and mime-type associations. They will be added automatically via the linked dekstop-files.hook pacman hook. Feel free to edit them or remove (effectively) by appending

~/.local/share/applications/<entry name here>.desktop


Note that the hook does not remove any desktop entries, just adds new ones. Old ones remaining after uninstalling an application must be removed manually, but the .bashrc provides a handy menudiff function for comparing global and local entries.