Skip to content

Instantly share code, notes, and snippets.

@oNguyenNgocTrung
Last active July 29, 2018 16:42
Show Gist options
  • Save oNguyenNgocTrung/106c0da878cb1abbe9e66c0d592d2894 to your computer and use it in GitHub Desktop.
Save oNguyenNgocTrung/106c0da878cb1abbe9e66c0d592d2894 to your computer and use it in GitHub Desktop.
Ubuntu Config

Install Source Code Pro

[ -d /usr/share/fonts/opentype ] || sudo mkdir /usr/share/fonts/opentype
sudo git clone --depth 1 --branch release https://github.com/adobe-fonts/source-code-pro.git /usr/share/fonts/opentype/scp
sudo fc-cache -f -v

Install Emacs

sudo add-apt-repository ppa:kelleyk/emacs
sudo apt-get update
sudo apt-get install emacs25
  • Setup emacsclient
#!/usr/local/bin/emacs_connect.sh
emacsclient -n -e "(if (> (length (frame-list)) 1) 't)" 2> /dev/null | grep t &> /dev/null

if [ "$?" -eq "1" ]; then
    emacsclient -a '' -nqc "$@" &> /dev/null
else
    emacsclient -nq "$@" &> /dev/null
fi
# alias emacs
alias em='/usr/local/bin/emacs_connect.sh'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment