diff --git a/distros/arch/autologin.md b/distros/arch/autologin.md index 9273201..995cf10 100644 --- a/distros/arch/autologin.md +++ b/distros/arch/autologin.md @@ -14,7 +14,6 @@ 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/install_yay.md b/distros/arch/install_yay.md index 9db99e4..cb4e5cd 100644 --- a/distros/arch/install_yay.md +++ b/distros/arch/install_yay.md @@ -9,3 +9,19 @@ pacman --sync --noconfirm --needed base-devel gcc git git clone https://aur.archlinux.org/yay.git /tmp/yay makepkg -C !$ -si ``` + +The 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 the 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 the `sudo` password. +If you leave, the installation will fail. +To avoid this, you can use the flag `--sudoloop` and enter the sudo password initially and it will loop it until the installation is finished. + +```sh +yay -S --noconfirm --sudoloop +``` + diff --git a/distros/arch/pacman.md b/distros/arch/pacman.md index 37f0952..6d9e9be 100644 --- a/distros/arch/pacman.md +++ b/distros/arch/pacman.md @@ -20,7 +20,9 @@ sudo pacman-key --populate archlinux And refreshed with: +```sh sudo pacman-key --refresh-keys + ``` If you have usigned keys, you can refresh with: @@ -52,6 +54,12 @@ List all orphaned packages: sudo pacman -Qtdq ``` +Removing a package: + +```sh +sudo pacman -Rn +``` + ## Cleaning Config Files Arch does not overwrite your changes to configuration files. @@ -62,3 +70,4 @@ 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. + diff --git a/distros/arch/pacman_extras.md b/distros/arch/pacman_extras.md new file mode 100644 index 0000000..53c730a --- /dev/null +++ b/distros/arch/pacman_extras.md @@ -0,0 +1,18 @@ +--- +title: "pacman - Extras" +tags: [ "distros" ] +requirements: [ "pacman" ] +--- + +## Unattended Actions + +```sh +pacman -Syu --noconfirm +``` + +## `pacman` and `yay` Text Colouring + +Getting the colors is done by editing the `/etc/pacman.conf` and uncommenting the line `Color`. + +By adding the line `ILoveCandy` you will unlock some terminal animations, like pacman eating dots while installing some package. + 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`.