Skip to content

Demitroi/dot-files

Repository files navigation

Demitroi's dot files

Software preferences and settings.

Table of content

Install Config

In order to install this config, first clone this repo and execute the make-symbolic-links.sh script.

sh make-symbolic-links.sh

Base System

Arch Linux

https://archlinux.org/

My base system consists in a basic arch linux installation that uses btrfs filesystem, network manager, vim and man pages.

Check out the Arch Linux Installation for the full manual.

Nvidia Drivers

https://wiki.archlinux.org/title/NVIDIA

In case a Nvidia Graphic Card is installed, the drivers must be installed, follow the arch linux wiki.

Install the container toolkit if you're planning to run ollama models through docker.

Automatic Scripts

https://wiki.archlinux.org/title/Systemd

Systemd can run script in certain events of the system, such as booting or resuming from suspend or hibernation.

Copy the systemd files included in this repo to the system and change the ownership.

sudo cp etc/systemd/system/user-resume@.service etc/systemd/system/user-startup@.service /etc/systemd/system/
sudo chown root:root /etc/systemd/system/user-resume@.service /etc/systemd/system/user-startup@.service

Load the new units and enable them.

sudo systemctl daemon-reload
sudo systemctl enable user-resume@myusername.service
sudo systemctl enable user-startup@myusername.service

Create the scripts directory and the files, then edit them according your needs.

mkdir -p ~/.local/share/scripts

cat > ~/.local/share/scripts/resume.sh << 'EOF'
#!/bin/bash
/usr/bin/openrgb --noautoconnect --profile /home/demitroi/.config/OpenRGB/red.orp &
disown
EOF

chmod u+x ~/.local/share/scripts/resume.sh

cat > ~/.local/share/scripts/startup.sh << 'EOF'
#!/bin/bash
/usr/bin/openrgb --noautoconnect --profile /home/demitroi/.config/OpenRGB/red.orp &
disown
EOF

chmod u+x ~/.local/share/scripts/startup.sh

Desktop Environment

Window Manager

Sway

https://swaywm.org/

Sway (contracted from SirCmpwn's Wayland compositor [1]) is a compositor for Wayland designed to be fully compatible with i3.

Create Sway startup script to auto start programs. The below file is an example, edit it according your needs.

mkdir -p ~/.local/share/scripts

cat > ~/.local/share/scripts/sway-startup.sh << 'EOF'
#!/bin/bash
/usr/bin/openrgb --noautoconnect --profile /home/demitroi/.config/OpenRGB/red.orp &
/usr/bin/qpwgraph --minimized &
/usr/bin/remmina --icon &
disown
EOF

chmod u+x ~/.local/share/scripts/sway-startup.sh

.config/sway/config

Fonts

The following is the list of fonts that I use.

Qt Wayland

Some Apps like KeePassXC and qpwgraph requires the qt-wayland packages to work properly.

Statusbar

Waybar

https://github.com/Alexays/Waybar

Highly customizable Wayland bar for Sway and Wlroots based compositors.

.config/waybar/config.jsonc

.config/waybar/style.css

Application Launcher

Wofi

https://hg.sr.ht/~scoopta/wofi

Wofi is a launcher/menu program for wlroots based wayland compositors such as sway.

.config/wofi/config

.config/wofi/style.css

Lock Screen

Swaylock

https://github.com/swaywm/swaylock

swaylock is a screen locking utility for Wayland compositors.

.config/swaylock/config

Terminal Emulator

Foot

https://codeberg.org/dnkl/foot

Foot is a fast, lightweight and minimalistic Wayland terminal emulator.

.config/foot/foot.ini

Shell

Zsh

https://www.zsh.org/

Zsh is a powerful shell that operates as both an interactive shell and as a scripting language interpreter.

.zshrc

Policy Kit

lxqt-policykit

https://github.com/lxqt/lxqt-policykit

Polkit is an application-level toolkit for defining and handling the policy that allows unprivileged processes to speak to privileged processes: It is a framework for centralizing the decision making process with respect to granting access to privileged operations for unprivileged applications.

Clipboard Manager

Cliphist

https://github.com/sentriz/cliphist

Wayland clipboard manager with support for multimedia.

Multimedia Server

PipeWire

https://pipewire.org/

PipeWire is a project that aims to greatly improve handling of audio and video under Linux.

Volume Control

PulseAudio Volume Control

https://freedesktop.org/software/pulseaudio/pavucontrol/

PulseAudio Volume Control (pavucontrol) is a simple GTK based volume control tool ("mixer") for the PulseAudio sound server.

In order to use speakers and headphones in the same sound card the "Auto-Mute Mode" has to be disabled. Exec alsamixer, select the sound card and disable the Auto-Mute.

PipeWire Graph

qpwgraph

https://gitlab.freedesktop.org/rncbc/qpwgraph

Qpwgraph is a graph manager dedicated to PipeWire, using the Qt C++ framework, based and pretty much like the same of QjackCtl.

Brightness Control

brightnessctl

https://github.com/Hummer12007/brightnessctl

A program to read and control device brightness.

Wallpapers

Wallpapers for background and lockscreen are expected to be localted in ~/.local/share/wallpapers/background.png and ~/.local/share/wallpapers/lockscreen.png respectively.

The recommended way to set the wallpapers is converting them using FFmpeg, for eample.

ffmpeg -i /path/to/my/background.jpg ~/.local/share/wallpapers/background.png
ffmpeg -i /path/to/my/lockscreen.png ~/.local/share/wallpapers/lockscreen.png

Notifications

Mako

https://github.com/emersion/mako

A lightweight notification daemon for Wayland. Works on Sway.

.config/mako/config

Screencasting

https://wiki.archlinux.org/title/Screen_capture#Wayland

https://wiki.archlinux.org/title/PipeWire#WebRTC_screen_sharing

The Screencasting in Wayland can be achieved by installing the following packages.

The Screencasting can be tested in the following page:

https://mozilla.github.io/webrtc-landing/gum_test.html

.config/xdg-desktop-portal-wlr/config

Screen Recorder

wf-recorder

https://github.com/ammen99/wf-recorder

wf-recorder is a utility program for screen recording of wlroots-based compositors (more specifically, those that support wlr-screencopy-v1 and xdg-output).

Record a simple video with audio.

wf-recorder --audio --file ~/Videos/test.mkv

Record a 60 fps video using libx265 for video and libopus for audio.

wf-recorder --audio --framerate 60 --codec libx265 -p preset=superfast -p crf=28 --audio-codec libopus --file ~/Videos/test_libx265.mkv

Record a 60 fps video using hardware accelerated hevc_nvenc for video and libopus for audio.

wf-recorder --audio --framerate 60 --codec hevc_nvenc -p preset=p4 --audio-codec libopus --file ~/Videos/test_hevc_nvenc.mkv

List all FFmpeg encoders:

ffmpeg -encoders

Show parameters of encoder:

ffmpeg -h encoder=libx265

To show more information and examples search in the web, for example:

https://trac.ffmpeg.org/wiki/Encode/AV1

Screenshots

grim

https://gitlab.freedesktop.org/emersion/grim

Grab images from a Wayland compositor.

.config/screenshot/take_full_screenshot.sh

.config/screenshot/take_region_screenshot.sh

Screenshot editor

swappy

https://github.com/jtheoof/swappy

A Wayland native snapshot editing tool, inspired by Snappy on macOS.

File Manager

PCManFM-Qt

https://github.com/lxqt/pcmanfm-qt

File manager and desktop icon manager (Qt port of PCManFM and libfm).

.config/pcmanfm-qt/default/settings.conf

File Archiver

LXQt Archiver

https://github.com/lxqt/lxqt-archiver

A simple & lightweight desktop-agnostic Qt file archiver.

.config/lxqt/archiver.conf

Image Viewer

LXImage-Qt

https://github.com/lxqt/lximage-qt

The image viewer and screenshot tool for lxqt.

.config/lximage-qt/settings.conf

Calendar

thunderbird

https://www.thunderbird.net/en-US/

Thunderbird is an open source email, news, and chat client previously developed by the Mozilla Foundation.

Look and Feel

GTK3 settings editor adapted to work in the wlroots environment.

.config/gtk-3.0/settings.ini

.gtkrc-2.0

.icons/default/index.theme

.config/xsettingsd/xsettingsd.conf

.bashrc

Display Settings

nwg-displays

https://github.com/nwg-piotr/nwg-displays

Output management utility for sway and Hyprland.

Screen Mirror

wl-mirror

https://github.com/Ferdi265/wl-mirror

A simple Wayland output mirror client.

View the available outputs.

swaymsg -t get_outputs

Mirror the desired output.

wl-mirror DP-3

You can also use the wl-present wrapper and select the output with the mouse.

wl-present mirror

Screen Magnifier

It's not possible yet on sway, see:

https://www.reddit.com/r/swaywm/comments/15v29nf/does_a_swaywlroots_magnifying_glass_tool_exists/

swaywm/sway#2781

General Tools

Web Browser

Firefox

https://www.mozilla.org/en-US/firefox/

Firefox is a popular open source graphical web browser from Mozilla.

Install the following Extensions:

In order to customize toolbar, right click tab bar, select customize toolbar and enable Title Bar. Go to General settings, first disable AI slop, then enable "Ask before closing multiple tabs", "Open previous windows and tabs", play DRM content, autoscrolling and disable link previews.

Now go to Home and set shortcuts to 2 rows, then go to Privacy Security, disable "Ask to save passwords" and "Save and autofill payment info".

Audio Player

Audacious

https://audacious-media-player.org/

Audacious is a free and advanced audio player. It is focused on audio quality and supports a wide variety of audio codecs, and is easily extensible through third-party plugins.

Video Player

mpv

https://mpv.io/

mpv is a media player based on MPlayer and the now unmaintained mplayer2.

.config/mpv/mpv.conf

With MPV you can play video devices like webcams and HDMI capturer.

List connected devices:

v4l2-ctl --list-devices

The output will look like this:

UGREEN 15389: UGREEN 15389 (usb-0000:0c:00.3-1):
	/dev/video2
	/dev/video3
	/dev/media1

HD Pro Webcam C920 (usb-0000:0c:00.3-2):
	/dev/video0
	/dev/video1
	/dev/media0

Chose a device, for example /dev/video2, now list the input formats available.

v4l2-ctl --list-formats-ext -d /dev/video2

The output is too long, It shows the available formats, resolutions and framerates, for example:

ioctl: VIDIOC_ENUM_FMT
        Type: Video Capture

        [0]: 'YUYV' (YUYV 4:2:2)
                Size: Discrete 2560x1440
                        Interval: Discrete 0.033s (30.000 fps)
                        Interval: Discrete 0.050s (20.000 fps)
                        Interval: Discrete 0.100s (10.000 fps)
                Size: Discrete 1920x1080
                        Interval: Discrete 0.017s (60.000 fps)
                        Interval: Discrete 0.020s (50.000 fps)
                        Interval: Discrete 0.033s (30.000 fps)
                        Interval: Discrete 0.050s (20.000 fps)
                        Interval: Discrete 0.100s (10.000 fps)

In this case I chose YUYV 4:2:2 1920x1080 60fps, so I run the next command. It's recommended to add the low-latency profile and untimed flag to get rid of possible lag.

mpv av://v4l2:/dev/video2 --profile=low-latency --untimed --demuxer-lavf-o=input_format=yuyv422,video_size=1920x1080,framerate=60

Document Viewer

zathura

https://pwmt.org/projects/zathura/

zathura is a customizable document viewer with vi-like keybindings. It provides a minimalistic and space-saving interface. Users interact with zathura primarily with the keyboard. Different file formats are supported through plugins.

.config/zathura/zathurarc

Office Suite

LibreOffice

https://www.libreoffice.org/

LibreOffice is a private, free and open source office suite.

In order to set the Icons for the dark theme go to: Tools / Options, in the floating menu select LibreOffice / View, in the Icon Theme select Breeze (Dark).

Calculator

Qalculate

https://qalculate.github.io/

Qalculate! is a multi-purpose cross-platform desktop calculator.

Audio Editor and Recorder

Audacity

https://www.audacityteam.org/

Audacity is an easy-to-use, multi-track audio editor and recorder for Windows, macOS, GNU/Linux and other operating systems.

Recording and Broadcasting

OBS Studio

https://obsproject.com/

Open Broadcaster Software (OBS) is an open source cross-platform video recording and live-streaming application.

Flashcards

Anki

https://apps.ankiweb.net/

Anki is a flashcard program that helps you spend more time on challenging material, and less on what you already know.

Video Editor

Kdenlive

https://kdenlive.org/en/

Kdenlive is a powerful free and open source cross-platform video editing program made by the KDE community.

Password Manager

KeePassXC

https://keepassxc.org/

Let KeePassXC safely store your passwords and auto-fill them into your favorite apps, so you can forget all about them.

System Information Tool

Fastfetch

https://github.com/fastfetch-cli/fastfetch

Fastfetch is a neofetch-like tool for fetching system information and displaying it in a visually appealing way.

System's Hardware Information Tool

Dmidecode

https://www.nongnu.org/dmidecode/

Dmidecode reports information about your system's hardware as described in your system BIOS according to the SMBIOS/DMI standard.

File Transferring and Synchronization

rsync

https://rsync.samba.org/

rsync is an open source utility that provides fast incremental file transfer.

SSD and HDD Monitoring

Smartmontools

https://www.smartmontools.org/

Control and monitor S.M.A.R.T. enabled ATA and SCSI Hard Drives.

Directory Tree Listing

tree

https://gitlab.com/OldManProgrammer/unix-tree

A directory listing program displaying a depth indented list of files.

Access and Manipulate Disks

udisks

https://www.freedesktop.org/wiki/Software/udisks/

Daemon, tools and libraries to access and manipulate disks, storage devices and technologies.

List Connected USB Devices

usbutils

https://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usbutils.git/

A collection of USB tools to query connected USB devices.

Lighting Control

OpenRGB

https://openrgb.org/

Open source RGB lighting control that doesn't depend on manufacturer software.

Development tools

Terminal Text Editor

Neovim

https://neovim.io/

Neovim is a fork of Vim aiming to improve the codebase, allowing for easier implementation of APIs, improved user experience and plugin implementation.

.config/nvim/init.lua

.config/nvim/lazy-lock.json

.config/nvim/ftplugin/java.lua

Terminal Multiplexer

Tmux

https://github.com/tmux/tmux/wiki

tmux is a terminal multiplexer. It lets you switch easily between several programs in one terminal, detach them (they keep running in the background) and reattach them to a different terminal.

.config/tmux/tmux.conf

Code Editor

Visual Studio Code

https://code.visualstudio.com/

Visual Studio Code is a code editor redefined and optimized for building and debugging modern web and cloud applications.

Install the following Extensions:

.config/Code - OSS/User/settings.json

.config/Code - OSS/User/keybindings.json

.config/code-flags.conf

Database Manager

DBeaver

https://dbeaver.io/

DBeaver Community is a free cross-platform database tool for developers, database administrators, analysts, and everyone working with data.

System Resource Monitor

btop

https://github.com/aristocratos/btop

A monitor of resources.

.config/btop/btop.conf

Process Viewer

htop

https://htop.dev/

A cross-platform interactive process viewer.

API Tester

curl

https://curl.se/

Command line tool and library for transferring data with URLs.

Version Control System

Git

https://git-scm.com/

Git is a free and open source distributed version control system designed to handle everything from small to very large projects with speed and efficiency.

.gitconfig

JSON Processor

jq

https://jqlang.org/

jq is a lightweight and flexible command-line JSON processor.

Open File Listing Tool

lsof

https://github.com/lsof-org/lsof

lsof is a command listing open files.

DNS Utilities

bind

https://www.isc.org/bind/

A complete, highly portable implementation of the DNS protocol.

TLS and SSL crypto library

OpenSSL

https://www.openssl.org/

OpenSSL is a software library for applications that provide secure communications over computer networks against eavesdropping, and identify the party at the other end. It is widely used by Internet servers, including the majority of HTTPS websites.

Virtual Machines

QEMU

https://www.qemu.org/

QEMU is a generic and open source machine emulator and virtualizer.

Make sure KVM is enabled.

LC_ALL=C.UTF-8 lscpu | grep Virtualization

If the previous command doesn't show anything, go to the BIOS/UEFI config and enable virtualization.

Create a disk image, if the host filesystem is not CoW, remove the o nocow=on flag.

qemu-img create -f qcow2 windows_10.qcow2 -o nocow=on 40G

Create a copy of the EFI vars file for the virtul machine.

cp /usr/share/edk2/x64/OVMF_VARS.4m.fd windows_10_OVMF_VARS.4m.fd

Run a virtual machine with the installation ISO.

For Windows guests, the virtio-win ISO is required in order to use the virtio devices.

https://github.com/virtio-win/virtio-win-pkg-scripts/blob/master/README.md

Follow the instructions of the Arch's wiki to load the VirtIO drives.

https://wiki.archlinux.org/title/QEMU#Preparing_a_Windows_guest

qemu-system-x86_64 \
    # Disk image, it's using VirtIO interface for perfomance
    -drive file=windows_10.qcow2,format=qcow2,index=0,media=disk,if=virtio \

    # Installation media
    -drive file=/home/demitroi/Downloads/Win10_22H2_English_x64v1.iso,index=2,media=cdrom \

    # VirtIO drivers for window, not requiered in Linux systems
    -drive file=/home/demitroi/Downloads/virtio-win-0.1.285.iso,index=3,media=cdrom \

    # UEFI firmware and EFI vars
    -drive if=pflash,format=raw,readonly=on,file=/usr/share/edk2/x64/OVMF_CODE.4m.fd \
    -drive if=pflash,format=raw,file=windows_10_OVMF_VARS.4m.fd \

    # Virtual Machine's memory
    -m 8G \

    # Enable KVM (Kernel-based Virtual Machine)
    --enable-kvm \

    # CPU config, this config is for Windows, some systems will be ok with just the host, check the qemu manual for all the options
    -cpu host,hv_relaxed,hv_spinlocks=0x1fff,hv_vapic,hv_time \

    # Improves mouse usage
    -usb -device usb-tablet \

    # VirtIO network interface
    -nic user,model=virtio-net-pci \

    # VirtIO graphics card
    -device virtio-vga-gl \
    -display gtk,gl=on \

    # Intel audio device, it can be skipped
    -audiodev pa,id=snd0 \
    -device ich9-intel-hda \
    -device hda-micro,audiodev=snd0 \

    # Shot boot menu, it can also be skipped
    -boot menu=on

Once the operating system is installed, remove the installation media, virtio drivers and optionally the boot menu. It's recommended to create a script to run the virtual machine quickly.

The guest can communicate to the host through the network using the IP 10.0.2.2, for example:

ping 10.0.2.2
ssh user@10.0.2.2
scp myfile user@10.0.2.2:~/

QEMU can do port forwarding, add the next flag to the command line.

-nic user,hostfwd=tcp::60022-:22

Another interesting feature is the passthrough of USB devices.

Show the connected USB devices.

lsusb
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 001 Device 003: ID 0930:0220 Toshiba Corp.
Bus 002 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 002 Device 002: ID 8087:0024 Intel Corp. Integrated Rate Matching Hub
Bus 002 Device 003: ID 058f:6366 Alcor Micro Corp. Multi Flash Reader
Bus 002 Device 004: ID 04f2:b3b1 Chicony Electronics Co., Ltd TOSHIBA Web Camera - HD
Bus 003 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub
Bus 003 Device 004: ID 0951:1666 Kingston Technology DataTraveler 100 G3/G4/SE9 G2/50 Kyson
Bus 004 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 004 Device 002: ID 8087:0024 Intel Corp. Integrated Rate Matching Hub

There's a Kingston pendrive connected, the problem is that Linux doesn't allow the write access to non-root users, this can be solved by changing the permission of the device.

chmod o+w /dev/bus/usb/003/004

The previous solution works, but it's temporal, the permission changes will be undone when the machine is restarted o when unplug and plug the device. To make the changes permant, create a udev rule.

vim /etc/udev/rules.d/99-qemu-usb.rules

Add the next content, the idVendor number comes from the left part of the lsusb's output and the idProduct from the right.

SUBSYSTEM=="usb", ATTR{idVendor}=="0951", ATTR{idProduct}=="1666", OWNER="myusername", MODE="0660"

Reload the udev rules.

udevadm control --reload
udevadm trigger

Operating Systems examples:

https://computernewb.com/wiki/QEMU/Guests

Containerization Software

Docker

https://www.docker.com/

Docker is a set of products that uses operating system-level virtualization to deliver software in packages called containers.

Make sure the Docker Unix Socket is enable in order to start docker on demand.

systemctl enable docker.socket

LLMs on Docker

See LLMs on Docker

Java Development

Java is a programming language originally developed by Sun Microsystems and released in 1995 as a core component of Sun Microsystems' Java platform.

Read the local documentation in: /usr/share/doc/java8-openjdk/api/index.html, /usr/share/doc/java21-openjdk/api/index.html and /usr/share/doc/java25-openjdk/api/index.html.

JavaScript Development

JavaScript often abbreviated as JS, is a programming language and core technology of the World Wide Web, alongside HTML and CSS.

Go Development

Go is an open source programming language supported by Google.

Go has some local documentation files, for example: /usr/share/doc/go/go_spec.html.

Run the following command to read Go's standard library documentation.

go doc -http

Python Development

Python is an interpreted, interactive, object-oriented programming language.

Read the local documentation in /usr/share/doc/python/html/index.html.

Servers

Multimedia Server

Jellyfin

https://jellyfin.org/

Jellyfin is a free and open-source multimedia application suite designed to organize, manage, and share digital media files to networked devices.

Enable and start the service.

systemctl enable jellyfin.service
systemctl start jellyfin.service

File Synchronization

Syncthing

https://syncthing.net/

Syncthing is a continuous file synchronization program.

Enable and start the service.

systemctl enable syncthing@myusername.service
systemctl start syncthing@myusername.service

SSH Server

OpenSSH

https://www.openssh.com/portable.html

SSH protocol implementation for remote login, command execution and file transfer.

Enable and start the service.

systemctl enable sshd.service
systemctl start sshd.service

Web Server

caddy

https://caddyserver.com/

Fast and extensible multi-platform HTTP/1-2-3 web server with automatic HTTPS.

Gaming

Prepare machine for gaming

See Prepare machine for gaming

Steam

https://store.steampowered.com/about/

Steam is a popular game distribution platform by Valve.

Enable proton-ge, go to Steam > Settings > Compatibility and change the default compatibility tool.

In order to change proton environment variables, go to game properties and in the launch options set them, for example:

PROTON_USE_WINED3D=1 %command%

See the next link to see the list of the available proton environment variables.

https://github.com/GloriousEggroll/proton-ge-custom?tab=readme-ov-file#modification

Launchers and Emulators

The recommended way to install launchers (such as Heroic Games Launcher) and emulators is using AppImages, download them, give them execution permissions and move them to ~/.local/bin.

Create the directory.

mkdir -p ~/.local/bin

Move it to the directory and add execution permissions.

mv ~/Downloads/Heroic-2.22.0-linux-x86_64.AppImage ~/.local/bin/Heroic-linux-x86_64.AppImage
chmod u+x ~/.local/bin/Heroic-linux-x86_64.AppImage

Create a desktop entry in ~/.local/share/applications directory.

Create the directory if it doesn't exist.

mkdir -p ~/.local/share/applications

Create a .desktop file, for example heroic.desktop:

[Desktop Entry]
Name=Heroic Games Launcher
Exec=/home/demitroi/.local/bin/Heroic-linux-x86_64.AppImage
Terminal=false
Type=Application
Icon=/home/demitroi/.local/share/applications/heroic.png
MimeType=x-scheme-handler/heroic;
Categories=Game;

Howtos

Go to the howtos section.

About

Software preferences and settings.

Resources

Stars

0 stars

Watchers

1 watching

Forks

Releases

No releases published

Packages

 
 
 

Contributors