Skip to content

Commit

Permalink
betterlock: Add silent notification option (linuxmint#5942)
Browse files Browse the repository at this point in the history
* Change author

* Closes linuxmint#32
  • Loading branch information
Centurix authored Apr 23, 2024
1 parent ef3344e commit 778ae01
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 2 deletions.
4 changes: 3 additions & 1 deletion betterlock/files/betterlock/applet.js
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@ MyApplet.prototype = {
this.settings = new Settings.AppletSettings(this, metadata.uuid, instance_id);
global.log(this.settings.settings);
this.settings.bind("show-notifications", "showNotifications", null);
this.settings.bind("show-silent-notifications", "showSilentNotifications", null)
this.settings.bind("show-caps-lock-indicator", "showCapsLockIndicator", this._updateIconVisibility);
this.settings.bind("show-num-lock-indicator", "showNumLockIndicator", this._updateIconVisibility);
this.settings.bind("show-scr-lock-indicator", "showScrLockIndicator", this._updateIconVisibility);
Expand Down Expand Up @@ -145,7 +146,8 @@ MyApplet.prototype = {
icon_size: ICON_SIZE
});
this._notification = new MessageTray.Notification(this._source, _("Lock Keys"), text, {
icon: icon
icon: icon,
silent: this.showSilentNotifications
});
this._notification.setUrgency(MessageTray.Urgency.NORMAL);
this._notification.setTransient(true);
Expand Down
5 changes: 5 additions & 0 deletions betterlock/files/betterlock/settings-schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,11 @@
"default": false,
"description" : "Show notifications"
},
"show-silent-notifications": {
"type" : "switch",
"default" : false,
"description" : "Silence system notificaiton sound"
},
"show-caps-lock-indicator": {
"type": "switch",
"default": false,
Expand Down
2 changes: 1 addition & 1 deletion betterlock/info.json
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{
"author": "none",
"author": "Centurix",
"original_author": "entelechy"
}

0 comments on commit 778ae01

Please sign in to comment.