From 5ccd75af845391a8c63a9da226995f850024517c Mon Sep 17 00:00:00 2001 From: Anthony Rose Date: Mon, 23 Dec 2024 11:16:21 +0000 Subject: [PATCH] Only use one terminal --- roles/home-gui/files/gnome-setup.sh | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/roles/home-gui/files/gnome-setup.sh b/roles/home-gui/files/gnome-setup.sh index d5b4f6d..db3085e 100644 --- a/roles/home-gui/files/gnome-setup.sh +++ b/roles/home-gui/files/gnome-setup.sh @@ -13,7 +13,16 @@ set_favorites_bar () { then gsettings set org.gnome.shell favorite-apps "$(cat "${XDG_CONFIG_HOME:-$HOME/.config}/favorite-apps.conf")" else - gsettings set org.gnome.shell favorite-apps "['org.gnome.Terminal.desktop', 'org.gnome.Ptyxis.desktop', 'org.gnome.Nautilus.desktop', 'org.gnome.Epiphany.desktop']" + _acp_terminal=org.gnome.Terminal.desktop + for dir in $(tr ':' '\n' <<< "$XDG_DATA_HOME:$XDG_DATA_DIRS") + do + if test -r "$dir/applications/org.gnome.Ptyxis.desktop" + then + _acp_terminal=org.gnome.Ptyxis.desktop + fi + done + gsettings set org.gnome.shell favorite-apps "['$_acp_terminal', 'org.gnome.Nautilus.desktop', 'org.gnome.Epiphany.desktop']" + unset _acp_terminal fi } set_favorites_bar