update: add support for installing fastfetch via flatpak or package manager
Co-authored-by: Copilot <copilot@github.com>
This commit is contained in:
parent
46275bb3e2
commit
8b41b1d913
|
|
@ -22,6 +22,15 @@ _omz_run_install_steps() {
|
||||||
|
|
||||||
_omz_install_fd || failed=1
|
_omz_install_fd || failed=1
|
||||||
_omz_install_fzf || failed=1
|
_omz_install_fzf || failed=1
|
||||||
|
# fastfetch is a useful dependency (preview/status); try to install
|
||||||
|
if _omz_has_cmd fastfetch; then :; else
|
||||||
|
# prefer flatpak when available
|
||||||
|
if _omz_should_prefer_flatpak && _omz_has_cmd flatpak; then
|
||||||
|
_omz_install_with_flatpak fastfetch || _omz_install_with_pkg_manager fastfetch || true
|
||||||
|
else
|
||||||
|
_omz_install_with_pkg_manager fastfetch || true
|
||||||
|
fi
|
||||||
|
fi
|
||||||
_omz_install_lua || failed=1
|
_omz_install_lua || failed=1
|
||||||
_omz_install_conda || failed=1
|
_omz_install_conda || failed=1
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -74,6 +74,9 @@ _omz_get_flatpak_app_id() {
|
||||||
lua|lua5.4)
|
lua|lua5.4)
|
||||||
echo "${_OMZ_FLATPAK_APP_LUA:-org.lua.Lua}"
|
echo "${_OMZ_FLATPAK_APP_LUA:-org.lua.Lua}"
|
||||||
;;
|
;;
|
||||||
|
fastfetch)
|
||||||
|
echo "${_OMZ_FLATPAK_APP_FASTFETCH:-com.github.dylanaraps.fastfetch}"
|
||||||
|
;;
|
||||||
*)
|
*)
|
||||||
echo ""
|
echo ""
|
||||||
;;
|
;;
|
||||||
|
|
@ -84,6 +87,10 @@ _omz_install_with_flatpak() {
|
||||||
local pkg="$1"
|
local pkg="$1"
|
||||||
local app_id
|
local app_id
|
||||||
|
|
||||||
|
if ! _omz_has_cmd flatpak; then
|
||||||
|
# try to install flatpak runtime via package manager
|
||||||
|
_omz_install_with_pkg_manager "flatpak" || return 1
|
||||||
|
fi
|
||||||
_omz_has_cmd flatpak || return 1
|
_omz_has_cmd flatpak || return 1
|
||||||
app_id="$(_omz_get_flatpak_app_id "$pkg")"
|
app_id="$(_omz_get_flatpak_app_id "$pkg")"
|
||||||
[[ -n "$app_id" ]] || return 1
|
[[ -n "$app_id" ]] || return 1
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue