{
    "tailapp": 2,
    "manifest": {
        "format": 2,
        "app_id": "wallpaper",
        "name": "Wallpaper",
        "version": 1,
        "schema": "tailapps/v0",
        "exported_at": 1795564634,
        "from": "gallery",
        "connections": [],
        "files": {
            "app.json": "cf1f6ca6938fc6aa0d890624aad9dec40a4f01dea4cec48ec76de9f346871654"
        },
        "signature": "vKnjMSseetnBnRht0BRupZuKcdB2OhEThHyYr7n4VSWHWI1JxHtWqshAtELtkyt7Fmaz6DKRzKiEvppGs0GVCg==",
        "key_id": "gallery-1"
    },
    "app": {
        "schema": "tailapps/v0",
        "app": "wallpaper",
        "name": "Wallpaper",
        "description": "Drop a picture to make it your desktop picture, on all screens or the main one, and switch back from a gallery. With Sync to My Devices on, pick or take a photo on your iPhone to set it.",
        "icon": "photo.on.rectangle",
        "permissions": [
            "wallpaper.control",
            "files.write:folder",
            "inbox:pictures",
            "inbox:choose",
            "send:pictures",
            "send:choose",
            "camera",
            "inbox:photo",
            "send:photo"
        ],
        "settings": {
            "folder": {
                "type": "folder",
                "label": "Keep pictures in",
                "default": "~/Pictures/Wallpapers",
                "create": true,
                "required": true,
                "platforms": [
                    "macos"
                ]
            },
            "phone": {
                "type": "toggle",
                "label": "Show my pictures on my iPhone",
                "default": false,
                "platforms": [
                    "macos"
                ]
            }
        },
        "state": {
            "pictures": {
                "type": "list",
                "default": [],
                "sync": false
            },
            "phone_pictures": {
                "type": "list",
                "default": [],
                "sync": false
            },
            "screen": {
                "type": "text",
                "default": "all",
                "sync": false
            },
            "fit": {
                "type": "text",
                "default": "fill",
                "sync": false
            }
        },
        "sources": {
            "from_mac": {
                "inbox": "pictures",
                "on_receive": "received_picture",
                "platforms": [
                    "ios"
                ]
            },
            "choose": {
                "inbox": "choose",
                "on_receive": "chosen_on_phone",
                "platforms": [
                    "macos"
                ]
            },
            "photo": {
                "inbox": "photo",
                "on_receive": "photo_from_phone",
                "platforms": [
                    "macos"
                ]
            }
        },
        "cards": [
            {
                "id": "main",
                "layout": {
                    "column": [
                        {
                            "drop": "Drop a picture to use it",
                            "on": "add",
                            "accept": [
                                ".jpg",
                                ".jpeg",
                                ".png",
                                ".heic",
                                ".heif",
                                ".tif",
                                ".tiff",
                                ".gif",
                                ".webp",
                                ".bmp"
                            ],
                            "hint": "JPG, PNG, HEIC\u2026 it's kept in your Wallpapers folder",
                            "platforms": [
                                "macos"
                            ]
                        },
                        {
                            "column": [
                                {
                                    "cell": "Screens",
                                    "leading": "display.2",
                                    "trailing": {
                                        "field": "Screens",
                                        "type": "segmented",
                                        "bind": "$screen",
                                        "options": [
                                            {
                                                "label": "All",
                                                "value": "all"
                                            },
                                            {
                                                "label": "Main",
                                                "value": "main"
                                            }
                                        ]
                                    }
                                },
                                {
                                    "cell": "Fit",
                                    "leading": "arrow.up.left.and.arrow.down.right",
                                    "trailing": {
                                        "field": "Fit",
                                        "type": "select",
                                        "bind": "$fit",
                                        "options": [
                                            {
                                                "label": "Fill",
                                                "value": "fill"
                                            },
                                            {
                                                "label": "Fit",
                                                "value": "fit"
                                            },
                                            {
                                                "label": "Stretch",
                                                "value": "stretch"
                                            },
                                            {
                                                "label": "Centre",
                                                "value": "center"
                                            }
                                        ]
                                    }
                                }
                            ],
                            "style": "inset",
                            "platforms": [
                                "macos"
                            ]
                        },
                        {
                            "gallery": "$pictures",
                            "thumb": "$item.path",
                            "limit": 24,
                            "height": "m",
                            "on_select": "use",
                            "when": "$pictures",
                            "platforms": [
                                "macos"
                            ]
                        },
                        {
                            "text": "Click a picture to use it again. \u22ef \u203a Undo puts the last one back.",
                            "size": "s",
                            "emphasis": "subtle",
                            "when": "$pictures",
                            "platforms": [
                                "macos"
                            ]
                        },
                        {
                            "row": [
                                {
                                    "button": "Choose Photo",
                                    "on": "send_library_photo",
                                    "style": "primary",
                                    "icon": "photo.on.rectangle",
                                    "grow": true,
                                    "disabled": "$running.send_library_photo"
                                },
                                {
                                    "button": "Take Photo",
                                    "on": "send_camera_photo",
                                    "style": "secondary",
                                    "icon": "camera",
                                    "grow": true,
                                    "disabled": "$running.send_camera_photo"
                                }
                            ],
                            "platforms": [
                                "ios"
                            ]
                        },
                        {
                            "gallery": "$phone_pictures",
                            "thumb": "$item.file",
                            "limit": 24,
                            "height": "m",
                            "on_select": "choose_on_phone",
                            "when": "$phone_pictures",
                            "platforms": [
                                "ios"
                            ]
                        },
                        {
                            "text": "Tap a picture to make it your Mac's desktop picture.",
                            "size": "s",
                            "emphasis": "subtle",
                            "when": "$phone_pictures",
                            "platforms": [
                                "ios"
                            ]
                        },
                        {
                            "text": "Choose or take a photo to make it your Mac's desktop picture. Pictures you add on the Mac show here too, with Show my pictures on my iPhone turned on there.",
                            "size": "s",
                            "emphasis": "subtle",
                            "when": "$phone_pictures | count | map:{0:true, else:false}",
                            "platforms": [
                                "ios"
                            ]
                        }
                    ],
                    "gap": "m"
                }
            }
        ],
        "actions": {
            "add": {
                "steps": [
                    {
                        "wallpaper.set": {
                            "image": "$args.files.0.path",
                            "screen": "$screen",
                            "fit": "$fit"
                        }
                    },
                    {
                        "files.save": {
                            "data": "$args.files.0.path",
                            "to": "$settings.folder",
                            "name": "$args.files.0.name"
                        },
                        "as": "saved"
                    },
                    {
                        "push": {
                            "pictures": {
                                "path": "$saved",
                                "name": "$args.files.0.name",
                                "at": "$now"
                            }
                        },
                        "max": 24
                    },
                    {
                        "if": "$settings.phone",
                        "then": [
                            {
                                "send": {
                                    "pictures": {
                                        "path": "$saved",
                                        "name": "$args.files.0.name"
                                    }
                                },
                                "file": "$saved"
                            }
                        ]
                    }
                ]
            },
            "use": {
                "steps": [
                    {
                        "wallpaper.set": {
                            "image": "$args.item.path",
                            "screen": "$screen",
                            "fit": "$fit"
                        }
                    }
                ]
            },
            "received_picture": {
                "steps": [
                    {
                        "if": "$args.file",
                        "then": [
                            {
                                "push": {
                                    "phone_pictures": {
                                        "file": "$args.file",
                                        "path": "$args.event.path",
                                        "name": "$args.event.name",
                                        "mac": "$args.from_id"
                                    }
                                },
                                "max": 24
                            }
                        ]
                    }
                ]
            },
            "choose_on_phone": {
                "steps": [
                    {
                        "send": {
                            "choose": {
                                "path": "$args.item.path"
                            }
                        },
                        "to": "$args.item.mac"
                    }
                ]
            },
            "send_library_photo": {
                "runs_on": [
                    "ios"
                ],
                "steps": [
                    {
                        "photos.pick": {
                            "max_px": 4096
                        },
                        "as": "p"
                    },
                    {
                        "send": {
                            "photo": {
                                "name": "$p.name"
                            }
                        },
                        "file": "$p.path"
                    }
                ]
            },
            "send_camera_photo": {
                "runs_on": [
                    "ios"
                ],
                "steps": [
                    {
                        "camera.take": {
                            "max_px": 4096
                        },
                        "as": "p"
                    },
                    {
                        "send": {
                            "photo": {
                                "name": "$p.name"
                            }
                        },
                        "file": "$p.path"
                    }
                ]
            },
            "photo_from_phone": {
                "runs_on": [
                    "macos"
                ],
                "steps": [
                    {
                        "if": "$args.file",
                        "then": [
                            {
                                "wallpaper.set": {
                                    "image": "$args.file",
                                    "screen": "$screen",
                                    "fit": "$fit"
                                }
                            },
                            {
                                "files.save": {
                                    "data": "$args.file",
                                    "to": "$settings.folder",
                                    "name": "$args.event.name"
                                },
                                "as": "saved"
                            },
                            {
                                "push": {
                                    "pictures": {
                                        "path": "$saved",
                                        "name": "$args.event.name",
                                        "at": "$now"
                                    }
                                },
                                "max": 24
                            },
                            {
                                "if": "$settings.phone",
                                "then": [
                                    {
                                        "send": {
                                            "pictures": {
                                                "path": "$saved",
                                                "name": "$args.event.name"
                                            }
                                        },
                                        "file": "$saved"
                                    }
                                ]
                            }
                        ]
                    }
                ]
            },
            "chosen_on_phone": {
                "runs_on": [
                    "macos"
                ],
                "steps": [
                    {
                        "wallpaper.set": {
                            "image": "$args.event.path",
                            "screen": "$screen",
                            "fit": "$fit"
                        }
                    }
                ]
            }
        },
        "views": {
            "menubar": {
                "icon": "photo.on.rectangle",
                "card": "main"
            },
            "floating": {
                "card": "main",
                "width": "default"
            }
        }
    },
    "app_json": "{\n  \"schema\": \"tailapps/v0\",\n  \"app\": \"wallpaper\",\n  \"name\": \"Wallpaper\",\n  \"description\": \"Drop a picture to make it your desktop picture, on all screens or the main one, and switch back from a gallery. With Sync to My Devices on, pick or take a photo on your iPhone to set it.\",\n  \"icon\": \"photo.on.rectangle\",\n  \"permissions\": [\n    \"wallpaper.control\",\n    \"files.write:folder\",\n    \"inbox:pictures\",\n    \"inbox:choose\",\n    \"send:pictures\",\n    \"send:choose\",\n    \"camera\",\n    \"inbox:photo\",\n    \"send:photo\"\n  ],\n  \"settings\": {\n    \"folder\": {\n      \"type\": \"folder\",\n      \"label\": \"Keep pictures in\",\n      \"default\": \"~/Pictures/Wallpapers\",\n      \"create\": true,\n      \"required\": true,\n      \"platforms\": [\"macos\"]\n    },\n    \"phone\": {\n      \"type\": \"toggle\",\n      \"label\": \"Show my pictures on my iPhone\",\n      \"default\": false,\n      \"platforms\": [\"macos\"]\n    }\n  },\n  \"state\": {\n    \"pictures\": { \"type\": \"list\", \"default\": [], \"sync\": false },\n    \"phone_pictures\": { \"type\": \"list\", \"default\": [], \"sync\": false },\n    \"screen\": { \"type\": \"text\", \"default\": \"all\", \"sync\": false },\n    \"fit\": { \"type\": \"text\", \"default\": \"fill\", \"sync\": false }\n  },\n  \"sources\": {\n    \"from_mac\": { \"inbox\": \"pictures\", \"on_receive\": \"received_picture\", \"platforms\": [\"ios\"] },\n    \"choose\": { \"inbox\": \"choose\", \"on_receive\": \"chosen_on_phone\", \"platforms\": [\"macos\"] },\n    \"photo\": { \"inbox\": \"photo\", \"on_receive\": \"photo_from_phone\", \"platforms\": [\"macos\"] }\n  },\n  \"cards\": [\n    {\n      \"id\": \"main\",\n      \"layout\": {\n        \"column\": [\n          {\n            \"drop\": \"Drop a picture to use it\",\n            \"on\": \"add\",\n            \"accept\": [\".jpg\", \".jpeg\", \".png\", \".heic\", \".heif\", \".tif\", \".tiff\", \".gif\", \".webp\", \".bmp\"],\n            \"hint\": \"JPG, PNG, HEIC\u2026 it's kept in your Wallpapers folder\",\n            \"platforms\": [\"macos\"]\n          },\n          {\n            \"column\": [\n              {\n                \"cell\": \"Screens\",\n                \"leading\": \"display.2\",\n                \"trailing\": {\n                  \"field\": \"Screens\",\n                  \"type\": \"segmented\",\n                  \"bind\": \"$screen\",\n                  \"options\": [\n                    { \"label\": \"All\", \"value\": \"all\" },\n                    { \"label\": \"Main\", \"value\": \"main\" }\n                  ]\n                }\n              },\n              {\n                \"cell\": \"Fit\",\n                \"leading\": \"arrow.up.left.and.arrow.down.right\",\n                \"trailing\": {\n                  \"field\": \"Fit\",\n                  \"type\": \"select\",\n                  \"bind\": \"$fit\",\n                  \"options\": [\n                    { \"label\": \"Fill\", \"value\": \"fill\" },\n                    { \"label\": \"Fit\", \"value\": \"fit\" },\n                    { \"label\": \"Stretch\", \"value\": \"stretch\" },\n                    { \"label\": \"Centre\", \"value\": \"center\" }\n                  ]\n                }\n              }\n            ],\n            \"style\": \"inset\",\n            \"platforms\": [\"macos\"]\n          },\n          {\n            \"gallery\": \"$pictures\",\n            \"thumb\": \"$item.path\",\n            \"limit\": 24,\n            \"height\": \"m\",\n            \"on_select\": \"use\",\n            \"when\": \"$pictures\",\n            \"platforms\": [\"macos\"]\n          },\n          {\n            \"text\": \"Click a picture to use it again. \u22ef \u203a Undo puts the last one back.\",\n            \"size\": \"s\",\n            \"emphasis\": \"subtle\",\n            \"when\": \"$pictures\",\n            \"platforms\": [\"macos\"]\n          },\n          {\n            \"row\": [\n              { \"button\": \"Choose Photo\", \"on\": \"send_library_photo\", \"style\": \"primary\", \"icon\": \"photo.on.rectangle\", \"grow\": true, \"disabled\": \"$running.send_library_photo\" },\n              { \"button\": \"Take Photo\", \"on\": \"send_camera_photo\", \"style\": \"secondary\", \"icon\": \"camera\", \"grow\": true, \"disabled\": \"$running.send_camera_photo\" }\n            ],\n            \"platforms\": [\"ios\"]\n          },\n          {\n            \"gallery\": \"$phone_pictures\",\n            \"thumb\": \"$item.file\",\n            \"limit\": 24,\n            \"height\": \"m\",\n            \"on_select\": \"choose_on_phone\",\n            \"when\": \"$phone_pictures\",\n            \"platforms\": [\"ios\"]\n          },\n          {\n            \"text\": \"Tap a picture to make it your Mac's desktop picture.\",\n            \"size\": \"s\",\n            \"emphasis\": \"subtle\",\n            \"when\": \"$phone_pictures\",\n            \"platforms\": [\"ios\"]\n          },\n          {\n            \"text\": \"Choose or take a photo to make it your Mac's desktop picture. Pictures you add on the Mac show here too, with Show my pictures on my iPhone turned on there.\",\n            \"size\": \"s\",\n            \"emphasis\": \"subtle\",\n            \"when\": \"$phone_pictures | count | map:{0:true, else:false}\",\n            \"platforms\": [\"ios\"]\n          }\n        ],\n        \"gap\": \"m\"\n      }\n    }\n  ],\n  \"actions\": {\n    \"add\": {\n      \"steps\": [\n        { \"wallpaper.set\": { \"image\": \"$args.files.0.path\", \"screen\": \"$screen\", \"fit\": \"$fit\" } },\n        {\n          \"files.save\": { \"data\": \"$args.files.0.path\", \"to\": \"$settings.folder\", \"name\": \"$args.files.0.name\" },\n          \"as\": \"saved\"\n        },\n        { \"push\": { \"pictures\": { \"path\": \"$saved\", \"name\": \"$args.files.0.name\", \"at\": \"$now\" } }, \"max\": 24 },\n        {\n          \"if\": \"$settings.phone\",\n          \"then\": [\n            { \"send\": { \"pictures\": { \"path\": \"$saved\", \"name\": \"$args.files.0.name\" } }, \"file\": \"$saved\" }\n          ]\n        }\n      ]\n    },\n    \"use\": {\n      \"steps\": [\n        { \"wallpaper.set\": { \"image\": \"$args.item.path\", \"screen\": \"$screen\", \"fit\": \"$fit\" } }\n      ]\n    },\n    \"received_picture\": {\n      \"steps\": [\n        {\n          \"if\": \"$args.file\",\n          \"then\": [\n            { \"push\": { \"phone_pictures\": { \"file\": \"$args.file\", \"path\": \"$args.event.path\", \"name\": \"$args.event.name\", \"mac\": \"$args.from_id\" } }, \"max\": 24 }\n          ]\n        }\n      ]\n    },\n    \"choose_on_phone\": {\n      \"steps\": [\n        { \"send\": { \"choose\": { \"path\": \"$args.item.path\" } }, \"to\": \"$args.item.mac\" }\n      ]\n    },\n    \"send_library_photo\": {\n      \"runs_on\": [\"ios\"],\n      \"steps\": [\n        { \"photos.pick\": { \"max_px\": 4096 }, \"as\": \"p\" },\n        { \"send\": { \"photo\": { \"name\": \"$p.name\" } }, \"file\": \"$p.path\" }\n      ]\n    },\n    \"send_camera_photo\": {\n      \"runs_on\": [\"ios\"],\n      \"steps\": [\n        { \"camera.take\": { \"max_px\": 4096 }, \"as\": \"p\" },\n        { \"send\": { \"photo\": { \"name\": \"$p.name\" } }, \"file\": \"$p.path\" }\n      ]\n    },\n    \"photo_from_phone\": {\n      \"runs_on\": [\"macos\"],\n      \"steps\": [\n        {\n          \"if\": \"$args.file\",\n          \"then\": [\n            { \"wallpaper.set\": { \"image\": \"$args.file\", \"screen\": \"$screen\", \"fit\": \"$fit\" } },\n            { \"files.save\": { \"data\": \"$args.file\", \"to\": \"$settings.folder\", \"name\": \"$args.event.name\" }, \"as\": \"saved\" },\n            { \"push\": { \"pictures\": { \"path\": \"$saved\", \"name\": \"$args.event.name\", \"at\": \"$now\" } }, \"max\": 24 },\n            {\n              \"if\": \"$settings.phone\",\n              \"then\": [\n                { \"send\": { \"pictures\": { \"path\": \"$saved\", \"name\": \"$args.event.name\" } }, \"file\": \"$saved\" }\n              ]\n            }\n          ]\n        }\n      ]\n    },\n    \"chosen_on_phone\": {\n      \"runs_on\": [\"macos\"],\n      \"steps\": [\n        { \"wallpaper.set\": { \"image\": \"$args.event.path\", \"screen\": \"$screen\", \"fit\": \"$fit\" } }\n      ]\n    }\n  },\n  \"views\": {\n    \"menubar\": { \"icon\": \"photo.on.rectangle\", \"card\": \"main\" },\n    \"floating\": { \"card\": \"main\", \"width\": \"default\" }\n  }\n}\n",
    "files": []
}