ghostty etc link

This commit is contained in:
pvincent
2026-08-20 12:33:29 +04:00
parent 27677f8531
commit 50188ed1ca
+4 -13
View File
@@ -149,24 +149,15 @@ function build_associative_user_homes {
}
function ghostty_global_config {
! command -v ghostty >/dev/null && return
! command -v ghostty >/dev/null && return # ghostty not yet installed!
# ghostty exists
[[ ! -d /etc/ghostty ]] && mkdir -p /etc/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
sudo mkdir -p /etc/ghostty
link_etc config ghostty
if [[ ! -f /etc/skell/.config/ghostty/config ]]; then
# ghostty config skeleton for new users
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
# change ghostty configuration for any normal user