mirror of
https://github.com/nikdoof/dotfiles.git
synced 2025-12-13 17:52:26 +00:00
16 lines
507 B
Bash
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
|
|
}
|