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

just add a example configuration file #7

Open
wants to merge 4 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions conf-example.indicator-chars
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
[letters]ÀÇÈÉø
[signs]«»×ø¼½¾

9 changes: 7 additions & 2 deletions indicator-chars.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/usr/bin/python
#!/usr/bin/env python
# -*- coding: utf-8 -*-
#
# Very simple chars indicator.
Expand Down Expand Up @@ -50,7 +50,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)

Expand Down Expand Up @@ -116,6 +119,8 @@ def update_menu(self, widget = None, data = None):
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()
Expand Down