mirror of
https://github.com/swaywm/sway.git
synced 2026-05-26 21:38:40 -04:00
Add lock command for invoking swaylock_command
Add lock command to be able to bind a key to invoke the lock command specified by swaylock_command
This commit is contained in:
parent
61cc0c67fe
commit
146a22290e
5 changed files with 15 additions and 0 deletions
|
|
@ -167,6 +167,7 @@ static struct cmd_handler command_handlers[] = {
|
|||
{ "focus", cmd_focus },
|
||||
{ "kill", cmd_kill },
|
||||
{ "layout", cmd_layout },
|
||||
{ "lock", cmd_lock },
|
||||
{ "move", cmd_move },
|
||||
{ "opacity", cmd_opacity },
|
||||
{ "reload", cmd_reload },
|
||||
|
|
|
|||
11
sway/commands/lock.c
Normal file
11
sway/commands/lock.c
Normal file
|
|
@ -0,0 +1,11 @@
|
|||
#include <wlr/util/log.h>
|
||||
#include "log.h"
|
||||
#include "sway/commands.h"
|
||||
#include "sway/idle.h"
|
||||
|
||||
struct cmd_results *cmd_lock(int argc, char **argv) {
|
||||
|
||||
invoke_swaylock();
|
||||
|
||||
return cmd_results_new(CMD_SUCCESS, NULL, NULL);
|
||||
}
|
||||
|
|
@ -37,6 +37,7 @@ sway_sources = files(
|
|||
'commands/focus_follows_mouse.c',
|
||||
'commands/fullscreen.c',
|
||||
'commands/kill.c',
|
||||
'commands/lock.c',
|
||||
'commands/opacity.c',
|
||||
'commands/include.c',
|
||||
'commands/input.c',
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue