

___x_cmd_mac_dock_magnification(){
    [ $# -gt 0 ]   || set -- status
    local op="$1"; shift
    case "$op" in
        -h|--help)  ___x_cmd help -m mac dock  magnification    ;;
        enable|disable|status)
                    ___x_cmd_mac_dock_magnification_"$op"      "$@"    ;;
        *)          N=mac M="Please specify whether to enable or disable" log:ret:64            ;;
    esac

}

___x_cmd_mac_dock_magnification_enable(){
    local size="${1:-61}";
    ___x_cmd_mac___cmd defaults write com.apple.dock magnification -bool true
    # Notice: the settings is not expected --> The size is set, however, the magnification effect is the maximum.
    ___x_cmd_mac___cmd defaults write com.apple.dock largesize -int "$size"
    ___x_cmd_mac_dock_restart
}

___x_cmd_mac_dock_magnification_disable(){
    ___x_cmd_mac___cmd defaults write com.apple.dock magnification -bool false
    ___x_cmd_mac_dock_restart
}

___x_cmd_mac_dock_magnification_status(){
    printf "%s\t"  magnification;   ___x_cmd_mac___cmd defaults read com.apple.dock magnification
    printf "%s:\t" tilesize;        ___x_cmd_mac___cmd defaults read com.apple.dock tilesize
    printf "%s:\t" largesize;       ___x_cmd_mac___cmd defaults read com.apple.dock largesize
}

