{
  "version": 2,
  "name": "Finder",
  "description": "Hidden files, paths of selected files, and quick restarts for Finder, the Dock and the menu bar.",
  "categories": [
    {
      "id": "finder",
      "name": "Finder",
      "sortOrder": 0,
      "iconSymbolName": "folder",
      "showAtTopLevel": false,
      "items": [
        {
          "id": "finder-toggle-hidden",
          "title": "Toggle Hidden Files",
          "isEnabled": true,
          "command": {
            "type": "Shell Command",
            "value": "current=$(defaults read com.apple.finder AppleShowAllFiles 2>/dev/null || echo NO); if [ \"$current\" = \"YES\" ] || [ \"$current\" = \"1\" ] || [ \"$current\" = \"true\" ]; then defaults write com.apple.finder AppleShowAllFiles NO; else defaults write com.apple.finder AppleShowAllFiles YES; fi; killall Finder",
            "runInBackground": true,
            "showNotification": false,
            "copyToClipboard": false,
            "openInTerminal": false
          },
          "confirmBeforeRunning": false,
          "isSeparator": false,
          "iconSymbolName": "eye"
        },
        {
          "id": "finder-copy-selection-path",
          "title": "Copy Path of Selected File",
          "isEnabled": true,
          "command": {
            "type": "AppleScript",
            "value": "tell application \"Finder\"\n\tset sel to selection\n\tif sel is {} then return \"Nothing selected in Finder\"\n\treturn POSIX path of (item 1 of sel as alias)\nend tell",
            "runInBackground": true,
            "showNotification": true,
            "copyToClipboard": true,
            "openInTerminal": false
          },
          "confirmBeforeRunning": false,
          "isSeparator": false,
          "iconSymbolName": "doc.on.clipboard"
        },
        {
          "id": "finder-open-terminal-here",
          "title": "Open Selected Folder in Terminal",
          "isEnabled": true,
          "command": {
            "type": "AppleScript",
            "value": "tell application \"Finder\"\n\tset sel to selection\n\tif sel is {} then\n\t\tset target to (POSIX path of (desktop as alias))\n\telse\n\t\tset target to POSIX path of (item 1 of sel as alias)\n\tend if\nend tell\ndo shell script \"open -a Terminal \" & quoted form of target",
            "runInBackground": true,
            "showNotification": false,
            "copyToClipboard": false,
            "openInTerminal": false
          },
          "confirmBeforeRunning": false,
          "isSeparator": false,
          "iconSymbolName": "terminal"
        },
        {
          "id": "finder-sep-1",
          "title": "",
          "isEnabled": true,
          "isSeparator": true,
          "command": {
            "type": "Shell Command",
            "value": "",
            "runInBackground": true,
            "showNotification": false,
            "copyToClipboard": false,
            "openInTerminal": false
          },
          "confirmBeforeRunning": false
        },
        {
          "id": "finder-restart",
          "title": "Restart Finder",
          "isEnabled": true,
          "command": {
            "type": "Shell Command",
            "value": "killall -KILL Finder",
            "runInBackground": true,
            "showNotification": false,
            "copyToClipboard": false,
            "openInTerminal": false
          },
          "confirmBeforeRunning": false,
          "isSeparator": false,
          "iconSymbolName": "arrow.clockwise"
        },
        {
          "id": "finder-restart-dock",
          "title": "Restart Dock",
          "isEnabled": true,
          "command": {
            "type": "Shell Command",
            "value": "killall -KILL Dock",
            "runInBackground": true,
            "showNotification": false,
            "copyToClipboard": false,
            "openInTerminal": false
          },
          "confirmBeforeRunning": false,
          "isSeparator": false,
          "iconSymbolName": "dock.rectangle"
        },
        {
          "id": "finder-restart-menubar",
          "title": "Restart Menu Bar",
          "isEnabled": true,
          "command": {
            "type": "Shell Command",
            "value": "killall -KILL SystemUIServer",
            "runInBackground": true,
            "showNotification": false,
            "copyToClipboard": false,
            "openInTerminal": false
          },
          "confirmBeforeRunning": false,
          "isSeparator": false,
          "iconSymbolName": "menubar.rectangle"
        }
      ]
    }
  ]
}
