initial commit

This commit is contained in:
Xanazf 2024-09-28 02:35:19 +03:00
commit 6844038616
294 changed files with 37788 additions and 0 deletions

View file

@ -0,0 +1,71 @@
{
"name": "GlobalShortcut",
"module": "Quickshell.Hyprland",
"type": "class",
"super": {
"type": "qt",
"module": "qml.QtQml",
"name": "QtObject"
},
"description": "Hyprland global shortcut.",
"details": "Global shortcut implemented with [hyprland_global_shortcuts_v1].\n\nYou can use this within hyprland as a global shortcut:\n```\nbind = <modifiers>, <key>, global, <appid>:<name>\n```\nSee [the wiki] for details.\n\n{{< callout type=\"warning\" >}}\n The shortcuts protocol does not allow duplicate appid + name pairs.\nWithin a single instance of quickshell this is handled internally, and both\nusers will be notified, but multiple instances of quickshell or XDPH may collide.\n\nIf that happens, whichever client that tries to register the shortcuts last will crash.\n{{< /callout >}}\n\n{{< callout type=\"info\" >}}\n This type does *not* use the xdg-desktop-portal global shortcuts protocol,\nas it is not fully functional without flatpak and would cause a considerably worse\nuser experience from other limitations. It will only work with Hyprland.\nNote that, as this type bypasses xdg-desktop-portal, XDPH is not required.\n{{< /callout >}}\n\n[hyprland_global_shortcuts_v1]: https://github.com/hyprwm/hyprland-protocols/blob/main/protocols/hyprland-global-shortcuts-v1.xml\n[the wiki]: https://wiki.hyprland.org/Configuring/Binds/#dbus-global-shortcuts\n",
"properties": {
"name": {
"type": {
"type": "qt",
"module": "qml",
"name": "string"
},
"details": "The name of the shortcut.\nYou cannot change this at runtime.\n"
},
"appid": {
"type": {
"type": "qt",
"module": "qml",
"name": "string"
},
"details": "The appid of the shortcut. Defaults to `quickshell`.\nYou cannot change this at runtime.\n\nIf you have more than one shortcut we recommend subclassing\nGlobalShortcut to set this.\n"
},
"description": {
"type": {
"type": "qt",
"module": "qml",
"name": "string"
},
"details": "The description of the shortcut that appears in `hyprctl globalshortcuts`.\nYou cannot change this at runtime.\n"
},
"pressed": {
"type": {
"type": "qt",
"module": "qml",
"name": "bool"
},
"details": "If the keybind is currently pressed.\n",
"flags": [
"readonly"
]
},
"triggerDescription": {
"type": {
"type": "qt",
"module": "qml",
"name": "string"
},
"details": "Have not seen this used ever, but included for completeness. Safe to ignore.\n"
}
},
"functions": [],
"signals": {
"pressed": {
"name": "pressed",
"details": "Fired when the keybind is pressed.\n",
"params": []
},
"released": {
"name": "released",
"details": "Fired when the keybind is released.\n",
"params": []
}
},
"variants": {}
}

View file

@ -0,0 +1,163 @@
{
"name": "Hyprland",
"module": "Quickshell.Hyprland",
"type": "class",
"super": {
"type": "qt",
"module": "qml.QtQml",
"name": "QtObject"
},
"description": null,
"details": null,
"flags": [
"singleton"
],
"properties": {
"focusedMonitor": {
"type": {
"type": "local",
"module": "Quickshell.Hyprland",
"name": "HyprlandMonitor"
},
"details": "The currently focused hyprland monitor. May be null.\n",
"flags": [
"readonly"
]
},
"workspaces": {
"type": {
"type": "local",
"module": "Quickshell",
"name": "ObjectModel",
"of": {
"type": "local",
"module": "Quickshell.Hyprland",
"name": "HyprlandWorkspace"
}
},
"details": "All hyprland workspaces.\n",
"flags": [
"readonly"
]
},
"monitors": {
"type": {
"type": "local",
"module": "Quickshell",
"name": "ObjectModel",
"of": {
"type": "local",
"module": "Quickshell.Hyprland",
"name": "HyprlandMonitor"
}
},
"details": "All hyprland monitors.\n",
"flags": [
"readonly"
]
},
"requestSocketPath": {
"type": {
"type": "qt",
"module": "qml",
"name": "string"
},
"details": "Path to the request socket (.socket.sock)\n",
"flags": [
"readonly"
]
},
"eventSocketPath": {
"type": {
"type": "qt",
"module": "qml",
"name": "string"
},
"details": "Path to the event socket (.socket2.sock)\n",
"flags": [
"readonly"
]
}
},
"functions": [
{
"ret": {
"type": "qt",
"module": "qml",
"name": "void"
},
"name": "dispatch",
"id": "dispatch",
"details": "Execute a hyprland [dispatcher](https://wiki.hyprland.org/Configuring/Dispatchers).\n",
"params": [
{
"name": "request",
"type": {
"type": "qt",
"module": "qml",
"name": "string"
}
}
]
},
{
"ret": {
"type": "local",
"module": "Quickshell.Hyprland",
"name": "HyprlandMonitor"
},
"name": "monitorFor",
"id": "monitorFor",
"details": "Get the HyprlandMonitor object that corrosponds to a quickshell screen.\n",
"params": [
{
"name": "screen",
"type": {
"type": "local",
"module": "Quickshell",
"name": "ShellScreen"
}
}
]
},
{
"ret": {
"type": "qt",
"module": "qml",
"name": "void"
},
"name": "refreshMonitors",
"id": "refreshMonitors",
"details": "Refresh monitor information.\n\nMany actions that will invalidate monitor state don't send events,\nso this function is available if required.\n",
"params": []
},
{
"ret": {
"type": "qt",
"module": "qml",
"name": "void"
},
"name": "refreshWorkspaces",
"id": "refreshWorkspaces",
"details": "Refresh workspace information.\n\nMany actions that will invalidate workspace state don't send events,\nso this function is available if required.\n",
"params": []
}
],
"signals": {
"rawEvent": {
"name": "rawEvent",
"details": "Emitted for every event that comes in through the hyprland event socket (socket2).\n\nSee [Hyprland Wiki: IPC](https://wiki.hyprland.org/IPC/) for a list of events.\n",
"params": [
{
"name": "event",
"type": {
"type": "local",
"module": "Quickshell.Hyprland",
"name": "HyprlandEvent"
}
}
]
}
},
"variants": {}
}

View file

@ -0,0 +1,68 @@
{
"name": "HyprlandEvent",
"module": "Quickshell.Hyprland",
"type": "class",
"super": {
"type": "qt",
"module": "qml.QtQml",
"name": "QtObject"
},
"description": "Live Hyprland IPC event.",
"details": "Live Hyprland IPC event. Holding this object after the\nsignal handler exits is undefined as the event instance\nis reused.\n\nEmitted by {{< qmltypelink type=\"local\" module=\"Quickshell.Hyprland\" name=\"Hyprland\" mtype=\"signal\" mname=\"rawEvent\" >}}.\n",
"flags": [
"uncreatable"
],
"properties": {
"name": {
"type": {
"type": "qt",
"module": "qml",
"name": "string"
},
"details": "The name of the event.\n\nSee [Hyprland Wiki: IPC](https://wiki.hyprland.org/IPC/) for a list of events.\n",
"flags": [
"readonly"
]
},
"data": {
"type": {
"type": "qt",
"module": "qml",
"name": "string"
},
"details": "The unparsed data of the event.\n",
"flags": [
"readonly"
]
}
},
"functions": [
{
"ret": {
"type": "qt",
"module": "qml",
"name": "list",
"of": {
"type": "qt",
"module": "qml",
"name": "string"
}
},
"name": "parse",
"id": "parse",
"details": "Parse this event with a known number of arguments.\n\nArgument count is required as some events can contain commas\nin the last argument, which can be ignored as long as the count is known.\n",
"params": [
{
"name": "argumentCount",
"type": {
"type": "qt",
"module": "qml",
"name": "int"
}
}
]
}
],
"signals": {},
"variants": {}
}

View file

@ -0,0 +1,44 @@
{
"name": "HyprlandFocusGrab",
"module": "Quickshell.Hyprland",
"type": "class",
"super": {
"type": "qt",
"module": "qml.QtQml",
"name": "QtObject"
},
"description": "Input focus grabber",
"details": "Object for managing input focus grabs via the [hyprland_focus_grab_v1]\nwayland protocol.\n\nWhen enabled, all of the windows listed in the `windows` property will\nreceive input normally, and will retain keyboard focus even if the mouse\nis moved off of them. When areas of the screen that are not part of a listed\nwindow are clicked or touched, the grab will become inactive and emit the\ncleared signal.\n\nThis is useful for implementing dismissal of popup type windows.\n```qml\nimport Quickshell\nimport Quickshell.Hyprland\nimport QtQuick.Controls\n\nShellRoot {\n FloatingWindow {\n id: window\n\n Button {\n anchors.centerIn: parent\n text: grab.active ? \"Remove exclusive focus\" : \"Take exclusive focus\"\n onClicked: grab.active = !grab.active\n }\n\n HyprlandFocusGrab {\n id: grab\n windows: [ window ]\n }\n }\n}\n```\n\n[hyprland_focus_grab_v1]: https://github.com/hyprwm/hyprland-protocols/blob/main/protocols/hyprland-global-shortcuts-v1.xml\n",
"properties": {
"windows": {
"type": {
"type": "qt",
"module": "qml",
"name": "list",
"of": {
"type": "qt",
"module": "qml.QtQml",
"name": "QtObject"
}
},
"details": "The list of windows to whitelist for input.\n"
},
"active": {
"type": {
"type": "qt",
"module": "qml",
"name": "bool"
},
"details": "If the focus grab is active. Defaults to false.\n\nWhen set to true, an input grab will be created for the listed windows.\n\nThis property will change to false once the grab is dismissed.\nIt will not change to true until the grab begins, which requires\nat least one visible window.\n"
}
},
"functions": [],
"signals": {
"cleared": {
"name": "cleared",
"details": "Sent whenever the compositor clears the focus grab.\n\nThis may be in response to all windows being removed\nfrom the list or simultaneously hidden, in addition to\na normal clear.\n",
"params": []
}
},
"variants": {}
}

View file

@ -0,0 +1,130 @@
{
"name": "HyprlandMonitor",
"module": "Quickshell.Hyprland",
"type": "class",
"super": {
"type": "qt",
"module": "qml.QtQml",
"name": "QtObject"
},
"description": null,
"details": null,
"flags": [
"uncreatable"
],
"properties": {
"y": {
"type": {
"type": "qt",
"module": "qml",
"name": "int"
},
"details": null,
"flags": [
"readonly"
]
},
"height": {
"type": {
"type": "qt",
"module": "qml",
"name": "int"
},
"details": null,
"flags": [
"readonly"
]
},
"name": {
"type": {
"type": "qt",
"module": "qml",
"name": "string"
},
"details": null,
"flags": [
"readonly"
]
},
"x": {
"type": {
"type": "qt",
"module": "qml",
"name": "int"
},
"details": null,
"flags": [
"readonly"
]
},
"lastIpcObject": {
"type": {
"type": "unknown",
"module": "",
"name": ""
},
"details": "Last json returned for this monitor, as a javascript object.\n\n{{< callout type=\"warning\" >}}\n This is *not* updated unless the monitor object is fetched again from\nHyprland. If you need a value that is subject to change and does not have a dedicated\nproperty, run {{< qmltypelink type=\"local\" module=\"Quickshell.Hyprland\" name=\"Hyprland\" mtype=\"func\" mname=\"refreshMonitors\" >}} and wait for this property to update.\n\n{{< /callout >}}",
"flags": [
"readonly"
]
},
"activeWorkspace": {
"type": {
"type": "local",
"module": "Quickshell.Hyprland",
"name": "HyprlandWorkspace"
},
"details": "The currently active workspace on this monitor. May be null.\n",
"flags": [
"readonly"
]
},
"description": {
"type": {
"type": "qt",
"module": "qml",
"name": "string"
},
"details": null,
"flags": [
"readonly"
]
},
"id": {
"type": {
"type": "qt",
"module": "qml",
"name": "int"
},
"details": null,
"flags": [
"readonly"
]
},
"scale": {
"type": {
"type": "qt",
"module": "qml",
"name": "real"
},
"details": null,
"flags": [
"readonly"
]
},
"width": {
"type": {
"type": "qt",
"module": "qml",
"name": "int"
},
"details": null,
"flags": [
"readonly"
]
}
},
"functions": [],
"signals": {},
"variants": {}
}

View file

@ -0,0 +1,64 @@
{
"name": "HyprlandWorkspace",
"module": "Quickshell.Hyprland",
"type": "class",
"super": {
"type": "qt",
"module": "qml.QtQml",
"name": "QtObject"
},
"description": null,
"details": null,
"flags": [
"uncreatable"
],
"properties": {
"name": {
"type": {
"type": "qt",
"module": "qml",
"name": "string"
},
"details": null,
"flags": [
"readonly"
]
},
"id": {
"type": {
"type": "qt",
"module": "qml",
"name": "int"
},
"details": null,
"flags": [
"readonly"
]
},
"lastIpcObject": {
"type": {
"type": "unknown",
"module": "",
"name": ""
},
"details": "Last json returned for this workspace, as a javascript object.\n\n{{< callout type=\"warning\" >}}\n This is *not* updated unless the workspace object is fetched again from\nHyprland. If you need a value that is subject to change and does not have a dedicated\nproperty, run {{< qmltypelink type=\"local\" module=\"Quickshell.Hyprland\" name=\"Hyprland\" mtype=\"func\" mname=\"refreshWorkspaces\" >}} and wait for this property to update.\n\n{{< /callout >}}",
"flags": [
"readonly"
]
},
"monitor": {
"type": {
"type": "local",
"module": "Quickshell.Hyprland",
"name": "HyprlandMonitor"
},
"details": null,
"flags": [
"readonly"
]
}
},
"functions": [],
"signals": {},
"variants": {}
}

View file

@ -0,0 +1,5 @@
{
"name": "Quickshell.Hyprland",
"description": "Hyprland specific Quickshell types",
"details": ""
}