Index

dotfiles / d60f804

My personal dotfiles for Debian/Ubuntu.

Latest Commit

{#}TimeHashSubjectAuthor#(+)(-)GPG?
2522 Sep 2021 21:12d60f804Update font installsJosh Stockin1106G

Blob @ dotfiles / install.sh

text/x-shellscript3216 bytesdownload raw
1#!/bin/bash
2
3HELPTEXT="./install.sh <desktop|laptop|headless>"
4case $1 in
5 h|help|\?|-h|-help|-\?|--h|--help|--\?)
6 echo -e $HELPTEXT
7 exit 0
8 ;;
9 desktop)
10 UNIT=DESKTOP
11 ;;
12 laptop)
13 UNIT=LAPTOP
14 ;;
15 headless)
16 UNIT=HEADLESS
17 ;;
18 *)
19 echo -e $HELPTEXT
20 exit 0
21 ;;
22esac
23
24category(){
25 echo -e " \e[1;37m$1\e[0m"
26}
27
28item(){
29 echo -e " \e[0m$1\e[0m"
30}
31
32echo -e " \e[1;33mInstall type \e[1;35m$UNIT\e[0m"
33
34# Bash config
35category "Bash config"
36item "~/.bash_aliases"
37install .bash_aliases $HOME/.bash_aliases
38item "~/.bashrc"
39install .bashrc $HOME/.bashrc
40item "~/.profile"
41install .profile $HOME/.profile
42
43category "Common folders"
44item "~/src/"
45SRCFOLDER=$HOME/src
46mkdir -p $SRCFOLDER
47
48# Local scripts
49category "Local scripts"
50LOCALBIN=$HOME/.local/bin
51if [ $UNIT == "DESKTOP" ]; then
52 item "~/.local/bin/middle-mouse-scroll"
53 install middle-mouse-scroll $LOCALBIN/middle-mouse-scroll
54fi
55item "~/.local/bin/minesweeper"
56if [ ! -f $LOCALBIN/minesweeper ]; then
57 git clone --depth=1 git://joshstock.in/ncurses-minesweeper.git $SRCFOLDER/ncurses-minesweeper
58 cd $SRCFOLDER/ncurses-minesweeper
59 make compile build
60 install bin/minesweeper $LOCALBIN/minesweeper
61 rm -rf $SRCFOLDER/ncurses-minesweeper
62fi
63
64if [ $UNIT == "DESKTOP" ] || [ $UNIT == "LAPTOP" ]; then
65 # GTK config
66 category "GTK config"
67
68 GTKDIR=$HOME/.config/gtk-3.0
69 item "~/.config/gtk-3.0/"
70 mkdir -p $GTKDIR
71
72 item "~/.config/gtk-3.0/gtk.css"
73 install gtk.css $GTKDIR/gtk.css
74
75 item "Terminal theme 'Oceanic Next'"
76 ./terminal_theme.sh $1 &>/dev/null
77
78 # Fonts
79 category "Fonts"
80
81 item "~/.fonts/"
82 FONTDIR=$HOME/.fonts
83 mkdir -p $FONTDIR
84
85 item "Fira Sans pack"
86 if [ ! -f $FONTDIR/FiraSans-Regular.ttf ]; then
87 curl -fLso /tmp/Fira.zip https://fonts.google.com/download?family=Fira%20Sans
88 unzip -q /tmp/Fira.zip -d $FONTDIR
89 fi
90
91 item "Fira Mono (Powerline-patched) pack"
92 if [ ! -f $FONTDIR/FuraMono-Regular\ Powerline.otf ]; then
93 curl -fLso $FONTDIR/FuraMono-Regular\ Powerline.otf https://github.com/powerline/fonts/raw/master/FiraMono/FuraMono-Regular%20Powerline.otf
94 fi
95 if [ ! -f $FONTDIR/FuraMono-Medium.otf ]; then
96 curl -fLso $FONTDIR/FuraMono-Medium\ Powerline.otf https://github.com/powerline/fonts/raw/master/FiraMono/FuraMono-Medium%20Powerline.otf
97 fi
98 if [ ! -f $FONTDIR/FuraMono-Bold.otf ]; then
99 curl -fLso $FONTDIR/FuraMono-Bold\ Powerline.otf https://github.com/powerline/fonts/raw/master/FiraMono/FuraMono-Bold%20Powerline.otf
100 fi
101
102 item "Refreshing font cache"
103 fc-cache
104fi
105
106# Global git config
107category "Global git config"
108
109item "~/.gitconfig"
110install .gitconfig $HOME/.gitconfig
111
112# Vim
113category "Vim config"
114
115item "~/.vim/"
116VIMDIR=$HOME/.vim
117mkdir -p $VIMDIR
118
119item "~/.vim/vimrc"
120if [ $UNIT == "HEADLESS" ]; then
121 grep -v "RMHEADLESS" vimrc > $VIMDIR/vimrc
122else
123 install vimrc $VIMDIR/vimrc
124fi
125
126item "~/.vim/autoload/plug.vim"
127curl -fLso $VIMDIR/autoload/plug.vim --create-dirs https://raw.githubusercontent.com/junegunn/vim-plug/master/plug.vim
128
129# Done
130echo -e " \e[1;33mDONE\e[0m"
131