-
Notifications
You must be signed in to change notification settings - Fork 0
/
install_quicktile.sh
executable file
·45 lines (37 loc) · 1.33 KB
/
install_quicktile.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
#!/bin/bash
source $( dirname $0 )/utils.sh
requireRoot
# get dependencies
apt-get install -y python-pip python-setuptools
pip2 install https://github.com/ssokolow/quicktile/archive/master.zip
# Generate the default config file, but delete it afterwards
quicktile
quicktileDefaultConfigFile=${HOME}/.config/quicktile.cfg
if [ ! -f ${quicktileDefaultConfigFile} ]; then
logInfo "Could not locate ${quicktileDefaultConfigFile}, this is unusual and might indicate an error."
else
rm ${quicktileDefaultConfigFile}
fi
# Set the config file from dotfiles
ensureDotfilesExist
quicktileConfigFile=${HOME}/.dotfiles/quicktile/quicktile.cfg
# get the configuration file
if [ -f ${quicktileConfigFile} ]; then
ln -s ${quicktileConfigFile} ${HOME}/.config/
else
exitWithError "Could not locate quicktile config file at ${quicktileConfigFile}."
fi
autostartDirectory=${HOME}/.config/autostart
autostartFile=${autostartDirectory}/quicktile.desktop
mkdir -p ${autostartDirectory}
chown ${USER}:${USER} ${autostartDirectory}
if [ ! -f ${autostartFile} ]; then
echo "[Desktop Entry]" >> ${autostartFile}
echo "Type=Application" >> ${autostartFile}
echo "Name=Quicktile" >> ${autostartFile}
echo "Exec=quicktile --daemonize" >> ${autostartFile}
chown ${USER}:${USER} ${autostartFile}
fi
# Launch it
quicktile --daemonize
logSuccess "Quicktile set up successfully."