~piotr-machura/dotfiles

e3f2b49989b5d9be934457b51ba404bbe0efc2f7 — Piotr Machura 4 months ago cac29f3
Change maximum README text width
1 files changed, 92 insertions(+), 64 deletions(-)

M README.md
M README.md => README.md +92 -64
@@ 1,41 1,55 @@
# Arch setup

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 is for documentation and license only.
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 is for
documentation 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 clone the repo normally if you just want some of the
configuration.
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
clone the repo normally if you just want some of the configuration.

1. Create an alias `alias dots="/usr/bin/git --git-dir=$HOME/.conifg/dots --work-tree=$HOME"`
2. Clone the repo `git clone --single-branch --branch dots --bare git@git.sr.ht:~piotr-machura/arch-setup $HOME/.config/dots`
3. Disable the showing of untracked files `dots config --local status.showUntrackedFiles no`
1. Create an alias `alias dots="/usr/bin/git --git-dir=$HOME/.conifg/dots
	 --work-tree=$HOME"`
2. Clone the repo `git clone --single-branch --branch dots --bare
	 git@git.sr.ht:~piotr-machura/arch-setup $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:** 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.
**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`.
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`.
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. Obtain the gpg key needed for Spotify `curl -sS https://download.spotify.com/debian/pubkey.gpg | gpg --import -`.
3. Install AUR packages using your favorite AUR helper `paru -S --needed - < ~/.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 $(paru -Qg base-devel | awk '{print $2}')` to set the base-devel
install reason as dependency.

### Pacman

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.
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.

```none
visudo


@@ 44,21 58,21 @@ visudo
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.
**or**, alternatively the root's home directory can be changed to your user's in the
`/etc/passwd` using `vipw`.

**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.
**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.

The list contains a nice meta-package which groups all of the base-devel utilities as its dependency after doing
`sudo pacman -S --asdeps $(pacman -Qqg base-devel)`.
**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.
Some programs require manual configuration, since not everything can be kept in the
repository. This section describes just that.

### Systemd & firewall



@@ 76,7 90,8 @@ just that.

- `neovim-undo-cleanup.service`

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

```
/etc/systemd/logind.conf


@@ 100,18 115,19 @@ The last step is optional, but without it ufw does clutter the systemd logs quit

## LightDM & Xorg

The config is present in `~/.config/lightdm/lightdm-mini-greeter.conf`. We will link it to the system-wide
location shortly, but first:
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](https://github.com/prikhi/lightdm-mini-greeter). It
requires specifying the user in config file. You **have** to change the `user` field in the cloned
The greeter in use is the [LightDM mini
greeter](https://github.com/prikhi/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.
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



@@ 127,7 143,8 @@ logind-check-graphical=true

### Maven home

Maven uses `~/.m2` directory for downloaded artifacts by default, this can be changed by setting
Maven uses `~/.m2` directory for downloaded artifacts by default, this can be changed by
setting
```none
/opt/maven/conf/settings.xml
----------------------------


@@ 136,8 153,8 @@ Maven uses `~/.m2` directory for downloaded artifacts by default, this can be ch

### Screen saver

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
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

```none
/etc/X11/xorg.conf


@@ 150,7 167,8 @@ EndSection

### Screen tearing

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

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


@@ 165,9 183,10 @@ EndSection

### Git

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
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

```none
~/.config/git/id


@@ 182,10 201,12 @@ key ID. Provide said identity file by creating
    smtpuser = <your email here>
```

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

### Himalaya
Himalaya is a handy command line IMAP/SMTP tool. The required configuration file has the following format:
Himalaya is a handy command line IMAP/SMTP tool. The required configuration file has the
following format:
```none
~/.config/himalaya/config.toml
------------------------------


@@ 221,17 242,20 @@ 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
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 is Rubik and the mono space font is JetBrains Mono, both of which are supplemented with [Nerd
Font](https://www.nerdfonts.com/) glyphs. GTK+ theme is [Arc Darker](https://github.com/horst3180/arc-theme) and icon
theme is [Papirus](https://github.com/PapirusDevelopmentTeam/papirus-icon-theme). The cursor theme is [Breeze
Snow](https://www.gnome-look.org/p/999927/). Set it as system-wide default by editing
The UI font is Rubik and the mono space font is JetBrains Mono, both of which are
supplemented with [Nerd Font](https://www.nerdfonts.com/) glyphs. GTK+ theme is [Arc
Darker](https://github.com/horst3180/arc-theme) and icon theme is
[Papirus](https://github.com/PapirusDevelopmentTeam/papirus-icon-theme). The cursor
theme is [Breeze Snow](https://www.gnome-look.org/p/999927/). Set it as system-wide
default by editing

```none
/usr/share/icons/default/index.theme


@@ 241,7 265,10 @@ Snow](https://www.gnome-look.org/p/999927/). Set it as system-wide default by ed
Inherits=Breeze_Snow
```

The others should be enabled by default after installing the dotfiles.
The others should be enabled by default after installing the dotfiles. The only
exception is the GTK2 theme, which requires linking to the system-wide location `ln -s
~/.local/share/themes/Materia-black /usr/share/themes`


### Thunar



@@ 266,8 293,8 @@ xfconf-query --channel thunar --property /misc-image-size-in-statusbar --create 

### Firefox

The repository will clone `userChrome.css` and `userContent.css` into `~/.local/share/firefox-chrome` . To use them
perform the following steps:
The repository will clone `userChrome.css` and `userContent.css` into
`~/.local/share/firefox-chrome` . To use them perform the following steps:

1. Open Firefox and go to _"about:config"_.
2. Accept the risk and search for _"UserProfileCustomizations"_ . Set it to _"true"_.


@@ 281,9 308,10 @@ the extension settings. Same with the BTTV config in `~/.config/bttv.json`.

## 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
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

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


@@ 292,6 320,6 @@ or remove (effectively) by appending
Hidden=true
```

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 alias `menu-diff` for comparing global and local
entries.
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 alias `menu-diff` for comparing global and local entries.