~piotr-machura/dotfiles

0ea3750ec3da53749ab8a2c261190e00abc2d6f8 — Piotr Machura 8 months ago 1bda363
Add information on firefox mime helper
1 files changed, 73 insertions(+), 39 deletions(-)

M README.md
M README.md => README.md +73 -39
@@ 1,8 1,10 @@
# Arch setup
This is a repository containing the configuration of my personal Arch Linux system. The changes to  my home directory

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.


@@ 19,25 21,29 @@ configs repo directly. Feel free to `unalias dots` now.
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`.

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`. 
packages in `~/.local/share/pacman/aur.txt`.

1. Install official packages  `pacman -S --needed - < ~/.local/share/pacman/pkg.txt`
1. Install official packages `pacman -S --needed - < ~/.local/share/pacman/pkg.txt`
1. Obtain the gpg key needed for Spotify `curl -sS https://download.spotify.com/debian/pubkey.gpg | gpg --import -`.
2. Install AUR packages using your favorite AUR helper `paru -S --needed - < ~/.local/share/pacman/aur.txt`.
1. Install AUR packages using your favorite AUR helper `paru -S --needed - < ~/.local/share/pacman/aur.txt`.

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

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


@@ 50,15 56,17 @@ The list contains a nice meta-package which groups all of the base-devel utiliti
`sudo pacman -S --asdeps $(pacman -Qqg base-devel)`.

## Additional configuration

Some programs require manual configuration, since not everything can be kept in the repository. This section describes
just that.

### Systemd & firewall

**System-wide** services enabled with `systemctl enable <service name here>` :

- `systemd-timesyncd.service`
- `lightdm.service`
- `bluetooth.service` *(optional)*
- `bluetooth.service` _(optional)_
- `ufw.service`
- `docker.service`
- `paccache.timer`


@@ 69,11 77,13 @@ 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

```
/etc/systemd/logind.conf
------------------------
HandlePowerKey=ignore
```

and the service reloaded with

`systemctl restart systemd-logind.service`


@@ 88,10 98,12 @@ and the service reloaded with
The last step is optional, but without it ufw does clutter the systemd logs quite a bit.

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

### ⚠️  Warning ⚠️
### ⚠️ 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
`lightdm-mini-greeter.conf` or **you won't be able to log in**.


@@ 101,6 113,7 @@ After you change the `user` field you may link it to the system-wide location wi
partition.

To enable the greeter uncomment the following lines

```none
/etc/lightdm/lightdm.conf
-------------------------


@@ 112,8 125,10 @@ logind-check-graphical=true
```

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

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


@@ 122,8 137,11 @@ Section "ServerFlags"
    Option "BlankTime" "0"
EndSection
```

### Screen tearing

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


@@ 136,9 154,11 @@ 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

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


@@ 151,19 171,23 @@ key ID. Provide said identity file by creating
    smtpserver = <your smtp server address here>
    smtpuser = <your email here>
```

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

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

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


@@ 171,66 195,76 @@ Snow](https://www.gnome-look.org/p/999927/). Set it as system-wide default by ed
[Icon Theme]
Inherits=Breeze_Snow
```

The others should be enabled by default after installing the dotfiles.

### Thunar
Ensure the following options are ticked under *"Prefernces"*:

- *"Draw frames around thumbnails"*
- *"Date format: ISO8601"*
- *"Open folders in new tabs on middle click"*
- *"Enable volume management"*
Ensure the following options are ticked under _"Prefernces"_:

- _"Draw frames around thumbnails"_
- _"Date format: ISO8601"_
- _"Open folders in new tabs on middle click"_
- _"Enable volume management"_

In the volume management settings ensure the following options are ticked:

- *"Mount removable drives when hot-plugged"*
- *"Mount removable media when inserted"*
- _"Mount removable drives when hot-plugged"_
- _"Mount removable media when inserted"_

Issue the following commands to enable some "hidden settings":

```bash
xfconf-query --channel thunar --property /misc-full-path-in-title --create --type bool --set true
xfconf-query --channel thunar --property /misc-image-size-in-statusbar --create --type bool --set true
```

### Firefox
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"_.
3. Go to `~/.mozilla/firefox/xxxxxxxx.default-release`.
4. Link the cloned chrome folder `ln -s ~/.local/share/firefox-chrome/ chrome` .
5. Restart the browser.
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"_.
3. Accept the risk and search for _"helpers.private_mime_types_file"_ . Set it to _"~/.local/share/firefox-chrome/mime.types"_.
4. Go to `~/.mozilla/firefox/xxxxxxxx.default-release`.
5. Link the cloned chrome folder `ln -s ~/.local/share/firefox-chrome/ chrome` .
6. Restart the browser.

A BTTV configuration json is available [here](https://gist.github.com/piotrmachura16/684e9189c3d34eefb63b0b953bd69840).
Import it in *"Twitch/BTTV Settings"*.
Import it in _"Twitch/BTTV Settings"_.

### Spotify

Log into Spotify and go to _"Settings"_. You may encounter some glitches with drop-down menus. Instead of clicking place
a cursor on them and hit "Enter".  Change *"Streaming quality"* to *"Very high"*, disable *"Normalize volume"*,
*"Autoplay"* and *"Show desktop notifications when song changes"*.
a cursor on them and hit "Enter". Change _"Streaming quality"_ to _"Very high"_, disable _"Normalize volume"_,
_"Autoplay"_ and _"Show desktop notifications when song changes"_.

### Mousepad

Mousepad is a simple GUI text editor, which doesn't get much use. Nevertheless, ensure the following options are ticked
in the appropriate menus under *"Preferences"*:

1. ***"View"***
    - *"Highlight current line"*
    - *"Highlight matching brackets"*
    - *"Font: JetBrains Mono NL Medium 11"*
    - *"Color scheme: Tango"*
2. ***"Editor"***
    - *"Tab width: 4"*
    - *"Tab mode: Insert Spaces"*
    - *"Enable automatic indentation"*
    - *"Backspace: Delete indent spaces as tabs"*
3. ***"Window"***
    - *"Client-side decorations"* - **disabled**
    - *"Open files in: new windows"*
in the appropriate menus under _"Preferences"_:

1. **_"View"_**
   - _"Highlight current line"_
   - _"Highlight matching brackets"_
   - _"Font: JetBrains Mono NL Medium 11"_
   - _"Color scheme: Tango"_
2. **_"Editor"_**
   - _"Tab width: 4"_
   - _"Tab mode: Insert Spaces"_
   - _"Enable automatic indentation"_
   - _"Backspace: Delete indent spaces as tabs"_
3. **_"Window"_**
   - _"Client-side decorations"_ - **disabled**
   - _"Open files in: new windows"_

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

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