[macos] Update the dock from a config file

This commit is contained in:
2025-03-19 23:36:02 +00:00
parent 3db31bc2a6
commit 442043c7d9
2 changed files with 25 additions and 0 deletions

View File

@@ -0,0 +1,15 @@
# Updates the dock
function update-dock() {
idx=1
while read entry; do
app_name=$(echo "$entry" | cut -d $'\t' -f 1)
app_path=$(echo "$entry" | cut -d $'\t' -f 2)
app_type=$(echo "$entry" | cut -d $'\t' -f 3)
idx=$((idx+1))
dockutil --no-restart -a "$(urldecode "$app_path")" > /dev/null 2>&1
if [ "$app_type" = "persisentApps" ]; then
dockutil --move "$app_name" -p $idx
fi
done < ~/.dotfiles/macos/.config/dockConfig.txt
killall Dock
}