Skip to content

Instantly share code, notes, and snippets.

@lakshyabatman
Created March 10, 2021 12:33
Show Gist options
  • Save lakshyabatman/a6e7ca8bc0585f4e13ccc1c822ffee23 to your computer and use it in GitHub Desktop.
Save lakshyabatman/a6e7ca8bc0585f4e13ccc1c822ffee23 to your computer and use it in GitHub Desktop.
My Config for My touchbar :D
[
{ "type": "dock", "align": "left", "width": 150 },
{
"type": "appleScriptTitledButton",
"source": {
"inline": "if application \"Spotify\" is running then\rtell application \"Spotify\"\rif player state is playing then\rreturn (get artist of current track) & \" – \" & (get name of current track)\relse\rreturn \"\"\rend if\rend tell\rend if\rreturn \"\"\r"
},
"action": "appleScript",
"actionAppleScript": {
"inline": "if application \"Spotify\" is running then\rtell application \"Spotify\"\rif player state is playing then\rnext track\rend if\rend tell\rend if\r"
},
"refreshInterval": 1,
"image": {
"base64": "iVBORw0KGgoAAAANSUhEUgAAAEAAAABABAMAAABYR2ztAAAABGdBTUEAALGPC/xhBQAAAAFzUkdCAK7OHOkAAAAYUExURUdwTB3WXx3UXh3VXx7XYBkXFRpVLRyURmIaeAQAAAAEdFJOUwDDO3fSqUUkAAABbklEQVRIx61VbW6DMAztoAeYNA7ApB6gkzhAWS24wIAL0HABaK6/pHFNEhy8TXu/kPzkPD/8cTj8K7KPAqB+K5NhQPCUrABCXe7HOUYYZxgVRLiG8RfY4DUgFFtC7cffAfZTFBwBdhWEKfgEq4ocEjgj4ZQifO6/QG9kkETp1dDeVWfRKx3XYSW0LoqY5kCElXDrQkyeCCuh6WL0M4nIWQIyzqixdfKU1koFDKvyCA8NJMzU4xiD+b4kfHRpsIyKc6hBwjVptFHVY51EMAINNDFGJITKDNQcdpX74Hz0CQ3rY5qwMp4EIxrlafzrsYZ2Veb0DkRgfNCUok4Y1fqEijfyi2b8RE9beWqa48Y/uvCNMcH9btfUi+/CGLR1vhL6Zz9N/vBlaCU+7lwY/cmJ67Ryen/2tj23PLqJBodZH8vgj544vOL4pxfI5acrSFxi8hrkU9TSKr78ZpnL50A8KPJJEo+afBblwyqf5j/iGys5j6ScrST2AAAAAElFTkSuQmCC"
}
},
{
"type": "pomodoro",
"workTime": 2400, // set time work in seconds. Default 1500 (25 min)
"restTime": 600, // set time rest in seconds. Default 300 (5 min),
"align":"right"
},
{
"type":"volumeDown",
"align":"right",
},
{
"type":"volumeUp",
"align":"right",
},
{
"type":"brightnessDown",
"align":"right",
"bordered":false
},
{
"type":"brightnessUp",
"align":"right",
"bordered":false
},
{ "type": "previous", "width": 30, "bordered": false, "align": "right" },
{ "type": "play", "width": 30, "bordered": false, "align": "right" },
{ "type": "next", "width": 30, "bordered": false, "align": "right" },
{
"type": "battery",
"align": "right",
"bordered": false
},
{
"type": "timeButton",
"formatTemplate": "HH:mm",
"align": "right",
"bordered": false,
"longAction": "shellScript",
"longExecutablePath": "/usr/bin/pmset",
"longShellArguments": ["sleepnow"]
},
{
"type": "displaySleep",
"width": 60,
"bordered": false,
"align": "right",
"title": "",
"image": {
"base64": "iVBORw0KGgoAAAANSUhEUgAAAEAAAABACAYAAACqaXHeAAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAABvAAAAbwBaKhFnQAAABl0RVh0U29mdHdhcmUAd3d3Lmlua3NjYXBlLm9yZ5vuPBoAAAnDSURBVHic5Zt5bBz1Fcc/v83uOlkfa2/iYDsmkIQmTkMOSDhTcqhFaRBHqNoUSlV60BJSEFLTQik9BaVAUVsJaKBQVZAiCKQ0qKUEWgRtkVNITKBgEoztxMf6WHu9l3fXO7szv/6xPrLZnfXM7NpY6lcaaTS/+b35vTdv3vV7g5QSMwdQBbwNyBl2HAE8ZvmxYx7fA84pK6/A4XRamG4dmqqiqlrWdVVNEY9F1wB3ArvM0LQigM0Aa9ZdgKu01MJ064jH4wxHhrOuK0qC5ncOA2wyS9Nm5mYhhANY43A6p515gGQylfO601mC3eEAWCmEMKWWZjVgJTC7rKyCWDRmcqp1aFKSSiZJJpO697hKywgHAw5gFXDYKO28AhBCzAYuBcZe9yUAmqbR3dkxehOUl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Q9FI3t6zaT83ichwlNrwtYaKjQZXLaeOH2xZyxWqPLi29KNBsGexkWPoEwLgncMwSfHfLAraeXcUjr/dxrC/O8XeHgDTTl36yks3L3WxY6sY9J38l20ASNL0aYAYrFrh48LrFAITjKsMJlepyB45Zxptv9GyA1SAIpkEDcqFiziwqJnnbpyLPhnBBGmDaCEopA4C/e0jRjcunAnrP0mQ64gT8o2szBSteANKukN6QfvNysaGnAb6wdRcIBQgApnenaCoMIFgXwLTvFRqIAUwbQChQA6Zzp0h3LzBoLQcYw/+9Bhhqk8uaJESZgF6n3Va6qcEtJsmJDGG2w8aOTTXUVabLYk+/OcDbHenmTokk198yUkJjWxhF1YalpFZKmf1D0WQw+5vZSW0zNwEJitjW8tBPd0rfoWek79Azsqa6ytAcIUgAN1nlw5IGjEEIsQPY/aXtV3HD9ddapgPgcs1hxfKJwmkgGKK17QSxaBQps/X/iaefZ9/+lyDN/CNWn2slEjwZRwEUJcl5a1cXSCoTVZVu1p27mkgod0fo40/uzViDVVg1gmP4CKCtfWo6SKWmodsReqI7Yw1WUagAeoFY6xS10KpSZxOQ8ZbY2OgaLKMgAYw2IrZEIsOcmOjRLRqkzi5oR1cPkeEoQIuhZsg8KFQDAB4E2HXH3XR2Ffd3uVzdoN7efn5yz3jH+oOFPqMgLwAghLAB7wJnF7oYk89tllKukrlchBk6xfgxavQ3u+3Al4EzCyaYH53AHuBZM5ugevgf4uMh5Jj7v8QAAAAASUVORK5CYII="
}
}
]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment