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

Update documentation and remove `stack`-related scripts

parent bc5370f7
No related branches found
No related tags found
No related merge requests found
...@@ -6,21 +6,15 @@ qbar is a status command for [sway](https://swaywm.org/) and [i3](https://i3wm.o ...@@ -6,21 +6,15 @@ qbar is a status command for [sway](https://swaywm.org/) and [i3](https://i3wm.o
### Compiling from Source ### Compiling from Source
Building qbar requires [stack](https://haskellstack.org/). To build it run: Building qbar requires nix. To build it run:
``` ```
stack build nix build
``` ```
You can also use the scripts in the `bin`-directory (all scripts will rebuild the project if required): 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 # Launch as swaybar status command while redirecting stderr to shell
./bin/run-sway default ./bin/run-sway default
# Run the binary directly (mostly used to control the bar via rpc)
./bin/run --help
# Install the binary to ~/.local/bin (this can also install tab completions)
./bin/install
``` ```
## Configuration ## Configuration
......
#!/usr/bin/env zsh
set -e
set -u
readonly executable_name=qbar
readonly local_bin=`stack path --local-bin`
readonly executable_path=$local_bin/$executable_name
stack install
echo >&2
if [[ -n "${LOCAL_ZSH_COMPLETION_PATH+set}" ]]
then
if [[ -d "$LOCAL_ZSH_COMPLETION_PATH" ]]
then
ZSH_COMPLETION_SCRIPT_PATH=$LOCAL_ZSH_COMPLETION_PATH/_$executable_name
$executable_path --zsh-completion-script $executable_path > $ZSH_COMPLETION_SCRIPT_PATH
echo "Installed zsh completions for $executable_name to $ZSH_COMPLETION_SCRIPT_PATH" >&2
else
echo "Not installing completions, LOCAL_ZSH_COMPLETION_PATH is set but isn't a directory ($LOCAL_ZSH_COMPLETION_PATH)." >&2
fi
else
echo "Not installing completions, set LOCAL_ZSH_COMPLETION_PATH to install them." >&2
fi
#!/bin/sh
set -e
set -u
readonly executable_name=qbar
stack build && stack exec $executable_name -- "$@"
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