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
20f41ddc
Unverified
Commit
20f41ddc
authored
Mar 03, 2025
by
SuperDuperDeou
Committed by
GitHub
Mar 03, 2025
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Pass hints as environment to scripts (#440)
* Pass hints as environment to scripts * Fix formatting --------- Co-authored-by:
Erik Reider
<
35975961+ErikReider@users.noreply.github.com
>
parent
d0998d02
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
6 additions
and
0 deletions
+6
-0
swaync.5.scd
man/swaync.5.scd
+1
-0
configModel.vala
src/configModel/configModel.vala
+5
-0
No files found.
man/swaync.5.scd
View file @
20f41ddc
...
@@ -728,5 +728,6 @@ SWAYNC_CATEGORY="SwayNC notification category"
...
@@ -728,5 +728,6 @@ SWAYNC_CATEGORY="SwayNC notification category"
SWAYNC_REPLACES_ID="ID of notification to replace"
SWAYNC_REPLACES_ID="ID of notification to replace"
SWAYNC_ID="SwayNC notification ID"
SWAYNC_ID="SwayNC notification ID"
SWAYNC_SUMMARY="Notification summary"
SWAYNC_SUMMARY="Notification summary"
SWAYNC_HINT_[NAME]="Value of the hint [NAME]"
```
```
#END scripting
#END scripting
src/configModel/configModel.vala
View file @
20f41ddc
...
@@ -247,6 +247,11 @@ namespace SwayNotificationCenter {
...
@@ -247,6 +247,11 @@ namespace SwayNotificationCenter {
spawn_env
+=
"SWAYNC_REPLACES_ID=%s"
.
printf
(
param
.
replaces_id
.
to_string
());
spawn_env
+=
"SWAYNC_REPLACES_ID=%s"
.
printf
(
param
.
replaces_id
.
to_string
());
spawn_env
+=
"SWAYNC_TIME=%s"
.
printf
(
param
.
time
.
to_string
());
spawn_env
+=
"SWAYNC_TIME=%s"
.
printf
(
param
.
time
.
to_string
());
spawn_env
+=
"SWAYNC_DESKTOP_ENTRY=%s"
.
printf
(
param
.
desktop_entry
??
""
);
spawn_env
+=
"SWAYNC_DESKTOP_ENTRY=%s"
.
printf
(
param
.
desktop_entry
??
""
);
foreach
(
string
hint
in
param
.
hints
.
get_keys
())
{
spawn_env
+=
"SWAYNC_HINT_%s=%s"
.
printf
(
hint
.
up
().
replace
(
"-"
,
"_"
),
param
.
hints
[
hint
].
print
(
false
));
}
return
yield
Functions
.
execute_command
(
exec
,
spawn_env
,
out
msg
);
return
yield
Functions
.
execute_command
(
exec
,
spawn_env
,
out
msg
);
}
}
...
...
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