mirror of
https://git.adityakumar.xyz/dwmbar.git
synced 2024-09-18 18:43:06 +00:00
keep config in user directory
This commit is contained in:
parent
f112628913
commit
cdf3b60d3e
2 changed files with 13 additions and 15 deletions
2
dwmbar
2
dwmbar
|
@ -15,7 +15,7 @@
|
||||||
|
|
||||||
VERSION="1.0"
|
VERSION="1.0"
|
||||||
|
|
||||||
DEFAULT_CONFIG_DIR="/usr/share/dwmbar"
|
DEFAULT_CONFIG_DIR="/home/$USER/.config/dwmbar"
|
||||||
export DEFAULT_CONFIG_DIR
|
export DEFAULT_CONFIG_DIR
|
||||||
DEFAULT_MODULES_DIR="$DEFAULT_CONFIG_DIR/modules/"
|
DEFAULT_MODULES_DIR="$DEFAULT_CONFIG_DIR/modules/"
|
||||||
export DEFAULT_MODULES_DIR
|
export DEFAULT_MODULES_DIR
|
||||||
|
|
26
install.sh
26
install.sh
|
@ -17,30 +17,28 @@
|
||||||
|
|
||||||
DWMBAR="/usr/bin/dwmbar"
|
DWMBAR="/usr/bin/dwmbar"
|
||||||
|
|
||||||
if [ "$EUID" -ne 0 ]
|
#if [ "$EUID" -ne 0 ]
|
||||||
then echo "Please run as root" > /dev/stderr
|
# then echo "Please run as root" > /dev/stderr
|
||||||
exit 1
|
# exit 1
|
||||||
fi
|
#fi
|
||||||
|
|
||||||
if [[ ! -f "dwmbar" ]]; then
|
if [[ ! -f "dwmbar" ]]; then
|
||||||
echo "dwmbar executable not found." > /dev/stderr
|
echo "dwmbar executable not found." > /dev/stderr
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Create /usr/share/dwmbar
|
# Create ~/.config/dwmbar
|
||||||
# Containing example bar.sh and modules
|
# Containing example bar.sh and modules
|
||||||
|
|
||||||
mkdir --parents "/usr/share/dwmbar/"
|
DWMBAR_CONF="/home/$USER/.config/dwmbar"
|
||||||
|
|
||||||
echo "./modules --> /usr/share/dwmbar/modules"
|
mkdir -pv $DWMBAR_CONF
|
||||||
cp -rT "./modules" "/usr/share/dwmbar/modules"
|
|
||||||
|
|
||||||
echo "./bar.sh --> /usr/share/dwmbar/bar.sh"
|
cp -vrfT "./modules" "$DWMBAR_CONF/modules"
|
||||||
cp "./bar.sh" "/usr/share/dwmbar/bar.sh"
|
|
||||||
|
|
||||||
echo "./config --> /usr/share/dwmbar/config"
|
cp -vf "./bar.sh" "$DWMBAR_CONF/bar.sh"
|
||||||
cp -r "./config" "/usr/share/dwmbar/config"
|
|
||||||
|
|
||||||
echo "./dwmbar --> /usr/bin/dwmbar"
|
cp -vr "./config" "$DWMBAR_CONF/config"
|
||||||
cp "./dwmbar" "/usr/bin/dwmbar"
|
|
||||||
|
sudo cp -vf "./dwmbar" $DWMBAR
|
||||||
[[ $? -eq 0 ]] && echo "Installation completed successfully"
|
[[ $? -eq 0 ]] && echo "Installation completed successfully"
|
||||||
|
|
Loading…
Reference in a new issue