From 9135e39fcae8fc6caf86e639830b2b3058ef2f5d Mon Sep 17 00:00:00 2001 From: Jens Nolte <git@queezle.net> Date: Wed, 26 Apr 2023 04:24:17 +0200 Subject: [PATCH] Update documentation and remove `stack`-related scripts --- README.md | 10 ++-------- bin/install | 27 --------------------------- bin/run | 8 -------- 3 files changed, 2 insertions(+), 43 deletions(-) delete mode 100755 bin/install delete mode 100755 bin/run diff --git a/README.md b/README.md index 83ff19a..6d47d2e 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 22456b5..0000000 --- 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 725246f..0000000 --- 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 -- "$@" -- GitLab