Make loading starship in bashrc based on condition - remove starship from depends
This commit is contained in:
parent
ab24a7a36f
commit
b23d714db9
2 changed files with 16 additions and 15 deletions
5
PKGBUILD
5
PKGBUILD
|
@ -2,8 +2,8 @@
|
||||||
# Maintainer: Librewish <librewish@gmail.com>
|
# Maintainer: Librewish <librewish@gmail.com>
|
||||||
|
|
||||||
pkgname=garuda-common-settings
|
pkgname=garuda-common-settings
|
||||||
pkgver=2.0.0
|
pkgver=2.0.1
|
||||||
pkgrel=2
|
pkgrel=1
|
||||||
arch=('any')
|
arch=('any')
|
||||||
url="https://gitlab.com/garuda-linux/themes-and-settings/settings/$pkgname"
|
url="https://gitlab.com/garuda-linux/themes-and-settings/settings/$pkgname"
|
||||||
license=('GPL')
|
license=('GPL')
|
||||||
|
@ -14,7 +14,6 @@ depends=('btrfsmaintenance'
|
||||||
'garuda-browser-settings'
|
'garuda-browser-settings'
|
||||||
'garuda-hooks'
|
'garuda-hooks'
|
||||||
'garuda-icons'
|
'garuda-icons'
|
||||||
'garuda-starship-prompt'
|
|
||||||
'haveged'
|
'haveged'
|
||||||
'memavaild'
|
'memavaild'
|
||||||
'nohang'
|
'nohang'
|
||||||
|
|
|
@ -1,8 +1,9 @@
|
||||||
# If not running interactively, don't do anything
|
# If not running interactively, don't do anything
|
||||||
[[ $- != *i* ]] && return
|
[[ $- != *i* ]] && return
|
||||||
|
|
||||||
# Load starship prompt
|
# Load starship prompt if starship is installed
|
||||||
__main() {
|
if [ -x /usr/bin/starship ]; then
|
||||||
|
__main() {
|
||||||
local major="${BASH_VERSINFO[0]}"
|
local major="${BASH_VERSINFO[0]}"
|
||||||
local minor="${BASH_VERSINFO[1]}"
|
local minor="${BASH_VERSINFO[1]}"
|
||||||
|
|
||||||
|
@ -11,9 +12,10 @@ __main() {
|
||||||
else
|
else
|
||||||
source /dev/stdin <<<"$("/usr/bin/starship" init bash --print-full-init)"
|
source /dev/stdin <<<"$("/usr/bin/starship" init bash --print-full-init)"
|
||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
__main
|
__main
|
||||||
unset -f __main
|
unset -f __main
|
||||||
|
fi
|
||||||
|
|
||||||
# Aliases
|
# Aliases
|
||||||
alias dir='dir --color=auto'
|
alias dir='dir --color=auto'
|
||||||
|
|
Loading…
Reference in a new issue