Macbook Arch Guide
cgdisk /dev/sda
# Setup Partitions
# 1 100MiB EFI partition # Hex code ef00
# 2 250MiB Boot partition # Hex code 8300
# 3 4GiB Swap partition # Hex code 8200
# 3 100% size partiton # Hex code 8300
# format paritions
mkfs.vfat -F32 /dev/sda1
mkfs.ext2 /dev/sda2
mkfs.ext4 /dev/sda4
# setup swap
mkswap /dev/sda3
swapon /dev/sda3
# mount paritions
mount /dev/sda4 /mnt
mkdir /mnt/boot
mount /dev/sda2 /mnt/boot
mkdir /mnt/boot/efi
mount /dev/sda1 /mnt/boot/efi
# install arch linux
pacstrap /mnt base base-devel grub-efi-x86_64 zsh zsh-completions vim git efibootmgr dialog wpa_supplicant
# fstab
genfstab -pU /mnt >> /mnt/etc/fstab
# enter the new system
arch-chroot /mnt /bin/bash
# set hostname
echo MYHOSTNAME > /etc/hostname
# set locale
echo LANG=en_US.UTF-8 >> /etc/locale.conf
echo LANGUAGE=en_US >> /etc/locale.conf
echo LC_ALL=C >> /etc/locale.conf
vim /etc/locale.gen
# uncomment en_US.UTF-8
locale-gen
# set root password
passwd
# create user
useradd -m -g users -G wheel,storage,power -s /bin/zsh MYUSERNAME
passwd MYUSERNAME
# Regenerate initrd image
mkinitcpio -p linux
# setup grub
grub-install
grub-mkconfig -o /boot/grub/grub.cfg
# unmount paritions and restart (remove usb)
exit
umount -R /mnt
reboot
XOrg
pacman -S xorg-server xorg-xinit xorg-server-utils mesa
pacman -S xorg-twm xorg-xclock xterm # basic components
XMonad
pacman -S xmonad xmonad-contrib xmobar trayer
Awesome WM
sudo pacman -S awesome vicious
XFCE 4 (Backup + Utilities)
sudo pacman -S xfce4 xfce4-goodies
Start WM with X
echo "exec xmonad" >> ~/.xinitrc # OR
echo "exec awesome" >> ~/.xinitrc # OR
echo "exec startxfce4" >> ~/.xinitrc
Create Awesome Config
mkdir -p ~/.config/awesome/
cp /etc/xdg/awesome/rc.lua ~/.config/awesome/ # basic config
Community Packages
sudo pacman -S yaourt
Enable 64-bit wrapped 32-bit packages + community repo (uncomment / add)
vim /etc/pacman.conf
# [multilib]
# Include = /etc/pacman.d/mirrorlists
# [archlinuxfr]
# SigLevel = Never
# Server = http://repo.archlinux.fr/$arch
Suspend
systemctl suspend
Set Time
tzselect $ US -> Eastern
sudo ln -s /usr/share/zoneinfo/US/Eastern /etc/localtime
hwclock --systohc --utc
Brightness
yaourt -S light-git
light -S 50 # sets brightness to 50%
light -U 10 # decrease by 10%
light -A 10 # increase by 10%
XScreensaver
sudo pacman -S xscreensaver
xscreensaver-demo
Lock Screen (On suspend/hibernate)
yaourt -S xss-lock
xss-lock -- /usr/bin/xscreensaver-command -lock &
Lock
xscreensaver-command --lock
Disable LID Wakeup (Prevents proper suspend when lid open)
sudo vim etc/tmpfiles.d/disable-lid0-wake.conf
# w /proc/acpi/wakeup - - - - LID0
Backlight (startup)
kbdlight max
Fix Tilde Key & Fix F# Keys
sudo vim /etc/modprobe.d/hid_apple.conf
# options hid_apple iso_layout=0
# options hid_apple fnmode=2
Basic Support
pacman -S xf86-input-synaptics
Natural Scrolling
xinput set-button-map 12 1 2 3 5 4 7 6
PulseAudio
sudo pacman -S pulseaudio pulseaudio-bluetooth pulseaudio-alsa paprefs
yaourt -S pasystray
Control
sudo pacman -S alsa-utils
alsamixer
Volume Applet
sudo pacman -S pasystray
Install Bluetooth Packages
sudo pacman -S bluez bluez-utils
Start and Enable Bluetooth Service
systemctl enable bluetooth
systemctl start bluetooth
Install and Run Blueman
sudo pacman -S blueman blueman-applet
Start Blueman Applet (startup)
blueman-applet
Install Experimental Facetime HD Driver
yaourt -S bcwc-pcie-git
Broadcom Drivers
yaourt -S broadcom-wl
Wifi Menu (Terminal)
sudo wifi-menu
Network Manager
sudo pacman -S networkmanager
sudo pacman -S network-manager-applet
sudo pacman -S networkmanager-openvpn
sudo pacman -S gnome-keyring
systemctl enable NetworkManager
systemctl start NetworkManager
Start Network Manager Applet (startup)
nm-applet --sm-disable
SSH
sudo pacman -S openssh
sudo systemctl enable sshd
sudo systemctl start sshd
Enable MBP Fan Usage
yaourt -S mbpfan-git
sudo systemctl enable mbpfan
sudo systemctl start mbpfan
Enable Automated Power Regulation
sudo pacman -S tlp
sudo systemctl enable tlp
Enable thermald (overheat shutoff)
yaourt -S thermald
sudo systemctl enable thermald
sudo systemctl start thermald
Install Powertop
sudo pacman -S powertop
sudo vim /etc/systemd/system/powertop.service
#[Unit]
#Description=Powertop tunings
#[Service]
#Type=oneshot
#ExecStart=/usr/bin/powertop --auto-tune
#[Install]
#WantedBy=multi-user.target
systemctl enable powertop
Install CUPS + HP Drivers
sudo pacman -S cups ghostscript gsfonts hplip
yaourt -S libcups
Enable CUPS Services
systemctl enable org.cups.cupsd.service
systemctl start org.cups.cupsd.service
systemctl enable org.cups.cupsd-browsed.service
systemctl start org.cups.cupsd-browsed.service
Access Web Interface
firefox http://localhost:631/
Increase FS Watchers and Instances (Dropbox)
sudo echo 'fs.inotify.max_user_watches = 1048576' >> /usr/lib/sysctl.d/50-default.conf
sudo echo 'fs.inotify.max_user_instances = 256' >> /usr/lib/sysctl.d/50-default.conf
Ranger Configuration
ranger --copy-config=all
Ascii Art Preview
sudo pacman -S libcaca
Foxit Reader (default pdf viewer)
vim ~/.config/ranger/rifle.conf
# ext pdf = foxitreader "$@"
Awesome Themes
git clone https://github.com/mikar/awesome-themes.git
git clone https://github.com/copycat-killer/awesome-copycats.git
XFCE4 Windows Settings (background)
xfsettingsd
Compositor
yaourt -S compton
Start Compositor (background startup)
compton -b
XFCE
xfce4-appearance-settings
# Fonts -> Custom DPI Setting -> 130
Spotify
sudo vim /usr/bin/spotify
# add: --force-device-scale-factor=1.5
Xresources
vim .Xresources
# Xft.dpi: 120
QT
export QT_DEVICE_PIXEL_RATIO=1.2
Firefox / Thunderbird
# about:config
layout.css.devPixelsPerPx = 1.5
Set Desktop Wallpaper
feh --bg-scale /path/to/wallpaper.jpg
Initialize Cursor
xsetroot -cursor_name left_ptr
Start Trayer (System Tray)
trayer --edge top --align right --SetDockType true --SetPartialStrut true --expand true --width 10 --height 27 --transparent true --alpha 0 --tint 0x242424
Install from Arch Repository
sudo pacman -S <package-name>
Install from Arch User Repository (AUR)
yaourt -S <package-name>
Update from Arch Repository
sudo pacman -Syu
Update from Arch User Repository
sudo yaourt -Syu --aur
rxvt-unicode urxvt-perlsfirefox-developer (aur)sublim-text-dev (aur)google-chrome (aur)dropbox (aur)thunar-dropbox (aur)telegram-desktop-bin (aur)slack-desktop (aur)steam (aur)termitespotify (aur)datagrip (aur)parcellitevlcfehxarchivermelddeepin-screenshotrofizoom (aur)zeal (aur)hexchatgearycorebirdtransmission-gtkinkscapegimplibreoffice-freshobs-studio (aur)virtualbox (aur)
sudo modprobe vboxdrvarchey-plus (aur)speedtest-cli (aur)htopmlocate
sudo updatedb # create search databaselocate file # searches filesystem for 'file'treevnstatz-git (aur)mutt5gcalcli (aur)rangerwavemoncli-visualizer (aur)imagemagick
convert file1.png file2.png file3.png +append combined.png # concatenate three imagesjq
cat file.json | jq '.' # format json filemtrncmpcppnmap
nmap 10.0.1.0/24 # Scan 256 address beginning with 10.0.1.0w3mttf-meslo (aur)icedtea-webflashplugingtk-theme-flatstudio (aur)trayer-srg (aur)mopidy mopidy-spotify (aur)Window Mgmt (Xmonad - Custom)
<cmd> + <l/r arrow><cmd> + <shift> + <l/r arrow><cmd> + <u/d arrow><cmd> + <shift> + <u/d arrow><cmd> + j/k<cmd> + <shift> + j/k<cmd> + n<cmd> + w/e/r<cmd> + <space><cmd> + h/l<cmd> + ,/.<cmd> + <enter><cmd> + pWindow Mgmt (awesome)
<cmd> + <arrow><cmd> + j<cmd> + k
<cmd> + <ctrl> + <space><cmd> + m<cmd> + n<cmd> + f<cmd> + <ctrl> + n<cmd> + <space><cmd> + <shift> + <num>Editing
<fn> + <left arrow><fn> + <right arrow><fn> + <up arrow><fn> + <down arrow><fn> + <ctrl> + <left arrow><fn> + <ctrl> + <right arrow><fn> + <ctrl> + <down arrow><fn> + <ctrl> + <up arrow>