Skip to content

The hidden files for configuring my full desktop experience, powered by Qtile.

Notifications You must be signed in to change notification settings

juanscr/arch_dotfiles

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

My Dotfiles!

As an Arch Linux user myself, I passed most of my time in university customizing and finding the perfect desktop environment. In this process, I tried and tested multiple ones till I arrived to my current configuration. My focus has been on constructing a functional and easy to use desktop experience, with aesthetics more of an after thought.

My Environment

In this repository, you'll find all the configuration of my desktop that you can use for creating your own configuration files or, at least, get some inspiration on creating your own. My desktop is mainly built by:

  • Qtile: A highly customizable tilling window manager written in python.
  • Hyrpland: Dynamic tiling Wayland compositor based on wlroots that doesn't sacrifice on its looks.
  • Alacritty: A fast terminal emulator written in rust.
  • Nvim: A fork of text editor vim improving maintenaibility and extensability of the original project.
  • Dracula: A dark color scheme focused on usability.

And many more to compose a full desktop experience.

Setup

To setup my dotfiles, first clone the bare repository in the desired place.

git clone --bare [email protected]:juanscr/arch_qtile_dotfiles.git

Then, use the following command to get all the files from the repository and, for usability, stop showing files not uploaded to git.

alias dfiles="/usr/bin/git --git-dir=path/to/repository --work-tree=$HOME"
dfiles config status.showUntrackedFiles no
dfiles restore --staged .
dfiles checkout .

And there you go. Happy tinkering!

Common Configuration Steps

In this section, you will find some common steps that I use in my computer to have a fully working desktop experience. Although many of the information here can be found in the Arch Wiki, I know first hand it is difficult to take in all the information that the wiki presents at once; as such, the information presented here is a quick summary of what I usually need to run on a freh installation of Arch.

Table of Contents

Installation Guide Annotations

When running the pacstrap command, is common to forget some basic packages that are completely needed to have a fully working installation. For a minimal installation, I would add the following packages to be installed so when you log in to the TTY some basic functionality can be executed.

  • networkmanager: Automatic configuration for network interfaces.
  • sudo: Privilige escalation.
  • neovim: Text editor.
  • grub: Boot loader, for uefi support install efibootmgr.
  • man-db, man-pages, texinfo: Package information.
  • intel-ucode: Microcode for intel CPUs.
  • openssh: SSH client.

Additionaly, the packages that I selected to construct my fully customized desktop environment are:

  • git: Version control.
  • base-devel: AUR manager.
  • gdm: Display manager.
  • dunst: Notification daemon.
  • chromium: My preferred browser.
  • blueman, bluez and bluez-utils: Bluetooth support and tray management.
  • polkit-gnome and polkit: Privilige escalation.
  • playerctl: Media controls.
  • spotify-launcher: Spotify media launcher.
  • vlc: Media player.
  • alacritty: Rust terminal.
  • chrony: NTP time syncing.
  • zsh, zsh-autosuggestions, zsh-syntax-highlighting: Use zsh shell with good autocompeltion and syntax highlighting.
  • hdparm: Set hard drive parameters.
  • zathura: PDF viewer.
  • exa: ls but better.
  • htop: System monitoring.
  • pacman-contrib: Includes scripts for checking updates in pacman. in vim.
  • fprintd and imagemagick: Fingerprint authentication.
  • thermald: Prevent overheating in intel CPUs.
  • tree-sitter-cli: CLI for treesitter parsers.
  • ripgrep and fd: Toolkit necessary for telescope to work.
  • acpilight: Brightness control.
  • pipewire, pipewire-audio, pipewire-pulse, wireplumber: Audio management through pipewire and pulseaudio.
  • pavucontrol: GUI for handling audio settings.
  • network-manager-applet: Tray icon for network manager.

For X11 support, I use the following packages:

  • qtile: Tilling window manager, for using my configuration also install python-psutil and python-dbus-next.
  • flameshot: Screenshot tool.
  • arandr: UI for xrandr settings.
  • autorandr: Automatic xrandr configuration by saving monitor configuration.
  • picom: Compositor for X11.
  • xf86-input-libinput: Touchpad customization.
  • nsxiv: Simple image viewer.
  • feh: Setup image background.
  • xorg-xrdb: Set main color scheme in X11.
  • pcmanfm-gtk3: GUI File explorer.
  • conky: System monitoring.
  • xclip: Paperclip management tool, necessary for copy-pasting to clipboard in vim.

For wayland support, I use the following packages:

  • hyprland: Tilling window manager.
  • wl-clipboard: Clipboard management.
  • xdg-desktop-portal and xdg-desktop-portal-hyprland: Screen sharing with pipewire.
  • tofi: Application launcher for wayland.
  • waybar: Status bar.
  • nwg-look: For setting the GTK themes in WLR compositors.

On the other hand, I install fonts, gtk and qt themes so I can highly customize my desktop environment look and feel. For that, I run:

  • ttf-jetbrains-mono and ttf-jetbrains-mono-nerd: Main fonts I use.
  • breeze and breeze-gtk: QT Theme for Breeze Dark.
  • xcursor-vanilla-dmz: Cursor theme.
  • papirus-icon-theme: Pretty icon theme
  • For other fonts, I install ttf-dejavu, gnu-free-fonts, adobe-source-code-pro-fonts, cantarell-fonts, ttf-liberation, ttf-bitstream-vera, ttf-droid, noto-fonts, ttf-croscore, ttf-ibm-plex.

Lastly, some additional packages I install outside the mainline arch repositories are:

Time Internet Synching

When I first did my Arch installation I notice that, as time passed on, the clock that was showing on my desktop was slowly getting out of sync of the real time. That occured because I didn't configure any network time syncing mechanisms to constantly sync the time. For network time syncing, NTP is not suggested as laptops do not have a permanent network connection and is really slow for time syncing. Instead use chrony that is specifically designed to combat this issues. The Colombian NTP servers can be seen this page.

To activate the servers when I'm connected to a network, I use the following aur package. Remember to install the chrony package and enable chronyd.service; additionally, disable and stop systemd-timesyncd for enabling chrony properly. My chrony configuration file is:

# Colombia NTP servers
server 3.co.pool.ntp.org iburst offline
server 0.south-america.pool.ntp.org iburst offline
server 1.south-america.pool.ntp.org iburst offline

rtcsync

# Drift file
driftfile /var/lib/chrony/drift

# If you specify an NTP server with the nts option to enable authentication
# with the Network Time Security (NTS) mechanism, or enable server NTS with
# the ntsservercert and ntsserverkey directives below, the following line will
# allow the client/server to save the NTS keys and cookies in order to reduce
# the number of key establishments (NTS-KE sessions).

ntsdumpdir /var/lib/chrony

# If the system timezone database is kept up to date and includes the
# right/UTC timezone, chronyd can use it to determine the current
# TAI-UTC offset and when will the next leap second occur.

leapsectz right/UTC

# INITIAL CLOCK CORRECTION
makestep 1.0 3

Nvidia Optimus

On my personal laptop, I have an integrated Intel Graphics card with a discrete Nvidia GeForce GTX 1050. This setup is common in laptops to improve battery life, by mostly using the intel graphics card and delivering the more intensive tasks to the nvidia card. Although the easiest route is to make the Nvidia card the default one and turn off the Intel one (which I used for many years), the battery life clocked below an hour and the computer had really high temperatures most of the time.

For that, I switched to use PRIME GPU Offloading in order to just use the Nvidia GPU when needed (i.e., running steam and other intensive tasks). The related Arch wiki pages that cover how to configure it are:

First, I installed the respective graphics driver for Nvidia and Intel with vulkan support (with their respective 32 bits libraries from the multilib repository):

pacman -S \
    nvidia nvidia-utils lib32-nvidia-utils \
    mesa intel-media-driver lib32-mesa \
    vulkan-intel lib32-vulkan-intel \
    nvidia-prime

Then, I removed kms from the HOOKS key in /etc/mkinitcpio.conf to avoid booting with the nouveau module (open source nvidia driver). Then regenerate the initramfs by:

mkinitcpio -P

After that, I created the pacman hook in order to always regenerate the initramfs when updating the nvidia package. By that I created the /etc/pacman.d/hooks/nvidia.hook with:

[Trigger]
Operation=Install
Operation=Upgrade
Operation=Remove
Type=Package
Target=nvidia
Target=linux
# Change the linux part above if a different kernel is used

[Action]
Description=Update NVIDIA module in initcpio
Depends=mkinitcpio
When=PostTransaction
NeedsTargets
Exec=/bin/sh -c 'while read -r trg; do case $trg in linux*) exit 0; esac; done; /usr/bin/mkinitcpio -P'

Then, I executed a reboot to load the nvidia propietary driver. For veryfing that it worked as I expected, I did the following commands and got the correct output:

Prime Test

Solid State Drives

In my personal and work laptop, I posses an NVMe SSD. Arch Linux has whole sections in their wiki dedicated to optimizing and taking care of the solid states drives that I suggest you read by yourself as it has a lot of content to parse. In this section, you'll find a little summary of what commands do I run to take care and optimize my SSD.

In first place, I activate TRIM. At first, verify if the SSD supports TRIM by running the following command:

lsblk --discard

Verifying that the DISC-GRAN and DISC-MAX have non-zero values which means it supports TRIM operations. After that, if the values are non-zero, active a periodic trim by using the following commands:

sudo pacman -S util-linux
systemctl enable --now fstrim.timer

Logitech Mouse Customization

I have a [Logitech G3000s](https://www.logitechg.com/en-eu/products/ gaming-mice/g300s-gaming-mouse.910-004345.html) mouse. This mouse has some colors to switch through by default and it can be customized to have different colors. Additionally, it has some custom buttons that allow to be customized.

Using the ratslap command, the color and buttons can be set. To changing the color to red and having the two middle buttons to change between tabs use:

sudo ratslap \
      --modify F3 \
      --colour red \
      --G8 LeftCtrl+PageUp \
      --G9 LeftCtrl+PageDown \
      --print F3 \
      --select F3

Touchpad Configuration

For configuring the touchpad for a more natural behavior, the libinput package was used as is the currently use package for managing input devices; for making it work in Xorg run the following command:

sudo pacman -S xf86-input-libinput

And restart the graphical environment so the devices are now managed by libinput. Then, to configure the touchpad for the following features:

  • Tapping for left click.
  • Tapping with two fingers for right click.
  • Tapping with three fingers for middle click (paste).
  • Natural scrolling, similar to windows.

Create the file /etc/X11/xorg.conf.d/30-touchpad.conf and write:

Section "InputClass"
    Identifier "libinput touchpad catchall"
    MatchIsTouchpad "on"
    MatchDevicePath "/dev/input/event*"
    Driver "libinput"
    Option "Tapping" "on"
    Option "ClickMethod" "clickfinger"
    Option "NaturalScrolling" "true"
EndSection

And then restart your computer to reload xorg.

Keyboard Layout Configuration

For my personal laptop, I use the following configuration for my keyboard layout:

  • The US keyboard layout as I find the best one for programming.
  • The altgr-intl variant in order to write in spanish easily and quickly.
  • The Caps Lock and Escape keys are swapped in order for improved VIM-like usage.

For setting this in an Xorg server, use the following command:

localectl --no-convert set-x11-keymap us evdev altgr-intl caps:swapescape

QT5 Platform

For configuring the QT applications, I use the qt5ct to configure the theme. This was the only way I could get the configuration to work. Create the following file /etc/profile.d/qt5_vars.sh and write the following:

export QT_QPA_PLATFORMTHEME=qt5ct

About

The hidden files for configuring my full desktop experience, powered by Qtile.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published