mirror of
https://github.com/jimeh/dotfiles.git
synced 2026-02-19 13:46:41 +00:00
Update RoundedCorners spoon for Hammerspoon
This commit is contained in:
@@ -1,39 +1,148 @@
|
|||||||
[
|
[
|
||||||
{
|
{
|
||||||
"doc" : "Give your screens rounded corners",
|
"Command": [],
|
||||||
"items" : [
|
"Constant": [],
|
||||||
|
"Constructor": [],
|
||||||
|
"Deprecated": [],
|
||||||
|
"Field": [],
|
||||||
|
"Function": [],
|
||||||
|
"Method": [
|
||||||
{
|
{
|
||||||
"doc" : "Controls whether corners are drawn on all screens or just the primary screen. Defaults to true",
|
"def": "RoundedCorners:start()",
|
||||||
"type" : "Variable",
|
"desc": "Starts RoundedCorners",
|
||||||
"name" : "allScreens",
|
"doc": "Starts RoundedCorners\n\nParameters:\n * None\n\nReturns:\n * The RoundedCorners object\n\nNotes:\n * This will draw the rounded screen corners and start watching for changes in screen sizes/layouts, reacting accordingly",
|
||||||
"def" : "RoundedCorners.allScreens"
|
"name": "start",
|
||||||
|
"notes": [
|
||||||
|
" * This will draw the rounded screen corners and start watching for changes in screen sizes/layouts, reacting accordingly"
|
||||||
|
],
|
||||||
|
"parameters": [
|
||||||
|
" * None"
|
||||||
|
],
|
||||||
|
"returns": [
|
||||||
|
" * The RoundedCorners object"
|
||||||
|
],
|
||||||
|
"signature": "RoundedCorners:start()",
|
||||||
|
"stripped_doc": "",
|
||||||
|
"type": "Method"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"doc" : "Controls which level of the screens the corners are drawn at. See `hs.canvas.windowLevels` for more information. Defaults to `screenSaver + 1`",
|
"def": "RoundedCorners:stop()",
|
||||||
"type" : "Variable",
|
"desc": "Stops RoundedCorners",
|
||||||
"name" : "level",
|
"doc": "Stops RoundedCorners\n\nParameters:\n * None\n\nReturns:\n * The RoundedCorners object\n\nNotes:\n * This will remove all rounded screen corners and stop watching for changes in screen sizes/layouts",
|
||||||
"def" : "RoundedCorners.level"
|
"name": "stop",
|
||||||
},
|
"notes": [
|
||||||
{
|
" * This will remove all rounded screen corners and stop watching for changes in screen sizes/layouts"
|
||||||
"doc" : "Controls the radius of the rounded corners, in points. Defaults to 6",
|
],
|
||||||
"type" : "Variable",
|
"parameters": [
|
||||||
"name" : "radius",
|
" * None"
|
||||||
"def" : "RoundedCorners.radius"
|
],
|
||||||
},
|
"returns": [
|
||||||
{
|
" * The RoundedCorners object"
|
||||||
"doc" : "Starts RoundedCorners\n\nParameters:\n * None\n\nReturns:\n * The RoundedCorners object\n\nNotes:\n * This will draw the rounded screen corners and start watching for changes in screen sizes\/layouts, reacting accordingly",
|
],
|
||||||
"type" : "Method",
|
"signature": "RoundedCorners:stop()",
|
||||||
"name" : "start",
|
"stripped_doc": "",
|
||||||
"def" : "RoundedCorners:start()"
|
"type": "Method"
|
||||||
},
|
|
||||||
{
|
|
||||||
"doc" : "Stops RoundedCorners\n\nParameters:\n * None\n\nReturns:\n * The RoundedCorners object\n\nNotes:\n * This will remove all rounded screen corners and stop watching for changes in screen sizes\/layouts",
|
|
||||||
"type" : "Method",
|
|
||||||
"name" : "stop",
|
|
||||||
"def" : "RoundedCorners:stop()"
|
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"name" : "RoundedCorners",
|
"Variable": [
|
||||||
"desc" : "Give your screens rounded corners"
|
{
|
||||||
|
"def": "RoundedCorners.allScreens",
|
||||||
|
"desc": "Controls whether corners are drawn on all screens or just the primary screen. Defaults to true",
|
||||||
|
"doc": "Controls whether corners are drawn on all screens or just the primary screen. Defaults to true",
|
||||||
|
"name": "allScreens",
|
||||||
|
"signature": "RoundedCorners.allScreens",
|
||||||
|
"stripped_doc": "",
|
||||||
|
"type": "Variable"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"def": "RoundedCorners.level",
|
||||||
|
"desc": "Controls which level of the screens the corners are drawn at. See `hs.canvas.windowLevels` for more information. Defaults to `screenSaver + 1`",
|
||||||
|
"doc": "Controls which level of the screens the corners are drawn at. See `hs.canvas.windowLevels` for more information. Defaults to `screenSaver + 1`",
|
||||||
|
"name": "level",
|
||||||
|
"signature": "RoundedCorners.level",
|
||||||
|
"stripped_doc": "",
|
||||||
|
"type": "Variable"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"def": "RoundedCorners.radius",
|
||||||
|
"desc": "Controls the radius of the rounded corners, in points. Defaults to 6",
|
||||||
|
"doc": "Controls the radius of the rounded corners, in points. Defaults to 6",
|
||||||
|
"name": "radius",
|
||||||
|
"signature": "RoundedCorners.radius",
|
||||||
|
"stripped_doc": "",
|
||||||
|
"type": "Variable"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"desc": "Give your screens rounded corners",
|
||||||
|
"doc": "Give your screens rounded corners\n\nDownload: [https://github.com/Hammerspoon/Spoons/raw/master/Spoons/RoundedCorners.spoon.zip](https://github.com/Hammerspoon/Spoons/raw/master/Spoons/RoundedCorners.spoon.zip)",
|
||||||
|
"items": [
|
||||||
|
{
|
||||||
|
"def": "RoundedCorners.allScreens",
|
||||||
|
"desc": "Controls whether corners are drawn on all screens or just the primary screen. Defaults to true",
|
||||||
|
"doc": "Controls whether corners are drawn on all screens or just the primary screen. Defaults to true",
|
||||||
|
"name": "allScreens",
|
||||||
|
"signature": "RoundedCorners.allScreens",
|
||||||
|
"stripped_doc": "",
|
||||||
|
"type": "Variable"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"def": "RoundedCorners.level",
|
||||||
|
"desc": "Controls which level of the screens the corners are drawn at. See `hs.canvas.windowLevels` for more information. Defaults to `screenSaver + 1`",
|
||||||
|
"doc": "Controls which level of the screens the corners are drawn at. See `hs.canvas.windowLevels` for more information. Defaults to `screenSaver + 1`",
|
||||||
|
"name": "level",
|
||||||
|
"signature": "RoundedCorners.level",
|
||||||
|
"stripped_doc": "",
|
||||||
|
"type": "Variable"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"def": "RoundedCorners.radius",
|
||||||
|
"desc": "Controls the radius of the rounded corners, in points. Defaults to 6",
|
||||||
|
"doc": "Controls the radius of the rounded corners, in points. Defaults to 6",
|
||||||
|
"name": "radius",
|
||||||
|
"signature": "RoundedCorners.radius",
|
||||||
|
"stripped_doc": "",
|
||||||
|
"type": "Variable"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"def": "RoundedCorners:start()",
|
||||||
|
"desc": "Starts RoundedCorners",
|
||||||
|
"doc": "Starts RoundedCorners\n\nParameters:\n * None\n\nReturns:\n * The RoundedCorners object\n\nNotes:\n * This will draw the rounded screen corners and start watching for changes in screen sizes/layouts, reacting accordingly",
|
||||||
|
"name": "start",
|
||||||
|
"notes": [
|
||||||
|
" * This will draw the rounded screen corners and start watching for changes in screen sizes/layouts, reacting accordingly"
|
||||||
|
],
|
||||||
|
"parameters": [
|
||||||
|
" * None"
|
||||||
|
],
|
||||||
|
"returns": [
|
||||||
|
" * The RoundedCorners object"
|
||||||
|
],
|
||||||
|
"signature": "RoundedCorners:start()",
|
||||||
|
"stripped_doc": "",
|
||||||
|
"type": "Method"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"def": "RoundedCorners:stop()",
|
||||||
|
"desc": "Stops RoundedCorners",
|
||||||
|
"doc": "Stops RoundedCorners\n\nParameters:\n * None\n\nReturns:\n * The RoundedCorners object\n\nNotes:\n * This will remove all rounded screen corners and stop watching for changes in screen sizes/layouts",
|
||||||
|
"name": "stop",
|
||||||
|
"notes": [
|
||||||
|
" * This will remove all rounded screen corners and stop watching for changes in screen sizes/layouts"
|
||||||
|
],
|
||||||
|
"parameters": [
|
||||||
|
" * None"
|
||||||
|
],
|
||||||
|
"returns": [
|
||||||
|
" * The RoundedCorners object"
|
||||||
|
],
|
||||||
|
"signature": "RoundedCorners:stop()",
|
||||||
|
"stripped_doc": "",
|
||||||
|
"type": "Method"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"name": "RoundedCorners",
|
||||||
|
"stripped_doc": "\nDownload: [https://github.com/Hammerspoon/Spoons/raw/master/Spoons/RoundedCorners.spoon.zip](https://github.com/Hammerspoon/Spoons/raw/master/Spoons/RoundedCorners.spoon.zip)",
|
||||||
|
"submodules": [],
|
||||||
|
"type": "Module"
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
@@ -117,7 +117,7 @@ function obj:render()
|
|||||||
{ action="clip", type="circle", center=data.center, radius=radius, reversePath=true, },
|
{ action="clip", type="circle", center=data.center, radius=radius, reversePath=true, },
|
||||||
{ action="fill", type="rectangle", frame={x=0, y=0, w=radius, h=radius, }, fillColor={ alpha=1, }},
|
{ action="fill", type="rectangle", frame={x=0, y=0, w=radius, h=radius, }, fillColor={ alpha=1, }},
|
||||||
{ type="resetClip", }
|
{ type="resetClip", }
|
||||||
):behavior(hs.canvas.windowBehaviors.canJoinAllSpaces):show()
|
):behavior(hs.canvas.windowBehaviors.canJoinAllSpaces):level(self.level):show()
|
||||||
end
|
end
|
||||||
end)
|
end)
|
||||||
end
|
end
|
||||||
|
|||||||
Reference in New Issue
Block a user