OSDN Git Service

split instant status
[instantos/instantOS.git] / userinstall.sh
1 #!/usr/bin/env bash
2
3 #############################################
4 ## installs all instantOS tools            ##
5 #############################################
6
7 cd "$HOME"
8
9 echo "installing instantOS tools"
10
11 RAW="https://raw.githubusercontent.com"
12 source <(curl -s $RAW/paperbenni/bash/master/import.sh)
13 pb install
14 pb git
15
16 LINK="$RAW/instantos/instantos/master"
17
18 curl -s "$LINK/termprograms.txt" >.cache/termprograms.txt
19
20 if ! [ ~/.local/share/fonts/symbola.ttf ]; then
21     mkdir -p .local/share/fonts
22     cd .local/share/fonts
23     echo "installing symbola font"
24     wget -q "http://symbola.surge.sh/symbola.ttf"
25 fi
26
27 cd "$HOME"
28
29 # laptop specific stuff
30 if acpi | grep -q '[0-9]%' &>/dev/null; then
31     # config file to indicate being a laptop
32     touch .cache/islaptop
33 fi
34
35 cd
36
37 # auto start script with instantWM
38 ls .instantos &>/dev/null || mkdir .instantos
39
40 cd /tmp
41 cd
42 mkdir -p instantos/notifications &>/dev/null
43 cd instantos/notifications
44
45 # gets executed by dunst on notification
46 curl -s "$RAW/instantos/instantos/master/programs/dunsttrigger" >dunsttrigger
47 chmod +x dunsttrigger
48
49 if ! [ -e notification.ogg ]; then
50     wget -qO notification.ogg "https://notificationsounds.com/notification-sounds/me-too-603/download/ogg"
51 fi
52
53 cd ~/instantos
54 rm -rf wallpapers
55 mkdir wallpapers
56
57 # set instantwm as default for lightdm
58 echo '[Desktop]' >.dmrc
59 echo 'Session=instantwm' >>.dmrc