commit 9d398d77e12ae918554bde0ad7b80312ff8e3697 Author: Frank Ploss Date: Thu Dec 17 02:03:09 2015 +0100 Initial commit diff --git a/extension.js b/extension.js new file mode 100644 index 0000000..d6d693d --- /dev/null +++ b/extension.js @@ -0,0 +1,43 @@ +'use strict'; + +const Lang = imports.lang; +const St = imports.gi.St; +const Main = imports.ui.main; +const PanelMenu = imports.ui.panelMenu; + +const IndicatorName = "Tor"; +const DisabledIcon = 'my-caffeine-off-symbolic'; +const EnabledIcon = 'my-caffeine-on-symbolic'; +const TorIcon = 'tor'; + +let torButton; + +const TorButton = new Lang.Class({ + Name: IndicatorName, + Extends: PanelMenu.Button, + + _init: function(metadata, params) { + this.parent(null, IndicatorName); + this._icon = new St.Icon({ + icon_name: TorIcon, + style_class: 'system-status-icon' + }); + + this.actor.add_child(this._icon); + } +}); + +function init(extensionMeta) { + let theme = imports.gi.Gtk.IconTheme.get_default(); + theme.append_search_path(extensionMeta.path + "/icons"); +} + +function enable() { + torButton = new TorButton(); + Main.panel.addToStatusArea(IndicatorName, torButton); +} + +function disable() { + torButton.destroy(); + torButton = null; +} diff --git a/icons/tor.svg b/icons/tor.svg new file mode 100644 index 0000000..7cc454f --- /dev/null +++ b/icons/tor.svg @@ -0,0 +1,172 @@ + + + + + + + + image/svg+xml + + Gnome Symbolic Icon Theme + + + + + + + + Gnome Symbolic Icon Theme + + + + + + + + + + + + + + + + diff --git a/metadata.json b/metadata.json new file mode 100644 index 0000000..fe2a4e9 --- /dev/null +++ b/metadata.json @@ -0,0 +1,13 @@ +{ + "description": "Change tor identity", + "name": "Tor", + "shell-version": [ + "3.10", + "3.12", + "3.14", + "3.16" + ], + "url": "", + "uuid": "change-tor-identity@fqxp.de", + "version": 1 +}