From db377935940948f1b61a3194a922265c47ac69ef Mon Sep 17 00:00:00 2001 From: Manuel Palenzuela Date: Thu, 24 Oct 2019 14:46:11 +0100 Subject: [PATCH] Added different config file --- dwmbarrc | 14 ++++++++------ modulesrc | 17 +++++++++++++++++ 2 files changed, 25 insertions(+), 6 deletions(-) create mode 100644 modulesrc diff --git a/dwmbarrc b/dwmbarrc index cfe6c6f..02b9a01 100755 --- a/dwmbarrc +++ b/dwmbarrc @@ -15,20 +15,22 @@ # You should have received a copy of the GNU General Public License # along with this program. If not, see . -DELAY=0.05 +CONFIG_NAME="modulesrc" + +DELAY=$(cat $CONFIG_NAME | grep -E "DELAY" | cut -d '"' -f2) MODULES_DIR="/home/$USER/.config/dwmbar/modules/" -CUSTOM_DIR="/home/$USER/.config/dwmbar/modules/custom/" -SEPARATOR=" | " -PADDING="$USER@$HOSTNAME " +CUSTOM_DIR=$(cat $CONFIG_NAME | grep -E "CUSTOM_DIR" | cut -d '"' -f2) +SEPARATOR=$(cat $CONFIG_NAME | grep -E "SEPARATOR" | cut -d '"' -f2) +PADDING=$(cat $CONFIG_NAME | grep -E "PADDING" | cut -d '"' -f2) OUTPUT_CACHE="/home/$USER/.config/dwmbar/.cache/" OUTPUT="" # What modules, in what order -MODULES="mpd weather volumebar wifi internet cpuload temperature battery date time" +MODULES=$(cat $CONFIG_NAME | grep -E "MODULES" | cut -d '"' -f2) # Modules that require an active internet connection -ONLINE_MODULES="weather internet" +ONLINE_MODULES=$(cat $CONFIG_NAME | grep -E "ONLINE_MODULES" | cut -d '"' -f2) INTERNET=1 #0 being true diff --git a/modulesrc b/modulesrc new file mode 100644 index 0000000..eab201c --- /dev/null +++ b/modulesrc @@ -0,0 +1,17 @@ +# What modules, in what order +MODULES="mpd weather volumebar wifi internet cpuload temperatu + +# Modules that require an active internet connection +ONLINE_MODULES="weather internet" + +# Delay between showing the status bar +DELAY="0.05" + +# Where the custom modules are stored +CUSTOM_DIR="/home/$USER/.config/dwmbar/modules/custom/" + +# Separator between modules +SEPARATOR=" | " + +# Padding at the end and beggining of the status bar +PADDING="$USER@$HOSTNAME "