Skip to content

Commit

Permalink
update README
Browse files Browse the repository at this point in the history
  • Loading branch information
goktug97 committed Feb 29, 2020
1 parent 65fd78d commit 453f643
Show file tree
Hide file tree
Showing 2 changed files with 31 additions and 2 deletions.
29 changes: 29 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -59,11 +59,40 @@ spotify-lyrics
- Update Lyrics: Deletes cached lyrics and fetches lyrics from the internet.
- Help: Show keybindings 5 seconds.

### DBUS
The lyrics can be scrolled via dbus.
Scroll the lyrics without changing the focus.

#### Python Example

``` python
import dbus

bus = dbus.SessionBus()
lyrics = bus.get_object('com.spotify_lyrics.line', '/com/spotify_lyrics')
lyrics.move(1) # Scroll Down
lyrics.move(-1) # Scroll Up
```

#### Bash Example

``` bash
#!/usr/bin/env bash
dbus-send --print-reply --dest="com.spotify_lyrics.line"\
"/com/spotify_lyrics"\
"com.spotify_lyrics.line.move"\
int32:$1 > /dev/null
```

I call this bash script from my i3 config. See below.

### Example Use Case (i3wm)
```i3
bindsym $mod+Shift+Home exec st -n Lyrics -e spotify-lyrics
for_window [instance="Lyrics"] floating enable; [instance="Lyrics"] move position center
for_window [instance="Lyrics"] resize set 644 388
bindsym $mod+Control+k exec lyrics-move -1
bindsym $mod+Control+j exec lyrics-move 1
```

### Example Use Case (Emacs)
Expand Down
4 changes: 2 additions & 2 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
long_description = f.read()

setup(name='yet-another-spotify-lyrics',
version='2.3.1',
version='2.4.0',
description='Command Line Spotify Lyrics with Album Cover',
author='Göktuğ Karakaşlı',
author_email='karakasligk@gmail.com',
Expand All @@ -17,7 +17,7 @@
long_description_content_type='text/markdown',
url='https://github.com/goktug97/yet-another-spotify-lyrics',
download_url=(
'https://github.com/goktug97/yet-another-spotify-lyrics/archive/v2.3.1.tar.gz'),
'https://github.com/goktug97/yet-another-spotify-lyrics/archive/v2.4.0.tar.gz'),
py_modules=[os.path.splitext(os.path.basename(path))[0]
for path in ['spotify_lyrics',
'utils',
Expand Down

0 comments on commit 453f643

Please sign in to comment.