mirror of
https://github.com/jimeh/dotfiles.git
synced 2026-02-19 11:06:41 +00:00
Update RoundedCorners spoon for Hammerspoon
This commit is contained in:
@@ -1,39 +1,148 @@
|
||||
[
|
||||
{
|
||||
"doc" : "Give your screens rounded corners",
|
||||
"items" : [
|
||||
"Command": [],
|
||||
"Constant": [],
|
||||
"Constructor": [],
|
||||
"Deprecated": [],
|
||||
"Field": [],
|
||||
"Function": [],
|
||||
"Method": [
|
||||
{
|
||||
"doc" : "Controls whether corners are drawn on all screens or just the primary screen. Defaults to true",
|
||||
"type" : "Variable",
|
||||
"name" : "allScreens",
|
||||
"def" : "RoundedCorners.allScreens"
|
||||
"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"
|
||||
},
|
||||
{
|
||||
"doc" : "Controls which level of the screens the corners are drawn at. See `hs.canvas.windowLevels` for more information. Defaults to `screenSaver + 1`",
|
||||
"type" : "Variable",
|
||||
"name" : "level",
|
||||
"def" : "RoundedCorners.level"
|
||||
},
|
||||
{
|
||||
"doc" : "Controls the radius of the rounded corners, in points. Defaults to 6",
|
||||
"type" : "Variable",
|
||||
"name" : "radius",
|
||||
"def" : "RoundedCorners.radius"
|
||||
},
|
||||
{
|
||||
"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",
|
||||
"name" : "start",
|
||||
"def" : "RoundedCorners:start()"
|
||||
},
|
||||
{
|
||||
"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()"
|
||||
"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",
|
||||
"desc" : "Give your screens rounded corners"
|
||||
"Variable": [
|
||||
{
|
||||
"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="fill", type="rectangle", frame={x=0, y=0, w=radius, h=radius, }, fillColor={ alpha=1, }},
|
||||
{ type="resetClip", }
|
||||
):behavior(hs.canvas.windowBehaviors.canJoinAllSpaces):show()
|
||||
):behavior(hs.canvas.windowBehaviors.canJoinAllSpaces):level(self.level):show()
|
||||
end
|
||||
end)
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user