Skip to content

Commit

Permalink
add noop action
Browse files Browse the repository at this point in the history
  • Loading branch information
g-rden committed Jul 9, 2024
1 parent a8cfb97 commit 0667338
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 0 deletions.
1 change: 1 addition & 0 deletions extra/swayimgrc.5
Original file line number Diff line number Diff line change
Expand Up @@ -192,6 +192,7 @@ in the key name.
.PP
Valid actions:
.IP "\fBnone\fR: can be used for removing built-in action;"
.IP "\fBnoop\fR: can be used for handle keys silently;"
.IP "\fBhelp\fR: show/hide help;"
.IP "\fBfirst_file\fR: jump to the first file;"
.IP "\fBlast_file\fR: jump to the last file;"
Expand Down
1 change: 1 addition & 0 deletions src/action.c
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
/** Action names. */
static const char* action_names[] = {
[action_none] = "none",
[action_noop] = "noop",
[action_help] = "help",
[action_first_file] = "first_file",
[action_last_file] = "last_file",
Expand Down
1 change: 1 addition & 0 deletions src/action.h
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
/** Supported actions. */
enum action_type {
action_none,
action_noop,
action_help,
action_first_file,
action_last_file,
Expand Down
1 change: 1 addition & 0 deletions src/viewer.c
Original file line number Diff line number Diff line change
Expand Up @@ -752,6 +752,7 @@ void viewer_on_keyboard(xkb_keysym_t key, uint8_t mods)
while (action->type != action_none) {
switch (action->type) {
case action_none:
case action_noop:
break;
case action_help:
switch_help();
Expand Down

0 comments on commit 0667338

Please sign in to comment.