forked from andrea-rosa/conky-config
-
Notifications
You must be signed in to change notification settings - Fork 11
/
Copy pathinstall
executable file
·39 lines (29 loc) · 1 KB
/
install
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
#!/bin/bash
# install conky on debian based os with requirements
sudo apt install conky-all git fonts-font-awesome grep libx11-dev gawk lm-sensors smartmontools -y
CONKY_PATH=~/.config/conky
AUTOSTART="/etc/xdg/autostart"
# make config folder for user
mkdir -p $CONKY_PATH
# move necessary files
cp conky.conf $CONKY_PATH
cp launchConky.sh $CONKY_PATH
cp onResolutionChange.sh $CONKY_PATH
cp *.lua $CONKY_PATH
echo "Configurations moved to $CONKY_PATH"
awk -v home="$HOME" '{ if ($0 ~ /Exec=.*/) {printf("Exec=%s/.config/conky/launchConky.sh\n", home)} else { print $0}}' conky.desktop >> conkyMod.desktop
sudo cp conkyMod.desktop "$AUTOSTART/conky.desktop"
rm conkyMod.desktop
echo "Added autostart entry at $AUTOSTART"
# make executable
sudo chmod +x "$CONKY_PATH/*.sh"
# git update submodules
git submodule update --init --recursive
# compile xeventbind and move to coky
cd xeventbind
make && cp xeventbind $CONKY_PATH
make clean
# start conky
bash ~/.config/conky/launchConky.sh
echo "Installation complete."
exit