-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathsetup.sh
executable file
·34 lines (27 loc) · 897 Bytes
/
setup.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
#!/usr/bin/env bash
# Install dependencies
echo "[+] Installing XMonad and dependencies"
sudo apt-get install xmonad libghc-xmonad-dev libghc-xmonad-contrib-dev xmobar suckless-tools
cabal install xmonad-extras
# Update the sample .xmobarrc to contain my current username
echo "[+] Generating configuration files"
USER=`whoami`
awk -v user="$USER" '{gsub("user", user)}1' .xmobarrc_template > .xmobarrc
# Get weather information
echo "[!] What is your zip code?"
read ZIP
echo "[+] Setting local weather zip code to $ZIP"
sed -i "s/XXXXX/$ZIP/g" .xmobarrc
# Copy configuration files to the appropriate places
cp .xmobarrc ~/
rm .xmobarrc
mkdir -p ~/.xmonad
cp xmonad.hs ~/.xmonad/
# Copy scripts to ~/.system
echo "[+] Installing helper scripts"
mkdir cp ./.system ~/.system
# Start/restart xmonad
echo "[+] XMonad installed"
echo "[+] Starting XMonad"
xmonad --recompile
xmonad --restart