Giter Site home page Giter Site logo

profanity-plugins's Issues

Plugin to display current song in presence stanza

Hey! I'm writing a plugin in C, even though I'm not good at it, and I don't understand why it doesn't work. Can someone please take a look at my code?

I'm using a separate thread to query playerctl and set the status. It will set the status once and never update it as if the nanosleep call wasn't working

#include <playerctl/playerctl.h>
#include <profapi.h>
#include <pthread.h>
#include <stdio.h>
#include <time.h>
#include <unistd.h>

void *cb(void *pl) {
  PlayerctlPlayer *plctl = (PlayerctlPlayer *)pl;
  gchar res[1024];
  while (1) {
    gchar *artist = playerctl_player_get_artist(plctl, NULL);
    gchar *title = playerctl_player_get_title(plctl, NULL);
    sprintf(res, "<presence><status>%s - %s</status></presence>", artist,
            title);
    prof_send_stanza(res);
    struct timespec ts;
    ts.tv_sec = 5;
    ts.tv_nsec = 0;
    nanosleep(&ts, NULL);
  }
}

void prof_on_connect(const char *const account_name,
                     const char *const fulljid) {
  PlayerctlPlayer *plctl = playerctl_player_new(NULL, NULL);
  pthread_t thread;
  if (pthread_create(&thread, NULL, cb, plctl)) {
    fprintf(stderr, "Error creating thread\n");
  }
}

Profanity on macOS via Homebrew doesn't support python plugins

Hello everyone!

I installed Profanity using these steps: http://www.profanity.im/install.html#os-x, with terminal notifier but without pgp support: brew install profanity --with-terminal-notifier --without-gpgme.

Unfortunately, running profanity -v shows that python plugins are disabled.

Profanity, version 0.6.0dev.master.b768c8b
Copyright (C) 2012 - 2017 James Booth <[email protected]>.
License GPLv3+: GNU GPL version 3 or later <https://www.gnu.org/licenses/gpl.html>

This is free software; you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.

Build information:
XMPP library: libstrophe
Desktop notification support: Enabled
OTR support: Enabled
PGP support: Disabled
C plugins: Enabled
Python plugins: Disabled
GTK icons: Disabled

What do I have to do to enable python plugins?

Play non-patented formats

Is it possible for the sounds plugin to play ogg and other non-patented formats in addition to the default mp3?

[emoticons.py] I can't get this plugin to work

I downloaded the code from here: https://github.com/profanity-im/profanity-plugins/blob/master/stable/emoticons.py

I installed it using the command in profanity. Also I did: $ pip install future, but when I send :) it does not convert to unicode.

Am I missing any more extra steps or is there a problem with the plugin?

I also found this other modified code, but it didn't work for me either:
5faccde#diff-2bf673a502cd2061cb958c02729463534aa7818eec85d5d6fe99a0b824e6ef5a

I have:

$ profanity  -v
Profanity, version 0.10.0
Copyright (C) 2012 - 2019 James Booth <[email protected]>.
Copyright (C) 2019 - 2021 Michael Vetter <[email protected]>.
License GPLv3+: GNU GPL version 3 or later <https://www.gnu.org/licenses/gpl.html>

This is free software; you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.

Build information:
XMPP library: libmesode
Desktop notification support: Disabled
OTR support: Enabled (libotr 4.1.1)
PGP support: Enabled (libgpgme 1.15.1)
OMEMO support: Enabled
C plugins: Enabled
Python plugins: Enabled (3.8.8)
GTK icons: Disabled

ImportError: No module named gtk

Greetings, I modified code of paste.py plugin for using pygtk instead of tkinter, because I have its already installed. But I get error mentioned in subject:

11/04/2016 10:15:33: stderr: ERR: Traceback (most recent call last):
11/04/2016 10:15:33: stderr: ERR:   File "/home/user/.local/share/profanity/plugins/paste.py", line 6, in <module>
11/04/2016 10:15:33: stderr: ERR:     import gtk
11/04/2016 10:15:33: stderr: ERR: ImportError: No module named gtk

Module pygtk installed in system, and can be succesfully imported in IPython.

Code of modified plugin:
https://gist.github.com/seamus-45/b35ce7e8b1fe80fa51da8c2cc418f7a0

Profanity, version 0.5.0dev.branch-master.699e08b
Copyright (C) 2012 - 2016 James Booth <[email protected]>.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>

This is free software; you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.

Build information:
XMPP library: libstrophe
Desktop notification support: Enabled
OTR support: Disabled
PGP support: Disabled
C plugins: Enabled
Python plugins: Enabled

What am I doing wrong?

Segfault when using the emoticons plugin

Hi,

i just tried to familiarise myself with the plugins API and ran into segfaults when using the emoticons.py plugin every time i receive a message which would have an emoticon in it. After some testing i am pretty sure there is an issue with using unicode inside the returning message.

Not sure if i can fix it from python side. Any hint is appreciated :)

Pushbullet plugin

Hello guys, where I to develop a pusbullet profanity plugin, would it be possible to get merged with profanity-plugins, or is it too early of a development stage for plugins repo for such undertakings?

Sounds plugin interrupts typing

I have noticed that if I'm typing while receiving a message, hence when the sound-plugin runs, typing gets locked up/frozen. It differs, I'm guessing that it depends on the timing, because I get several different ways it can act:

  • I lose a few letters that I typed only. (no serious bother)
  • The input prompt seems frozen for some seconds, and am not able to type. (once it lasted for quite some time, and I chose to restart profanity to resolve it)
  • I cannot type for a moment, and the sound is played ~10 times over in quick succession. (quite annoying)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.