-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathextension.js
More file actions
37 lines (31 loc) · 956 Bytes
/
extension.js
File metadata and controls
37 lines (31 loc) · 956 Bytes
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
33
34
35
36
const { St, Clutter, Gio } = imports.gi;
const Main = imports.ui.main;
const PanelMenu = imports.ui.panelMenu;
const PopupMenu = imports.ui.popupMenu;
const Me = imports.misc.extensionUtils.getCurrentExtension();
const Util = imports.misc.util;
let activityButton;
function init() {
// CSSスタイルの適用
const stylesheet = Me.dir.get_child('stylesheet.css');
if (stylesheet.query_exists(null)) {
let themeContext = St.ThemeContext.get_for_stage(global.stage);
let theme = themeContext.get_theme();
theme.load_stylesheet(stylesheet);
}
// アクティビティボタンを削除
activityButton = Main.panel.statusArea.activities;
if (activityButton) {
activityButton.container.hide();
}
}
function enable() {
if (activityButton) {
activityButton.container.hide();
}
}
function disable() {
if (activityButton) {
activityButton.container.show();
}
}