diff options
Diffstat (limited to '.local/share/gnome-shell/extensions/org-agenda-indicator@rbenencia.name/prefs.js')
| -rw-r--r-- | .local/share/gnome-shell/extensions/org-agenda-indicator@rbenencia.name/prefs.js | 33 |
1 files changed, 33 insertions, 0 deletions
diff --git a/.local/share/gnome-shell/extensions/org-agenda-indicator@rbenencia.name/prefs.js b/.local/share/gnome-shell/extensions/org-agenda-indicator@rbenencia.name/prefs.js new file mode 100644 index 0000000..08db40d --- /dev/null +++ b/.local/share/gnome-shell/extensions/org-agenda-indicator@rbenencia.name/prefs.js @@ -0,0 +1,33 @@ +import Adw from 'gi://Adw'; +import Gtk from 'gi://Gtk'; + +import {ExtensionPreferences} from 'resource:///org/gnome/Shell/Extensions/js/extensions/prefs.js'; + +export default class OrgAgendaIndicatorPreferences extends ExtensionPreferences { + fillPreferencesWindow(window) { + const settings = this.getSettings('org.gnome.shell.extensions.org-agenda-indicator'); + const page = new Adw.PreferencesPage(); + const group = new Adw.PreferencesGroup({ + title: 'Display', + description: 'Configure what the indicator shows.', + }); + const row = new Adw.ActionRow({ + title: 'Show clocked-in task', + subtitle: 'Display the active Org clock in the panel and menu when one is running.', + }); + const toggle = new Gtk.Switch({ + active: settings.get_boolean('show-clocked-in-task'), + valign: Gtk.Align.CENTER, + }); + + toggle.connect('notify::active', widget => { + settings.set_boolean('show-clocked-in-task', widget.get_active()); + }); + + row.add_suffix(toggle); + row.activatable_widget = toggle; + group.add(row); + page.add(group); + window.add(page); + } +} |
