rofify


Namerofify JSON
Version 0.0.41 PyPI version JSON
download
home_pagehttps://github.com/dbkosky/rofify.git
SummaryRofi menu script that controls spotify playback.
upload_time2024-01-04 11:22:14
maintainer
docs_urlNone
authorDaniel Kosky
requires_python
licenseMIT
keywords spotify rofi
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # Rofify
## Spotify Menu in Rofi
This app is intended to provide an alternative method for controlling spotify playback. 
It's inspired by the terminal application [SpoTUI](https://github.com/ceuk/SpoTUI), and makes heavy use of 
[spotipy](https://github.com/plamere/spotipy) and [python-rofi-menu](https://github.com/miphreal/python-rofi-menu). The included theme is based on the
the rofi themes by [adi1090x](https://github.com/adi1090x/rofi).

![selecting from a playlist in rofify](previews/playlists.gif)

Before you attempt to install this, it's worth noting that, at present, you need spotify premium in order to use this. You will need create an app on [the spotify devolper site](https://developer.spotify.com) (go to dashboard, then create an app).

To install the package run: 
``` sh
pip install rofify
```

## Setup
You will need to add a few items to the configuration to get started.
To create the a config file at .config/rofify/config you can run:
``` sh
python -m rofify --create-config
```

In the config file you will need to set the values for username, client_id and client_secret.
The client_id and client_secret can be obtained on your application page on developer.spotify.com.
Redirect_uri can be left the same, unless you have changed it in the application settings on 
developer.spotify.com.

Next, run:
``` sh
python -m rofify --create-token
```
This is required, as the authentication uses this token in every reuqest made.
This creates a token using the path specified by 'cache_path' in the config file. 

Try and see if the package is working by typing running Rofi:
``` sh
rofi -modi spotify:"python -m rofify" -show spotify
```

## Hotkeys
If you want to run rofify with hotkeys you'll need to create or modify custom key bindings in your rofi config. For example:

```
! Previous track
rofi.kb-custom-1:   Super+Left

! Next track
rofi.kb-custom-2:   Super+Right

! Toggle pause/play
rofi.kb-custom-3:   Super+space

! Toggle shuffle
rofi.kb-custom-4:   Super+s

! Cycle repeat state
rofi.kb-custom-5:   Super+r
```

These are convenient keybindings for me, but some experimentation might be needed depending on your setup. Make sure that any keybinding you use isn't already used by another default rofi keybinding or it will throw an error (you can get a full list of the config options by running rofi -dump-config).

            

Raw data

            {
    "_id": null,
    "home_page": "https://github.com/dbkosky/rofify.git",
    "name": "rofify",
    "maintainer": "",
    "docs_url": null,
    "requires_python": "",
    "maintainer_email": "",
    "keywords": "spotify,rofi",
    "author": "Daniel Kosky",
    "author_email": "dbkosky@gmail.com",
    "download_url": "https://files.pythonhosted.org/packages/3a/76/80ff5adc84100aeef64f0f3d03a3063d5ab51bafa29716dc14b4f778928e/rofify-0.0.41.tar.gz",
    "platform": null,
    "description": "# Rofify\n## Spotify Menu in Rofi\nThis app is intended to provide an alternative method for controlling spotify playback. \nIt's inspired by the terminal application [SpoTUI](https://github.com/ceuk/SpoTUI), and makes heavy use of \n[spotipy](https://github.com/plamere/spotipy) and [python-rofi-menu](https://github.com/miphreal/python-rofi-menu). The included theme is based on the\nthe rofi themes by [adi1090x](https://github.com/adi1090x/rofi).\n\n![selecting from a playlist in rofify](previews/playlists.gif)\n\nBefore you attempt to install this, it's worth noting that, at present, you need spotify premium in order to use this. You will need create an app on [the spotify devolper site](https://developer.spotify.com) (go to dashboard, then create an app).\n\nTo install the package run: \n``` sh\npip install rofify\n```\n\n## Setup\nYou will need to add a few items to the configuration to get started.\nTo create the a config file at .config/rofify/config you can run:\n``` sh\npython -m rofify --create-config\n```\n\nIn the config file you will need to set the values for username, client_id and client_secret.\nThe client_id and client_secret can be obtained on your application page on developer.spotify.com.\nRedirect_uri can be left the same, unless you have changed it in the application settings on \ndeveloper.spotify.com.\n\nNext, run:\n``` sh\npython -m rofify --create-token\n```\nThis is required, as the authentication uses this token in every reuqest made.\nThis creates a token using the path specified by 'cache_path' in the config file. \n\nTry and see if the package is working by typing running Rofi:\n``` sh\nrofi -modi spotify:\"python -m rofify\" -show spotify\n```\n\n## Hotkeys\nIf you want to run rofify with hotkeys you'll need to create or modify custom key bindings in your rofi config. For example:\n\n```\n! Previous track\nrofi.kb-custom-1:   Super+Left\n\n! Next track\nrofi.kb-custom-2:   Super+Right\n\n! Toggle pause/play\nrofi.kb-custom-3:   Super+space\n\n! Toggle shuffle\nrofi.kb-custom-4:   Super+s\n\n! Cycle repeat state\nrofi.kb-custom-5:   Super+r\n```\n\nThese are convenient keybindings for me, but some experimentation might be needed depending on your setup. Make sure that any keybinding you use isn't already used by another default rofi keybinding or it will throw an error (you can get a full list of the config options by running rofi -dump-config).\n",
    "bugtrack_url": null,
    "license": "MIT",
    "summary": "Rofi menu script that controls spotify playback.",
    "version": "0.0.41",
    "project_urls": {
        "Homepage": "https://github.com/dbkosky/rofify.git"
    },
    "split_keywords": [
        "spotify",
        "rofi"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "85dd47dc97e01a76dbd60fce742393610f93e2b16b4b9bdadc8d00920b163d18",
                "md5": "c8be7164ce3155a023fa8efc2cbeb811",
                "sha256": "9d5f097dec4671d97bb47b35b217bf72ca7db0bf17ba6ae23a2ca2a1f8f4a3da"
            },
            "downloads": -1,
            "filename": "rofify-0.0.41-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "c8be7164ce3155a023fa8efc2cbeb811",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": null,
            "size": 24716,
            "upload_time": "2024-01-04T11:22:13",
            "upload_time_iso_8601": "2024-01-04T11:22:13.873396Z",
            "url": "https://files.pythonhosted.org/packages/85/dd/47dc97e01a76dbd60fce742393610f93e2b16b4b9bdadc8d00920b163d18/rofify-0.0.41-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "3a7680ff5adc84100aeef64f0f3d03a3063d5ab51bafa29716dc14b4f778928e",
                "md5": "ab523208479db73b85a52e26421c0126",
                "sha256": "6e38d82d3af7e66ca3b9d40b651ab81f6b5a77275ea42df98a6b59f8adcd0500"
            },
            "downloads": -1,
            "filename": "rofify-0.0.41.tar.gz",
            "has_sig": false,
            "md5_digest": "ab523208479db73b85a52e26421c0126",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": null,
            "size": 18408,
            "upload_time": "2024-01-04T11:22:14",
            "upload_time_iso_8601": "2024-01-04T11:22:14.818877Z",
            "url": "https://files.pythonhosted.org/packages/3a/76/80ff5adc84100aeef64f0f3d03a3063d5ab51bafa29716dc14b4f778928e/rofify-0.0.41.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2024-01-04 11:22:14",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "dbkosky",
    "github_project": "rofify",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": true,
    "lcname": "rofify"
}
        
Elapsed time: 0.17940s