Browse Source

ghostty etc link

main
pvincent 2 weeks ago
parent
commit
50188ed1ca
  1. 19
      lib/initiate.bash

19
lib/initiate.bash

@ -149,24 +149,15 @@ function build_associative_user_homes {
}
function ghostty_global_config {
! command -v ghostty >/dev/null && return
# 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
! command -v ghostty >/dev/null && return # ghostty not yet installed!
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

Loading…
Cancel
Save