From c3c623f1d119b4a92f44d01e611a049699b2c7a9 Mon Sep 17 00:00:00 2001 From: Bram Kelchtermans Date: Sun, 7 Jul 2024 13:58:32 +0200 Subject: [PATCH] refactor: Add GUI setup script and install graphical apps if GUI is detected --- gui/bluemail.sh | 1 + gui/setup.sh | 9 +++++++++ gui/spotify.sh | 4 ++++ setup.sh | 8 ++++++++ 4 files changed, 22 insertions(+) create mode 100755 gui/bluemail.sh create mode 100755 gui/setup.sh create mode 100755 gui/spotify.sh diff --git a/gui/bluemail.sh b/gui/bluemail.sh new file mode 100755 index 00000000..5561f4d7 --- /dev/null +++ b/gui/bluemail.sh @@ -0,0 +1 @@ +snap install bluemail \ No newline at end of file diff --git a/gui/setup.sh b/gui/setup.sh new file mode 100755 index 00000000..f47a4288 --- /dev/null +++ b/gui/setup.sh @@ -0,0 +1,9 @@ +apt install floorp +apt install snapd +apt install flatpak + +chmod +x ./gui/spotify.sh +./gui/spotify.sh + +chmod +x ./gui/bluemail.sh +./gui/bluemail.sh \ No newline at end of file diff --git a/gui/spotify.sh b/gui/spotify.sh new file mode 100755 index 00000000..87bde031 --- /dev/null +++ b/gui/spotify.sh @@ -0,0 +1,4 @@ +curl -sS https://download.spotify.com/debian/pubkey_6224F9941A8AA6D1.gpg | sudo gpg --dearmor --yes -o /etc/apt/trusted.gpg.d/spotify.gpg +echo "deb http://repository.spotify.com stable non-free" | sudo tee /etc/apt/sources.list.d/spotify.list + +sudo apt-get update && sudo apt-get install spotify-client \ No newline at end of file diff --git a/setup.sh b/setup.sh index d1468332..ba73cbd0 100755 --- a/setup.sh +++ b/setup.sh @@ -51,3 +51,11 @@ install_node_if_no_gui() { configure_terminal configure_apt_cacher install_node_if_no_gui + +if [ -z "$XDG_CURRENT_DESKTOP" ]; then + echo "No GUI detected, not installing graphical apps..." + else + echo "GUI detected, let's install some graphical apps!" + sudo chmod +x ./gui/setup.sh + ./gui/setup.sh + fi \ No newline at end of file