Skip to content
Snippets Groups Projects
Commit 79eaa9ab authored by Jens Nolte's avatar Jens Nolte
Browse files

Require at least one block when running a server

parent 8a00c483
No related branches found
No related tags found
No related merge requests found
......@@ -14,7 +14,7 @@ stack build
You can also use the scripts in the `bin`-directory (all scripts will rebuild the project if required):
```
# Launch as swaybar status command while redirecting stderr to shell
./bin/run-sway
./bin/run-sway default
# Run the binary directly (mostly used to control the bar via rpc)
./bin/run --help
......
......@@ -60,11 +60,8 @@ pipeClientParser = do
barConfigurationParser :: Parser (BarIO ())
barConfigurationParser = do
blocks <- many blockParser
pure $ case blocks of
-- Load default config if no blocks are selected on the command line
[] -> defaultBarConfig
l -> sequence_ l
blocks <- some blockParser
pure $ sequence_ blocks
blockParser :: Parser (BarIO ())
blockParser = subparser (
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment