Re-use AWK components
[khatus.git] / bin / khatus_gen_make_status_bar
diff --git a/bin/khatus_gen_make_status_bar b/bin/khatus_gen_make_status_bar
deleted file mode 100755 (executable)
index 50e1b03..0000000
+++ /dev/null
@@ -1,39 +0,0 @@
-#! /usr/bin/awk -f
-
-BEGIN {
-    aliases["@energy"]    = "make_status_energy()"
-    aliases["@memory"]    = "make_status_mem()"
-    aliases["@processes"] = "make_status_procs()"
-    aliases["@cpu"]       = "make_status_cpu()"
-    aliases["@disk"]      = "make_status_disk()"
-    aliases["@net"]       = "make_status_net()"
-    aliases["@bluetooth"] = "make_status_bluetooth()"
-    aliases["@backlight"] = "make_status_screen_brightness()"
-    aliases["@volume"]    = "make_status_volume()"
-    aliases["@mpd"]       = "make_status_mpd()"
-    aliases["@weather"]   = "make_status_weather()"
-    aliases["@datetime"]  = "make_status_datetime()"
-    out = "function make_status_bar(    position, bar, sep, i, j) {\n"
-    n = split(Status_Bar, s, ",")
-    for (i=1; i<=n; i++) {
-        alias = s[i]
-        function_call = aliases[alias]
-        if (function_call) {
-            out = out "        position[++i] = " function_call ";\n"
-        } else {
-            printf("Unexpected status bar component alias: \"%s\"\n", alias) \
-                > "/dev/stderr"
-            exit(1)
-        }
-    }
-    out = out "\
-        bar = \"\";\
-        sep = \"\";\
-        for (j = 1; j <= i; j++) {\
-           bar = bar sep position[j];\
-           sep = \" \";\
-        }\
-        return bar;\
-    }";
-    print out
-}
This page took 0.02473 seconds and 4 git commands to generate.