2019-10-21 19:28:26 +00:00
|
|
|
#!/bin/bash
|
|
|
|
|
|
|
|
CONFIG_DIR="/home/$USER/.config/dwmbar"
|
|
|
|
MODULES_DIR="$CONFIG_DIR/modules"
|
2019-10-21 21:57:45 +00:00
|
|
|
CUSTOM_DIR="$MODULES_DIR/custom"
|
2019-10-21 19:28:26 +00:00
|
|
|
DWMBARRC="$CONFIG_DIR/dwmbarrc"
|
|
|
|
DWMBAR="/usr/bin/dwmbar"
|
|
|
|
|
2019-10-22 00:12:33 +00:00
|
|
|
if [ "$EUID" -ne 0 ]
|
|
|
|
then echo "Please run as root"
|
|
|
|
exit 0
|
|
|
|
fi
|
|
|
|
|
2019-10-21 19:28:26 +00:00
|
|
|
if [[ ! -f "dwmbar" ]]; then
|
|
|
|
echo "dwmbar executable not found."
|
|
|
|
fi
|
|
|
|
|
2019-10-21 21:57:45 +00:00
|
|
|
cp "./dwmbar" "/usr/bin/dwmbar"
|
2019-10-21 19:28:26 +00:00
|
|
|
|
2019-10-21 21:57:45 +00:00
|
|
|
mkdir -p "$CUSTOM_DIR"
|
2019-10-21 19:28:26 +00:00
|
|
|
|
2019-10-21 21:57:45 +00:00
|
|
|
for script in $(ls modules); do
|
|
|
|
echo "modules/$script -> $MODULES_DIR/$script"
|
|
|
|
cp "modules/$script" "$MODULES_DIR/$script"
|
|
|
|
done
|
2019-10-21 19:40:41 +00:00
|
|
|
|
2019-10-21 21:57:45 +00:00
|
|
|
[[ ! -f "$DWMBARRC" ]] && cp "./dwmbarrc" "$DWMBARRC"
|