Git Product home page Git Product logo

ulauncher-clipboard's Introduction

ulauncher-clipboard

Ulauncher extension for managing your clipboard history

Usage

Open Ulauncher and type the keyword c followed by a space. This will search your clipboard history. Activate an entry (for example by pressing enter or clicking on it). This will copy it your actual clipboard. Now you can paste it elsewhere.

From Ulauncher's preferences you can change the keyword and the clipboard manager to use, number of results to be shown.

If you want to use GPaste or CopyQ or Clipman, you have to install them. Unlike the other options Clipster will be downloaded automatically and is used as the fallback in "Auto" mode if you don't have any of the others.

Copy hook

ulauncher-clipboard supports a hook to run after activating an entry in the list and copying it to the clipboard. This is an indirect way to support pasting. It's not possible to achieve pasting safely, but depending on your system environment you may be able to run a command to trigger "ctrl+v" or "shift+insert". This will not work in all applications, and may even have unwanted side effects, so beware!

In X11 you can use xdotool to do this. Ex:

xdotool key ctrl+v

License

The code is licensed as MIT.

ulauncher-clipboard will try to use your icon theme. The fallback icons (also used in the screenshot) are part of Paper Icons by Sam Hewitt, and is licensed under CC-SA-4.0

ulauncher-clipboard's People

Contributors

friday avatar iss-in avatar jurgel avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

ulauncher-clipboard's Issues

Delete entry

It's possible to use alt_enter as a secondary action, to show a list of all actions or trigger one directly.

I'm personally not a fan of this combination (prefer Alfred's "right arrow") and don't need the delete method that badly either, so if you do, let me know or submit a PR (I'll be happy to review it).

The logic needs to go in the clipboard manager as a new method, since the actual code will differ by manager. You don't need to cover all three clipboard managers.

Deduplicate CopyQ entries

It seems CopyQ isn't doing deduplication when you insert using their own api (which I'm looking into doing, to resolve issues due to the gtk clipboard limitations).

Highlight results

Search results formatting doesn't support highlighting. It can't be solved without Ulauncher changing the result view, so this is blocked.

Does not show copied images

When copying an image, images do not show up on ULauncher.
I use CopyQ and it does have the ability to remember what images I copied.

Cache the xml after the first call

The xml file is parsed and searched on every keystroke, which is clearly inefficient.

Ulauncher's events are a bit primitive for handling this, so some kind of time based workaround may be required. I can't notice any real performance issues however (with ~2000 entries in my clipboard), so this is not a prio.

Error on libnotify

Error messages $ ulauncher -v --dev

ulauncher log

2022-07-16 13:48:11,681 | INFO | ulauncher.api.server.ExtensionRunner: _run_process() | Extension "com.github.friday.ulauncher-clipboard" started. PID 26512
  File "/home/system7/.local/share/ulauncher/extensions/com.github.friday.ulauncher-clipboard/main.py", line 3, in <module>
  File "/home/system7/.local/share/ulauncher/extensions/com.github.friday.ulauncher-clipboard/lib.py", line 5, in <module>
2022-07-16 13:48:11,736 | ERROR | ulauncher.api.server.ExtensionRunner: _run_process() | Extension "com.github.friday.ulauncher-clipboard" exited instantly with code 1
2022-07-16 13:48:11,737 | ERROR | ulauncher.api.server.ExtensionRunner: _run_process() | Extension "com.github.friday.ulauncher-clipboard" failed with an error: ValueError: Namespace Notify not available for version 0.7
PID 26750
  File "/home/system7/.local/share/ulauncher/extensions/com.github.friday.ulauncher-clipboard/main.py", line 3, in <module>
    from lib import logger, try_int, ensure_status, set_clipboard, show_message
  File "/home/system7/.local/share/ulauncher/extensions/com.github.friday.ulauncher-clipboard/lib.py", line 5, in <module>
    gi.require_versions({
  File "/usr/lib/python3.10/site-packages/gi/__init__.py", line 149, in require_versions
    require_version(module_name, module_version)
  File "/usr/lib/python3.10/site-packages/gi/__init__.py", line 129, in require_version
    raise ValueError('Namespace %s not available for version %s' %
ValueError: Namespace Notify not available for version 0.7

libnotify

$ pacman -Qi libnotify                                                                                                                                                                            
Enter Password or Place finger on fingerprint reader: ***
Name            : libnotify
Version         : 0.8.0-1
Description     : Library for sending desktop notifications
Architecture    : x86_64
URL             : https://gitlab.gnome.org/GNOME/libnotify
Licenses        : LGPL
Groups          : None
Provides        : libnotify.so=4-64
Depends On      : gdk-pixbuf2  libglib-2.0.so=0-64  libgobject-2.0.so=0-64  libgio-2.0.so=0-64  libgdk_pixbuf-2.0.so=0-64
Optional Deps   : None
Required By     : avvie  discord  file-roller  geary  gnome-bluetooth-3.0  gnome-disk-utility  gnome-online-accounts  gnome-remote-desktop  gnome-settings-daemon  gnome-user-share  ibus  insomnia-bin
                  runjs-bin  solaar  system-config-printer  timeshift  ulauncher  vino  visual-studio-code-bin  webkit2gtk  webkit2gtk-4.1  zenity
Optional For    : balena-etcher  brave-bin  firefox  geoclue  vlc
Conflicts With  : None
Replaces        : None
Installed Size  : 321.34 KiB
Packager        : Jan Alexander Steffens (heftig) <[email protected]>
Build Date      : Fri 15 Jul 2022 01:02:12 CEST
Install Date    : Fri 15 Jul 2022 10:44:09 CEST
Install Reason  : Installed as a dependency for another package
Install Script  : No
Validated By    : Signature

Clipboard extension doesn't work since update to ubuntu 21.10

In ubuntu 20.04 I didn't have problem. After dist-upgrade from 20.04 to 21.10, clipboard extension didn't work. I try after restart but didn't work. I try too uninstall/install extension but same issue.
I already use with gpaste and it works when I used it standalone. I try with copyq too but doesn't work too.

Distro ubuntu 21.10 - gnome 40

Log when I trigger keyword to open clipboard addon on ulauncher

com.github.friday.ulauncher-clipboard | 2022-01-05 18:50:57,280 | DEBUG | ulauncher.api.client.Client: on_message() | Incoming event KeywordQueryEvent
Traceback (most recent call last):
  File "<string>", line 1, in <module>
AttributeError: 'NoneType' object has no attribute 'get_filename'
Traceback (most recent call last):
  File "/usr/lib/python3/dist-packages/ulauncher/api/client/Client.py", line 54, in on_message
    self.extension.trigger_event(event)
  File "/usr/lib/python3/dist-packages/ulauncher/api/client/Extension.py", line 52, in trigger_event
    action = listener.on_event(event, self)
  File "/home/rmaud/.local/share/ulauncher/extensions/com.github.friday.ulauncher-clipboard/main.py", line 89, in on_event
    icon = getThemeIcon('edit-paste', 32)
  File "/home/rmaud/.local/share/ulauncher/extensions/com.github.friday.ulauncher-clipboard/lib.py", line 40, in getThemeIcon
    return execGet(sys.executable, '-c', "import gi; gi.require_version('Gtk', '3.0'); from gi.repository import Gtk; print({})".format(getIconCode))
  File "/home/rmaud/.local/share/ulauncher/extensions/com.github.friday.ulauncher-clipboard/lib.py", line 21, in execGet
    return subprocess.check_output(list(args)).rstrip().decode('utf-8')
  File "/usr/lib/python3.9/subprocess.py", line 424, in check_output
    return run(*popenargs, stdout=PIPE, timeout=timeout, check=True,
  File "/usr/lib/python3.9/subprocess.py", line 528, in run
    raise CalledProcessError(retcode, process.args,
subprocess.CalledProcessError: Command '['/usr/bin/python3', '-c', "import gi; gi.require_version('Gtk', '3.0'); from gi.repository import Gtk; print(Gtk.IconTheme.get_default().lookup_icon('edit-paste', 32, 0).get_filename())"]' returned non-zero exit status 1.

Ask me if you have more questions

Did not find KDE Plasma Clipboard Manager

  • Describe your issue in detail (expected behavior and how the actual behavior differs)
    Did not find KDE Plasmas own Clipboard Manager

  • Include which clipboard manager you are using
    The one included in KDE

  • Include complete logs running ulauncher with ulauncher -v
    2023-09-12 17:34:31,778 | INFO | ulauncher: main() | Ulauncher version 5.15.3
    2023-09-12 17:34:31,778 | INFO | ulauncher: main() | Extension API version 2.0.0
    2023-09-12 17:34:31,778 | INFO | ulauncher: main() | GTK+ 3.24.38
    2023-09-12 17:34:31,778 | INFO | ulauncher: main() | Is Wayland: True
    2023-09-12 17:34:31,779 | INFO | ulauncher: main() | Wayland compatibility: on
    2023-09-12 17:34:31,797 | DEBUG | ulauncher.ui.windows.Builder: init() | consider using a pythonic name instead of design name 'input-box'
    2023-09-12 17:34:31,799 | DEBUG | ulauncher.ui.windows.Builder: do_connect() | connect builder by name 'ulauncher_window','destroy', 'on_destroy'
    2023-09-12 17:34:31,799 | DEBUG | ulauncher.ui.windows.Builder: do_connect() | connect builder by name 'ulauncher_window','focus_in_event', 'on_focus_in_event'
    2023-09-12 17:34:31,799 | DEBUG | ulauncher.ui.windows.Builder: do_connect() | connect builder by name 'ulauncher_window','focus_out_event', 'on_focus_out_event'
    2023-09-12 17:34:31,800 | DEBUG | ulauncher.ui.windows.Builder: do_connect() | connect builder by name 'input','key_press_event', 'on_input_key_press_event'
    2023-09-12 17:34:31,801 | DEBUG | ulauncher.ui.windows.Builder: log_unconnected_functions() | Not connected to builder 'on_input_changed'
    2023-09-12 17:34:31,801 | DEBUG | ulauncher.ui.windows.Builder: log_unconnected_functions() | Not connected to builder 'on_mnu_about_activate'
    2023-09-12 17:34:31,801 | DEBUG | ulauncher.ui.windows.Builder: log_unconnected_functions() | Not connected to builder 'on_mnu_close_activate'
    2023-09-12 17:34:31,801 | DEBUG | ulauncher.ui.windows.Builder: log_unconnected_functions() | Not connected to builder 'on_mnu_preferences_activate'
    2023-09-12 17:34:31,801 | DEBUG | ulauncher.ui.windows.Builder: log_unconnected_functions() | Not connected to builder 'on_preferences_dialog_destroyed'
    2023-09-12 17:34:31,802 | DEBUG | ulauncher.utils.display: get_screens() | Found 1 monitor(s)
    2023-09-12 17:34:31,802 | DEBUG | ulauncher.utils.display: get_screens() | Monitor 0 - X: 0, Y: 0, W: 1745, H: 982
    2023-09-12 17:34:31,808 | DEBUG | ulauncher.ui.windows.UlauncherWindow: show_results() | render 0 results
    2023-09-12 17:34:31,809 | INFO | ulauncher.api.server.ExtensionServer: _start_thread() | Starting WS server on port 5054
    2023-09-12 17:34:31,809 | INFO | ulauncher.search.apps.app_watcher: start() | Started scanning desktop dirs
    2023-09-12 17:34:31,825 | INFO | ulauncher.utils.desktop.reader: find_apps_cached() | Found 60 apps in cache
    2023-09-12 17:34:31,826 | INFO | ulauncher.utils.desktop.reader: read_desktop_file() | Could not read "/usr/share/applications/org.kde.mobile.okular_fb.desktop": constructor returned NULL
    2023-09-12 17:34:31,827 | INFO | ulauncher.utils.desktop.reader: read_desktop_file() | Could not read "/usr/share/applications/org.kde.mobile.okular_djvu.desktop": constructor returned NULL
    2023-09-12 17:34:31,829 | INFO | ulauncher.utils.desktop.reader: read_desktop_file() | Could not read "/usr/share/applications/org.kde.mobile.okular_mobi.desktop": constructor returned NULL
    2023-09-12 17:34:31,832 | INFO | ulauncher.utils.desktop.reader: read_desktop_file() | Could not read "/usr/share/applications/org.kde.mobile.okular_xps.desktop": constructor returned NULL
    2023-09-12 17:34:31,832 | INFO | ulauncher.utils.desktop.reader: read_desktop_file() | Could not read "/usr/share/applications/org.kde.mobile.okular_dvi.desktop": constructor returned NULL
    2023-09-12 17:34:31,834 | INFO | ulauncher.utils.desktop.reader: read_desktop_file() | Could not read "/usr/share/applications/org.kde.mobile.okular_epub.desktop": constructor returned NULL
    2023-09-12 17:34:31,835 | INFO | ulauncher.utils.desktop.reader: read_desktop_file() | Could not read "/usr/share/applications/org.kde.mobile.okular_chm.desktop": constructor returned NULL
    2023-09-12 17:34:31,835 | INFO | ulauncher.utils.desktop.reader: read_desktop_file() | Could not read "/usr/share/applications/org.kde.mobile.okular_ghostview.desktop": constructor returned NULL
    2023-09-12 17:34:31,839 | INFO | ulauncher.utils.desktop.reader: read_desktop_file() | Could not read "/usr/share/applications/org.kde.mobile.okular_pdf.desktop": constructor returned NULL
    2023-09-12 17:34:31,841 | INFO | ulauncher.utils.desktop.reader: read_desktop_file() | Could not read "/usr/share/applications/org.kde.mobile.okular_txt.desktop": constructor returned NULL
    2023-09-12 17:34:31,843 | INFO | ulauncher.utils.desktop.reader: read_desktop_file() | Could not read "/usr/share/applications/org.kde.kwin_rules_dialog.desktop": constructor returned NULL
    2023-09-12 17:34:31,843 | INFO | ulauncher.utils.desktop.reader: read_desktop_file() | Could not read "/usr/share/applications/org.kde.mobile.okular_tiff.desktop": constructor returned NULL
    2023-09-12 17:34:31,846 | INFO | ulauncher.utils.desktop.reader: read_desktop_file() | Could not read "/usr/share/applications/org.kde.kded5.desktop": constructor returned NULL
    2023-09-12 17:34:31,848 | INFO | ulauncher.utils.desktop.reader: read_desktop_file() | Could not read "/usr/share/applications/org.kde.mobile.okular_comicbook.desktop": constructor returned NULL
    2023-09-12 17:34:31,848 | INFO | ulauncher.utils.desktop.reader: read_desktop_file() | Could not read "/usr/share/applications/org.kde.mobile.okular_plucker.desktop": constructor returned NULL
    2023-09-12 17:34:31,851 | INFO | ulauncher.utils.desktop.reader: read_desktop_file() | Could not read "/usr/share/applications/org.kde.mobile.okular_fax.desktop": constructor returned NULL
    2023-09-12 17:34:31,853 | INFO | ulauncher.utils.desktop.reader: read_desktop_file() | Could not read "/usr/share/applications/org.kde.mobile.okular_md.desktop": constructor returned NULL
    2023-09-12 17:34:31,854 | INFO | ulauncher.utils.desktop.reader: read_desktop_file() | Could not read "/usr/share/applications/org.kde.mobile.okular_kimgio.desktop": constructor returned NULL
    2023-09-12 17:34:31,857 | INFO | ulauncher.utils.desktop.reader: find_apps_cached() | Found 60 apps in the system
    2023-09-12 17:34:31,857 | INFO | ulauncher.search.apps.app_watcher: start() | Scanned desktop dirs in 0.05 seconds
    2023-09-12 17:34:31,862 | DEBUG | ulauncher.search.apps.app_watcher: start() | Start watching desktop files...

Search not working

Ulauncher: 5.4.0
Distribution: Ubuntu 19.04
Desktop Environment: Gnome 3.32.2
Display Server: Both Wayland and X11
Clipboard Manager: GPaste

Launching the clipboard extension with c and following it with a space does successfully retrieve the clipboard history, however when typing a search only the loading indicator is displayed:

Screenshot from 2019-11-05 22-35-32

Loading...dont shows any item

Hello. I just installed your extension and cant figure out how to use it. I'm on gnome(wayland), tried gpaste and clipster. Every time I type c in ulauncher its shows Loading... and nothing else and the error in terminal:

Traceback (most recent call last):
  File "/usr/lib/python3.11/site-packages/ulauncher/api/client/Client.py", line 54, in on_message
    self.extension.trigger_event(event)
  File "/usr/lib/python3.11/site-packages/ulauncher/api/client/Extension.py", line 52, in trigger_event
    action = listener.on_event(event, self)
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/hxss/.local/share/ulauncher/extensions/com.github.friday.ulauncher-clipboard/main.py", line 114, in on_event
    lines += max(1, (result.name.count('\n') + 1) * 0.85)
                     ^^^^^^^^^^^
AttributeError: 'ExtensionSmallResultItem' object has no attribute 'name'

Pasteboard issue with Ulauncher, CopyQ, ulauncher-clipboard and ulauncher-two-factor-authenticator

I'm not sure this is the right place to report this issue.
I'm using Ubuntu 22.04 with Ulauncher and CopyQ as well as ulauncher-clipboard. I've also installed and activated the Ulauncher extension two-factor-authenticator (https://github.com/endorama/ulauncher-two-factor-authenticator), which is now working well.
CopyQ works as intended, and so does ulauncher-clipboard.
However, after launching Ulauncher, activating two-factor-authenticator (keyword: 2fa), and hitting Enter or Alt+1 to select the first entry, there's nothing in the clipboard, i.e., CopyQ/ ulauncher-clipboard.
Any idea how to fix/debug this will be much appreciated.

Error message when saving settings

Hi!

I got this error message every time I try to save settings updates:

Message: 'com.github.friday.ulauncher-clipboard'
Error Name: UnhandledError
Type: KeyError

Stacktrace:

Traceback (most recent call last):
  File "/usr/lib/python3/dist-packages/ulauncher/ui/windows/PreferencesUlauncherDialog.py", line 202, in on_scheme_callback
    resp = rt.dispatch(self, scheme_request.get_uri())
  File "/usr/lib/python3/dist-packages/ulauncher/utils/Router.py", line 49, in dispatch
    return callback(context, url_params)
  File "/usr/lib/python3/dist-packages/ulauncher/ui/windows/PreferencesUlauncherDialog.py", line 456, in prefs_extension_update_prefs
    controller = ExtensionServer.get_instance().get_controller(ext_id)
  File "/usr/lib/python3/dist-packages/ulauncher/api/server/ExtensionServer.py", line 76, in get_controller
    return self.controllers[extension_id]
KeyError: 'com.github.friday.ulauncher-clipboard'

Screenshot from 2021-11-13 21-56-43

I'm trying to set the clipboard manager to CopyQ instead of Auto because it ulauncher doesn't seem to be able to find my clipboard history.

thanks!

Make sure clipboard manager daemons are closed

ulauncher-clipboard will start clipboard manager if they're not running, when switching between them.

To preserve resources and "clean up after itself", it should then stop any daemon started this way when you switch to another manager.

This issue doesn't have any known negative effects (besides memory consumption and duplicating the clipboard history). Normally you would just use the default autodetection or switch once if you have more than one of them installed.

This is very low prio (just documenting since it's I feel a tad uncomfortable leaving it like this).

Paste directly

Since the reason for copying an entry is almost certainly to paste it, this could be made more efficient by pasting directly. Ulauncher doesn't support this, and from what I've seen, it doesn't seem very easy (and it's near impossible to search for this). You would have to know more about the GTK APIs than I currently do.

This could be the same keyword (replacing the behavior), a new keyword (keeping the old behavior), or a multiple-choice option, like ulauncher-kill (with alt+enter or on the main action)

Copying items doesn't work

Items aren't copied after clicking them. I'm using:

  • Python 3.11 (probably the cause)
  • Ulauncher v6 dev
  • Wayland (Hyprland)
  • Clipman as my clipboard manager

The plugin shows all copied items, but selecting and clicking them doesn't copy them to the clipboard.

My solution for now is to checkout to this commit.

Ulauncher debug logs don't contain any errors.

On wayland

Any chance of it working it wayland, now that wl-clipboard is working and fully functional ?

really looking forward to this

Clipman in Mint Xfce 22 is not recognized in the extension

  • Describe your issue in detail (expected behavior and how the actual behavior differs)
    When I switch the Clipboard Manager to Clipman, and then try to search, it says that Clipman cannot be found, please install it...

  • Include which clipboard manager you are using

Clipman

  • Make sure the issue is not with the clipboard manager. Use it independently from this extension to find out.
  • If it doesn't work for you, try another one. I do not support clipboard managers, only the integration with them.
  • Make sure your distro is updated.
  • Include complete logs running ulauncher with ulauncher -v
    LOG
com.github.friday.ulauncher-clipboard | 2021-09-22 17:50:04,417 | INFO | ulauncher-clipboard: ensureStatus() | Attempting to start manager Clipman
com.github.friday.ulauncher-clipboard | 2021-09-22 17:50:04,417 | WARNING | ulauncher-clipboard: ensureStatus() | Could not start manager Clipman (0 attempts)
com.github.friday.ulauncher-clipboard | 2021-09-22 17:50:04,417 | DEBUG | ulauncher.api.client.Client: send() | Send message
2021-09-22 17:50:04,420 | DEBUG | ulauncher.api.server.ExtensionController: handleMessage() | Incoming response (KeywordQueryEvent, RenderResultListAction) from "com.github.friday.ulauncher-clipboard"
2021-09-22 17:50:04,422 | DEBUG | ulauncher.ui.windows.UlauncherWindow: show_results() | render 1 results
2021-09-22 17:50:28,344 | DEBUG | ulauncher.utils.display: get_screens() | Found 2 monitor(s)
2021-09-22 17:50:28,345 | DEBUG | ulauncher.utils.display: get_screens() |   Monitor 0 - X: 0, Y: 0, W: 1920, H: 1080
2021-09-22 17:50:28,345 | DEBUG | ulauncher.utils.display: get_screens() |   Monitor 1 - X: 1920, Y: 0, W: 1360, H: 768
2021-09-22 17:50:28,414 | DEBUG | ulauncher.ui.windows.UlauncherWindow: show_results() | render 0 results
2021-09-22 17:50:28,814 | DEBUG | ulauncher.ui.windows.UlauncherWindow: show_results() | render 9 results
2021-09-22 17:50:29,168 | DEBUG | ulauncher.api.server.ExtensionController: _send_event() | Send event KeywordQueryEvent to "com.github.friday.ulauncher-clipboard"
com.github.friday.ulauncher-clipboard | 2021-09-22 17:50:29,204 | DEBUG | ulauncher.api.client.Client: on_message() | Incoming event KeywordQueryEvent
2021-09-22 17:50:29,430 | DEBUG | ulauncher.ui.windows.UlauncherWindow: show_results() | render 1 results
com.github.friday.ulauncher-clipboard | 2021-09-22 17:50:29,451 | INFO | ulauncher-clipboard: ensureStatus() | Attempting to start manager Clipman
com.github.friday.ulauncher-clipboard | 2021-09-22 17:50:29,451 | WARNING | ulauncher-clipboard: ensureStatus() | Could not start manager Clipman (0 attempts)
com.github.friday.ulauncher-clipboard | 2021-09-22 17:50:29,452 | DEBUG | ulauncher.api.client.Client: send() | Send message
2021-09-22 17:50:29,454 | DEBUG | ulauncher.api.server.ExtensionController: handleMessage() | Incoming response (KeywordQueryEvent, RenderResultListAction) from "com.github.friday.ulauncher-clipboard"
2021-09-22 17:50:29,456 | DEBUG | ulauncher.ui.windows.UlauncherWindow: show_results() | render 1 results
2021-09-22 17:50:29,810 | DEBUG | ulauncher.api.server.ExtensionController: _send_event() | Send event KeywordQueryEvent to "com.github.friday.ulauncher-clipboard"
com.github.friday.ulauncher-clipboard | 2021-09-22 17:50:29,856 | DEBUG | ulauncher.api.client.Client: on_message() | Incoming event KeywordQueryEvent
2021-09-22 17:50:29,974 | DEBUG | ulauncher.api.server.ExtensionController: _send_event() | Send event KeywordQueryEvent to "com.github.friday.ulauncher-clipboard"
2021-09-22 17:50:30,121 | DEBUG | ulauncher.api.server.ExtensionController: _send_event() | Send event KeywordQueryEvent to "com.github.friday.ulauncher-clipboard"
com.github.friday.ulauncher-clipboard | 2021-09-22 17:50:30,123 | INFO | ulauncher-clipboard: ensureStatus() | Attempting to start manager Clipman
com.github.friday.ulauncher-clipboard | 2021-09-22 17:50:30,124 | WARNING | ulauncher-clipboard: ensureStatus() | Could not start manager Clipman (0 attempts)
com.github.friday.ulauncher-clipboard | 2021-09-22 17:50:30,124 | DEBUG | ulauncher.api.client.Client: send() | Send message
2021-09-22 17:50:30,126 | DEBUG | ulauncher.api.server.ExtensionController: handleMessage() | Incoming response (KeywordQueryEvent, RenderResultListAction) from "com.github.friday.ulauncher-clipboard"
com.github.friday.ulauncher-clipboard | 2021-09-22 17:50:30,125 | DEBUG | ulauncher.api.client.Client: on_message() | Incoming event KeywordQueryEvent
2021-09-22 17:50:30,219 | DEBUG | ulauncher.api.server.ExtensionController: _send_event() | Send event KeywordQueryEvent to "com.github.friday.ulauncher-clipboard"
2021-09-22 17:50:30,344 | DEBUG | ulauncher.api.server.ExtensionController: _send_event() | Send event KeywordQueryEvent to "com.github.friday.ulauncher-clipboard"
com.github.friday.ulauncher-clipboard | 2021-09-22 17:50:30,374 | INFO | ulauncher-clipboard: ensureStatus() | Attempting to start manager Clipman
com.github.friday.ulauncher-clipboard | 2021-09-22 17:50:30,375 | WARNING | ulauncher-clipboard: ensureStatus() | Could not start manager Clipman (0 attempts)
com.github.friday.ulauncher-clipboard | 2021-09-22 17:50:30,375 | DEBUG | ulauncher.api.client.Client: send() | Send message
2021-09-22 17:50:30,377 | DEBUG | ulauncher.api.server.ExtensionController: handleMessage() | Incoming response (KeywordQueryEvent, RenderResultListAction) from "com.github.friday.ulauncher-clipboard"
com.github.friday.ulauncher-clipboard | 2021-09-22 17:50:30,376 | DEBUG | ulauncher.api.client.Client: on_message() | Incoming event KeywordQueryEvent
2021-09-22 17:50:30,419 | DEBUG | ulauncher.api.server.ExtensionController: _send_event() | Send event KeywordQueryEvent to "com.github.friday.ulauncher-clipboard"
2021-09-22 17:50:30,540 | DEBUG | ulauncher.api.server.ExtensionController: _send_event() | Send event KeywordQueryEvent to "com.github.friday.ulauncher-clipboard"
com.github.friday.ulauncher-clipboard | 2021-09-22 17:50:30,640 | INFO | ulauncher-clipboard: ensureStatus() | Attempting to start manager Clipman
com.github.friday.ulauncher-clipboard | 2021-09-22 17:50:30,641 | WARNING | ulauncher-clipboard: ensureStatus() | Could not start manager Clipman (0 attempts)
com.github.friday.ulauncher-clipboard | 2021-09-22 17:50:30,641 | DEBUG | ulauncher.api.client.Client: send() | Send message
2021-09-22 17:50:30,643 | DEBUG | ulauncher.api.server.ExtensionController: handleMessage() | Incoming response (KeywordQueryEvent, RenderResultListAction) from "com.github.friday.ulauncher-clipboard"
com.github.friday.ulauncher-clipboard | 2021-09-22 17:50:30,642 | DEBUG | ulauncher.api.client.Client: on_message() | Incoming event KeywordQueryEvent
2021-09-22 17:50:30,792 | DEBUG | ulauncher.ui.windows.UlauncherWindow: show_results() | render 1 results
com.github.friday.ulauncher-clipboard | 2021-09-22 17:50:30,889 | INFO | ulauncher-clipboard: ensureStatus() | Attempting to start manager Clipman
com.github.friday.ulauncher-clipboard | 2021-09-22 17:50:30,890 | WARNING | ulauncher-clipboard: ensureStatus() | Could not start manager Clipman (0 attempts)
com.github.friday.ulauncher-clipboard | 2021-09-22 17:50:30,890 | DEBUG | ulauncher.api.client.Client: send() | Send message
2021-09-22 17:50:30,892 | DEBUG | ulauncher.api.server.ExtensionController: handleMessage() | Incoming response (KeywordQueryEvent, RenderResultListAction) from "com.github.friday.ulauncher-clipboard"
com.github.friday.ulauncher-clipboard | 2021-09-22 17:50:30,891 | DEBUG | ulauncher.api.client.Client: on_message() | Incoming event KeywordQueryEvent
com.github.friday.ulauncher-clipboard | 2021-09-22 17:50:31,134 | INFO | ulauncher-clipboard: ensureStatus() | Attempting to start manager Clipman
com.github.friday.ulauncher-clipboard | 2021-09-22 17:50:31,135 | WARNING | ulauncher-clipboard: ensureStatus() | Could not start manager Clipman (0 attempts)
com.github.friday.ulauncher-clipboard | 2021-09-22 17:50:31,135 | DEBUG | ulauncher.api.client.Client: send() | Send message
2021-09-22 17:50:31,137 | DEBUG | ulauncher.api.server.ExtensionController: handleMessage() | Incoming response (KeywordQueryEvent, RenderResultListAction) from "com.github.friday.ulauncher-clipboard"
com.github.friday.ulauncher-clipboard | 2021-09-22 17:50:31,136 | DEBUG | ulauncher.api.client.Client: on_message() | Incoming event KeywordQueryEvent
com.github.friday.ulauncher-clipboard | 2021-09-22 17:50:31,381 | INFO | ulauncher-clipboard: ensureStatus() | Attempting to start manager Clipman
com.github.friday.ulauncher-clipboard | 2021-09-22 17:50:31,381 | WARNING | ulauncher-clipboard: ensureStatus() | Could not start manager Clipman (0 attempts)
com.github.friday.ulauncher-clipboard | 2021-09-22 17:50:31,382 | DEBUG | ulauncher.api.client.Client: send() | Send message
2021-09-22 17:50:31,384 | DEBUG | ulauncher.api.server.ExtensionController: handleMessage() | Incoming response (KeywordQueryEvent, RenderResultListAction) from "com.github.friday.ulauncher-clipboard"
com.github.friday.ulauncher-clipboard | 2021-09-22 17:50:31,382 | DEBUG | ulauncher.api.client.Client: on_message() | Incoming event KeywordQueryEvent
com.github.friday.ulauncher-clipboard | 2021-09-22 17:50:31,623 | INFO | ulauncher-clipboard: ensureStatus() | Attempting to start manager Clipman
com.github.friday.ulauncher-clipboard | 2021-09-22 17:50:31,623 | WARNING | ulauncher-clipboard: ensureStatus() | Could not start manager Clipman (0 attempts)
com.github.friday.ulauncher-clipboard | 2021-09-22 17:50:31,624 | DEBUG | ulauncher.api.client.Client: send() | Send message
2021-09-22 17:50:31,625 | DEBUG | ulauncher.api.server.ExtensionController: handleMessage() | Incoming response (KeywordQueryEvent, RenderResultListAction) from "com.github.friday.ulauncher-clipboard"
2021-09-22 17:50:31,627 | DEBUG | ulauncher.ui.windows.UlauncherWindow: show_results() | render 1 results
2021-09-22 17:50:48,414 | DEBUG | ulauncher.utils.display: get_screens() | Found 2 monitor(s)
2021-09-22 17:50:48,415 | DEBUG | ulauncher.utils.display: get_screens() |   Monitor 0 - X: 0, Y: 0, W: 1920, H: 1080
2021-09-22 17:50:48,416 | DEBUG | ulauncher.utils.display: get_screens() |   Monitor 1 - X: 1920, Y: 0, W: 1360, H: 768
2021-09-22 17:50:48,462 | DEBUG | ulauncher.ui.windows.UlauncherWindow: show_results() | render 0 results
2021-09-22 17:50:48,848 | DEBUG | ulauncher.ui.windows.UlauncherWindow: show_results() | render 9 results
2021-09-22 17:50:49,309 | DEBUG | ulauncher.api.server.ExtensionController: _send_event() | Send event KeywordQueryEvent to "com.github.friday.ulauncher-clipboard"
com.github.friday.ulauncher-clipboard | 2021-09-22 17:50:49,387 | DEBUG | ulauncher.api.client.Client: on_message() | Incoming event KeywordQueryEvent
2021-09-22 17:50:49,563 | DEBUG | ulauncher.ui.windows.UlauncherWindow: show_results() | render 1 results
com.github.friday.ulauncher-clipboard | 2021-09-22 17:50:49,664 | INFO | ulauncher-clipboard: ensureStatus() | Attempting to start manager Clipman
com.github.friday.ulauncher-clipboard | 2021-09-22 17:50:49,664 | WARNING | ulauncher-clipboard: ensureStatus() | Could not start manager Clipman (0 attempts)
com.github.friday.ulauncher-clipboard | 2021-09-22 17:50:49,664 | DEBUG | ulauncher.api.client.Client: send() | Send message
2021-09-22 17:50:49,666 | DEBUG | ulauncher.api.server.ExtensionController: handleMessage() | Incoming response (KeywordQueryEvent, RenderResultListAction) from "com.github.friday.ulauncher-clipboard"
2021-09-22 17:50:49,668 | DEBUG | ulauncher.ui.windows.UlauncherWindow: show_results() | render 1 results
2021-09-22 17:50:53,154 | DEBUG | ulauncher.api.server.ExtensionController: _send_event() | Send event KeywordQueryEvent to "com.github.friday.ulauncher-clipboard"
com.github.friday.ulauncher-clipboard | 2021-09-22 17:50:53,178 | DEBUG | ulauncher.api.client.Client: on_message() | Incoming event KeywordQueryEvent
2021-09-22 17:50:53,363 | DEBUG | ulauncher.api.server.ExtensionController: _send_event() | Send event KeywordQueryEvent to "com.github.friday.ulauncher-clipboard"
com.github.friday.ulauncher-clipboard | 2021-09-22 17:50:53,445 | INFO | ulauncher-clipboard: ensureStatus() | Attempting to start manager Clipman
com.github.friday.ulauncher-clipboard | 2021-09-22 17:50:53,446 | WARNING | ulauncher-clipboard: ensureStatus() | Could not start manager Clipman (0 attempts)
com.github.friday.ulauncher-clipboard | 2021-09-22 17:50:53,446 | DEBUG | ulauncher.api.client.Client: send() | Send message
2021-09-22 17:50:53,448 | DEBUG | ulauncher.api.server.ExtensionController: handleMessage() | Incoming response (KeywordQueryEvent, RenderResultListAction) from "com.github.friday.ulauncher-clipboard"
com.github.friday.ulauncher-clipboard | 2021-09-22 17:50:53,447 | DEBUG | ulauncher.api.client.Client: on_message() | Incoming event KeywordQueryEvent
2021-09-22 17:50:53,505 | DEBUG | ulauncher.api.server.ExtensionController: _send_event() | Send event KeywordQueryEvent to "com.github.friday.ulauncher-clipboard"
2021-09-22 17:50:53,587 | DEBUG | ulauncher.api.server.ExtensionController: _send_event() | Send event KeywordQueryEvent to "com.github.friday.ulauncher-clipboard"
com.github.friday.ulauncher-clipboard | 2021-09-22 17:50:53,700 | INFO | ulauncher-clipboard: ensureStatus() | Attempting to start manager Clipman
com.github.friday.ulauncher-clipboard | 2021-09-22 17:50:53,701 | WARNING | ulauncher-clipboard: ensureStatus() | Could not start manager Clipman (0 attempts)
com.github.friday.ulauncher-clipboard | 2021-09-22 17:50:53,701 | DEBUG | ulauncher.api.client.Client: send() | Send message
2021-09-22 17:50:53,702 | DEBUG | ulauncher.api.server.ExtensionController: handleMessage() | Incoming response (KeywordQueryEvent, RenderResultListAction) from "com.github.friday.ulauncher-clipboard"
com.github.friday.ulauncher-clipboard | 2021-09-22 17:50:53,701 | DEBUG | ulauncher.api.client.Client: on_message() | Incoming event KeywordQueryEvent
2021-09-22 17:50:53,722 | DEBUG | ulauncher.api.server.ExtensionController: _send_event() | Send event KeywordQueryEvent to "com.github.friday.ulauncher-clipboard"
2021-09-22 17:50:53,900 | DEBUG | ulauncher.api.server.ExtensionController: _send_event() | Send event KeywordQueryEvent to "com.github.friday.ulauncher-clipboard"
com.github.friday.ulauncher-clipboard | 2021-09-22 17:50:53,951 | INFO | ulauncher-clipboard: ensureStatus() | Attempting to start manager Clipman
com.github.friday.ulauncher-clipboard | 2021-09-22 17:50:53,952 | WARNING | ulauncher-clipboard: ensureStatus() | Could not start manager Clipman (0 attempts)
com.github.friday.ulauncher-clipboard | 2021-09-22 17:50:53,952 | DEBUG | ulauncher.api.client.Client: send() | Send message
2021-09-22 17:50:53,954 | DEBUG | ulauncher.api.server.ExtensionController: handleMessage() | Incoming response (KeywordQueryEvent, RenderResultListAction) from "com.github.friday.ulauncher-clipboard"
com.github.friday.ulauncher-clipboard | 2021-09-22 17:50:53,953 | DEBUG | ulauncher.api.client.Client: on_message() | Incoming event KeywordQueryEvent
2021-09-22 17:50:54,152 | DEBUG | ulauncher.ui.windows.UlauncherWindow: show_results() | render 1 results
com.github.friday.ulauncher-clipboard | 2021-09-22 17:50:54,197 | INFO | ulauncher-clipboard: ensureStatus() | Attempting to start manager Clipman
com.github.friday.ulauncher-clipboard | 2021-09-22 17:50:54,198 | WARNING | ulauncher-clipboard: ensureStatus() | Could not start manager Clipman (0 attempts)
com.github.friday.ulauncher-clipboard | 2021-09-22 17:50:54,198 | DEBUG | ulauncher.api.client.Client: send() | Send message
2021-09-22 17:50:54,200 | DEBUG | ulauncher.api.server.ExtensionController: handleMessage() | Incoming response (KeywordQueryEvent, RenderResultListAction) from "com.github.friday.ulauncher-clipboard"
com.github.friday.ulauncher-clipboard | 2021-09-22 17:50:54,199 | DEBUG | ulauncher.api.client.Client: on_message() | Incoming event KeywordQueryEvent
com.github.friday.ulauncher-clipboard | 2021-09-22 17:50:54,443 | INFO | ulauncher-clipboard: ensureStatus() | Attempting to start manager Clipman
com.github.friday.ulauncher-clipboard | 2021-09-22 17:50:54,444 | WARNING | ulauncher-clipboard: ensureStatus() | Could not start manager Clipman (0 attempts)
com.github.friday.ulauncher-clipboard | 2021-09-22 17:50:54,444 | DEBUG | ulauncher.api.client.Client: send() | Send message
2021-09-22 17:50:54,446 | DEBUG | ulauncher.api.server.ExtensionController: handleMessage() | Incoming response (KeywordQueryEvent, RenderResultListAction) from "com.github.friday.ulauncher-clipboard"
com.github.friday.ulauncher-clipboard | 2021-09-22 17:50:54,445 | DEBUG | ulauncher.api.client.Client: on_message() | Incoming event KeywordQueryEvent
com.github.friday.ulauncher-clipboard | 2021-09-22 17:50:54,695 | INFO | ulauncher-clipboard: ensureStatus() | Attempting to start manager Clipman
com.github.friday.ulauncher-clipboard | 2021-09-22 17:50:54,695 | WARNING | ulauncher-clipboard: ensureStatus() | Could not start manager Clipman (0 attempts)
com.github.friday.ulauncher-clipboard | 2021-09-22 17:50:54,696 | DEBUG | ulauncher.api.client.Client: send() | Send message
2021-09-22 17:50:54,698 | DEBUG | ulauncher.api.server.ExtensionController: handleMessage() | Incoming response (KeywordQueryEvent, RenderResultListAction) from "com.github.friday.ulauncher-clipboard"
2021-09-22 17:50:54,700 | DEBUG | ulauncher.ui.windows.UlauncherWindow: show_results() | render 1 results

Read this before submitting issues!

I do not get any money for creating and maintaining this extension, and I'm more motivated in spending the free time I have on maintenance off the Ulauncher app itself. So I really need a high threshold for contributions here. You have to provide the relevant information.

  • Describe your issue in detail
  • Issues must include which clipboard manager you are using
  • Make sure the issue is not with the clipboard manager. Use it independently from this extension to find out.
  • If it doesn't work for you, try another one. I do not support clipboard managers, only the integration with them
  • Include complete logs running ulauncher with ulauncher -v

Support for other clipboard managers

There's now a common format for clipboard managers. This extensions already supports two and it should be easy to add more.

Clipster unfortunately proved to be difficult because it's written in Python. Somehow running it through Ulauncher makes Clipster think it's running in Python3, while it's actually Py2. Similarly it's based on the 'owner-change'-event which is seemingly only triggered when another app/process copies something, making it fail tracking these additions. I actually started trying to add Clipster as the second manager before switching to CopyQ, and have a fully working integration downloading and modding clipster to work in Python2, but the 'owner-change' problem was harder to fix.

Klipper (KDE) and Clipman (XFC) would be nice to haves, but I will not be putting effort into adding others unless I needs them (which may happen, since I switch desktop environments sometimes). PR's are welcome.

What's needed is either that the clipboard manager can export the whole clipboard history via CLI or writes directly into a file or multiple files in open formats, which can be parsed.

manager for Clips app

**manager for Clips app **
I am trying to add a manager for https://github.com/hezral/clips, it works fine in elementaryOs but I see it's missing on your extension so i am trying to make a manager for it, but i can't make it work, here's the code i am doing:

from shutil import which

class MyClipsManager:
    def __init__(self):
        self.name = 'clips'
        self.binary = '/usr/bin/clips'
        if not self.can_start():
            raise Exception('Clips app is not installed or not in PATH')
        if not self.is_running():
            self.start()

    def can_start(self):
        return bool(which(self.binary))

    def is_running(self):
        return bool(self.pid_of('clips'))

    def pid_of(self, process_name):
        return subprocess.check_output(['pgrep', process_name]).strip()

    def start(self):
        subprocess.call([self.binary])

    def stop(self):
        subprocess.call(['killall', 'clips'])

    def add(self, text):
        subprocess.call([self.binary, '-a', text])

    def get_history(self):
        return subprocess.check_output([self.binary, '-l']).decode('utf-8').splitlines()

[Guide] Using Flatpak version of CopyQ

I use the Flatpak version of CopyQ, and to make it work with the extension, I wrote the following shell script named copyq and put it in my PATH:

#!/bin/bash
flatpak run com.github.hluk.copyq "$@"

Since copyq command is not directly available as a CLI command, we need such a wrapper.

Copied text not accessible

I noticed a strange behavior when using this extension. As soon as I select something from the clipboard history and trying to paste it, the application in which I try to paste does not respond anymore.

The command xclip -selection c -o does not terminate when calling it which probably causes the non responding application. This command does usually return the current clipboard content. But it runs forever, if I selected something from the clipboard history before.

I am using arch and experienced the same problem with CopyQ and GPaste.

When using xclip with verbose output I get the following log:

Connected to X server.
Using selection: XA_CLIPBOARD
Using UTF8_STRING.
...

Pinned items

Describe the solution you'd like
Allow pinning of some items, so that they never go away from history except unpinned.

PR allowed for this? @friday ?

Clearing the clipboard history

There was a problem clearing the clipboard history. Since I use the auto setting and the standard clipboard manager as far as I understand it is 'Clipster', how do I clear the history? The 'Clipster' package is not installed in the system (and I also do not want to install it, I use the gnome extension for the buffer) so the keys for cleaning type '--erase-entire-board' do not work. I see Clipster is in the folder with the extension Ulauncher, but where the file with the saved history contains I do not know.

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.