Skip to content

Commit 1b021c9

Browse files
committed
add key to control visibility
1 parent 9e56dc8 commit 1b021c9

File tree

11 files changed

+68
-3
lines changed

11 files changed

+68
-3
lines changed

.gitignore

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@ debian/files
55
obj-*/
66
.potrans/
77
builddir/
8-
98
#IDE
109
*~
1110
~*

data/gschema.xml

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,5 +16,12 @@
1616
<key enum="TextPosition" name="position">
1717
<default>'left'</default>
1818
</key>
19+
20+
<key name="visible" type="b">
21+
<default>true</default>
22+
<summary>Whether indicator is visible</summary>
23+
<description>Hide indicator if set to false. It is still running, just hidden</description>
24+
</key>
25+
1926
</schema>
2027
</schemalist>

debian/changelog

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,9 @@
1+
io.github.ellie-commons.wingpanel-indicator-onething (1.3.0) jammy; urgency=medium
2+
3+
* Add key to show/hide indicator
4+
5+
-- Stella <teamcons.carrd.co> Fri, 17 Oct 2025 01:09:16 +0300
6+
17
io.github.ellie-commons.wingpanel-indicator-onething (1.2.0) jammy; urgency=medium
28

39
* Not symbolic
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
misc:Depends=dconf-gsettings-backend | gsettings-backend
2+
shlibs:Depends=libc6 (>= 2.2.5), libglib2.0-0t64 (>= 2.38.0), libgtk-3-0t64 (>= 3.16.2), libwingpanel3
3+
misc:Pre-Depends=
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
Format: https://dep.debian.net/deps/dep5
2+
Upstream-Name: wingpanel-indicator-onething
3+
Source: https://github.com/ellie-commons/wingpanel-indicator-onething/
4+
5+
Files: *
6+
Copyright: 2025 Teamcons <teamcons.carrd.co>
7+
License: LGPL-2+
8+
This program is free software; you can redistribute it and/or
9+
modify it under the terms of the GNU General Public
10+
License as published by the Free Software Foundation; either
11+
version 2 of the License, or (at your option) any later version.
12+
13+
This program is distributed in the hope that it will be useful,
14+
but WITHOUT ANY WARRANTY; without even the implied warranty of
15+
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
16+
General Public License for more details.
17+
18+
You should have received a copy of the GNU General Public
19+
License along with this program; if not, see
20+
<https://www.gnu.org/licenses/>.
21+
22+
On Debian systems, the complete text of the GNU Lesser General
23+
Public License can be found in `/usr/share/common-licenses/LGPL-2.1'.
Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<schemalist>
3+
<enum id="TextPosition">
4+
<value nick='left' value='0'/>
5+
<value nick='center' value='1'/>
6+
<value nick='right' value='2'/>
7+
</enum>
8+
9+
<schema path="/io/github/ellie_commons/indicator-onething/" id="io.github.ellie_commons.indicator-onething">
10+
<key name="text" type="s">
11+
<default>""</default>
12+
<summary>Text to display</summary>
13+
<description>Text to display in wingpanel. Empty string is replaced by a localized default</description>
14+
</key>
15+
<!-- Values: 0(Left), 1(Center), 2(Right) -->
16+
<key enum="TextPosition" name="position">
17+
<default>'left'</default>
18+
</key>
19+
20+
<key name="visible" type="b">
21+
<default>true</default>
22+
<summary>Whether indicator is visible</summary>
23+
<description>Hide indicator if set to false. It is still running, just hidden</description>
24+
</key>
25+
26+
</schema>
27+
</schemalist>
Binary file not shown.
Binary file not shown.

meson.build

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
project(
22
'onething',
33
'vala', 'c',
4-
version: '1.2.0'
4+
version: '1.3.0'
55
)
66

77
gnome = import('gnome')

src/Indicator.vala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ public class onething.Indicator : Wingpanel.Indicator {
3434
Intl.textdomain (GETTEXT_PACKAGE);
3535

3636
settings = new GLib.Settings ("io.github.ellie_commons.indicator-onething");
37-
visible = true;
37+
settings.bind ("visible", this, "visible", GLib.SettingsBindFlags.DEFAULT);
3838
}
3939

4040
public override Gtk.Widget get_display_widget () {

0 commit comments

Comments
 (0)