stevee

My wayland statusbar
git clone git://gtms.dev/stevee
Log | Files | Refs | Submodules | README | LICENSE

commit ee46a7673c63c9890c1bf6b0acb0c9e1c8b1f5b2
parent b92fecdc3e6a1372b6b57c57a264ede86fc8c1a6
Author: Andrea Feletto <andrea@andreafeletto.com>
Date:   Fri, 13 May 2022 01:06:51 +0200

require at least one module

Diffstat:
Msrc/main.zig | 7++++++-
1 file changed, 6 insertions(+), 1 deletion(-)

diff --git a/src/main.zig b/src/main.zig @@ -24,7 +24,7 @@ pub fn main() anyerror!void { var gpa: heap.GeneralPurposeAllocator(.{}) = .{}; defer _ = gpa.deinit(); - fcft.init(.auto, false, .info); + fcft.init(.auto, false, .warning); // cli arguments const params = comptime [_]clap.Param(clap.Help){ @@ -61,6 +61,11 @@ pub fn main() anyerror!void { } } + if (state.modules.modules.items.len == 0) { + std.log.err("having no module is currently not supported", .{}); + return clap.help(io.getStdErr().writer(), &params); + } + // event loop try state.wayland.registerGlobals(); try state.loop.run();