-
Notifications
You must be signed in to change notification settings - Fork 0
/
term
executable file
·82 lines (75 loc) · 3.18 KB
/
term
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
#!/usr/bin/env bash
# Various terminal themes and ux improvements
# as well as tools for use in a terminal - installed with apt.
holy-dot src/ install os util
# Changes theme on both Linux and MacOS iTerm:
# bash -c "$(wget -qO- https://git.io/vQgMr)"
# though prefer xfce on Linux (skip for that)
sudoUse
if check-x gsettings; then
# For Gnome, this will make the terminal window frame flash for a visual bell.
# Though not only, as all other apps will flash under certain conditions too.
gsettings set org.gnome.desktop.wm.preferences audible-bell false
gsettings set org.gnome.desktop.wm.preferences visual-bell true
gsettings set org.gnome.desktop.wm.preferences visual-bell-type frame-flash
fi
if onLinux; then
# URxvt & XTerm
if [ ! -f ~/.Xresources ]; then
cp "$HOLY_HOME"/home/.Xresources ~
else
echo ".Xresouces already exists, thus skipping use of:"
echo "$HOLY_HOME"/home/.Xresources
fi
cd ~; ln -s .Xresources .Xdefaults-$(hostname) # this could be just for Ubuntu
# Xfce4 Terminal Themes
onApt && sudo apt -y install xfce4-terminal
mkdir -p ~/.local/share/xfce4/terminal/colorschemes
cp "$HOLY_HOME"/files/themes/xfce4/* ~/.local/share/xfce4/terminal/colorschemes
if [ ! -f ~/.config/xfce4/terminal/terminalrc ]; then
mkdir -p ~/.config/xfce4/terminal
cp "$HOLY_HOME"/files/xfce4/terminalrc ~/.config/xfce4/terminal/terminalrc
fi
# Fonts
$destination="/usr/share/fonts/truetype/iosevka-custom"
# Building my own Custom Iosevka here:
gh-install orlin/Iosevka dist/iosevka-custom/ttf.zip ~/tmp
cd ~/tmp && rm -rf ttf && unzip ttf.zip
sudo rm -rf $destination
sudo mkdir -p $destination
sudo mv ~/tmp/ttf/*.ttf $destination
fc-cache -f
rm -rf ~/tmp/ttf*
fi
if onApt; then
# fonts:
sudo apt -y install fonts-firacode fonts-inconsolata fonts-hack-ttf
# themes:
sudo apt -y install dconf-cli uuid-runtime
# tools:
sudo apt install -y tmux
sudo apt install -y ncdu # http://dev.yorhel.nl/ncdu NCurses Disk Usage
sudo apt install -y neofetch # https://github.com/dylanaraps/neofetch
# TODO: add more ways to install bashtop, for Mac and other Linux distros
if onUbuntu; then
if $(bb -i "(< $(lsb_release -rs) 20.10)"); then
sudo-add-apt-repository ppa:bashtop-monitor/bashtop
sudo-apt-update
fi
sudo apt install -y bashtop
fi
# NOTE: bashtop and glances give a great overview of system activity
sudo apt install -y htop glances # monitor system processes and much more
# https://askubuntu.com/questions/257263/how-to-display-network-traffic-in-the-terminal
sudo apt install -y bmon slurm tcptrack iftop nethogs # network interface(s)
sudo apt install -y speedometer # graph network traffic with custom chart max
# speedometer -l -t eth0 -r eth0 -m $(( 1024 * 1024 * 9 ))
sudo apt install -y speedtest-cli # speedtest
# memory:
sudo apt install -y smem # https://www.selenic.com/smem/
elif onMac; then
brewOn && brew tap homebrew/cask-fonts && brew cask install font-iosevka && brew cask install font-iosevka-slab
specho iTerm2 Shell Integrations ...
# the following will add a line to .profile or .bash_profile / something
curl -L https://iterm2.com/misc/install_shell_integration.sh | bash
fi