
___x_cmd_mac_appearance(){
    [ $# -gt 0 ]    ||      set -- status

    local op="$1";  shift

    case "$op" in
        status|light|dark)
            ___x_cmd_mac_appearance_"$op" "$@"     ;;
        -h|--help)
            ___x_cmd help -m mac appearance "$@"   ;;
        *)
            N=mac M="Unsupported cmd -> $op" log:ret:64
    esac
}

___x_cmd_mac_appearance_status(){
    ___x_cmd_cmds defaults read -g AppleInterfaceStyle
}

___x_cmd_mac_appearance_light(){
    ___x_cmd_cmds osascript -e 'tell application "System Events" to tell appearance preferences to set dark mode to false'
}

___x_cmd_mac_appearance_dark(){
    ___x_cmd_cmds osascript -e 'tell application "System Events" to tell appearance preferences to set dark mode to true'
}
