Various Arch Linux Commands

Auto-Start i3 at login:

Add the following lines to ~/.bash_profile:

if systemctl -q is-active graphical.target && [[ ! $DISPLAY && $XDG_VTNR -eq 1 ]]; then
  exec startx
fi

Auto-Load VBoxClient modules:

Add the following line to ~/.config/i3/config:

exec VBoxClient-all

~/.config/i3status/config 12 hour clock fix (use %I):

tztime local {
        format = "%m/%d/%Y %I:%M:%S "
}

Update Package Repository:

pacman -Syy

Update Keys:

pacman-key --init
pacman-key --populate archlinux
pacman-key --refresh-keys

Update Mirrors:

reflector --country US --sort rate --save /etc/pacman.d/mirrorlist

If you notice that particular mirrors are failing, then delete/comment them out.

Visual Studio Code:

sudo pacman -S code

Git:

sudo pacman -S git

Git Setup:

Setup User:

git config --global user.name  "John Doe"
git config --global user.email "johndoe@example.com"

Store Credentials:

git config --global credential.helper store

Initialize Storing of Credentials:

cd into cloned repo directory

git pull

provide username/password

For a snipping tool, get ksnip from AUR. Requires a couple other AUR packages...

Spotify:

curl -sS https://download.spotify.com/debian/pubkey.gpg | gpg --import

Then install spotify from AUR. On VirtualBox, I had to switch my Audio Controller to Intel HD Audio for my sound to work.

AUR Build:

git clone https://aur.archlinux.org/SomeRepo.git
cd SomeRepo
makepkg -si

Pacman Cheat Sheet:

Install:

sudo pacman -S packageName

Uninstall:

sudo pacman -Rs packageName