-
Notifications
You must be signed in to change notification settings - Fork 1
/
extension.js
32 lines (25 loc) · 842 Bytes
/
extension.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
const St = imports.gi.St;
const Main = imports.ui.main;
const Utils = imports.misc.util;
let button;
function _showKeyboard() {
Utils.trySpawnCommandLine("onboard");
}
function init() {
button = new St.Bin({ style_class: 'panel-button',
reactive: true,
can_focus: true,
x_fill: true,
y_fill: false,
track_hover: true });
let icon = new St.Icon({ icon_name: 'format-text-italic-symbolic',
style_class: 'system-status-icon' });
button.set_child(icon);
button.connect('button-press-event', _showKeyboard);
}
function enable() {
Main.panel._rightBox.insert_child_at_index(button, 0);
}
function disable() {
Main.panel._rightBox.remove_child(button);
}