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
c1b623a1
Unverified
Commit
c1b623a1
authored
Jul 18, 2025
by
Erik Reider
Committed by
GitHub
Jul 18, 2025
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix client printing help when running with --skip-wait (#605)
parent
18bc4570
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
13 additions
and
4 deletions
+13
-4
client.vala
src/client.vala
+13
-4
No files found.
src/client.vala
View file @
c1b623a1
...
@@ -133,9 +133,7 @@ private void print_subscribe_waybar () {
...
@@ -133,9 +133,7 @@ private void print_subscribe_waybar () {
}
}
}
}
public
int
command_line
(
ref
string
[]
args
)
{
public
int
command_line
(
ref
string
[]
args
,
bool
skip_wait
)
{
bool
skip_wait
=
"--skip-wait"
in
args
||
"-sw"
in
args
;
// Used to know how many args the current command consumed
// Used to know how many args the current command consumed
int
used_args
=
1
;
int
used_args
=
1
;
try
{
try
{
...
@@ -313,6 +311,7 @@ public int command_line (ref string[] args) {
...
@@ -313,6 +311,7 @@ public int command_line (ref string[] args) {
stderr
.
printf
(
"Could not find monitor: \"%s\"!"
,
args
[
1
]);
stderr
.
printf
(
"Could not find monitor: \"%s\"!"
,
args
[
1
]);
break
;
break
;
default
:
default
:
print
(
"Unknown command: \"%s\"\n"
,
args
[
0
]);
print_help
(
args
);
print_help
(
args
);
break
;
break
;
}
}
...
@@ -337,18 +336,28 @@ int try_connect (owned string[] args) {
...
@@ -337,18 +336,28 @@ int try_connect (owned string[] args) {
BusType
.
SESSION
,
BusType
.
SESSION
,
"org.erikreider.swaync.cc"
,
"org.erikreider.swaync.cc"
,
"/org/erikreider/swaync/cc"
);
"/org/erikreider/swaync/cc"
);
bool
skip_wait
=
"--skip-wait"
in
args
||
"-sw"
in
args
;
bool
one_arg
=
true
;
bool
one_arg
=
true
;
while
(
args
.
length
>
0
)
{
while
(
args
.
length
>
0
)
{
if
(
args
[
0
]
==
"--skip-wait"
||
args
[
0
]
==
"-sw"
)
{
args
=
args
[
1
:];
continue
;
}
if
(!
one_arg
)
{
if
(!
one_arg
)
{
// Separate each command output
// Separate each command output
print
(
"\n"
);
print
(
"\n"
);
}
}
if
(
command_line
(
ref
args
)
==
1
)
{
if
(
command_line
(
ref
args
,
skip_wait
)
==
1
)
{
print_connection_error
();
print_connection_error
();
return
1
;
return
1
;
}
}
one_arg
=
false
;
one_arg
=
false
;
}
}
// Should only be reached if the args only contains --skip-wait or -sw
if
(
one_arg
)
{
stderr
.
printf
(
"Skipping wait, but with no action."
);
}
return
0
;
return
0
;
}
catch
(
Error
e
)
{
}
catch
(
Error
e
)
{
print_connection_error
();
print_connection_error
();
...
...
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