-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy paththeme.sh
executable file
·124 lines (95 loc) · 2.72 KB
/
theme.sh
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
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
#!/bin/bash
set -ex
DOTFILES_FOLDER="$(dirname "$(realpath "$0")")"
LN="ln -sf"
function link_folder {
rm -rf "$HOME/.$1"
$LN "$DOTFILES_FOLDER/$1" "$HOME/.$1"
}
# Setup the icons folder
link_folder icons
# Setup the fonts folder
link_folder fonts
# VLC Settings
link_folder config/vlc
# Gtk3 settings (dark mode)
link_folder "config/gtk-3.0"
# Home folders
mkdir -p "$HOME/Downloads" "$HOME/repos" "$HOME/Videos"
$LN "$DOTFILES_FOLDER/config/user-dirs.dirs" "$HOME/.config/user-dirs.dirs"
rm -d -f "$HOME/Desktop" "$HOME/Music" "$HOME/Public" "$HOME/Templates" "$HOME/Pictures" "$HOME/Documents"
"$DOTFILES_FOLDER/scripts/dropbox.sh"
# PPA
sudo add-apt-repository --yes ppa:git-core/ppa
sudo add-apt-repository --yes ppa:phoerious/keepassxc
sudo apt-get update
# Install a few packages
PACKAGES=(
zsh
terminator
redshift
vlc
mpv
firefox
vim
vim-gtk
youtube-dl
ffmpeg
handbrake-cli
keepassxc
xdotool
gparted
screenfetch
chrome-gnome-shell
gnome-tweak-tool
dconf-editor
python3-pip
wireguard-tools
materia-gtk-theme
xclip xsel
)
sudo apt-get install -y "${PACKAGES[@]}"
# Autostart redshift
mkdir -p "$HOME/.config/autostart/"
$LN "$DOTFILES_FOLDER/redshift.desktop" "$HOME/.config/autostart/"
# Set zsh default shell
sudo chsh "$USER" -s "$(which zsh)"
# Avoid breaking the oh-my-zsh install script
rm -rf "$HOME/.zshrc"
export SHELL
SHELL="$(which zsh)"
echo "Installing oh-my-zsh"
wget -qO- "https://raw.githubusercontent.com/robbyrussell/oh-my-zsh/master/tools/install.sh" | sh
# Get our zshrc back
$LN "$DOTFILES_FOLDER/zshrc" "$HOME/.zshrc"
gnome_extentions_dir="$HOME/.local/share/gnome-shell/extensions/"
function install_extention {
mkdir -p "$gnome_extentions_dir"
local zipfile="$(mktemp).zip"
wget "https://extensions.gnome.org/extension-data/$1.shell-extension.zip" -O "$zipfile"
local tmpdir="$(mktemp -d)"
unzip "$zipfile" -d "$tmpdir"
local folder_name="$(jq .uuid "$tmpdir/metadata.json" --raw-output)"
# TODO: if not installed already
mv "$tmpdir" "$gnome_extentions_dir/$folder_name"
}
GNOME_EXTENTIONS=(
# WIP: needs more testing
# "VitalsCoreCoding.com.v31"
# "unitehardpixel.eu.v40"
# "user-themegnome-shell-extensions.gcampax.github.com.v40"
)
for ext in "${GNOME_EXTENTIONS[@]}";
do
install_extention "$ext"
done
# Load my dconf dump
dconf load / < "$DOTFILES_FOLDER/dconf.ini"
# Set a Wallpaper
WALLPAPER_URL="https://source.unsplash.com/collection/3355701/1920x1080"
# https://source.unsplash.com/collection/3355701/1920x1080/daily
if [ ! -f "$HOME/w.jpg" ]; then
wget "$WALLPAPER_URL" -O "$HOME/w.jpg"
fi
gsettings set org.gnome.desktop.background picture-uri "file://$HOME/w.jpg"
gsettings set org.gnome.settings-daemon.plugins.background active true