Comments (14)
recently made the switch to nixos & not really in a comfortable place to figure out how to package this myself at the moment so I won’t be able to help :(
from spotify-player.
@aome510 hmmm, it isn't!
2023-09-09T17:44:41.506603Z INFO spotify_player: General configurations: AppConfig { theme: "dracula", client_id: "######", client_port: 8080, copy_command: Command { command: "xclip", args: ["-sel", "c"] }, playback_format: "{track} • {artists}\n{album}\n{metadata}", notify_format: NotifyFormat { summary: "{track} • {artists}", body: "{album}" }, tracks_playback_limit: 50, proxy: None, ap_port: None, app_refresh_duration_in_ms: 32, playback_refresh_duration_in_ms: 0, page_size_in_rows: 20, track_table_item_max_len: 32, play_icon: "▶", pause_icon: "▌▌", liked_icon: "♥", border_type: Plain, progress_bar_type: Rectangle, playback_window_position: Top, playback_window_width: 6, enable_media_control: true, enable_streaming: true, enable_cover_image_cache: true, default_device: "spotify-player", device: DeviceConfig { name: "fedora", device_type: "speaker", volume: 100, bitrate: 320, audio_cache: true } }
and here's my config
client_id = "#####"
[device]
name = "fedora"
volume = 100
bitrate = 320
audio_cache = true
copy_command = { command = "/usr/bin/wl-copy", args = [] } # linux
just to make sure it's in the correct place - /home/tho/.config/spotify-player/app.toml
edit 1: okay i've found the culprit copy_command
should be at the top level, not at device
from spotify-player.
i suggest only displaying the link as copying it would require support for Wayland, X11, etc.
from spotify-player.
@apprehensions, @noelpilled can you guys test the changes in #110? The copy-link action should be available for all Spotify items. I only tested on macos. The default copy_command
on Linux is xsel -ib
but feel free to change it by setting copy_command
option in app.toml
file. For example,
copy_command = { command = "...", args = ["...", "..."] }
from spotify-player.
@aome510, why did you device to do a copy method via a copy command? why don't you just display the track link and have the terminal handle the copying? anyhoo, xsel
should not be used; xclip
should, as its the most used and well-known C xclipboard program. you should also provide an example for wayland via wl-copy
.
however, since you said i can test:
copy_command = { command = "xclip", args = ["-sel", "c"] }
2023-01-19T11:24:27.311804Z INFO client_request{request=GetUserPlaylists}: spotify_player::client: successfully handled the client request, took: 621ms
2023-01-19T11:24:29.580103Z ERROR terminal_event{event=Key(KeyEvent { code: Enter, modifiers: NONE, kind: Press, state: NONE })}: spotify_player::event: Failed to handle event: No such file or directory (os error 2)
2023-01-19T11:24:30.650885Z ERROR terminal_event{event=Key(KeyEvent { code: Enter, modifiers: NONE, kind: Press, state: NONE })}: spotify_player::event: Failed to handle event: No such file or directory (os error 2)
2023-01-19T11:24:30.696877Z ERROR terminal_event{event=Key(KeyEvent { code: Enter, modifiers: NONE, kind: Press, state: NONE })}: spotify_player::event: Failed to handle event: No such file or directory (os error 2)
2023-01-19T11:24:30.804890Z ERROR terminal_event{event=Key(KeyEvent { code: Enter, modifiers: NONE, kind: Press, state: NONE })}: spotify_player::event: Failed to handle event: No such file or directory (os error 2)
tl;dr, it doesn't work for me. xclip
is similar to xsel
as it takes in stdin as input by default.
from spotify-player.
why did you device to do a copy method via a copy command? why don't you just display the track link and have the terminal handle the copying?
I found it not trivial in my case to copy display text from the terminal. Not sure if it was because the text is rendered by TUI library but I couldn't just select it like I do normally with terminal text. That said, imo, most people would prefer to have one-step action to achieve the goal instead of displaying the link, trying to copy it with terminal.
tl;dr, it doesn't work for me. xclip is similar to xsel as it takes in stdin as input by default.
Judging from the log, it seems the app couldn't find xclip
from your path. Can you specify the full path in the app.toml
config file then try again?
from spotify-player.
xsel should not be used; xclip should, as its the most used and well-known C xclipboard program. you should also provide an example for wayland via wl-copy.
I could change it to xclip
for linux. I'm not too familiar with wayland though
from spotify-player.
It supports simply displaying the link.. Right?
from spotify-player.
Curious what the use case for simply displaying the link is? Aren't the strings pretty long?
from spotify-player.
It supports simply displaying the link.. Right?
No, it uses a default command to copy the link to clipboard. Like I mentioned before, I found it nontrivial to display the link and copy to clipboard using my terminal.
from spotify-player.
i added
copy_command = { command = "wl-copy", args = [] } # linux
to my config, but i still can't copyTrackLink. when i press 5 nothing happens (not even the menu closes)
from spotify-player.
i added
copy_command = { command = "wl-copy", args = [] } # linux
to my config, but i still can't copyTrackLink. when i press 5 nothing happens (not even the menu closes)
Can you check if there is any errors in the application's log (in ~/.cache/spotify_player/
)?
from spotify-player.
it says
2023-09-09T11:25:05.900974Z ERROR terminal_event{event=Key(KeyEvent { code: Char('5'), modifiers: NONE, kind: Press, state: NONE })}: spotify_player::event: Failed to handle event: No such file or directory (os error 2)
2023-09-09T11:25:06.141760Z ERROR terminal_event{event=Key(KeyEvent { code: Char('5'), modifiers: NONE, kind: Press, state: NONE })}: spotify_player::event: Failed to handle event: No such file or directory (os error 2)
2023-09-09T11:25:06.340173Z ERROR terminal_event{event=Key(KeyEvent { code: Char('5'), modifiers: NONE, kind: Press, state: NONE })}: spotify_player::event: Failed to handle event: No such file or directory (os error 2)
2023-09-09T11:25:06.496259Z ERROR terminal_event{event=Key(KeyEvent { code: Char('5'), modifiers: NONE, kind: Press, state: NONE })}: spotify_player::event: Failed to handle event: No such file or directory (os error 2)
2023-09-09T11:25:07.604987Z ERROR terminal_event{event=Key(KeyEvent { code: Enter, modifiers: NONE, kind: Press, state: NONE })}: spotify_player::event: Failed to handle event: No such file or directory (os error 2)
2023-09-09T11:25:07.801972Z ERROR terminal_event{event=Key(KeyEvent { code: Enter, modifiers: NONE, kind: Press, state: NONE })}: spotify_player::event: Failed to handle event: No such file or directory (os error 2)
2023-09-09T11:25:07.996163Z ERROR terminal_event{event=Key(KeyEvent { code: Enter, modifiers: NONE, kind: Press, state: NONE })}: spotify_player::event: Failed to handle event: No such file or directory (os error 2)
2023-09-09T11:25:08.150035Z ERROR terminal_event{event=Key(KeyEvent { code: Enter, modifiers: NONE, kind: Press, state: NONE })}: spotify_player::event: Failed to handle event: No such file or directory (os error 2)
2023-09-09T11:27:01.026774Z INFO spotify_player::streaming: Got an event from the integrated player: TimeToPreloadNextTrack { play_request_id: 0, track_id: SpotifyId { id: 254099813482921766222209309487781320590, audio_type: Track } }
2023-09-09T11:27:02.022980Z INFO client_request{request=GetCurrentPlayback}: spotify_player::client: successfully handled the client request, took: 996ms
even though wl-copy is in path
edit 1: even if i write the full path to wl-copy (/usr/bin/wl-copy) it says no such file or directory
edit 2: with the same config on macos everything works fine (except s/wl-copy/pbcopy)
from spotify-player.
it says
2023-09-09T11:25:05.900974Z ERROR terminal_event{event=Key(KeyEvent { code: Char('5'), modifiers: NONE, kind: Press, state: NONE })}: spotify_player::event: Failed to handle event: No such file or directory (os error 2) 2023-09-09T11:25:06.141760Z ERROR terminal_event{event=Key(KeyEvent { code: Char('5'), modifiers: NONE, kind: Press, state: NONE })}: spotify_player::event: Failed to handle event: No such file or directory (os error 2) 2023-09-09T11:25:06.340173Z ERROR terminal_event{event=Key(KeyEvent { code: Char('5'), modifiers: NONE, kind: Press, state: NONE })}: spotify_player::event: Failed to handle event: No such file or directory (os error 2) 2023-09-09T11:25:06.496259Z ERROR terminal_event{event=Key(KeyEvent { code: Char('5'), modifiers: NONE, kind: Press, state: NONE })}: spotify_player::event: Failed to handle event: No such file or directory (os error 2) 2023-09-09T11:25:07.604987Z ERROR terminal_event{event=Key(KeyEvent { code: Enter, modifiers: NONE, kind: Press, state: NONE })}: spotify_player::event: Failed to handle event: No such file or directory (os error 2) 2023-09-09T11:25:07.801972Z ERROR terminal_event{event=Key(KeyEvent { code: Enter, modifiers: NONE, kind: Press, state: NONE })}: spotify_player::event: Failed to handle event: No such file or directory (os error 2) 2023-09-09T11:25:07.996163Z ERROR terminal_event{event=Key(KeyEvent { code: Enter, modifiers: NONE, kind: Press, state: NONE })}: spotify_player::event: Failed to handle event: No such file or directory (os error 2) 2023-09-09T11:25:08.150035Z ERROR terminal_event{event=Key(KeyEvent { code: Enter, modifiers: NONE, kind: Press, state: NONE })}: spotify_player::event: Failed to handle event: No such file or directory (os error 2) 2023-09-09T11:27:01.026774Z INFO spotify_player::streaming: Got an event from the integrated player: TimeToPreloadNextTrack { play_request_id: 0, track_id: SpotifyId { id: 254099813482921766222209309487781320590, audio_type: Track } } 2023-09-09T11:27:02.022980Z INFO client_request{request=GetCurrentPlayback}: spotify_player::client: successfully handled the client request, took: 996ms
even though wl-copy is in path
edit 1: even if i write the full path to wl-copy (/usr/bin/wl-copy) it says no such file or directory
edit 2: with the same config on macos everything works fine (except s/wl-copy/pbcopy)
interesting, can you provide a complete log as well? I want to make sure that the copy_command
is correctly configured.
from spotify-player.
Related Issues (20)
- ResumePause doesn't always register. Play/Pause Icon is confused. HOT 2
- Sixel output messed HOT 21
- [Question] Alternative for Free Non-Premium account
- OpenSpotifyLinkFromClipboard does not work on Wayland HOT 16
- [Question] How can I save an album? HOT 1
- List Que? HOT 1
- Incredible! Thank you! 😄👍🏼
- Playlists don't show up on the homepage HOT 6
- Glitchy image album cover image behavior in kitty Mac OS HOT 10
- error loading playlists without images HOT 3
- Opening and closing pop up messes up the UI HOT 2
- Unable show album cover in tmux. HOT 6
- Devices doesn't show Google Cast devices HOT 1
- Control + S doesnt set to Shuffle HOT 4
- Add album to queue
- Incorrect Playlist Order in Library HOT 2
- Add option to disable album art and reduce header height HOT 7
- Ask confirmation before quiting HOT 2
- Make notification timeout configurable HOT 1
- No Devices show up / Devices are empty HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from spotify-player.