From 0a4d55165288e3f4b7e1b9b9d845e1d124a9a590 Mon Sep 17 00:00:00 2001 From: "Archie Hilton (thytom)" Date: Mon, 21 Oct 2019 20:28:26 +0100 Subject: [PATCH] Added basic install script and updated TODO.org --- TODO.org | 8 ++++---- dwmbarrc | 4 +++- install.sh | 20 ++++++++++++++++++++ 3 files changed, 27 insertions(+), 5 deletions(-) create mode 100644 install.sh diff --git a/TODO.org b/TODO.org index a04feaa..5a59529 100644 --- a/TODO.org +++ b/TODO.org @@ -16,13 +16,13 @@ Modules: - Disk Usage - Mail - CPU Usage -- Temperature -- Volume - Network -- Temperature -- Battery +- Volume Bar Finished Modules: +- Volume +- Battery +- Temperature - Weather - Bluetooth - Arch Updates diff --git a/dwmbarrc b/dwmbarrc index 9610857..69dbe29 100755 --- a/dwmbarrc +++ b/dwmbarrc @@ -1,10 +1,12 @@ #!/bin/bash +# Example file, designed to be edited. + MODULES_DIR="modules/" SEPARATOR=" | " -MODULES="volume temperature date time battery" +MODULES="wifi internet bluetooth volume temperature date time battery" run_modules(){ for module in $MODULES; do diff --git a/install.sh b/install.sh new file mode 100644 index 0000000..7d07847 --- /dev/null +++ b/install.sh @@ -0,0 +1,20 @@ +#!/bin/bash + +CONFIG_DIR="/home/$USER/.config/dwmbar" +MODULES_DIR="$CONFIG_DIR/modules" +DWMBARRC="$CONFIG_DIR/dwmbarrc" +DWMBAR="/usr/bin/dwmbar" + +if [[ ! -f "dwmbar" ]]; then + echo "dwmbar executable not found." +fi + +install() +{ + cp "./dwmbar /usr/bin/dwmbar" + + mkdir -p "$CONFIG_DIR" + + [[ ! -f "$MODULES_DIR" ]] && cp -r "./modules" "$CONFIG_DIR/modules" + [[ ! -f "$DWMBARRC" ]] && cp "./dwmbarrc" "$DWMBARRC" +}