-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathpostinstall.sh
175 lines (157 loc) · 10.5 KB
/
postinstall.sh
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
echo "___________________________________________________________________________________"
echo " "
echo " GET LANGUAGE INFO FROM USER "
echo "___________________________________________________________________________________"
# Get language & region info
echo "---------------------------------------"
echo "Besides English, what other language would you like to spellcheck?" answer
echo "Please type the 2-letter countrycode for the language you would like to install, for example "de" for German language (no caps):"
read -p 'countrycode for example "nl" and hit ENTER: ' LANG
flatpak config --system --set languages "en;$LANG"
flatpak update -y
echo "___________________________________________________________________________________"
echo " "
echo " APPLICATIONS - Install required and recommended apps "
echo "___________________________________________________________________________________"
# Install applications/tools via the proper method (Flatpak)
# Remove Gnome Text Editor, install a less 'naked' simple texteditor instead
flatpak uninstall -y org.gnome.TextEditor
flatpak -y install flathub mousepad
# Music editor tool
flatpak install -y flathub org.audacityteam.Audacity
# Image editor tool
flatpak install -y flathub com.github.PintaProject.Pinta
# GIMP advanced image editor
flatpak install -y fedora org.gimp.GIMP
# Video converter
flatpak install -y flathub app/fr.handbrake.ghb/x86_64/stable
# Video trimmer, converter, merger
flatpak install -y flathub losslesscut
# OnlyOffice
flatpak install -y flathub org.onlyoffice.desktopeditors
# LibreOffice
flatpak install -y fedora org.libreoffice.LibreOffice
echo "___________________________________________________________________________________"
echo " "
echo " GNOME EXTENSIONS - Required for usable and intuitive system "
echo "___________________________________________________________________________________"
#Install extensions that cannot be installed+autoupdated system-wide on Fedora SilverBlue
wget -O $HOME/Downloads/install-gnome-extensions.sh https://raw.githubusercontent.com/ToasterUwU/install-gnome-extensions/master/install-gnome-extensions.sh
# Dash-to-Panel ([email protected])
bash install-gnome-extensions.sh --enable 1160
# Removable Drive menu ([email protected])
bash install-gnome-extensions.sh --enable 7
# ArcMenu ([email protected])
bash install-gnome-extensions.sh --enable 3628
# Desktop Icons ([email protected])
bash install-gnome-extensions.sh --enable 5263
# Allow Locked Remote Desktop ([email protected])
bash install-gnome-extensions.sh --enable 4338
# Custom Hot Corners ([email protected])
bash install-gnome-extensions.sh --enable 4167
# Bing Wallpaper ([email protected])
mkdir $HOME/Pictures/Wallpapers
bash install-gnome-extensions.sh --enable 1262
#remove the script used to install extensions.
rm install-gnome-extensions.sh
echo "___________________________________________________________________________________"
echo " "
echo " GNOME - Intuitive configuration for Gnome, Extensions, Apps "
echo "___________________________________________________________________________________"
# To override distribution defaults and create your own for all (future and current users)
# See here: https://help.gnome.org/admin/system-admin-guide/stable/dconf-custom-defaults.html.en
# First create a dconf profile
sudo mkdir -p /etc/dconf/profile
sudo tee /etc/dconf/profile/user &>/dev/null << EOF
user-db:user
system-db:local
EOF
# Download the Gnome Intuitive configuration and apply
sudo wget -P /etc/dconf/db/local.d https://raw.githubusercontent.com/zilexa/Fedora-Silverblue-Intuitive-Postinstall/main/00-gnome-intuitive
sudo dconf update
echo "___________________________________________________________________________________"
echo " "
echo " APPLICATIONS - configure apps "
echo "___________________________________________________________________________________"
echo "Configure ONLYOFFICE DESKTOPEDITORS"
echo "____________________"
# Enable dark mode, use separate windows instead of tabs
mkdir -p $HOME/.var/app/onlyoffice
tee -a $HOME/.var/app/onlyoffice/DesktopEditors.conf &>/dev/null << EOF
UITheme=theme-dark
editorWindowMode=true
EOF
echo "Configure LIBREOFFICE"
echo "_____________________"
# Adjust the LibreOffice settings to make it look like MS Office: icons: Colibre, ribbon view. Also enable LanguageTools modern spell and grammar checker, save every 5min etc.
cd $HOME/Downloads
wget -O $HOME/Downloads/libreoffice-configure-to-look-like-Office365.tar.xz "https://github.com/zilexa/Fedora-Silverblue-Intuitive-Postinstall/raw/main/libreoffice-configure-to-look-like-Office365.tar.xz"
mkdir -p $HOME/.var/app/org.libreoffice.LibreOffice/config/libreoffice/4/user
tar -xvf $HOME/Downloads/libreoffice-configure-to-look-like-Office365.tar.xz -C $HOME/.var/app/org.libreoffice.LibreOffice/config/libreoffice/4/user
rm $HOME/Downloads/libreoffice-configure-to-look-like-Office365.tar.xz
echo "Configure FIREFOX"
echo "_____________________"
# For current and future system users and profiles
# Create default policies (install minimal set of extensions and theme, enable syncing of your toolbar layout, disable default Mozilla bookmarks)
# first delete existing profiles
rm -r $HOME/.mozilla/firefox/*.default-release
rm -r $HOME/.mozilla/firefox/*.default
rm $HOME/.mozilla/firefox/profiles.ini
# Create default firefox policies
sudo mkdir -p /etc/firefox/policies
sudo tee -a /etc/firefox/policies/policies.json &>/dev/null << EOF
{
"policies": {
"DisableProfileImport": true,
"NoDefaultBookmarks": true,
"DisplayBookmarksToolbar": "always",
"Preferences": {
"browser.uiCustomization.state": {
"Value": "{\"placements\":{\"widget-overflow-fixed-list\":[\"screenshot-button\",\"save-to-pocket-button\",\"logins-button\",\"panic-button\",\"preferences-button\",\"bookmarks-menu-button\"],\"unified-extensions-area\":[\"sponsorblocker_ajay_app-browser-action\",\"_contain-facebook-browser-action\",\"magnolia_12_34-browser-action\"],\"nav-bar\":[\"back-button\",\"forward-button\",\"stop-reload-button\",\"customizableui-special-spring1\",\"downloads-button\",\"ublock0_raymondhill_net-browser-action\",\"urlbar-container\",\"customizableui-special-spring2\",\"_446900e4-71c2-419f-a6a7-df9c091e268b_-browser-action\",\"unified-extensions-button\"],\"toolbar-menubar\":[\"menubar-items\"],\"TabsToolbar\":[\"firefox-view-button\",\"tabbrowser-tabs\",\"new-tab-button\",\"alltabs-button\",\"fullscreen-button\"],\"vertical-tabs\":[],\"PersonalToolbar\":[\"fxa-toolbar-menu-button\",\"history-panelmenu\",\"personal-bookmarks\"]},\"seen\":[\"save-to-pocket-button\",\"developer-button\",\"sponsorblocker_ajay_app-browser-action\",\"ublock0_raymondhill_net-browser-action\",\"_contain-facebook-browser-action\",\"magnolia_12_34-browser-action\",\"_446900e4-71c2-419f-a6a7-df9c091e268b_-browser-action\"],\"dirtyAreaCache\":[\"nav-bar\",\"unified-extensions-area\",\"toolbar-menubar\",\"TabsToolbar\",\"PersonalToolbar\",\"widget-overflow-fixed-list\",\"vertical-tabs\"],\"currentVersion\":20,\"newElementCount\":8}",
"Status": "default"
}
},
"Extensions": {
"Install": ["https://addons.mozilla.org/firefox/downloads/latest/ublock-origin/latest.xpi", "https://github.com/bpc-clone/bpc_updates/releases/download/latest/bypass_paywalls_clean-3.7.1.0.xpi", "https://addons.mozilla.org/firefox/downloads/latest/sponsorblock/latest.xpi", "https://addons.mozilla.org/firefox/downloads/latest/facebook-container/latest.xpi", "https://addons.mozilla.org/firefox/downloads/latest/google-container/latest.xpi", "https://addons.mozilla.org/firefox/downloads/latest/nord-polar-night-theme/latest.xpi"]}
}
}
EOF
echo "___________________________________________________________________________________"
echo " "
echo " OPTIONAL SETTINGS - choose y/n "
echo "___________________________________________________________________________________"
# Get a Firefox shortcut for 2 profiles
echo "---------------------------------------"
echo "Firefox: would you like to be able to launch different profiles (2), by simply right-clicking the Firefox shortcut?"
read -p "Only useful if multiple users use this machine and each user has its own Firefox profile. (y/n)?" answer
case ${answer:0:1} in
y|Y )
sudo cp /usr/share/applications/org.mozilla.firefox.desktop /usr/local/share/applications/
echo "Please enter the first Firefox profile (user) name:"
read -p 'firefox profile 1 name (e.g. Lisa): ' PROFILE1
echo "Please enter the second Firefox profile (user) name:"
read -p 'firefox profile 2 name (e.g. John): ' PROFILE2
echo adding profiles to right-click of Firefox shortcut...
sudo sed -i -e 's@Actions=new-window;new-private-window;profile-manager-window;@Actions=new-window;$PROFILE1;$PROFILE2;@g' /usr/local/share/applications/org.mozilla.firefox.desktop
sudo tee -a /usr/local/share/applications/org.mozilla.firefox.desktop &>/dev/null << EOF
[Desktop Action $PROFILE1]
Name=start $profile1's Firefox
Exec=firefox -P $PROFILE1 -no-remote
[Desktop Action $PROFILE2]
Name=start $profile2's Firefox
Exec=firefox -P $PROFILE2 -no-remote
EOF
# The shortcut in ~/.local/share/application overrides the system shortcuts in /usr/share/applications. This also removes file associations. Fix those:
##xdg-settings set default-web-browser firefox.desktop
##xdg-mime default firefox.desktop x-scheme-handler/chrome
##xdg-mime default firefox.desktop application/x-extension-htm
##xdg-mime default firefox.desktop application/x-extension-html
##xdg-mime default firefox.desktop application/x-extension-shtml
##xdg-mime default firefox.desktop application/xhtml+xml
##xdg-mime default firefox.desktop application/x-extension-xhtml
##xdg-mime default firefox.desktop application/x-extension-xht
;;
* )
echo "Keeping the Firefox shortcut as is..."
;;
esac