tomasklaen / uosc

Feature-rich minimalist proximity-based UI for MPV player.
GNU Lesser General Public License v2.1
1.86k stars 68 forks source link

5.6.0 copy-to-clipboard notification #989

Closed mrfragger closed 2 months ago

mrfragger commented 2 months ago

Ctrl+c script-binding uosc/copy-to-clipboard #! [Video Online] > Copy currently playing online video URL

works great for URL and local files but notification isn't showing unlike the paste command which shows 'Added to playlist'

mp.commandv('show-text', t('Copied to clipboard') .. ': ' .. payload, 3000) I see the code is there but it's over my head to figure out why it's not showing

mrfragger commented 2 months ago

I did the 2 deletions and 2 additions but still no notification...copying works just fine though. Tested on a mac Sonomoa 14.5....with 0.38 and nightly build. Also tested on Linux Mint..same thing pasting shows notification and copying doesn't.

tomasklaen commented 2 months ago

When does copying not show notification?

mrfragger commented 2 months ago

The notification that it has been copied never shows either when copying a playing youtube URL or playing a local video or audio. The copying URL and filepath/file definitely do work and copy to the clipboard though. It's not a huge deal though.

tomasklaen commented 2 months ago

Since the commit above, the set_clipboard() function now displays the notification every time it's called. It's impossible for you to receive a path in clipboard, and not see the notification. Unless you disabled notifications, but if others are showing, that's probably not the case.

I guess you're still on an older commit.

mrfragger commented 2 months ago

so so sorry. I modfied the uosc files in the dir I used to upgrade uosc. on mac..not the actual ones. I should delete those right away once copied. Once I modified the correct files with the commit it does indeed work.