Skip to content

Commit 453f643

Browse files
committed
update README
1 parent 65fd78d commit 453f643

File tree

2 files changed

+31
-2
lines changed

2 files changed

+31
-2
lines changed

README.md

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -59,11 +59,40 @@ spotify-lyrics
5959
- Update Lyrics: Deletes cached lyrics and fetches lyrics from the internet.
6060
- Help: Show keybindings 5 seconds.
6161

62+
### DBUS
63+
The lyrics can be scrolled via dbus.
64+
Scroll the lyrics without changing the focus.
65+
66+
#### Python Example
67+
68+
``` python
69+
import dbus
70+
71+
bus = dbus.SessionBus()
72+
lyrics = bus.get_object('com.spotify_lyrics.line', '/com/spotify_lyrics')
73+
lyrics.move(1) # Scroll Down
74+
lyrics.move(-1) # Scroll Up
75+
```
76+
77+
#### Bash Example
78+
79+
``` bash
80+
#!/usr/bin/env bash
81+
dbus-send --print-reply --dest="com.spotify_lyrics.line"\
82+
"/com/spotify_lyrics"\
83+
"com.spotify_lyrics.line.move"\
84+
int32:$1 > /dev/null
85+
```
86+
87+
I call this bash script from my i3 config. See below.
88+
6289
### Example Use Case (i3wm)
6390
```i3
6491
bindsym $mod+Shift+Home exec st -n Lyrics -e spotify-lyrics
6592
for_window [instance="Lyrics"] floating enable; [instance="Lyrics"] move position center
6693
for_window [instance="Lyrics"] resize set 644 388
94+
bindsym $mod+Control+k exec lyrics-move -1
95+
bindsym $mod+Control+j exec lyrics-move 1
6796
```
6897

6998
### Example Use Case (Emacs)

setup.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
long_description = f.read()
99

1010
setup(name='yet-another-spotify-lyrics',
11-
version='2.3.1',
11+
version='2.4.0',
1212
description='Command Line Spotify Lyrics with Album Cover',
1313
author='Göktuğ Karakaşlı',
1414
author_email='[email protected]',
@@ -17,7 +17,7 @@
1717
long_description_content_type='text/markdown',
1818
url='https://github.com/goktug97/yet-another-spotify-lyrics',
1919
download_url=(
20-
'https://github.com/goktug97/yet-another-spotify-lyrics/archive/v2.3.1.tar.gz'),
20+
'https://github.com/goktug97/yet-another-spotify-lyrics/archive/v2.4.0.tar.gz'),
2121
py_modules=[os.path.splitext(os.path.basename(path))[0]
2222
for path in ['spotify_lyrics',
2323
'utils',

0 commit comments

Comments
 (0)