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
f1821a59
Unverified
Commit
f1821a59
authored
Jul 07, 2023
by
Erik Reider
Committed by
GitHub
Jul 07, 2023
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fixed Debian packaged configs being checked before user configs (#296)
parent
e400600d
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
12 additions
and
8 deletions
+12
-8
functions.vala
src/functions.vala
+12
-8
No files found.
src/functions.vala
View file @
f1821a59
...
...
@@ -106,10 +106,7 @@ namespace SwayNotificationCenter {
public
static
string
get_style_path
(
owned
string
?
custom_path
,
bool
only_system
=
false
)
{
string
[]
paths
=
{
// Fallback location. Specified in postinstall.py
"/usr/local/etc/xdg/swaync/style.css"
};
string
[]
paths
=
{};
if
(
custom_path
!=
null
&&
custom_path
.
length
>
0
)
{
// Replaces the home directory relative path with a absolute path
if
(
custom_path
.
get
(
0
)
==
'~'
)
{
...
...
@@ -127,6 +124,11 @@ namespace SwayNotificationCenter {
paths
+=
Path
.
build_path
(
Path
.
DIR_SEPARATOR
.
to_string
(),
path
,
"swaync/style.css"
);
}
// Fallback location. Specified in postinstall.py. Mostly for Debian
paths
+=
"/usr/local/etc/xdg/swaync/style.css"
;
info
(
"Looking for CSS file in these directories:\n\t- %s"
,
string
.
joinv
(
"\n\t- "
,
paths
));
string
path
=
""
;
foreach
(
string
try_path
in
paths
)
{
...
...
@@ -144,10 +146,7 @@ namespace SwayNotificationCenter {
}
public
static
string
get_config_path
(
owned
string
?
custom_path
)
{
string
[]
paths
=
{
// Fallback location. Specified in postinstall.py
"/usr/local/etc/xdg/swaync/config.json"
};
string
[]
paths
=
{};
if
(
custom_path
!=
null
&&
(
custom_path
=
custom_path
.
strip
()).
length
>
0
)
{
// Replaces the home directory relative path with a absolute path
if
(
custom_path
.
get
(
0
)
==
'~'
)
{
...
...
@@ -167,6 +166,11 @@ namespace SwayNotificationCenter {
paths
+=
Path
.
build_path
(
Path
.
DIR_SEPARATOR
.
to_string
(),
path
,
"swaync/config.json"
);
}
// Fallback location. Specified in postinstall.py. Mostly for Debian
paths
+=
"/usr/local/etc/xdg/swaync/config.json"
;
info
(
"Looking for config file in these directories:\n\t- %s"
,
string
.
joinv
(
"\n\t- "
,
paths
));
string
path
=
""
;
foreach
(
string
try_path
in
paths
)
{
...
...
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