Skip to content

Commit

Permalink
Add example themes and allow # in colors.
Browse files Browse the repository at this point in the history
  • Loading branch information
philj56 committed Jun 25, 2022
1 parent fd1d752 commit 60c0c65
Show file tree
Hide file tree
Showing 5 changed files with 43 additions and 2 deletions.
3 changes: 2 additions & 1 deletion doc/tofi.5.scd
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
2 changes: 1 addition & 1 deletion src/config.c
Original file line number Diff line number Diff line change
Expand Up @@ -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++;
Expand Down
17 changes: 17 additions & 0 deletions themes/dmenu
Original file line number Diff line number Diff line change
@@ -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
14 changes: 14 additions & 0 deletions themes/dos
Original file line number Diff line number Diff line change
@@ -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
9 changes: 9 additions & 0 deletions themes/fullscreen
Original file line number Diff line number Diff line change
@@ -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

0 comments on commit 60c0c65

Please sign in to comment.