OSDN Git Service

add youtube-dl and xclip
[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 # drag and drop x utility for ranger
42 if ! command -v dragon &>/dev/null; then
43     cd /tmp
44     git clone --depth=1 https://github.com/mwh/dragon.git &>/dev/null
45     cd dragon
46     make
47     make install
48     cd ..
49     rm -rf dragon
50 fi
51
52 cd
53 mkdir -p instantos/notifications &>/dev/null
54 cd instantos/notifications
55
56 # gets executed by dunst on notification
57 curl -s "$RAW/instantos/instantos/master/programs/dunsttrigger" >dunsttrigger
58 chmod +x dunsttrigger
59
60 if ! [ -e notification.ogg ]; then
61     wget -qO notification.ogg "https://notificationsounds.com/notification-sounds/me-too-603/download/ogg"
62 fi
63
64 cd ~/instantos
65 rm -rf wallpapers
66 mkdir wallpapers
67
68 # set instantwm as default for lightdm
69 echo '[Desktop]' >.dmrc
70 echo 'Session=instantwm' >>.dmrc