Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
X
ximper-shell-notification-center
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Ximper Linux
ximper-shell-notification-center
Commits
c5067e65
Unverified
Commit
c5067e65
authored
Oct 20, 2024
by
Sonter
Committed by
GitHub
Oct 20, 2024
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add a way to change No Notifications text (#485)
parent
aef8fd7c
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
20 additions
and
2 deletions
+20
-2
swaync.5.scd
man/swaync.5.scd
+5
-0
config.json.in
src/config.json.in
+1
-0
configModel.vala
src/configModel/configModel.vala
+3
-0
configSchema.json
src/configSchema.json
+5
-0
controlCenter.ui
src/controlCenter/controlCenter.ui
+1
-1
controlCenter.vala
src/controlCenter/controlCenter.vala
+5
-1
No files found.
man/swaync.5.scd
View file @
c5067e65
...
...
@@ -126,6 +126,11 @@ config file to be able to detect config errors
default: true ++
description: Hides the control center when clicking on notification action
*text-empty* ++
type: string ++
default: "No Notifications" ++
description: Text that appears when there are no notifications to show
*fit-to-screen* ++
type: bool ++
default: true ++
...
...
src/config.json.in
View file @
c5067e65
...
...
@@ -28,6 +28,7 @@
"transition-time": 200,
"hide-on-clear": false,
"hide-on-action": true,
"text-empty": "No Notifications",
"script-fail-notify": true,
"scripts": {
"example-script": {
...
...
src/configModel/configModel.vala
View file @
c5067e65
...
...
@@ -412,6 +412,9 @@ namespace SwayNotificationCenter {
/** Hides the control center when clicking on notification action */
public
bool
hide_on_action
{
get
;
set
;
default
=
true
;
}
/** Text that appears when there are no notifications to show */
public
string
text_empty
{
get
;
set
;
default
=
"No Notifications"
;
}
/** The controlcenters horizontal alignment. Supersedes `positionX` if not `NONE` */
public
PositionX
control_center_positionX
{
// vala-lint=naming-convention
get
;
set
;
default
=
PositionX
.
NONE
;
...
...
src/configSchema.json
View file @
c5067e65
...
...
@@ -176,6 +176,11 @@
"description"
:
"Hides the control center when clicking on notification action"
,
"default"
:
true
},
"text-empty"
:
{
"type"
:
"string"
,
"description"
:
"Text that appears when there are no notifications to show"
,
"default"
:
"No Notifications"
},
"script-fail-notify"
:
{
"type"
:
"boolean"
,
"description"
:
"Sends a notification if a script fails to run"
,
...
...
src/controlCenter/controlCenter.ui
View file @
c5067e65
...
...
@@ -68,7 +68,7 @@
</packing>
</child>
<child>
<object
class=
"GtkLabel"
>
<object
class=
"GtkLabel"
id=
"text_empty_label"
>
<property
name=
"visible"
>
True
</property>
<property
name=
"can-focus"
>
False
</property>
<property
name=
"label"
translatable=
"yes"
>
No Notifications
</property>
...
...
src/controlCenter/controlCenter.vala
View file @
c5067e65
...
...
@@ -4,6 +4,8 @@ namespace SwayNotificationCenter {
[
GtkChild
]
unowned
Gtk
.
Box
notifications_box
;
[
GtkChild
]
unowned
Gtk
.
Label
text_empty_label
;
[
GtkChild
]
unowned
Gtk
.
Stack
stack
;
[
GtkChild
]
unowned
Gtk
.
ScrolledWindow
scrolled_window
;
...
...
@@ -61,11 +63,13 @@ namespace SwayNotificationCenter {
list_box
.
get_style_context
().
add_class
(
"control-center-list"
);
viewport
.
add
(
list_box
);
text_empty_label
.
set_text
(
ConfigModel
.
instance
.
text_empty
);
if
(
swaync_daemon
.
use_layer_shell
)
{
if
(!
GtkLayerShell
.
is_supported
())
{
stderr
.
printf
(
"GTKLAYERSHELL IS NOT SUPPORTED!\n"
);
stderr
.
printf
(
"Swaync only works on Wayland!\n"
);
stderr
.
printf
(
"If running waylan
s
session, try running:\n"
);
stderr
.
printf
(
"If running waylan
d
session, try running:\n"
);
stderr
.
printf
(
"\tGDK_BACKEND=wayland swaync\n"
);
Process
.
exit
(
1
);
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment