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
5e30c19e
Commit
5e30c19e
authored
Oct 07, 2025
by
Erik Reider
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Display in debug log why notifications aren't being shown
parent
d401ac00
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
17 additions
and
1 deletion
+17
-1
notiDaemon.vala
src/notiDaemon/notiDaemon.vala
+17
-1
No files found.
src/notiDaemon/notiDaemon.vala
View file @
5e30c19e
...
@@ -180,7 +180,8 @@ namespace SwayNotificationCenter {
...
@@ -180,7 +180,8 @@ namespace SwayNotificationCenter {
break
;
break
;
}
}
debug
(
"Notification: %s\n"
,
param
.
to_string
());
debug
(
"Notification (ID:%u, state: %s): %s\n"
,
param
.
applied_id
,
state
.
to_string
(),
param
.
to_string
());
// Get the notification id to replace
// Get the notification id to replace
uint32
replace_notification
=
0
;
uint32
replace_notification
=
0
;
...
@@ -198,21 +199,29 @@ namespace SwayNotificationCenter {
...
@@ -198,21 +199,29 @@ namespace SwayNotificationCenter {
synchronous_ids
.
set
(
param
.
synchronous
,
id
);
synchronous_ids
.
set
(
param
.
synchronous
,
id
);
}
}
string
?
hide_notification_reason
=
null
;
bool
show_notification
=
state
==
NotificationStatusEnum
.
ENABLED
bool
show_notification
=
state
==
NotificationStatusEnum
.
ENABLED
||
state
==
NotificationStatusEnum
.
TRANSIENT
;
||
state
==
NotificationStatusEnum
.
TRANSIENT
;
if
(!
show_notification
)
{
hide_notification_reason
=
"Notification status is not Enabled or Transient in Config"
;
}
// Don't show the notification window if the control center is open
// Don't show the notification window if the control center is open
if
(
control_center
.
get_visibility
())
{
if
(
control_center
.
get_visibility
())
{
hide_notification_reason
=
"Control Center is visible"
;
show_notification
=
false
;
show_notification
=
false
;
}
}
bool
bypass_dnd
=
param
.
urgency
==
UrgencyLevels
.
CRITICAL
||
param
.
swaync_bypass_dnd
;
bool
bypass_dnd
=
param
.
urgency
==
UrgencyLevels
.
CRITICAL
||
param
.
swaync_bypass_dnd
;
// Don't show the notification window if dnd or inhibited
// Don't show the notification window if dnd or inhibited
if
(!
bypass_dnd
&&
(
dnd
||
swaync_daemon
.
inhibited
))
{
if
(!
bypass_dnd
&&
(
dnd
||
swaync_daemon
.
inhibited
))
{
hide_notification_reason
=
"Do Not Disturb is enabled or an Inhibitor is running"
;
show_notification
=
false
;
show_notification
=
false
;
}
}
if
(
show_notification
)
{
if
(
show_notification
)
{
if
(
replace_notification
>
0
)
{
if
(
replace_notification
>
0
)
{
debug
(
"Replacing Notification: ID:%u\n"
,
param
.
applied_id
);
NotificationWindow
.
instance
.
replace_notification
(
replace_notification
,
param
);
NotificationWindow
.
instance
.
replace_notification
(
replace_notification
,
param
);
}
else
{
}
else
{
NotificationWindow
.
instance
.
add_notification
(
param
);
NotificationWindow
.
instance
.
add_notification
(
param
);
...
@@ -220,6 +229,9 @@ namespace SwayNotificationCenter {
...
@@ -220,6 +229,9 @@ namespace SwayNotificationCenter {
}
else
if
(
replace_notification
>
0
)
{
}
else
if
(
replace_notification
>
0
)
{
// Remove the old notification due to it not being replaced
// Remove the old notification due to it not being replaced
NotificationWindow
.
instance
.
close_notification
(
replace_notification
,
false
);
NotificationWindow
.
instance
.
close_notification
(
replace_notification
,
false
);
}
else
{
debug
(
"Not displaying Notification: ID:%u, Reason: \"%s\"\n"
,
param
.
applied_id
,
hide_notification_reason
);
}
}
// Only add notification to CC if it isn't IGNORED and not transient/TRANSIENT
// Only add notification to CC if it isn't IGNORED and not transient/TRANSIENT
...
@@ -227,6 +239,7 @@ namespace SwayNotificationCenter {
...
@@ -227,6 +239,7 @@ namespace SwayNotificationCenter {
&&
state
!=
NotificationStatusEnum
.
TRANSIENT
&&
state
!=
NotificationStatusEnum
.
TRANSIENT
&&
!
param
.
transient
)
{
&&
!
param
.
transient
)
{
if
(
replace_notification
>
0
)
{
if
(
replace_notification
>
0
)
{
debug
(
"Replacing CC Notification: ID:%u\n"
,
param
.
applied_id
);
control_center
.
replace_notification
(
replace_notification
,
param
);
control_center
.
replace_notification
(
replace_notification
,
param
);
}
else
{
}
else
{
control_center
.
add_notification
(
param
);
control_center
.
add_notification
(
param
);
...
@@ -234,6 +247,8 @@ namespace SwayNotificationCenter {
...
@@ -234,6 +247,8 @@ namespace SwayNotificationCenter {
}
else
if
(
replace_notification
>
0
)
{
}
else
if
(
replace_notification
>
0
)
{
// Remove the old notification due to it not being replaced
// Remove the old notification due to it not being replaced
control_center
.
close_notification
(
replace_notification
,
false
);
control_center
.
close_notification
(
replace_notification
,
false
);
}
else
{
debug
(
"Not Placing Notification in CC: ID:%u\n"
,
param
.
applied_id
);
}
}
#if WANT_SCRIPTING
#if WANT_SCRIPTING
...
@@ -246,6 +261,7 @@ namespace SwayNotificationCenter {
...
@@ -246,6 +261,7 @@ namespace SwayNotificationCenter {
if
(
scripts
.
length
==
0
)
return
id
;
if
(
scripts
.
length
==
0
)
return
id
;
this
.
run_scripts
(
param
,
ScriptRunOnType
.
RECEIVE
);
this
.
run_scripts
(
param
,
ScriptRunOnType
.
RECEIVE
);
#endif
#endif
debug
(
"\n"
);
return
id
;
return
id
;
}
}
...
...
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