Menu

Linux desktop fonts configuration in 2025

Modern font configuration for Linux:

gsettings set org.gnome.desktop.interface font-name "Adwaita Sans 11"
gsettings set org.gnome.desktop.interface document-font-name "Adwaita Sans 11"
gsettings set org.gnome.desktop.interface monospace-font-name "Noto Sans Mono 11"

Adwaita Sans is the new default font for GNOME desktop environment. It looks great and modern. Noto Sans Mono is a great monospaced font for programming.

· 28 Oct 2025

Schwalbe tire levers manual

· 24 Aug 2025

Bikepacking gear list

Essentials

Clothing warm weather (20°C+)
  • Shorts x1
  • T-shirt x1
  • Underwear x2
  • Light shoes x1
Add for colder weather (15°C)
  • Base layer x2
  • Waterproof jacket x1
  • Trousers x1
  • Socks x2
Accessories
  • Sun cream x1
  • Deodorant x1
  • Chamois cream x1
  • After-ride recovery cream x1
  • Toothbrush x1
  • Toothpaste x1
  • Warm cream x1
  • Earplugs x1
  • Chain wax x1

First Aid

  • Anti-allergy medication x1
  • Pain reliever x1
  • Plasters x1
  • Daily medication x1
  • Magnesium supplement x1

Electronics

  • Lights (front and rear) x1
  • Charger USB-C x1
  • Charging cable x1
  • Di2 adapter x1
  • Garmin adapter x1
  • Power bank x1
  • Headphones x1

Tools

  • Lock x1
  • Pump x1
  • Spare tube x1
  • Multi-tool x1
  • Tire levers x1

Important Documents

  • Driving license
  • ID card
  • OV-chipkaart
  • Cash
  • Credit card
· 18 Aug 2025

SSD drive health status

Should you replace your SSD drive? Here is a simple way to check the health status of your SSD drive.

sudo dnf install -y nvme-cli
sudo nvme smart-log /dev/nvme0

This will show you the following information:

Smart Log for NVME device:nvme0 namespace-id:ffffffff
critical_warning			: 0
temperature				: 43 °C (316 K)
available_spare				: 100%
available_spare_threshold		: 50%
percentage_used				: 1%
endurance group critical warning summary: 0
Data Units Read				: 10,529,778 (5.39 TB)
Data Units Written			: 36,729,164 (18.81 TB)
host_read_commands			: 179,044,182
host_write_commands			: 689,140,626
controller_busy_time			: 1,040
power_cycles				: 386
power_on_hours				: 6,494
unsafe_shutdowns			: 60
media_errors				: 0
num_err_log_entries			: 0
Warning Temperature Time		: 0
Critical Composite Temperature Time	: 0
Temperature Sensor 1			: 43 °C (316 K)
Temperature Sensor 2			: 44 °C (317 K)
Thermal Management T1 Trans Count	: 0
Thermal Management T2 Trans Count	: 0
Thermal Management T1 Total Time	: 0
Thermal Management T2 Total Time	: 0

available_spare - shows the percentage of spare memory blocks available on your SSD.

available_spare_threshold - is the critical threshold, expressed as a percentage. When your available_spare drops below this threshold, it’s a warning sign that your drive is nearing the end of its life.

percentage_used - indicates the percentage of the drive’s total estimated lifespan that has been used up.

· 17 Feb 2025

PS1 with git status without any extra dependencies

In this guide, we will add git status to the command line prompt without any extra dependencies.

Our new prompt has the following additional functionality:

  • If the command exits with a non-zero status, it will show the exit code in red, e.g., ✘127.
  • The username and hostname are shown in green, e.g., user@hostname (should prevent the user from executing commands on the wrong host).
  • The current working directory is shown in blue.
  • The git status is shown in square brackets (only if inside a git repository):
    • The branch name is shown in yellow.
    • Untracked files are shown with a yellow question mark.
    • Staged files are shown with a green plus sign.
    • Unstaged files are shown with a red exclamation mark.
    • Ahead and behind of upstream are shown with up and down arrows, respectively.
  • The prompt is split into multiple lines for better readability.

Open your ~/.bashrc file and add the following snippet:

function git_status_prompt() {
    local git_info=""
    if git rev-parse --is-inside-work-tree &>/dev/null; then
        # Define colors
        local branch_color="\033[0;33m"     # Yellow for branch name
        local reset_color="\033[0m"         # Reset to default color
        local untracked_color="\033[1;33m"  # Bold yellow for untracked
        local staged_color="\033[1;32m"     # Bold green for staged
        local unstaged_color="\033[1;31m"   # Bold red for unstaged

        # Show branch name if on a branch, otherwise show commit hash
        local branch_name=$(git symbolic-ref --short -q HEAD 2>/dev/null)
        if [[ -n "$branch_name" ]]; then
            git_info+="[${branch_color}${branch_name}${reset_color}"
        else
            git_info+="[${branch_color}@$(git rev-parse --short HEAD)${reset_color}"
        fi

        # Add additional status indicators with respective colors
        [[ -n $(git ls-files --others --exclude-standard) ]] && git_info+=" ${untracked_color}?${reset_color}"
        ! git diff --cached --quiet && git_info+=" ${staged_color}+${reset_color}"
        ! git diff --quiet && git_info+=" ${unstaged_color}!${reset_color}"

        # Ahead/behind of upstream
        local ahead=$(git rev-list --count @{u}..HEAD 2>/dev/null)
        local behind=$(git rev-list --count HEAD..@{u} 2>/dev/null)
        [[ $ahead -gt 0 ]] && git_info+=" ⇡$ahead"
        [[ $behind -gt 0 ]] && git_info+=" ⇣$behind"

        # Close the square bracket
        git_info+="]"
    fi
    echo -e "$git_info"
}
PS1='$(if [ $? -ne 0 ]; then echo "\[\e[0;31m\]✘$? \[\e[0m\] "; fi)\[\e[01;32m\]\u@\h\[\e[0m\] \[\e[01;34m\]\w\[\e[0m\] $(git_status_prompt)\n\$ '

Apply the changes by running:

source ~/.bashrc
· 3 Nov 2024

Remap the key between left shift and Z in Logitech MX Mechanical Mini in Linux

In Europe, Logitech only sells keyboards with ISO layout. This means that there is an additional key between the left shift and Z. This key is often in the way if you are used to the US layout (ANSI layout). Solaar does not allow you to remap this key.

  1. Install evtest:
sudo dnf install evtest
  1. Start it and find the device:
sudo evtest

evtest will output all available devices. For example:

No device specified, trying to scan all of /dev/input/event*
Available devices:
/dev/input/event0:	Sleep Button
/dev/input/event1:	Power Button
...
/dev/input/event27:	solaar-keyboard
/dev/input/event3:	Logitech USB Receiver
/dev/input/event4:	Logitech USB Receiver Mouse
/dev/input/event5:	Logitech USB Receiver Consumer Control
/dev/input/event6:	Logitech USB Receiver System Control

The keyboard is solaar-keyboard. However, it is connected via the USB receiver. This means that the device is /dev/input/event3.

  1. Record the key code by pressing the key:
Event: time 1692951945.797570, type 4 (EV_MSC), code 4 (MSC_SCAN), value 70064
Event: time 1692951945.797570, type 1 (EV_KEY), code 86 (KEY_102ND), value 1

If you selected solaar-keyboard as the device, evtest won’t record any key

  1. Create a new rule:
sudo vim /etc/udev/hwdb.d/mx-keys.hwdb

Add the following content:

evdev:name:Logitech USB Receiver:*
  KEYBOARD_KEY_70064=leftshift
  1. Update the rules to test the new configuration:
sudo systemd-hwdb update
sudo udevadm trigger
· 20 May 2024

Upgrade to fedora 40

Make sure your current system is up to date:

sudo dnf upgrade --refresh

Reboot:

reboot

Install dnf plugin which updates OS:

sudo dnf install dnf-plugin-system-upgrade

Download and prepare packages for upgrade:

sudo dnf system-upgrade download --releasever=40

Reboot and start upgrade process

sudo dnf system-upgrade reboot
· 23 Apr 2024

Fix missing shortcuts in Logitech MX Mechanical Mini in Linux

Logitech MX Mechanical Mini keyboard works mostly great in Linux. However, there are few buttons which don’t: Mic mute, Screenshots, Emoji, Voice dictation. To fix it, install solaar and reboot your computer (important, otherwise the app will hang):

sudo dnf install solaar
reboot

Configuring every button is 2-step process.

On the first step, the button is marked as a custom button (Diverted):

On the second step, click Rule Editor in the bottom left corner and there you can assign a new action to it:

Solaar keeps configuration files in ~/.config/solaar/ directory. Rules are stored in ~/config/solaar/rules.yaml file:

%YAML 1.3
---
- Key: [MultiPlatform Search, pressed]
- KeyPress:
  - XF86_AudioNext
  - click
...
---
- Key: [Voice Dictation, pressed]
- Execute: [firefox, 'https://gemini.google.com']
...
---
- Key: [Snipping Tool, pressed]
- KeyPress:
  - Print
  - click
...
---
- Key: [Open Emoji Panel, pressed]
- Execute: gnome-characters
...
---
- Key: [Mute Microphone, pressed]
- KeyPress:
  - XF86_AudioMicMute
  - click
...

The configuration file is located in ~/.config/solaar/config.yaml and is unique for every keyboard. It contains the keyboard’s name, serial number and etc. Our modified configuration should look like this:

- 1.1.10
- _NAME: MX Mechanical Mini
  _absent: [hi-res-scroll, lowres-scroll-mode, hires-smooth-invert, hires-smooth-resolution, hires-scroll-mode, scroll-ratchet, smart-shift, thumb-scroll-invert,
    thumb-scroll-mode, onboard_profiles, report_rate, pointer_speed, dpi, speed-change, backlight-timed, reprogrammable-keys, persistent-remappable-keys,
    crown-smooth, divert-crown, divert-gkeys, m-key-leds, mr-key-led, gesture2-gestures, gesture2-divert, gesture2-params, sidetone, equalizer, adc_power_management]
  # <redacted>
  _sensitive: {divert-keys: true, multiplatform: false}
  # <redacted>
  backlight: true
  change-host: null
  disable-keyboard-keys: {1: false, 4: false, 8: false, 16: false}
  divert-keys: {212: 1, 226: 0, 227: 0, 231: 0, 232: 0, 233: 0, 259: 1, 264: 1, 266: 1, 267: 0, 268: 0, 269: 0, 270: 0, 271: 0, 272: 0, 273: 0, 274: 0,
    277: 0, 279: 0, 280: 0, 281: 0, 282: 0, 283: 0, 284: 1, 286: 0, 316: 0, 321: 0}
  fn-swap: false
  multiplatform: 0
· 26 Feb 2024

Monitor open connections

This command will plot open connections:

{ while true; do ss -ant | grep ESTAB | wc -l; sleep 0.1; done } | ttyplot
· 24 Feb 2024

dnf: list all dependencies of a package

dnf repoquery --deplist <package-name>
· 6 Nov 2023