diff --git a/README.md b/README.md index 83ff19a2104bb068f1754f63f7a465d5c235f764..6d47d2e12b4984cded6ab6046c0cfe6465d93a1f 100644 --- a/README.md +++ b/README.md @@ -6,21 +6,15 @@ qbar is a status command for [sway](https://swaywm.org/) and [i3](https://i3wm.o ### 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): ``` # Launch as swaybar status command while redirecting stderr to shell ./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 diff --git a/bin/install b/bin/install deleted file mode 100755 index 22456b59ce33fb5480737f9af489ed365318f0c1..0000000000000000000000000000000000000000 --- a/bin/install +++ /dev/null @@ -1,27 +0,0 @@ -#!/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 diff --git a/bin/run b/bin/run deleted file mode 100755 index 725246f6802134a6b134d49207c18543bb150031..0000000000000000000000000000000000000000 --- a/bin/run +++ /dev/null @@ -1,8 +0,0 @@ -#!/bin/sh - -set -e -set -u - -readonly executable_name=qbar - -stack build && stack exec $executable_name -- "$@"