aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorManuel Palenzuela <manuelpalenzuelamerino@gmail.com>2019-10-24 14:46:11 +0100
committerManuel Palenzuela <manuelpalenzuelamerino@gmail.com>2019-10-24 14:46:11 +0100
commitdb377935940948f1b61a3194a922265c47ac69ef (patch)
tree86b11fe69529e2462b8c8d242941e66eaf7dffcd
parent9969167112f99287ab9011f085bd6c43114a5b2d (diff)
Added different config file
-rwxr-xr-xdwmbarrc14
-rw-r--r--modulesrc17
2 files changed, 25 insertions, 6 deletions
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 <https://www.gnu.org/licenses/>.
-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 "