From 0a41f6b65af23e0d0b710f1856c8c35763c640dd Mon Sep 17 00:00:00 2001 From: coja Date: Sun, 31 Aug 2025 22:42:20 +0200 Subject: [PATCH 1/2] [Archlinux] pacman, yay, faillock --- distros/arch/autologin.md | 18 ++++++++++--- distros/arch/pacman.md | 53 +++++++++++++++++++++++++++++++++------ 2 files changed, 61 insertions(+), 10 deletions(-) diff --git a/distros/arch/autologin.md b/distros/arch/autologin.md index ce74af5..995cf10 100644 --- a/distros/arch/autologin.md +++ b/distros/arch/autologin.md @@ -7,14 +7,13 @@ tags: [ "distros", "arch" ] Edit `/etc/systemd/system/getty@tty1.service.d/override.conf` by typing: -```bash +```sh sudo systemctl edit getty@tty1 ``` The put in the following, changing `[ USER ]` to your username. ``` - [Service] ExecStart= ExecStart=-/usr/bin/agetty --autologin [ USER ] -s %I 115200,38400,9600 vt102 @@ -25,9 +24,22 @@ ExecStart=-/usr/bin/agetty --autologin [ USER ] -s %I 115200,38400,9600 vt102 In `.bashrc`. -``` +```sh if [ -z "$DISPLAY" ] && [ "$(fgconsole)" -eq 1 ]; then exec startx fi ``` + +# Faillock reset + +After failing 3 times to enter the password, archlinux would ussualy lock entering the password for 10 minutes, not all apps and guis display this message, so sometimes it can be a bit confusing. To reset this lockdown, you can login as root and restart it manually with command + +``` sh +failock --reset + +``` + + + + diff --git a/distros/arch/pacman.md b/distros/arch/pacman.md index a286142..6b75e58 100644 --- a/distros/arch/pacman.md +++ b/distros/arch/pacman.md @@ -7,50 +7,56 @@ Packages are kept in /var/cache/pacman/pkg. Delete unused old packages with: -```bash +```sh sudo pacman -Sc ``` Signatures are handled by the pacman-key, initially set up with: -```bash +```sh sudo pacman-key --populate archlinux ``` And refreshed with: +```sh sudo pacman-key --refresh-keys + ``` If you have usigned keys, you can refresh with: -```bash +```sh sudo pacman -Sc ``` or -```bash +```sh sudo pacman -Scc ``` Reset all keys with: -```bash +```sh sudo rm -r /etc/pacmand.d/gnupg/ && sudo pacman-key --init ``` If you're constantly getting 'everything corrupted, nothing upgraded', try running: -```bash +```sh sudo pacman -S archlinux-keyring ``` List all orphaned packages: -```bash +```sh sudo pacman -Qtdq ``` +```sh +sudo pacman -Rn #removing the package +``` + ## Cleaning Config Files Arch does not overwrite your changes to configuration files. @@ -61,3 +67,36 @@ These changes must be merge manually. Install the `pacdiff` tool to make this easier, from the `pacman-contrib` package, then simply run `sudo pacdiff` to sort through the various mergers. + +# AUR helpers (yay, paru,..) + +Installing helper can be done by cloning and building that package from AUR repository, to avoid doing that manually and to automate updating, we use helpers. + +Building Yay: +```sh +sudo pacman -S --needed git base-devel +git clone https://aur.archlinux.org/yay.git +cd yay +makepkg -si +``` + +Flags are mostly the same as in pacman +But running yay without flags will do the update like `yay -Syu` and with package name it will search packages in aur and pacman repos, and let you choose which to install + +```sh +yay +``` + + +Building the package can usually take some time, and after the build it will ask for sudo password, if afk installation will fail, to avoid this you can use the flag `--sudoloop` and enter the sudo password initially and it will loop it untill finishing the installation, to avoid answering all of the installation question `--noconfirm` can be used +```sh +yay -S --noconfirm --sudoloop +``` + + + +## Pacman and yay text coloring + +Getting the colors is done by editing the `/etc/pacman.conf` and uncommenting the line `Color` +By adding the line `ILoveCandy` you will unlock soem terminal animations, like one pacman eating the dots while installing some package + From 2cff9f47ea75670cb7189219bea3e0ec7ed3abb0 Mon Sep 17 00:00:00 2001 From: coja Date: Sun, 31 Aug 2025 22:45:22 +0200 Subject: [PATCH 2/2] [Vim] nano alternative --- writing/vim.md | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/writing/vim.md b/writing/vim.md index 110ec2d..cabfd63 100644 --- a/writing/vim.md +++ b/writing/vim.md @@ -3,6 +3,13 @@ title: "vim basics" tags: [ "vim", "basic" ] --- +## Instant nano replacement + +`vim -y` - will start vim but like other editors like nano, there will be syntax highlighting, etc +Keybind to exit this mode is `Ctrl+q` + +## Steps + 1. Insert text by pressing `a`. 1. Stop inserting text by pressing `Ctrl+[`. 1. Exit with `ZZ`.