summaryrefslogtreecommitdiff
path: root/src/main.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/main.c')
-rw-r--r--src/main.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/main.c b/src/main.c
index 2a9ce00..807f57c 100644
--- a/src/main.c
+++ b/src/main.c
@@ -22,6 +22,7 @@
#include "input.h"
#include "log.h"
#include "nelem.h"
+#include "lock.h"
#include "shm.h"
#include "string_vec.h"
#include "string_vec.h"
@@ -905,6 +906,11 @@ int main(int argc, char *argv[])
parse_args(&tofi, argc, argv);
+ if (lock_check()) {
+ log_error("Another instance of tofi is already running.\n");
+ exit(EXIT_FAILURE);
+ }
+
/*
* Initial Wayland & XKB setup.
* The first thing to do is connect a listener to the global registry,