From 862bd746f3b49e4841edbab0738fe9aa664f3673 Mon Sep 17 00:00:00 2001 From: Anthony Perkins Date: Wed, 12 Oct 2022 13:58:43 +0100 Subject: [PATCH] Use kgx (Gnome Console) if gnome-terminal is not installed --- roles/home-gui/files/gnome-setup.sh | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/roles/home-gui/files/gnome-setup.sh b/roles/home-gui/files/gnome-setup.sh index 613fa97..67af462 100644 --- a/roles/home-gui/files/gnome-setup.sh +++ b/roles/home-gui/files/gnome-setup.sh @@ -7,7 +7,7 @@ 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.Nautilus.desktop', 'org.mozilla.firefox.desktop']" + gsettings set org.gnome.shell favorite-apps "['org.gnome.Terminal.desktop', 'org.gnome.Console.desktop', 'org.gnome.Nautilus.desktop', 'org.mozilla.firefox.desktop']" fi } set_favorites_bar @@ -22,10 +22,17 @@ set_keyboard_and_language () { gsettings set org.gnome.desktop.wm.keybindings switch-windows-backward "['Tab']" # Set custom keybindings. + if [ -x /usr/bin/kgx ] && ! [ -x /usr/bin/gnome-terminal ] + then + _acp_term=/usr/bin/kgx + else + _acp_term=/usr/bin/gnome-terminal + fi gsettings set org.gnome.settings-daemon.plugins.media-keys custom-keybindings "['/org/gnome/settings-daemon/plugins/media-keys/custom-keybindings/launch-terminal/']" - gsettings set org.gnome.settings-daemon.plugins.media-keys.custom-keybinding:/org/gnome/settings-daemon/plugins/media-keys/custom-keybindings/launch-terminal/ command '/usr/bin/gnome-terminal' + gsettings set org.gnome.settings-daemon.plugins.media-keys.custom-keybinding:/org/gnome/settings-daemon/plugins/media-keys/custom-keybindings/launch-terminal/ command "$_acp_term" gsettings set org.gnome.settings-daemon.plugins.media-keys.custom-keybinding:/org/gnome/settings-daemon/plugins/media-keys/custom-keybindings/launch-terminal/ name 'Launch Terminal' gsettings set org.gnome.settings-daemon.plugins.media-keys.custom-keybinding:/org/gnome/settings-daemon/plugins/media-keys/custom-keybindings/launch-terminal/ binding 't' + unset _acp_term } set_keyboard_and_language