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
/
Copy pathSwayInstallScript
316 lines (305 loc) · 14.8 KB
/
SwayInstallScript
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
#!/bin/bash
###Fedora & OpenSUSE Sway Build + Redflower rice
## RPM 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 "Updating"
$upd
#Initial stuff
gnome-shell-extension-tool -e user-theme
gnome-shell-extension-tool -e [email protected]
#Installing
echo "Installing \e[1mffmpeg\e[0m (For sway)"
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
dnf clean all
dnf repolist
sudo dnf install ffmpeg-devel -y
}
else echo "Can't find distro name, assuming has ffmpeg-devel dependencie" && sudo $ins install ffmpeg-devel -y
fi
echo -e "Installing \e[1mwlroots,sway,swaylock,swayidle,albert,swaybg,grim,wayland-devel and waybar\e[0m from rpm"
sudo rpm --import https://build.opensuse.org/projects/home:GeoDerp:redflower/public_key
sudo $ins config-manager --add-repo "https://download.opensuse.org/repositories/home:/GeoDerp:/redflower/"$os"/home:GeoDerp:redflower.repo"
$ins clean all
$ins sudo clean all
$ins repolist
sudo $ins install --enablerepo=home_GeoDerp_redflower wlroots-devel celt sway swaylock swayidle albert grim waybar swaybg -y
#doing commands again (sometimes is buggy) , if still no intsall after finish run script manually (copy and past into terminal), from start up to the end of stage 1
sudo $ins config-manager --add-repo "https://download.opensuse.org/repositories/home:/GeoDerp:/redflower/"$os"/home:GeoDerp:redflower.repo"
sudo $ins install wlroots-devel celt sway swaylock swayidle albert grim waybar swaybg -y
#making sure swaylock has login authentication
sudo bash -c ' echo "auth include login" > /etc/pam.d/swaylock'
# since albert only works in xwayland for the time being we have to tell it to run in xwayland and not wayland
sudo bash -c ' echo export QT_QPA_PLATFORM="xcb" >> /etc/profile.d/albert.sh'
#when we start up sway we will try to run albert in x11 and all the other QT programs in wayland
sudo bash -c ' echo export QT_QPA_PLATFORM="wayland" >> /etc/profile.d/qtwayland.sh'
source /etc/profile.d/albert.sh
echo -e "Installing \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
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'
#wf-recorder (Records and streams for wayland) WARNING this is a SOURCE BUILD NOT AN RPM
# 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
}
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 "Installing \e[1mwpgtk\e[0m (Wallpaper & Theme changer)"
sudo $ins install python3 xsettingsd feh -y
sudo pip3 install wpgtk
}
fi
echo -e "Installing \e[1mkitty\e[0m (terminal with fish and oh-my-fish)"
sudo $ins install kitty -y
sudo $ins install fish -y
#curl -L https://get.oh-my.fish | fish
##putting all configs and images into its right replacement
###(this is for ricing and you do not need it if you dont want yours to look like mine)
#wallpaper images
echo ""
echo ""
echo -e "\e[1mNote: 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
echo -e "Installing \e[1mAlbert\e[0m Launcher"
sudo $ins install albert -y
echo "Implementing Rice for: GTK3, Sway, Gnome Icons, x-cursor, kitty, Albert, Waybar"
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)
# echo "this may come up with warnings, I think it dose work but i'm not 100% confident, will probably upgrade to a different cursor down the track"
# 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 {
#wpg (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/
## WARNING, it may crash around about here, I have no idea why but it dose. If it dose run th rest of these commands by hand. You may need to change the $int variable to your os rpm.
#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/"
#sway (the wm)
echo "installing packages for special keys"
sudo $ins install brightnessctl pulseaudio playerctl -y
cd ~/SwayWM_Build/dooooots/sway
mkdir ~/.config/sway
mv * ~/.config/sway/
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 working 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 -y
echo "Updating"
$upd
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