ghostty etc link
This commit is contained in:
+4
-13
@@ -149,24 +149,15 @@ function build_associative_user_homes {
|
|||||||
}
|
}
|
||||||
|
|
||||||
function ghostty_global_config {
|
function ghostty_global_config {
|
||||||
! command -v ghostty >/dev/null && return
|
! command -v ghostty >/dev/null && return # ghostty not yet installed!
|
||||||
|
|
||||||
# ghostty exists
|
sudo mkdir -p /etc/ghostty
|
||||||
[[ ! -d /etc/ghostty ]] && mkdir -p /etc/ghostty
|
link_etc config ghostty
|
||||||
local global_config=/etc/ghostty/config
|
|
||||||
local asset_config="$MIAOU_BASH_DIR"/assets/ghostty/config
|
|
||||||
if [[ ! -f "$global_config" ]]; then
|
|
||||||
cp "$asset_config" "$global_config"
|
|
||||||
echo 'ghostty global config created'
|
|
||||||
elif ! cmp -s "$asset_config" "$global_config"; then
|
|
||||||
cp "$asset_config" "$global_config"
|
|
||||||
echo 'ghostty global config replaced'
|
|
||||||
fi
|
|
||||||
|
|
||||||
if [[ ! -f /etc/skell/.config/ghostty/config ]]; then
|
if [[ ! -f /etc/skell/.config/ghostty/config ]]; then
|
||||||
# ghostty config skeleton for new users
|
# ghostty config skeleton for new users
|
||||||
mkdir -p /etc/skel/.config/ghostty
|
mkdir -p /etc/skel/.config/ghostty
|
||||||
echo "config-file = $global_config" >/etc/skel/.config/ghostty/config
|
echo 'config-file = /etc/ghostty/config' >/etc/skel/.config/ghostty/config
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# change ghostty configuration for any normal user
|
# change ghostty configuration for any normal user
|
||||||
|
|||||||
Reference in New Issue
Block a user