Name | cs-app-osx-spaces JSON |
Version |
20250108
JSON |
| download |
home_page | None |
Summary | Access to the MacOS X display spaces. |
upload_time | 2025-01-08 03:17:47 |
maintainer | None |
docs_url | None |
author | None |
requires_python | None |
license | None |
keywords |
python3
|
VCS |
|
bugtrack_url |
|
requirements |
No requirements were recorded.
|
Travis-CI |
No Travis.
|
coveralls test coverage |
No coveralls.
|
Access to the MacOS X display spaces.
*Latest release 20250108*:
New "current" subcommand to report the current space number.
## <a name="main"></a>`main(argv=None)`
cs.app.osx.spaces command line mode.
## <a name="Spaces"></a>Class `Spaces`
The spaces for a particular display.
*`Spaces.__init__(self, display_index=0, *, cg_conn: Optional[inspect._empty] = <objc.function '_CGSDefaultConnection' at 0x124198760>)`*:
Initialise.
Parameters:
* `display_index`: optional display index, default `0`
* `cg_conn`: optional CoreGraphics connection,
default from `CoreGraphics._CGSDefaultConnection()`
*`Spaces.__getitem__(self, space_index)`*:
Return the space at index `space_index`.
Note that the index counts from `0`, while the desktop space
number counts from `1`.
*`Spaces.current`*:
The current space.
*`Spaces.current_index`*:
The index of the current space, found by scanning the spaces
for the current space UUID.
Returns `None` if not found.
*`Spaces.current_uuid`*:
The UUID of the current space.
*`Spaces.display_id`*:
The display identifier of the display.
*`Spaces.display_uuid`*:
The UUID of the display.
*`Spaces.forget(self)`*:
Forget the current spaces information.
This will cause it to be obtained anew.
*`Spaces.get_wp_config(self, space_index: int)`*:
Get the desktop picture configuration of the space at `space_index`.
*`Spaces.monitor_current(self, **kw)`*:
Return a `cs.delta.monitor` generator for changes to the
"current" space i.e. changes representing a desktop space switch.
*`Spaces.monitor_wp_config(self, space_index=None, **kw)`*:
Return a `cs.delta.monitor` generator for the wallpaper
configuration of a specific space (default `self.current_index`
at the time of call).
*`Spaces.popindices(self, argv)`*:
Pop a leading spaces specification from `argv` if present,
return a list of the indices it represents.
If there is no spaces specification, return `None`.
Note that space indices count from `0`, and space numbers count from `1`.
The following spaces specifications are recognised:
* `.`: the current space index
* `*`: all the space indices
* a positive integer `spn`: `spn-1`
*`Spaces.set_wp_config(self, space_index: int, wp_config: dict)`*:
Set the desktop picture configuration of the space at
`space_index` using the `dict` `wp_config`.
## <a name="SpacesCommand"></a>Class `SpacesCommand(cs.cmdutils.BaseCommand)`
A command line implementation for manipulating spaces.
Usage summary:
Usage: spaces [common-options...] subcommand [options...]
A command line implementation for manipulating spaces.
Subcommands:
current [common-options...]
Print the current space number.
help [common-options...] [-l] [-s] [subcommand-names...]
Print help for subcommands.
This outputs the full help for the named subcommands,
or the short help for all subcommands if no names are specified.
Options:
-l Long listing.
-r Recurse into subcommands.
-s Short listing.
info [common-options...] [field-names...]
Recite general information.
Explicit field names may be provided to override the default listing.
monitor [common-options...]
Monitor space switches.
repl [common-options...]
Run a REPL (Read Evaluate Print Loop), an interactive Python prompt.
Options:
--banner banner Banner.
shell [common-options...]
Run a command prompt via cmd.Cmd using this command's subcommands.
wp [common-options...] [{.|space#|*} [wp-path]]
Set or query the wallpaper for a space.
The optional space number may be "." to indicate the
current space or "*" to indicate all spaces.
wpm [common-options...] [{.|space#}]
Monitor the wallpaper settings of a particular space.
*`SpacesCommand.Options`*
*`SpacesCommand.cmd_current(self, argv)`*:
Usage: {cmd}
Print the current space number.
*`SpacesCommand.cmd_monitor(self, argv)`*:
Usage: {cmd}
Monitor space switches.
*`SpacesCommand.cmd_wp(self, argv)`*:
Usage: {cmd} [{{.|space#|*}} [wp-path]]
Set or query the wallpaper for a space.
The optional space number may be "." to indicate the
current space or "*" to indicate all spaces.
*`SpacesCommand.cmd_wpm(self, argv)`*:
Usage: {cmd} [{{.|space#}}]
Monitor the wallpaper settings of a particular space.
*`SpacesCommand.run_context(self, **kw)`*:
Set `options.spaces` to a `Spaces` instnace during a command run.
# Release Log
*Release 20250108*:
New "current" subcommand to report the current space number.
*Release 20240622*:
* New SpacesCommand with a "wp" command to report or set wallpaper configs.
* Assorted other updates.
Raw data
{
"_id": null,
"home_page": null,
"name": "cs-app-osx-spaces",
"maintainer": null,
"docs_url": null,
"requires_python": null,
"maintainer_email": null,
"keywords": "python3",
"author": null,
"author_email": "Cameron Simpson <cs@cskk.id.au>",
"download_url": "https://files.pythonhosted.org/packages/35/7e/255b73e09f5d811ff95348ab7e9d99bd9a95272d734faa604a587c30eb01/cs_app_osx_spaces-20250108.tar.gz",
"platform": null,
"description": "Access to the MacOS X display spaces.\n\n*Latest release 20250108*:\nNew \"current\" subcommand to report the current space number.\n\n## <a name=\"main\"></a>`main(argv=None)`\n\ncs.app.osx.spaces command line mode.\n\n## <a name=\"Spaces\"></a>Class `Spaces`\n\nThe spaces for a particular display.\n\n*`Spaces.__init__(self, display_index=0, *, cg_conn: Optional[inspect._empty] = <objc.function '_CGSDefaultConnection' at 0x124198760>)`*:\nInitialise.\n\nParameters:\n* `display_index`: optional display index, default `0`\n* `cg_conn`: optional CoreGraphics connection,\n default from `CoreGraphics._CGSDefaultConnection()`\n\n*`Spaces.__getitem__(self, space_index)`*:\nReturn the space at index `space_index`.\nNote that the index counts from `0`, while the desktop space\nnumber counts from `1`.\n\n*`Spaces.current`*:\nThe current space.\n\n*`Spaces.current_index`*:\nThe index of the current space, found by scanning the spaces\nfor the current space UUID.\nReturns `None` if not found.\n\n*`Spaces.current_uuid`*:\nThe UUID of the current space.\n\n*`Spaces.display_id`*:\nThe display identifier of the display.\n\n*`Spaces.display_uuid`*:\nThe UUID of the display.\n\n*`Spaces.forget(self)`*:\nForget the current spaces information.\nThis will cause it to be obtained anew.\n\n*`Spaces.get_wp_config(self, space_index: int)`*:\nGet the desktop picture configuration of the space at `space_index`.\n\n*`Spaces.monitor_current(self, **kw)`*:\nReturn a `cs.delta.monitor` generator for changes to the\n\"current\" space i.e. changes representing a desktop space switch.\n\n*`Spaces.monitor_wp_config(self, space_index=None, **kw)`*:\nReturn a `cs.delta.monitor` generator for the wallpaper\nconfiguration of a specific space (default `self.current_index`\nat the time of call).\n\n*`Spaces.popindices(self, argv)`*:\nPop a leading spaces specification from `argv` if present,\nreturn a list of the indices it represents.\nIf there is no spaces specification, return `None`.\n\nNote that space indices count from `0`, and space numbers count from `1`.\n\nThe following spaces specifications are recognised:\n* `.`: the current space index\n* `*`: all the space indices\n* a positive integer `spn`: `spn-1`\n\n*`Spaces.set_wp_config(self, space_index: int, wp_config: dict)`*:\nSet the desktop picture configuration of the space at\n`space_index` using the `dict` `wp_config`.\n\n## <a name=\"SpacesCommand\"></a>Class `SpacesCommand(cs.cmdutils.BaseCommand)`\n\nA command line implementation for manipulating spaces.\n\nUsage summary:\n\n Usage: spaces [common-options...] subcommand [options...]\n A command line implementation for manipulating spaces.\n Subcommands:\n current [common-options...]\n Print the current space number.\n help [common-options...] [-l] [-s] [subcommand-names...]\n Print help for subcommands.\n This outputs the full help for the named subcommands,\n or the short help for all subcommands if no names are specified.\n Options:\n -l Long listing.\n -r Recurse into subcommands.\n -s Short listing.\n info [common-options...] [field-names...]\n Recite general information.\n Explicit field names may be provided to override the default listing.\n monitor [common-options...]\n Monitor space switches.\n repl [common-options...]\n Run a REPL (Read Evaluate Print Loop), an interactive Python prompt.\n Options:\n --banner banner Banner.\n shell [common-options...]\n Run a command prompt via cmd.Cmd using this command's subcommands.\n wp [common-options...] [{.|space#|*} [wp-path]]\n Set or query the wallpaper for a space.\n The optional space number may be \".\" to indicate the\n current space or \"*\" to indicate all spaces.\n wpm [common-options...] [{.|space#}]\n Monitor the wallpaper settings of a particular space.\n\n*`SpacesCommand.Options`*\n\n*`SpacesCommand.cmd_current(self, argv)`*:\nUsage: {cmd}\nPrint the current space number.\n\n*`SpacesCommand.cmd_monitor(self, argv)`*:\nUsage: {cmd}\nMonitor space switches.\n\n*`SpacesCommand.cmd_wp(self, argv)`*:\nUsage: {cmd} [{{.|space#|*}} [wp-path]]\nSet or query the wallpaper for a space.\nThe optional space number may be \".\" to indicate the\ncurrent space or \"*\" to indicate all spaces.\n\n*`SpacesCommand.cmd_wpm(self, argv)`*:\nUsage: {cmd} [{{.|space#}}]\nMonitor the wallpaper settings of a particular space.\n\n*`SpacesCommand.run_context(self, **kw)`*:\nSet `options.spaces` to a `Spaces` instnace during a command run.\n\n# Release Log\n\n\n\n*Release 20250108*:\nNew \"current\" subcommand to report the current space number.\n\n*Release 20240622*:\n* New SpacesCommand with a \"wp\" command to report or set wallpaper configs.\n* Assorted other updates.\n",
"bugtrack_url": null,
"license": null,
"summary": "Access to the MacOS X display spaces.",
"version": "20250108",
"project_urls": {
"MonoRepo Commits": "https://bitbucket.org/cameron_simpson/css/commits/branch/main",
"Monorepo Git Mirror": "https://github.com/cameron-simpson/css",
"Monorepo Hg/Mercurial Mirror": "https://hg.sr.ht/~cameron-simpson/css",
"Source": "https://github.com/cameron-simpson/css/blob/main/lib/python/cs/app/osx/spaces.py"
},
"split_keywords": [
"python3"
],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "05c5143000c3ab23aa09e30cb341c978eea54e03052d8cfb3131895d9151652f",
"md5": "e25a09530b9aa58fecb9c509b90251b6",
"sha256": "9c999995c895e0ed184a239d9131a30cf116854f00d45b8ad8c68b0b5eb6913c"
},
"downloads": -1,
"filename": "cs_app_osx_spaces-20250108-py2.py3-none-any.whl",
"has_sig": false,
"md5_digest": "e25a09530b9aa58fecb9c509b90251b6",
"packagetype": "bdist_wheel",
"python_version": "py2.py3",
"requires_python": null,
"size": 6917,
"upload_time": "2025-01-08T03:17:45",
"upload_time_iso_8601": "2025-01-08T03:17:45.869247Z",
"url": "https://files.pythonhosted.org/packages/05/c5/143000c3ab23aa09e30cb341c978eea54e03052d8cfb3131895d9151652f/cs_app_osx_spaces-20250108-py2.py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"blake2b_256": "357e255b73e09f5d811ff95348ab7e9d99bd9a95272d734faa604a587c30eb01",
"md5": "076d507a0a5a7c0906e2f7149b5c8ccd",
"sha256": "f5ba0f6623d86462688fd2ed349450af77e2a5b4242d8113a58d6f483d128af9"
},
"downloads": -1,
"filename": "cs_app_osx_spaces-20250108.tar.gz",
"has_sig": false,
"md5_digest": "076d507a0a5a7c0906e2f7149b5c8ccd",
"packagetype": "sdist",
"python_version": "source",
"requires_python": null,
"size": 5670,
"upload_time": "2025-01-08T03:17:47",
"upload_time_iso_8601": "2025-01-08T03:17:47.153168Z",
"url": "https://files.pythonhosted.org/packages/35/7e/255b73e09f5d811ff95348ab7e9d99bd9a95272d734faa604a587c30eb01/cs_app_osx_spaces-20250108.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2025-01-08 03:17:47",
"github": true,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"github_user": "cameron-simpson",
"github_project": "css",
"travis_ci": false,
"coveralls": false,
"github_actions": false,
"lcname": "cs-app-osx-spaces"
}