Skip to content

Pollot/Spotify-Volume

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Spotify Volume

A simple python script to control Spotify volume using keyboard shortcuts.

Installation

  1. Install python from official website or by using winget in your terminal or command prompt:
winget install python
  1. Install dependencies by running the following command in your terminal or command prompt:
pip install spotipy keyboard python-dotenv
  1. Download this repository as ZIP and extract it or clone it using git

Set up

  1. Log into Spotify for Developers.

  2. Create a new app:

    • Choose any desired app name and description
    • Set the redirect URI to anything you prefer, such as https://open.spotify.com/ or http://localhost/
    • Select Web API
    • Accept the Developer Terms of Service and Design Guidelines
  3. Open your application details and enter them into .env-example file

  4. Rename .env-example file to .env

Usage

  1. Edit the spotify-volume.py file. Change the key bindings to your desired keyboard shortcuts by modifying these lines of code:
volume_up_key = "f13"
volume_down_key = "f14"
volume_mute_key = "f15"
exit_key = "f12"
  1. Run the Python script by opening the spotify-volume.bat file or through the shell with python [path]/spotify-volume.py. Running the script directly won't work because it needs to create a cache file for your Spotify token.

Additional information

You can change specific settings by modifying these lines of code:

volume_step = 2   # The increment/decrement step size for volume adjustments
max_volume = 100  # Maximum playback volume
min_volume = 0    # Minimum playback volume
bar_length = 25   # Volume bar length
refresh_rate = 5  # Time in seconds to refresh playback data

About

A simple python script to control Spotify volume using keyboard shortcuts

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published