Skip to content
Mainly for my use, but it just has my vimrc and some basic bash functions
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
.config
.scripts
.templates
bin
.bash_profile
.bashrc
.bashrc052019
.gitconfig
.gitignore
.tmux.conf
.vimrc
.vimrc04302019
.vimrc2018
.xinitrc
.zprofile
.zshrc
README.md
install_dotfiles.sh
tmux-cheatsheet.md

README.md

dotfiles

Cameron's Dotfiles

Mainly for my use, but it just has my vimrc and some basic bash functions

Vim Keybindings

Tools are configured for vim style keybinding.

Setup

  • Clone dotfiles: 'git clone https://github.com/durhc427/dotfiles.git ~/dotfiles'
  • Install dotfiles: 'cd ~/dotfiles && ./install_dotfiles.sh
  • Install nvim (instructions coming)
  • Install packages:
  • pip install --user neovim
  • sudo pacman -S exuberant-ctags
  • sudo pacman -S tmux
  • sudo pacman -S zsh
  • sudo pacman -S zathura
  • sudo pacman -S zathura-pdf-poppler
  • sudo pacman -S texlive
  • sudo packan -S termite
  • sudo packan -S gvim
  • sudo packan -S rtorrent
  • Install AUR Packages [with yay]:
  • siji-git
  • [other font package for termite I cannot remember!]
  • Install Vim plugins: ':PlugClean' and ':PlugUpgrade' and ':PlugUpdate'

Arch Linux Install and Dotfiles Setup [UEFI]

Download

  • Download and write arch iso to USB with dd: sudo dd if=</path/to/archlinux-20xx.xx.xx-x86_64.iso> of=</dev/sdx> example:

sudo dd if=<~/Downloads/archlinux-2018.12.01-x86_64.iso> of=</dev/sdb>

Boot

  • Boot from USB (check your boot priority choices in boot sequence!)

  • Connect to the internet wifimenu or dhclient -v

  • Check internet connection ping archlinux.org

  • Update the system clock and enable network time: timedatectl set-ntp true

Check service status using timedatectl status

Partition

  • Partition the disks using fdisk or parted: fdisk /dev/sdx Check devices using lsblk or fdisk -l (ignore results ending in rom , loop , or airoot

  • Required for devices with UEFI enabled:

  • Partition for root directory: /
  • EFI system partition
  • example for UEFI with GPT:
    • Mount Point , Partition , Partition type , Suggested size
    • /boot , /dev/sdx1 , EFI System , 260-512 M
    • [SWAP], /dev/sdx2 , Linux swap , More than 512M, generally 2 x
    • / , /dev/sdx3 , Linux , 20-30G
    • /home, /dev/sdx4 , Linux , Remainder of device

Format

  • Format the partitions, for example:
    • formatting the EFI system
      mkfs.fat -F32 /dev/sda1
      
    • formatting the swap partition
      mkswap /dev/sda2
      swapon /dev/sda2
      
    • formatting the Linux filesystems for root and home (if you have one)
      mkfs.ext4 /dev/sda3
      mkfs.ext4 /dev/sda4
      

Mount the Filesystems

  • Mount root partition mount /dev/sda3 /mnt
  • Mount home partition mkdir /mnt/home mount dev/sda4 /mnt/home
  • Mount boot partition mkdir /mnt/boot mount /dev/sda1 /mnt/boot

Install Base system

pacstrap /mnt base base-devel vim git networkmanager

Configure the system

  • Generate an fstab file:
genfstab -U /mnt >> /mnt/etc/fstab
  • Change root into the new system
arch-chroot /mnt
  • Set time zone:
ln -sf /usr/share/zoneinfo/<Region>/<City> /etc/localtime
  • Run hwclock(8) to generate /etc/adjtime:
hwclock --systohc
  • Uncomment en_US.UTF-8 UTF-8 and other needed locales in /etc/locale.gen, and generate them with:
locale-gen
  • Set the LANG variable in locale.conf(5) accordingly, for example:
/etc/locale.conf
----------------
LANG=en_US.UTF-8

  • Create the hostname file:
/etc/hostname
-------------
<myhostname>
  • Add matching entries to hosts(5)
/etc/hosts
----------------------------------------------
127.0.0.1	localhost
::1		localhost
127.0.1.1	<myhostname>.localdomain	<myhostname>
  • Set root password
passwd

Post Install

  • Login as root

  • Add non-root user

useradd -m -g users -G wheel -s /bin/bash <normie_user>
  • Create password for user
passwd <normie_user>
  • Set editor:
EDITOR=vim visudo
  • Look for and uncomment %wheel ALL=(ALL) ALL

  • Log in as user

Install necessary packages

  • Install (not sure if this is all in base-devel)
pacman -S pulseaudio pulseaudio-alsa xorg-xinit xorg-server bspwm sxhkd libxcb xcb-util xcb-util-keysyms xcb-util-wm termite dmenu noto-fonts python pip-python zsh gvim openssh
  • Font confusion? Set fonts manually in
~/.config/fontsconfig/fonts.conf

Setup window manager

  • source: https://github.com/windelicato/dotfiles/wiki/bspwm-for-dummies

  • Important: Make sure your environment variable $XDG_CONFIG_HOME is set or your bspwmrc will not be found. This can be done by adding XDG_CONFIG_HOME="$HOME/.config" and export XDG_CONFIG_HOME to your ~/.profile.

  • Copy /usr/share/doc/bspwm/examples/bspwmrc to ~/.config/bspwm/bspwmrc and run

chmod +x ~/.config/bspwm/bspwmrc
  • Copy /usr/share/doc/bspwm/examples/sxhkdrc to ~/.config/sxhkd/sxhkdrc . example:
mkdir ~/.config && mkdir ~/.config/bspwm && mkdir ~/.config/sxhkd
cd /usr/share/doc/bspwm/examples/
cp bspwmrc ~/.config/bspwm/ && sxkhdrc ~/.config/sxkhd/

Look at this file and learn the key bindings. Change any bindings you don't like. For instance, I prefer using alt over super (windows key). Change the line at 84 to match your preferred terminal editor (change to termite )

  • Open up ~/.xinitrc and add the following to the bottom:
sxhkd &
exec bspwm
  • Test new configuration Run startx and press Super + Enter. A grey terminal should appear.

Install dotfiles

  • Clone this repo
git clone https://github.com/durhc427/dotfiles.git
  • Install dotfiles: 'cd ~/dotfiles && ./install_dotfiles.sh

  • Install Vim plugins: ':PlugClean' and ':PlugUpgrade' and ':PlugUpdate'

Install yay (AUR Package Manager)

mkdir build && cd build
git clone https://aur.archlinux.org/yay.git
cd yay
makepkg -si
  • Install a package in yay
yay -S <package-name>

For example:

yay -S polybar

Setup SSH with github

NOTE: my dotfiles already include a git default setup with my email address, you should change this to yours

Set defaults

  • Run the command to generate an SSH key, replacing Tommy Trojan's email with your own:
ssh-keygen -t rsa -b 2048 -C "ttrojan@usc.edu"
  • When prompted for a file location, use the default location (press Enter).

  • Upon success, you should receive a confirmation such as:

Your identification has been saved in /home/cs104/.ssh/id_rsa.
Your public key has been saved in /home/cs104/.ssh/id_rsa.pub.
The key fingerprint is:
SHA256:vC+4OG2u1PIeE0OKX9jiFFHuLnkYCBSsvIW8ybD873H ttrojan@usc.edu
The key's randomart image is:
+---[RSA 2048]----+
|   ++o.          |
|    S+.o *.*     |
|   +.X. o        |
|    0. o +       |
|   ..o  E .      |
|  .=S. . + .0    |
| .*=* ...        |
|.+.=o*. ..  *o*  |
| .++*oo. ..      |
+----[SHA256]-----+
  • Set git defaults:
git config --global user.name "Tommy Trojan"
git config --global user.email "ttrojan@usc.edu"
git config --global color.ui auto
git config --global core.editor vim
git config --global core.autocrlf input
git config --global push.default simple


  • Check your work:
git config --list

You should see something like this:

user.name=Tommy Trojan
user.email=ttrojan@usc.edu
color.ui=auto
core.editor=subl -n -w
core.autocrlf=input
push.default=simple

Add key to github page

  • Go to: https://github.com/settings/ssh

  • Click on Add SSH Key

  • Provide a name for the key, such as "CS104 VM Key", "MacBook Key" or "aludra Key"

  • Display the contents of your id_rsa.pub file by typing the following command at the terminal prompt.

cat ~/.ssh/id_rsa.pub
  • Copy the contents of your id_rsa.pub file and paste them into the key field. Make sure you copy the entire contents of the id_rsa.pub file. It should start with ssh-rsa and end with your email address.

  • Click Add Key

Thinkpad x240 Setup

Issues with trackpad upgraded to 3-button trackpad. http://diy.mironto.sk/thinkpad-x240-replacing-touchpad-and-keyboard/

  • Remove default synaptics driver:
  • sudo pacman -R xf86-input-synaptics
  • Remove any synaptics.conf files in /etc/X11/xorg.conf.d/
  • Add the following touchpad configuration file in /etc/X11/xorg.conf.d/:
Section "InputClass"
   Identifier "touchpad"
   Driver "libinput"
   MatchIsTouchpad "on"
   Option "Tapping" "on"
   Option "TappingButtonMap" "lmr"
EndSection
You can’t perform that action at this time.