summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPhil Jones <philj56@gmail.com>2022-06-25 17:52:24 +0100
committerPhil Jones <philj56@gmail.com>2022-06-25 17:52:24 +0100
commit60c0c650c67d727ff1fe9dd12df0baf56fd55045 (patch)
treedeef67518828fa0a0d67552ad5c8357eb8626c1d
parentfd1d7524b7a98fff762a5590e91496731474addb (diff)
Add example themes and allow # in colors.
-rw-r--r--doc/tofi.5.scd3
-rw-r--r--src/config.c2
-rw-r--r--themes/dmenu17
-rw-r--r--themes/dos14
-rw-r--r--themes/fullscreen9
5 files changed, 43 insertions, 2 deletions
diff --git a/doc/tofi.5.scd b/doc/tofi.5.scd
index 08c608d..4b39093 100644
--- a/doc/tofi.5.scd
+++ b/doc/tofi.5.scd
@@ -192,7 +192,8 @@ options.
# COLORS
-Colors can be specified in the form _RGB_, _RGBA_, _RRGGBB_ or _RRGGBBAA_.
+Colors can be specified in the form _RGB_, _RGBA_, _RRGGBB_ or _RRGGBBAA_,
+optionally prefixed with a hash (#).
# PERCENTAGE VALUES
diff --git a/src/config.c b/src/config.c
index 4b20ab5..fc850e5 100644
--- a/src/config.c
+++ b/src/config.c
@@ -168,7 +168,7 @@ void config_load(struct tofi *tofi, const char *filename)
num_errs++;
continue;
}
- char *value = strtok_r(NULL, "#;\r\n", &saveptr2);
+ char *value = strtok_r(NULL, "\r\n", &saveptr2);
if (!value) {
PARSE_ERROR(filename, lineno, "Config option \"%s\" missing value.\n", option_stripped);
num_errs++;
diff --git a/themes/dmenu b/themes/dmenu
new file mode 100644
index 0000000..db37290
--- /dev/null
+++ b/themes/dmenu
@@ -0,0 +1,17 @@
+anchor = top
+width = 100%
+height = 60
+horizontal = true
+font-size = 14
+prompt-text = " run: "
+font-name = monospace
+outline-width = 0
+border-width = 0
+background-color = #000000
+num-results = 10
+min-input-width = 240
+result-spacing = 30
+padding-top = 0
+padding-bottom = 0
+padding-left = 0
+padding-right = 0
diff --git a/themes/dos b/themes/dos
new file mode 100644
index 0000000..e9306be
--- /dev/null
+++ b/themes/dos
@@ -0,0 +1,14 @@
+font-name = VT323
+corner-radius = 120
+outline-color = #D3D1B9
+outline-width = 6
+border-color = #E3E1C9
+border-width = 120
+background-color = #000000
+text-color = #0A3
+selection-color = #0F6
+prompt-text = "C:\> "
+num-results = 9
+hide-cursor = true
+width = 1280
+height = 960
diff --git a/themes/fullscreen b/themes/fullscreen
new file mode 100644
index 0000000..6aef12f
--- /dev/null
+++ b/themes/fullscreen
@@ -0,0 +1,9 @@
+width = 100%
+height = 100%
+border-width = 0
+outline-width = 0
+padding-left = 35%
+padding-top = 35%
+result-spacing = 50
+font-name = monospace
+background-color = #000A