From: Cyrille Giquello Date: Wed, 3 Feb 2016 18:37:15 +0000 (+0100) Subject: Merge branch 'master' of https://github.com/Cyrille37/indicator-chars X-Git-Url: https://adrianiainlam.tk/git/?a=commitdiff_plain;h=7f119634390d9a4a590b2e3cb5934af3a4acc5ab;hp=e9f1824fa6951452bd23902f5b3d1e244bdc9f6a;p=indicator-chars.git Merge branch 'master' of https://github.com/Cyrille37/indicator-chars --- diff --git a/README.rst b/README.rst index bd44bb8..e31d12d 100644 --- a/README.rst +++ b/README.rst @@ -11,6 +11,24 @@ Create a file .indicator-chars in your home directory with lines of characters to be selectable. ------- +Fork Cyrille37 +------- + +:Author: Cyrille37 + +- Some changes to make indicator-chars works on Ubuntu 12.04LTS with Unity 2D + + - replace the custom icon with a theme icon name + + - add a char copy into Clipboard(selection="CLIPBOARD") + +- Other minors changes + + - use env to find the Python engine + + - add a configuration file example: "conf-example.indicator-chars" + +------- Install ------- diff --git a/conf-example.indicator-chars b/conf-example.indicator-chars new file mode 100644 index 0000000..593ffee --- /dev/null +++ b/conf-example.indicator-chars @@ -0,0 +1,3 @@ +[letters]ÀÇÈÉø +[signs]«»×ø¼½¾ + diff --git a/indicator-chars.py b/indicator-chars.py index 0570a02..61c5365 100755 --- a/indicator-chars.py +++ b/indicator-chars.py @@ -1,4 +1,4 @@ -#!/usr/bin/python +#!/usr/bin/env python # -*- coding: utf-8 -*- # # Very simple chars indicator. @@ -51,7 +51,10 @@ class IndicatorChars: def __init__(self): self.ind = appindicator.Indicator( - "Chars", os.path.join(self.SCRIPT_DIR, 'light16x16.png'), + # Custom icon seems to doesn't work on my Ubuntu 12.04 LTS running Unity 2D + #"Chars", os.path.join(self.SCRIPT_DIR, 'light16x16.png'), + # So fallback to an referenced theme's icon name + "Chars", "accessories-character-map", appindicator.CATEGORY_APPLICATION_STATUS) self.ind.set_status(appindicator.STATUS_ACTIVE) @@ -117,6 +120,8 @@ class IndicatorChars: def on_char_click(self, widget, char): cb = gtk.Clipboard(selection="PRIMARY") cb.set_text(char) + cb = gtk.Clipboard(selection="CLIPBOARD") + cb.set_text(char) def on_quit(self, widget): gtk.main_quit()