This is my dotfiles repository. You can learn more about dotfiles here.
I use Ansible for better flexibility. The main Ansible tasks are located in
roles/dotfiles/tasks
.
# Install ansible and requirements
$ sudo pacman -S ansible
$ ansible-galaxy install -r requirements.yml
Copy .env.sample
to .env
and configure environment variables. Then run the playbook:
$ ./install.sh
You can pass ansible-playbook arguments to install.sh
:
$ ./install.sh --tags gnome
$ ./install.sh --skip-tags fonts,proxy
You can find the list of tags in roles/dotfiles/tasks/main.yml
.
After installing, do not move dotfiles repository. If you did that, install once again.
Here I explain some manual configurations that are hard to automate, or I was too lazy to automate!
If you have multiple monitors (one HiDPI, and one with lower dpi):
-
Use Wayland
-
Enable the experimental fractional scaling feature of Wayland:
$ gsettings set org.gnome.mutter experimental-features "['scale-monitor-framebuffer']"
-
Open
Settings -> Displays
, and set Scale to your desired value for each monitor.
$ sudo pacman -S cups
$ sudo systemctl enable --now cups
$ sudo pacman -S hplip
$ sudo hp-setup -i
References:
- https://wiki.archlinux.org/title/map_scancodes_to_keycodes
- https://wiki.archlinux.org/title/Keyboard_input#Identifying_scancodes
My Xiaomi laptop's keyboard has a button for using Xiao AI in Windows,
but it was unusable in Linux. To use this button,
I found its scancode (0x72
) and mapped it to a linux keycode.
To find the scancode, press the key and look for logs like this in dmesg
output:
[ 8474.796476] atkbd serio0: Unknown key pressed (translated set 2, code 0x72 on isa0060/serio0).
[ 8474.796481] atkbd serio0: Use 'setkeycodes 72 <keycode>' to make it known.
Open list of linux keycodes and pick a keycode (e.g. 172
: HomePage):
$ cat /usr/include/linux/input-event-codes.h | grep KEY_
$ sudo setkeycodes 72 172
Find your keyboard information with evemu-describe
command (evemu
package).
Create /usr/lib/udev/hwdb.d/90-redmi.hwdb
and set mapping for your keyboard:
evdev:atkbd:dmi:bvn*:bvr*:bd*:svnTIMI:pnRedmiBookPro15:*
KEYBOARD_KEY_72=172
Update hwdb.bin
:
$ sudo systemd-hwdb update
After any change to 90-redmi.hwdb
, run sudo touch /usr
.
My favorite monospace fonts:
Use a nerd font for better compatibility with shell prompts like Powerlevel10k or Starship. This dotfiles repo installs some nerd fonts.