Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

new script lua/cmus_announce.lua: -- Announces now-playing song in cmus to current buffer/channel. #553

Merged
merged 1 commit into from
Jun 9, 2024

Conversation

Nomarian
Copy link
Contributor

@Nomarian Nomarian commented May 3, 2024

Script info

  • Script name: cmus_announce.lua
  • Version: 1
  • Script tags: lua, music, command, audio

Description

creates /cmus_announce command that will /me on current buffer/channel the currently playing song.

Checklist (new script)

  • Single commit, single file added
  • Commit message: New script name.py: short description…
  • No similar script already exists
  • Name: max 32 chars, only lower case letters, digits and underscores
  • Unique name, does not already exist in repository
  • No shebang on the first line
  • Comment in script with name/pseudo, e-mail and license
  • Only English in code/comments
  • Pure WeeChat API used, no extra API
  • Function hook_process is used for any blocking call
  • For Python script: works with Python 3 (Python 2 support is optional)
  • Score 100 / 100 displayed by weechat-script-lint

@Nomarian Nomarian changed the title new script lua/cmus-announce.lua: -- Announces currently playing song… new script lua/cmus-announce.lua: -- Announces currently playing song on cmus to current buffer/channel. May 3, 2024
@Nomarian Nomarian changed the title new script lua/cmus-announce.lua: -- Announces currently playing song on cmus to current buffer/channel. new script lua/cmus-announce.lua: -- Announces now-playing song in cmus to current buffer/channel. May 3, 2024
@kllmanu
Copy link

kllmanu commented May 3, 2024

Thank you for this script, I tested it today, looks good to me 👍

@Nomarian Nomarian force-pushed the cmus-announce.lua branch from 3d0704b to 8208b13 Compare May 3, 2024 19:47
@flashcode
Copy link
Member

Hi,
By convention scripts have underscores and no dashes in name, could you please rename your script to cmus_announce.lua?
See file: Contributing.md
Thanks!

@flashcode flashcode self-assigned this May 13, 2024
@flashcode flashcode added the new script New script label May 13, 2024
@Nomarian Nomarian force-pushed the cmus-announce.lua branch 2 times, most recently from ef11873 to 5a014c8 Compare May 13, 2024 22:32
@Nomarian Nomarian changed the title new script lua/cmus-announce.lua: -- Announces now-playing song in cmus to current buffer/channel. new script lua/cmus_announce.lua: -- Announces now-playing song in cmus to current buffer/channel. May 28, 2024
@Nomarian Nomarian force-pushed the cmus-announce.lua branch from 5a014c8 to c2d4a58 Compare June 3, 2024 00:39
@Nomarian
Copy link
Contributor Author

Nomarian commented Jun 3, 2024

Renamed. All good?

There's some bad bugs with it too, like it ultimately just runs a /me, which will fail on a server buffer and cmus hangs with a MPRIS warning when you launch it without MPRIS (but that's more a cmus bug not a weechat bug)

@Nomarian Nomarian force-pushed the cmus-announce.lua branch from c2d4a58 to 9ea6ee4 Compare June 3, 2024 00:55
@Nomarian Nomarian force-pushed the cmus-announce.lua branch from 9ea6ee4 to 8e2ad11 Compare June 3, 2024 05:57
@flashcode flashcode merged commit f27e2c0 into weechat:master Jun 9, 2024
1 check passed
@Nomarian Nomarian deleted the cmus-announce.lua branch June 9, 2024 22:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
new script New script
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants