Files
dotfiles/macos/.config/shell-common/dock.sh

16 lines
507 B
Bash

# 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 "$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
}