This repository has been archived by the owner on Sep 6, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
/
BuildSwayInstallScript
384 lines (370 loc) · 17.9 KB
/
BuildSwayInstallScript
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
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
#!/bin/bash
###Fedora/OpenSUSE Sway Build + Redflower rice
###Source build Script
#finding OS
. /etc/os-release
if [[ $NAME = Fedora* ]]
then ins=dnf
elif [[ $NAME = openSUSE* ]]
then ins=zypper
elif [[ ! -z "$OSTREE_VERSION" ]] #For SilverBlue (SilverBlue may not work on riceing stage, haven't tested)
then ins=rpm-ostree
else echo "can't find distro name, defaulting to Fedora" && ins=zypper
fi
#configuring Update + OS veribles
if [[ $NAME = Fedora* ]]
then upd="sudo dnf update -y" && os="$NAME"_"$VERSION_ID"
elif [[ ! -z "$OSTREE_VERSION" ]] #For Silverteam
then upd='rpm-ostree upgrade -y' && os="$NAME"_"$VERSION_ID"
elif [[ $NAME = "openSUSE Leap" ]]
then upd="sudo zypper up -y" && os="$NAME"_"$VERSION_ID"
elif [[ $NAME = "openSUSE Tumbleweed" ]]
then upd="sudo zypper dup -y" && os=$NAME
else echo "can't find distro name, assuming openSUSE" && upd="sudo zypper dup -y" && os=$NAME
fi
echo ""
echo ""
echo -e "\e[1mHello, and welcome to the Sway Wm Intsall script\e[0m"
echo -e "\e[93m------------------------------------------------------------------------------------------------------------\e[39m"
echo -e "Type: \e[4m1\e[0m: If you only want to only install the \e[94mBase packages\e[39m (no rice)"
echo -e "Type: \e[4m2\e[0m, If you want \e[94mBase Packages\e[39m + \e[91mRice\e[39m"
echo -e "Type: \e[4m3\e[0m, If you want \e[94mBase Packages\e[39m + \e[91mRice\e[39m + additional \e[92mgeneric aplications\e[39m"
echo -e "Type: \e[4m4\e[0m, If you want only the \e[91mRice\e[39m (Would need base packages installed in some way)"
echo -e "\e[93m-------------------------------------------------------------------------------------------------------------\e[39m"
read -n1 -p "Type [1,2,3 or 4]" Choice
echo ""
echo -e "\e[93m-------------------------------------------------------------------------------------------------------------\e[39m"
echo ""
echo -e "\e[1mRunning Choice\e[0m: \e[5m$Choice\e[0;39m"
echo ""
if [[ $Choice = 2 ]] || [[ $Choice = 3 ]] || [[ $Choice = 4 ]]
then {
echo ""
echo -e "\e[93m------------------------------------------------------------------------------------------------------------\e[39m"
echo ""
echo -e "Do you Want to install \e[1mwpgtk\e[0m (Theme/coloursheme changer)"
echo ""
echo -e "\e[4m1\e[0m:\e[1mYes\e[0m \e[4m2\e[0m:\e[1mNo\e[0m"
echo ""
echo -e "\e[93m-------------------------------------------------------------------------------------------------------------\e[39m"
read -n1 -p "Type [1 or 2]" WChoice
echo ""
echo -e "\e[93m-------------------------------------------------------------------------------------------------------------\e[39m"
echo ""
echo -e "\e[1mRunning Choice\e[0m: \e[5m$WChoice\e[0;39m"
}
fi
if [[ $Choice = 1 ]] || [[ $Choice = 2 ]] || [[ $Choice = 3 ]]
then {
echo ""
echo -e "\e[93m-------------------------------------------------------------------------------------------------------------\e[39m"
echo -e "\e[1mBase packages:\e[0m \e[94m(Stage 1)\e[39m"
echo ""
echo "Initial stuff"
sudo $ins update -y
echo -e "\e[1mUpdating\e[0m"
$upd
## Turning off unnessesery services
##(recommended for using fedora worstation on RaspberyPi )
#sudo systemctl status sshd && sudo systemctl enable sshd && sudo systemctl start sshd && systemctl list-units --type service --all | grep running && sudo systemctl disable libvirtd.service && sudo systemctl disable avahi-daemon.service && sudo systemctl mask bluetooth.service && sudo systemctl disable cups.service && sudo systemctl disable iscsi.service && sudo systemctl mask iscsid.service && sudo systemctl disable ModemManager.service && sudo systemctl disable multipathd.service && sudo systemctl disable mdmonitor.service && sudo systemctl disable iscsi-shutdown.service && sudo systemctl mask gssproxy.service && sudo systemctl disable sssd.service && sudo systemctl mask wpa_supplicant.service && sudo systemctl disable sssd-kcm.service && sudo systemctl disable lvm2-monitor.service && sudo systemctl disable NetworkManager-wait-online.service && sudo systemd-analyze blame && sudo systemd-analyze critical-chain && sudo nmcli connection modify Wired\ connection\ 1 ipv6.method ignore && sudo systemctl stop NetworkManager.service && sudo systemctl disable NetworkManager.service && sudo $ins install network-scripts -y && sudo systemctl enable network.service && sudo systemctl start network.service
##install Sway
echo "Intsalling all dependencies"
#ffmpeg
if [[ $NAME = Fedora* ]] || [[ ! -z "$OSTREE_VERSION" ]]
then {
sudo dnf install https://download1.rpmfusion.org/free/fedora/rpmfusion-free-release-$(rpm -E %fedora).noarch.rpm -y
sudo dnf install https://download1.rpmfusion.org/nonfree/fedora/rpmfusion-nonfree-release-$(rpm -E %fedora).noarch.rpm -y
sudo dnf install ffmpeg-devel -y
elif [[ $NAME = openSUSE* ]]
then zypper ffmpeg install -y
}
else echo "Can't find distro name, assuming has ffmpeg-devel dependencie" && sudo $ins install ffmpeg-devel -y
fi
#everything else
sudo $ins install cmake gdk-pixbuf2 git gcc brightnessctl pulseaudio playerctl make xcb-util-xrm-devel xcb-util-image-devel.x86_64 xcb-util-cursor-devel.x86_64 xcb-util-renderutil-devel.x86_64 xcb-util-keysyms-devel.x86_64 xcb-util-wm-devel libxcb-devel ctags ffmpeg-devel ctags-etags meson mesa-dri-drivers ninja-build wayland-devel wayland-protocols-devel mesa-libEGL-devel mesa-libGLES-devel mesa-dri-drivers libdrm-devel libgbm-devel libxkbcommon-devel libudev-devel pixman-devel libinput-devel libevdev-devel systemd-devel cairo-devel libpcap-devel jsoncpp libinput rpm-build gnome-tweak-tool xcb-util-wm-devel libcap-devel libsigc++ sassc glib2-devel gtk-murrine-engine gtk2-engines kmix pulseaudio-libs-devel libdbusmenu-gtk3-devel clang-devel.x86_64 fmt-devel gtkmm30-devel jsoncpp-devel libpulse.so.0 libnl3-devel libdbusmenu-gtk3 gcc-c++ clang json-c-devel pam-devel pango-devel pcre-devel gdk-pixbuf2-devel -y
#Making sure the filesystem knows where all the .pc's are
sudo bash -c 'cat >> /etc/profile.d/wlroots.sh <<EOL
export PATH=/usr/local/bin:$PATH
export PKG_CONFIG_PATH=/usr/local/lib64/pkgconfig:$PKG_CONFIG_PATH
export LD_LIBRARY_PATH=/usr/local/lib64/:$LD_LIBRARY_PATH
EOL'
sudo bash -c ' echo "/usr/local/lib64/" > /etc/ld.so.conf.d/sway.conf'
source /etc/profile.d/wlroots.sh
gnome-shell-extension-tool -e user-theme
gnome-shell-extension-tool -e [email protected]
#Installing
echo -e "\e[1mwlroots\e[0m (nessesery for sway to work with wayland)"
cd ~/
git clone https://github.com/swaywm/wlroots.git
cd wlroots
meson build
ninja -C build install
echo -e "\e[1mscdoc\e[0m (nessesery for sway to work (sway's man page))"
sudo rpm -ivh https://copr-be.cloud.fedoraproject.org/results/shengis/scdoc/fedora-29-x86_64/00853655-scdoc/scdoc-1.8.1-1.fc29.x86_64.rpm
echo -e "\e[1mSway WM\e[0m "
cd ~/
git clone https://github.com/swaywm/sway
cd sway
meson build
ninja -C build install
sudo chmod a+s /usr/local/bin/sway
echo -e "\e[1mswaylock\e[0m (sway native plugin)"
cd ~/
git clone https://github.com/swaywm/swaylock
cd swaylock
meson build
ninja -C build install
sudo chmod a+s /usr/local/bin/swaylock
#making sure sway has login authentication
sudo bash -c ' echo "auth include login" > /etc/pam.d/swaylock'
echo -e "\e[1mswayidle\e[0m (sway native plugin)"
cd ~/
git clone https://github.com/swaywm/swayidle.git
cd swayidle
meson build
ninja -C build install
echo -e "\e[1mswaybg\e[0m (background setter)"
cd ~/
git clone https://github.com/swaywm/swaybg.git
cd swaybg
meson build
ninja -C build
sudo ninja -C build install
echo -e "\e[1mgrim\e[0m (Grab images from a Wayland compositor)"
cd ~/
git clone https://github.com/emersion/grim.git
cd grim
meson build
ninja -C build
ninja -C build install
echo -e "\e[1mwf-recorder\e[0m (Records and streams for wayland)"
sudo $ins install cmake wayland-devel libpulse-devel pulseaudio-libs-devel -y --skip-broken
installing ffmpeg for encoding/decoding
sudo $ins install https://download1.rpmfusion.org/free/fedora/rpmfusion-free-release-$(rpm -E %fedora).noarch.rpm https://download1.rpmfusion.org/nonfree/fedora/rpmfusion-nonfree-release-$(rpm -E %fedora).noarch.rpm -y
sudo $ins install ffmpeg ffmpeg-devel x264-devel -y
cd ~/
git clone https://github.com/ammen99/wf-recorder && cd wf-recorder
meson build --prefix=/usr --buildtype=release
ninja -C build
sudo ninja -C build install
echo -e "\e[1mWayBar\e[0m (for swaybar replacement) (unnessesery, could use swaybar witch comes with sway)"
cd ~/
git clone https://github.com/Alexays/Waybar
cd Waybar
meson build
ninja -C build install
echo -e "\e[1mfont awesome\e[0m for \e[1mWayBar\e[0m "
cd ~/
git clone https://github.com/FortAwesome/Font-Awesome.git
mkdir ~/.fonts
mv ~/Font-Awesome/webfonts/*.ttf ~/.fonts/
sudo rm -r ~/Font-Awesome # clean up
cd ~/.fonts
sudo wget "https://github.com/ox-it/hidden-museum/raw/master/fonts/Century%20Gothic.ttf" ~/.fonts/
gsettings set org.gnome.desktop.interface monospace-font-name "Monospace Regular 11"
gsettings set org.gnome.desktop.interface document-font-name 'Century Gothic Regular 10'
gsettings set org.gnome.desktop.interface font-name 'Century Gothic Regular 11'
}
fi
if [[ $Choice = 2 ]] || [[ $Choice = 4 ]] || [[ $Choice = 3 ]]
then {
echo ""
echo -e "\e[93m-------------------------------------------------------------------------------------------------------------\e[39m"
echo -e "\e[1mRicing:\e[0m \e[91m(Stage 2)\e[39m"
echo ""
if [[ $WChoice = 1 ]]
then {
echo -e "\e[1mwpgtk\e[0m (Wallpaper & Theme changer)"
sudo $ins install python3 xsettingsd feh -y
cd ~/
git clone https://github.com/deviantfero/wpgtk
cd wpgtk
sudo pip install .
}
fi
echo -e "\e[1mAlbert\e[0m, Rofi alternative (Aplication Launcher)"
sudo bash -c ' echo export QT_QPA_PLATFORM="xcb" >> /etc/profile.d/albert.sh'
sudo bash -c ' echo export QT_QPA_PLATFORM="wayland" >> /etc/profile.d/qtwayland.sh'
source /etc/profile.d/albert.sh
cd ~/
mkdir Albert
cd Albert
sudo $ins install python3-devel qt5-qtx11extras-devel qt5-qtsvg-devel muParser-devel libqalculate-devel qt5-qtcharts-devel qt5-qtwayland-devel -y
git clone --recursive https://github.com/albertlauncher/albert.git
mkdir albert-build
cd albert-build
cmake ../albert -DCMAKE_INSTALL_PREFIX=/usr -DCMAKE_BUILD_TYPE=Debug
make
sudo make install
echo -e "\e[1mkitty\e[0m (terminal with fish and oh-my-fish)"
sudo $ins install kitty -y
sudo $ins install fish -y
# oh-my-fish with git
#git clone https://github.com/oh-my-fish/oh-my-fish
#cd oh-my-fish
#bin/install --offline
# with a tarball
#curl -L https://get.oh-my.fish > install
#fish install --offline=omf.tar.gz
#wallpaper images
echo ""
echo ""
echo -e "\e5mNote: with the Sway wallpaper Images, there are two images that can be used as wallpapers for Sway.\e[0m"
echo -e "\e[38;5;166m--------------------------------------------------------------------------------------------------------------------\e[39m"
echo -e "\e[96mOne christian\e[39m, and one \e[95mblank\e[39m."
echo -e "On line 23 on \e[4m~/.config/sway/config\e[0m there is a line with \e[4moutput *bg ~/Pictures/Wallpapers/Wallpaper.jpg stretch\e[0m change \e[96mWallpaper.jpg\e[39m or \e[95mBlank.jpg\e[39m depending on what you prefer more)"
echo -e "Wallpaper.jpg being the \e[96mChristian\e[39m one and \e[95mBlank.jpg\e[39m being, well, blank."
echo -e "\e[38;5;166m--------------------------------------------------------------------------------------------------------------------\e[39m"
echo -e "Feel free to go to the \e[4m~/Pictures/Wallpapers\e[0m dir to see the images for yourself."
echo ""
sleep 15
cd ~/"SwayWM_Build"/Images
mkdir ~/Pictures/Wallpapers/
mv * ~/Pictures/Wallpapers/
sudo cp ~/Pictures/Wallpapers/Blank.jpg /usr/share/backgrounds/Blank.jpg
#GTK3 for GNOME
cd ~/"SwayWM_Build"/dooooots/GTK3/theme/vimix-gtk-themes-master
mkdir -p ~/.themes/
chmod +x Install
chmod +x parse-sass.sh
./Install -n VimixRedFlower -t ruby -o -f
cd ~/"SwayWM_Build"/dooooots/GTK3/theme/VimixRedFlower
mv * ~/.themes/VimixRedFlower-dark-ruby
gsettings set org.gnome.desktop.interface gtk-theme VimixRedFlower-dark-ruby
#icon
cd ~/"SwayWM_Build"/dooooots/GTK3/Icon/vimix-icon-theme-master
mkdir ~/.icons
cp -r RedFlower-Paper-Vimix ~/.icons/
cp -r Vimix ~/.icons/
cp -r Paper-Vimix ~/.icons/
echo "Applying Dark theme, you can use gnome-tweak letter to apply light theme"
gsettings set org.gnome.desktop.interface icon-theme RedFlower-Paper-Vimix
gtk-update-icon-cache RedFlower-Paper-Vimix
#cursor (x11 not wayland, might find a wayland verient down the line)
# (I do think it works, but not as well as i will like, probilly will update in the future)
# cd ~/
# sudo $ins install inkscape xorg-x11-apps -y
# git clone https://github.com/keeferrourke/capitaine-cursors.git
# cd capitaine-cursors
# chmod +x build.sh
# ./build.sh
# gsettings set org.gnome.desktop.interface cursor-theme 'la capitaine'
#GDM (Login screen)
#cd ~/"SwayWM_Build"/dooooots/GTK3/GDM
#comming soon (.....maby)
#Grub theme (not tested and unnessesery)
##cd ~/
##github https://github.com/gustawho/grub2-theme-breeze.git
##cd grub2-theme-breeze
##sudo ./install.sh"
#irssi (for irc)
#cd ~/"SwayWM_Build"/dooooots/irssi
#$ins install irssi -y
#mkdir ~/.irssi
#mv * ~/.irssi/
#config comming soon (maby)
if [[ $WChoice = 1 ]]
then {
#wpgtk (Wallapaper theme changer)
cd ~/SwayWM_Build/dooooots/wpg
mkdir -p ~/.config/wpg
mv * ~/.config/wpg/
# RE linking base files (if this dosn't work let me know and try manually)
wpg --link ~/.config/wpg/templates/org.albert.frontend.widgetboxmodel_themes_RedFlower.qss.base ~/.local/share/albert/org.albert.frontend.widgetboxmodel/themes/RedFlower.qss
wpg --link ~/.config/wpg/templates/config_waybar_style.css.base ~/.config/waybar/style.css
wpg --link ~/.config/wpg/templates/config_sway_config.base ~/.config/sway/config
ln -s ~/.local/share/albert/org.albert.frontend.widgetboxmodel/themes/RedFlower.qss ~/.config/wpg/templates/org.albert.frontend.widgetboxmodel_themes_RedFlower.qss
ln -s ~/.config/waybar/style.css ~/.config/wpg/templates/config_waybar_style.css
ln -s ~/.config/sway/config ~/.config/wpg/templates/config_sway_config
# Starter Wallpaper Set
ln -s ~/Pictures/Wallpapers/Wallpaper.jpg ~/.config/wpg/wallpapers/Wallpaper.jpg
ln -s ~/.config/wpg/wallpapers/Wallpaper.jpg ~/.config/wpg/.current
#GTK Link (-i for icons as well, more info at SwayWM_Build/dooooots/wpg/README.md)
wpg-install.sh -g
# Vim (CLI text Editor)
sudo $ins install vim -y
cd ~/
mkdir ~/.vim
cd ~/.vim
git clone https://github.com/deviantfero/wpgtk.vim.git .
echo ":colorscheme wpgtkAlt" >> ~/.vimrc
}
fi
#kitty (terminal)
cd ~/"SwayWM_Build"/dooooots/kitty
mkdir -p ~/.config/kitty
mv * ~/.config/kitty/
#Albert config (my chosen aplication launcher (Aplication and theme install later))
cd ~/"SwayWM_Build"/dooooots/Albert
mkdir ~/.config/albert
mv * ~/.config/albert/
#sway (the wm)
cd ~/"SwayWM_Build"/dooooots/sway
mkdir ~/.config/sway
mv * ~/.config/sway/
#WayBar (the bar replacment for swaybar, wayland version of polybar for i3wm)
cd ~/"SwayWM_Build"/dooooots/waybar
mkdir ~/.config/waybar
mv * ~/.config/waybar/
#Albert (Aplication Launcher)
#Installing albert RedFlower theme
cd ~/"SwayWM_Build"/dooooots/AlbertTheme
mkdir -p ~/.local/share/albert/org.albert.frontend.widgetboxmodel/themes
sudo mv * "~/.local/share/albert/org.albert.frontend.widgetboxmodel/themes/"
echo "Finnished rice :D"
}
else exit
fi
if [[ $Choice = 3 ]]
then {
echo ""
echo -e "\e[93m-------------------------------------------------------------------------------------------------------------\e[39m"
echo -e "\e[1mInstalling app's:\e[0m \e[92m(Stage 3)\e[39m"
echo ""
echo "Apps: Atom, Spodify, Keepassxc, LibreOffice, nano, Google Chrome, Franz"
#Flatpak's
sudo $ins install flatpak -y
sudo flatpak remote-add --if-not-exists flathub https://flathub.org/repo/flathub.flatpakrepo
#Atom (Prefered IDE)
cd ~/
sudo rpm --import https://packagecloud.io/AtomEditor/atom/gpgkey
sudo sh -c 'echo -e "[Atom]\nname=Atom Editor\nbaseurl=https://packagecloud.io/AtomEditor/atom/el/7/\$basearch\nenabled=1\ngpgcheck=0\nrepo_gpgcheck=1\ngpgkey=https://packagecloud.io/AtomEditor/atom/gpgkey" > /etc/yum.repos.d/atom.repo'
sudo $ins install atom-beta -y
mkdir -p ~/.atom/packages
cp ~/SwayWM_Build/dooooots/.atom/config.cson ~/.atom/
cd ~/SwayWM_Build/dooooots/.atom/packages && sudo mv * ~/.atom/packages/
cd ~/
# Atom Wpgtk Theme Symlink
wpg --link ~/.config/wpg/templates/wpgtk-theme-syntax_styles_colors.less.base ~/.atom/packages/wpgtk-theme-syntax/styles/colors.less
wpg --link ~/.config/wpg/templates/wpgtk-one-dark-ui_styles_ui-variables-custom.less.base ~/.atom/packages/wpgtk-one-dark-ui/styles/ui-variables-custom.less
ln -s ~/.atom/packages/wpgtk-theme-syntax/styles/colors.less ~/.config/wpg/templates/wpgtk-theme-syntax_styles_colors.less
ln -s ~/.atom/packages/wpgtk-one-dark-ui/styles/ui-variables-custom.less ~/.config/wpg/templates/wpgtk-one-dark-ui_styles_ui-variables-custom.less
#Spodify (Music Player)
sudo flatpak install flathub com.spotify.Client -y
#keepassxc (Password Manager)
sudo $ins install keepassxc -y
#LibreOffice (office)
sudo $ins groupinstall LibreOffice -y
#security applications
#sudo $ins groupinstall security-lab -y
#intsall day-n-day apps (unnessesery)
##installing nano (Prefered Terminal Text Editor)
sudo $ins install nano -y
##Google chrome (Prefered Web Browser, only works for Fedora)
sudo $ins install fedora-workstation-repositories -y
sudo $ins config-manager --set-enabled google-chrome
sudo $ins install google-chrome-beta -y
##franz (Multi Messaging Aplication)
flatpak install flathub com.meetfranz.Franz
echo -e "\e[1mUpdating\e[0m"
$upd
echo -e "\e[1mcleaning up\e[0m"
~/
sudo rm -r capitaine-cursors swayidle sway swaylock wf-recorder swaybg grim Albert Font-Awesome Waybar wlroots wpgtk
echo "finished, Have fun, Hopefully everything works :D (let me know if it doesn't)"
echo "Now restarting"
sleep 35
sudo init 6
}
else exit
fi