nrw


Namenrw JSON
Version 0.7 PyPI version JSON
download
home_pageNone
SummaryA simple program that sets random images as desktop wallpaper in *nix operating systems.
upload_time2024-05-03 00:13:08
maintainerNone
docs_urlNone
authorNone
requires_python>=3.7
licenseMIT License Copyright (c) 2023 Marcus Bowman Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
keywords gnome cinnamon nitrogen linux random wallpaper desktop background unsplash
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # Nix Random Wallpaper

A simple program that sets random wallpaper images as desktop backgrounds in nix based operating systems / window managers. It fetches images from a local directory or Unsplash, composes a new image to match display size and arrangement, and sets the new image as the desktop background.

This project was forked from [Gnome Random Wallpaper](https://github.com/miliarch/gnome_random_wallpaper), which while great at its original limited scope, is no longer maintained.

**Example arrangement**

![Example Arrangement](example_arrangement.png)

**Example wallpaper**

![Example Wallpaper](example_wallpaper.jpg)

## Usage

Nix Random Wallpaper (`nrw`) currently makes the following assumptions about the user:
* The user will configure some external scheduler to prompt the `nrw` command to run in the background
* The user doesn't usually want to keep the generated wallpaper images forever
  * The last image that was generated is replaced by the newly generated image
  * The default output directory is `/tmp/random` - `/tmp` is commonly a tmpfs filesystem and exists only in memory (while the system remains powered on)
    * Note: The default output directory can and probably should be changed to a non-volatile location in [configuration](#configuration). Specifying a non-volatile directory will prevent temporary auto-selection of a system default wallpaper by the window manager on login after a fresh boot cycle, which can be disorienting.
* The user won't interact directly with the program often, making command line argument support unnecessary

Simply running `nrw` will fetch images from either the [Unsplash API](https://source.unsplash.com/) or the image directory (`images_dir`) defined in configuration, then prepare and set the wallpaper based on the configured setter. In xorg, all setters resize and compose the images on a spanned canvas matching your current display arrangement, save the resulting wallpaper image to the output directory (`output_dir`), and update your desktop background. In wayland (currently only hyprland), images are placed on their own right-sized canvases, saved separately, and update the desktop background individually on each screen.

Some suggested steps to take in your environment:
* Configure a cron job or timer of some sort to run `nrw` at regular intervals (every 15 minutes works well for me - `*/15 * * * * /path/to/nrw`)
* Configure a Startup Application to run `nrw` on login

## Installation

Use the following command to install the `nrw` module from PyPi with pip:
```
pip install nrw
```

Or to install the latest version of the repository with pip:
```
pip install git+https://github.com/miliarch/nrw.git
```

After installation, a `nrw` executable link should be placed in your `$HOME/.local/bin` directory (this may vary depending on distro). If this directory is included in your PATH environment variable, the `nrw` command should be available for use without any further steps. Otherwise, you'll need to either specify the full path to run the program, or add the `$HOME/.local/bin` directory to your PATH environment variable.

Alternatively, clone this repository to your preferred installation directory and manually link `./nrw/nix_random_wallpaper.py` in the execution directory of your choice.

## Configuration

Default configuration can be found in [nrw/config.yaml](nrw/config.yaml). This file can be copied to `$HOME/.config/nix_random_wallpaper/config.yaml` and modified to override the default options.

Each configuration option in the file includes an in-line comment that details its function. If you have any questions about how existing options behave, or requests for new options, please raise an issue in this repository.

## Supported display configurations

Any number of displays that are arranged horizontally (side-by-side) within the vertical (height) bounds of the largest display should be supported.

## Unsupported display configurations

Vertical arrangements, including mixed vertical/horizontal arrangements, are currently unsupported. Support may be implemented in the future.

## Tested configurations

### Window managers

* Cinnamon 5.0.5-5.0.7 (xorg)
* awesome v4.3 (xorg)
* hyprland v0.39.1 (wayland)

### Wallpaper setters

* gnome (via gsettings; xorg only)
* [nitrogen](https://github.com/l3ib/nitrogen) (recommended for xorg)
* [hyprpaper](https://github.com/hyprwm/hyprpaper) (hyprland/wayland only)

### Resolutions
* 1920x1080
* 2560x1440
* 3840x2160

### Display arrangements
* Dual monitor, landscape orientation, horizontal arrangement (side-by-side)
* In hyprland/wayland, images are set independently by active monitor instead of being placed on a large canvas; any arrangement should be supported

            

Raw data

            {
    "_id": null,
    "home_page": null,
    "name": "nrw",
    "maintainer": null,
    "docs_url": null,
    "requires_python": ">=3.7",
    "maintainer_email": "Marcus Bowman <miliarch.mb@gmail.com>",
    "keywords": "gnome, cinnamon, nitrogen, linux, random, wallpaper, desktop, background, unsplash",
    "author": null,
    "author_email": "Marcus Bowman <miliarch.mb@gmail.com>",
    "download_url": "https://files.pythonhosted.org/packages/c2/c1/104affa815b5d6873568af36b73900b4d10c4f85a484d5f1bc8d55b78cd3/nrw-0.7.tar.gz",
    "platform": null,
    "description": "# Nix Random Wallpaper\n\nA simple program that sets random wallpaper images as desktop backgrounds in nix based operating systems / window managers. It fetches images from a local directory or Unsplash, composes a new image to match display size and arrangement, and sets the new image as the desktop background.\n\nThis project was forked from [Gnome Random Wallpaper](https://github.com/miliarch/gnome_random_wallpaper), which while great at its original limited scope, is no longer maintained.\n\n**Example arrangement**\n\n![Example Arrangement](example_arrangement.png)\n\n**Example wallpaper**\n\n![Example Wallpaper](example_wallpaper.jpg)\n\n## Usage\n\nNix Random Wallpaper (`nrw`) currently makes the following assumptions about the user:\n* The user will configure some external scheduler to prompt the `nrw` command to run in the background\n* The user doesn't usually want to keep the generated wallpaper images forever\n  * The last image that was generated is replaced by the newly generated image\n  * The default output directory is `/tmp/random` - `/tmp` is commonly a tmpfs filesystem and exists only in memory (while the system remains powered on)\n    * Note: The default output directory can and probably should be changed to a non-volatile location in [configuration](#configuration). Specifying a non-volatile directory will prevent temporary auto-selection of a system default wallpaper by the window manager on login after a fresh boot cycle, which can be disorienting.\n* The user won't interact directly with the program often, making command line argument support unnecessary\n\nSimply running `nrw` will fetch images from either the [Unsplash API](https://source.unsplash.com/) or the image directory (`images_dir`) defined in configuration, then prepare and set the wallpaper based on the configured setter. In xorg, all setters resize and compose the images on a spanned canvas matching your current display arrangement, save the resulting wallpaper image to the output directory (`output_dir`), and update your desktop background. In wayland (currently only hyprland), images are placed on their own right-sized canvases, saved separately, and update the desktop background individually on each screen.\n\nSome suggested steps to take in your environment:\n* Configure a cron job or timer of some sort to run `nrw` at regular intervals (every 15 minutes works well for me - `*/15 * * * * /path/to/nrw`)\n* Configure a Startup Application to run `nrw` on login\n\n## Installation\n\nUse the following command to install the `nrw` module from PyPi with pip:\n```\npip install nrw\n```\n\nOr to install the latest version of the repository with pip:\n```\npip install git+https://github.com/miliarch/nrw.git\n```\n\nAfter installation, a `nrw` executable link should be placed in your `$HOME/.local/bin` directory (this may vary depending on distro). If this directory is included in your PATH environment variable, the `nrw` command should be available for use without any further steps. Otherwise, you'll need to either specify the full path to run the program, or add the `$HOME/.local/bin` directory to your PATH environment variable.\n\nAlternatively, clone this repository to your preferred installation directory and manually link `./nrw/nix_random_wallpaper.py` in the execution directory of your choice.\n\n## Configuration\n\nDefault configuration can be found in [nrw/config.yaml](nrw/config.yaml). This file can be copied to `$HOME/.config/nix_random_wallpaper/config.yaml` and modified to override the default options.\n\nEach configuration option in the file includes an in-line comment that details its function. If you have any questions about how existing options behave, or requests for new options, please raise an issue in this repository.\n\n## Supported display configurations\n\nAny number of displays that are arranged horizontally (side-by-side) within the vertical (height) bounds of the largest display should be supported.\n\n## Unsupported display configurations\n\nVertical arrangements, including mixed vertical/horizontal arrangements, are currently unsupported. Support may be implemented in the future.\n\n## Tested configurations\n\n### Window managers\n\n* Cinnamon 5.0.5-5.0.7 (xorg)\n* awesome v4.3 (xorg)\n* hyprland v0.39.1 (wayland)\n\n### Wallpaper setters\n\n* gnome (via gsettings; xorg only)\n* [nitrogen](https://github.com/l3ib/nitrogen) (recommended for xorg)\n* [hyprpaper](https://github.com/hyprwm/hyprpaper) (hyprland/wayland only)\n\n### Resolutions\n* 1920x1080\n* 2560x1440\n* 3840x2160\n\n### Display arrangements\n* Dual monitor, landscape orientation, horizontal arrangement (side-by-side)\n* In hyprland/wayland, images are set independently by active monitor instead of being placed on a large canvas; any arrangement should be supported\n",
    "bugtrack_url": null,
    "license": "MIT License  Copyright (c) 2023 Marcus Bowman  Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the \"Software\"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:  The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.  THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. ",
    "summary": "A simple program that sets random images as desktop wallpaper in *nix operating systems.",
    "version": "0.7",
    "project_urls": {
        "Documentation": "https://github.com/miliarch/nrw",
        "Repository": "https://github.com/miliarch/nrw.git"
    },
    "split_keywords": [
        "gnome",
        " cinnamon",
        " nitrogen",
        " linux",
        " random",
        " wallpaper",
        " desktop",
        " background",
        " unsplash"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "35ab741c925afece98bbdce121b6dec2e3e868548bf079a8eefac795aecf6869",
                "md5": "172dfc2979dac81bc95eb55c8171c296",
                "sha256": "df7319e34e1cd68e84de0755947b8617024a385284fcb53b8131c6c0c267345d"
            },
            "downloads": -1,
            "filename": "nrw-0.7-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "172dfc2979dac81bc95eb55c8171c296",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.7",
            "size": 9903,
            "upload_time": "2024-05-03T00:13:05",
            "upload_time_iso_8601": "2024-05-03T00:13:05.868284Z",
            "url": "https://files.pythonhosted.org/packages/35/ab/741c925afece98bbdce121b6dec2e3e868548bf079a8eefac795aecf6869/nrw-0.7-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "c2c1104affa815b5d6873568af36b73900b4d10c4f85a484d5f1bc8d55b78cd3",
                "md5": "94ea2e0a06a55c4e0c922cc27836f3d0",
                "sha256": "b9ba9e175615987ad1a91c63066f1642e759ae6d8891176c66aefcbf0f39e8e8"
            },
            "downloads": -1,
            "filename": "nrw-0.7.tar.gz",
            "has_sig": false,
            "md5_digest": "94ea2e0a06a55c4e0c922cc27836f3d0",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.7",
            "size": 8434,
            "upload_time": "2024-05-03T00:13:08",
            "upload_time_iso_8601": "2024-05-03T00:13:08.812824Z",
            "url": "https://files.pythonhosted.org/packages/c2/c1/104affa815b5d6873568af36b73900b4d10c4f85a484d5f1bc8d55b78cd3/nrw-0.7.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2024-05-03 00:13:08",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "miliarch",
    "github_project": "nrw",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": false,
    "lcname": "nrw"
}
        
Elapsed time: 2.71710s