mirror of
https://github.com/nikdoof/dotfiles.git
synced 2025-12-13 17:52:26 +00:00
[macos] Update the dock from a config file
This commit is contained in:
15
macos/.config/shell-common/dock.sh
Normal file
15
macos/.config/shell-common/dock.sh
Normal 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
|
||||
}
|
||||
Reference in New Issue
Block a user