-
Notifications
You must be signed in to change notification settings - Fork 8
/
pbp-install-desktop
executable file
·188 lines (163 loc) · 4.99 KB
/
pbp-install-desktop
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
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
#!/bin/sh
### Package: pbp-install-desktop
### Version: v20200725.2300
### Author: Michael Gan "xmixahlx" [email protected]
### License: GPLv3
### Script Dependencies: linux
## PBPTOOLSDIR
if [ -z $PBPTOOLSDIR ]; then
PBPTOOLSDIR="`pwd`"
fi
## VARS
DATE=`date +%Y%m%d%H%M%S`
RESDIR=$PBPTOOLSDIR/resources
## OVERRIDES
# Override debian.
if [ -z $INSTALLDEPS ]; then
INSTALLDEPS=debian
fi
echo "\n*** INSTALLDEPS selected is $INSTALLDEPS.\n"
# Override with yes to install sway, waybar and bash configs.
if [ -z $USERCONFIGS ]; then
USERCONFIGS=no
fi
echo "\n*** USERCONFIGS selected is $USERCONFIGS.\n"
# Override yes with no.
if [ -z $SYSTEM ]; then
SYSTEM=yes
fi
echo "\n*** SYSTEM selected is $SYSTEM.\n"
# Override yes with no.
if [ -z $OPTS ]; then
OPTS=yes
fi
echo "\n*** OPTS selected is $OPTS.\n"
# Override yes with no.
if [ -z $XFCE ]; then
XFCE=yes
fi
echo "\n*** XFCE selected is $XFCE.\n"
# Override yes with no.
if [ -z $SWAY ]; then
SWAY=yes
fi
echo "\n*** SWAY selected is $SWAY.\n"
# Override no with yes to install hwaccel.
if [ -z $HWACCEL ]; then
HWACCEL=no
fi
echo "\n*** HWACCEL selected is $HWACCEL.\n"
# Override no with yes to install kodi.
if [ -z $KODI ]; then
KODI=no
fi
echo "\n*** KODI selected is $KODI.\n"
# Override no with yes to install wayland.
if [ -z $WAYLAND ]; then
WAYLAND=no
fi
echo "\n*** WAYLAND selected is $WAYLAND.\n"
# Override no with yes to install media.
if [ -z $MEDIA ]; then
MEDIA=no
fi
echo "\n*** MEDIA selected is $MEDIA.\n"
## CONTINUE
echo "\n*** Continue to install the above configurations? \n"
read -p "Yes or No: " CONTINUE
case $CONTINUE in
[Yy]* ) echo "\n*** YES selected. Continuing.\n" ;;
[Nn]* ) echo "\n*** NO selected. Exiting.\n" && exit ;;
* ) echo "\n***YES or NO not selected. Exiting.\n" && exit ;;
esac
## USERCONFIGS
if [ $USERCONFIGS = yes ]; then
if [ -f ~/.config/sway/config ]; then
cp ~/.config/sway/config ~/.config/sway/config.$DATE
fi
if
[ -f ~/.config/waybar/config ]; then
cp ~/.config/waybar/config ~/.config/waybar/config.$DATE
fi
if
[ -f ~/.config/i3/config ]; then
cp ~/.config/i3/config ~/.config/i3/config.$DATE
fi
if
[ -f ~/.bash_profile ]; then
cp ~/.bash_profile ~/.bash_profile.$DATE
fi
mkdir -p ~/.config/{i3,sway,waybar}
cp $RESDIR/sway/config ~/.config/sway/config
cp $RESDIR/waybar/config ~/.config/waybar/config
cp $RESDIR/i3/config ~/.config/i3/config
cp $RESDIR/bash/bash_profile ~/.bash_profile
fi
## DEBIAN INSTALL
if [ $INSTALLDEPS = debian ]; then
## SYSTEM
if [ $SYSTEM = yes ]; then
sudo apt-get -y install udev p7zip-full lrzip zip zstd bzip2 hdparm hddtemp smartmontools curl \
coreutils build-essential bison flex make cmake meson git wget patch make autoconf automake \
pkg-config fonts-dejavu fonts-freefont-ttf fonts-liberation fonts-roboto ttf-bitstream-vera \
upower linux-cpupower brightnessctl brightness-udev light pulseaudio pulseaudio-utils \
pulseaudio-module-bluetooth pavucontrol pasystray alsa-utils alsa-tools \
bluez bluez-obexd bluetooth blueman network-manager-gnome xserver-xorg \
gvfs gvfs-backends gvfs-bin gvfs-fuse fuse3 termit sddm i3 feh \
task-laptop task-ssh-server ssh-askpass rename
fi
## OPTS
if [ $OPTS = yes ]; then
sudo apt-get -y install chromium firefox inkscape gimp vlc mpv audacity mediainfo \
mediainfo-gui libreoffice libreoffice-gtk3 rdesktop gftp-gtk qalculate-gtk
fi
## XFCE
if [ $XFCE = yes ]; then
sudo apt-get -y install xfce4 xfce4-goodies
fi
## SWAY
if [ $SWAY = yes ]; then
sudo apt-get -y install xwayland sway sway-backgrounds swaybg swayidle swaylock \
grim slurp imv mako-notifier wl-clipboard wdisplays
sudo apt-get -y install -t experimental waybar
fi
fi
## HWACCEL
if [ $HWACCEL = yes ]; then
INSTALLDEPS=$INSTALLDEPS pbp-install-libva
INSTALLDEPS=$INSTALLDEPS pbp-install-libva-v4l2-request
INSTALLDEPS=$INSTALLDEPS pbp-install-libva-utils
INSTALLDEPS=$INSTALLDEPS pbp-install-mesa
INSTALLDEPS=$INSTALLDEPS pbp-install-ffmpeg
INSTALLDEPS=$INSTALLDEPS pbp-install-alacritty
INSTALLDEPS=$INSTALLDEPS pbp-install-gstreamer
fi
## KODI
if [ $KODI = yes ]; then
INSTALLDEPS=$INSTALLDEPS pbp-install-libudfread
INSTALLDEPS=$INSTALLDEPS pbp-install-kodi
INSTALLDEPS=$INSTALLDEPS pbp-install-jellyfin-kodi
INSTALLDEPS=$INSTALLDEPS pbp-install-kodi-inputstream-adaptive
INSTALLDEPS=$INSTALLDEPS pbp-install-kodi-p8-platform
INSTALLDEPS=$INSTALLDEPS pbp-install-kodi-platform
fi
## WAYLAND
if [ $WAYLAND = yes ]; then
INSTALLDEPS=$INSTALLDEPS pbp-install-fontawesome
INSTALLDEPS=$INSTALLDEPS pbp-install-libinput
INSTALLDEPS=$INSTALLDEPS pbp-install-sway
INSTALLDEPS=$INSTALLDEPS pbp-install-dmenu-wayland
INSTALLDEPS=$INSTALLDEPS pbp-install-waybar
INSTALLDEPS=$INSTALLDEPS pbp-install-wdisplays
INSTALLDEPS=$INSTALLDEPS pbp-install-wlogout
INSTALLDEPS=$INSTALLDEPS pbp-install-xdg-desktop-portal
INSTALLDEPS=$INSTALLDEPS pbp-install-xdg-desktop-portal-wlr
fi
## MEDIA
if [ $MEDIA = yes ]; then
INSTALLDEPS=$INSTALLDEPS pbp-install-libcamera
INSTALLDEPS=$INSTALLDEPS pbp-install-pipewire
fi
## EXIT
exit
## ENJOY