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
81fb57ec
Unverified
Commit
81fb57ec
authored
Sep 30, 2022
by
Benjamin Vergnaud
Committed by
GitHub
Sep 30, 2022
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add client flags to turn dnd on/off (#169)
parent
b65a08bb
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
28 additions
and
0 deletions
+28
-0
swaync-client
completions/bash/swaync-client
+4
-0
swaync-client.fish
completions/fish/swaync-client.fish
+2
-0
_swaync-client
completions/zsh/_swaync-client
+2
-0
swaync-client.1.scd
man/swaync-client.1.scd
+6
-0
client.vala
src/client.vala
+14
-0
No files found.
completions/bash/swaync-client
View file @
81fb57ec
...
...
@@ -12,6 +12,8 @@ _swaync-client() {
-cp
-d
-D
-dn
-df
-c
-C
-sw
...
...
@@ -29,6 +31,8 @@ _swaync-client() {
--close-panel
--toggle-dnd
--get-dnd
--dnd-on
--dnd-off
--count
--hide-latest
--close-latest
...
...
completions/fish/swaync-client.fish
View file @
81fb57ec
...
...
@@ -8,6 +8,8 @@ complete -c swaync-client -s op -l open-panel --description "Opens the notificai
complete -c swaync-client -s cp -l close-panel --description "Closes the notificaion panel" -r
complete -c swaync-client -s d -l toggle-dnd --description "Toggle and print the current dnd state" -r
complete -c swaync-client -s D -l get-dnd --description "Print the current dnd state" -r
complete -c swaync-client -s dn -l dnd-on --description "Turn dnd on and print the new dnd state" -r
complete -c swaync-client -s df -l dnd-off --description "Turn dnd off and print the new dnd state" -r
complete -c swaync-client -s c -l count --description "Print the current notificaion count" -r
complete -c swaync-client -l hide-latest --description "Hides latest notification. Still shown in Control Center" -r
complete -c swaync-client -l close-latest --description "Closes latest notification" -r
...
...
completions/zsh/_swaync-client
View file @
81fb57ec
...
...
@@ -10,6 +10,8 @@ _arguments -s \
'(-cp --close-panel)'{-cp,--close-panel}'[Closes the notificaion panel]' \
'(-d --toggle-dnd)'{-d,--toggle-dnd}'[Toggle and print the current dnd state]' \
'(-D --get-dnd)'{-D,--get-dnd}'[Print the current dnd state]' \
'(-dn --dnd-on)'{-dn,--dnd-on}'[Turn dnd on and print the new dnd state]' \
'(-df --dnd-off)'{-df,--dnd-off}'[Turn dnd off and print the new dnd state]' \
'(-c --count)'{-c,--count}'[Print the current notificaion count]' \
'(--hide-latest)'--hide-latest'[Closes all notifications]' \
'(--close-latest)'--close-latest'[Hides latest notification. Still shown in Control Center]' \
...
...
man/swaync-client.1.scd
View file @
81fb57ec
...
...
@@ -37,6 +37,12 @@ swaync-client - Client executable
*-D, --get-dnd*
Print the current dnd state
*-dn, --dnd-on*
Turn dnd on and print the new dnd state
*-df, --dnd-off*
Turn dnd off and print the new dnd state
*-c, --count*
Print the current notificaion count
...
...
src/client.vala
View file @
81fb57ec
...
...
@@ -19,6 +19,8 @@ interface CcDaemon : Object {
public
abstract
bool
get_dnd
()
throws
DBusError
,
IOError
;
public
abstract
void
set_dnd
(
bool
state
)
throws
DBusError
,
IOError
;
public
abstract
bool
get_visibility
()
throws
DBusError
,
IOError
;
public
abstract
void
toggle_visibility
()
throws
DBusError
,
IOError
;
...
...
@@ -49,6 +51,8 @@ private void print_help (string[] args) {
print
(
"\t -cp, \t --close-panel \t\t Closes the notificaion panel\n"
);
print
(
"\t -d, \t --toggle-dnd \t\t Toggle and print the current dnd state\n"
);
print
(
"\t -D, \t --get-dnd \t\t Print the current dnd state\n"
);
print
(
"\t -dn, \t --dnd-on \t\t Turn dnd on and print the new dnd state\n"
);
print
(
"\t -df, \t --dnd-off \t\t Turn dnd off and print the new dnd state\n"
);
print
(
"\t -c, \t --count \t\t Print the current notificaion count\n"
);
print
(
"\t \t --hide-latest \t\t Hides latest notification. Still shown in Control Center\n"
);
print
(
"\t \t --close-latest \t Closes latest notification\n"
);
...
...
@@ -161,6 +165,16 @@ public int command_line (string[] args) {
case
"-D"
:
print
(
cc_daemon
.
get_dnd
().
to_string
());
break
;
case
"--dnd-on"
:
case
"-dn"
:
cc_daemon
.
set_dnd
(
true
);
print
(
cc_daemon
.
get_dnd
().
to_string
());
break
;
case
"--dnd-off"
:
case
"-df"
:
cc_daemon
.
set_dnd
(
false
);
print
(
cc_daemon
.
get_dnd
().
to_string
());
break
;
case
"--subscribe"
:
case
"-s"
:
cc_daemon
.
subscribe
.
connect
(
on_subscribe
);
...
...
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