Skip to content

Commit

Permalink
[Themes] add calc() support to distance in theme format. (#1105)
Browse files Browse the repository at this point in the history
* Initial test to allow math in distances.

Support + and -
Needs spaces around + and -.

* [THEME] Fix printing theme with math in distance.

* [Theme] use calc() syntax.

* [Theme] Add * and /  to calc().

* [Theme] Fix the precedense ordering in parsing. Also avoid making copies.

* [Theme] Don't print unneeded ().

* [Theme] Add modulo to calc.
  • Loading branch information
DaveDavenport committed Apr 24, 2020
1 parent f90ad97 commit 151547a
Show file tree
Hide file tree
Showing 12 changed files with 418 additions and 317 deletions.
12 changes: 0 additions & 12 deletions doc/rofi-script.5
Original file line number Diff line number Diff line change
Expand Up @@ -64,8 +64,6 @@ Rofi sets the following environment variable when executing the script:
.SS \fB\fCROFI\_RETV\fR
.PP
An integer number with the current state:

.RS
.IP \(bu 2
\fB0\fP: Initial call of script.
.IP \(bu 2
Expand All @@ -75,8 +73,6 @@ An integer number with the current state:
.IP \(bu 2
\fB10\-28\fP: Custom keybinding 1\-19

.RE

.SH Passing mode options
.PP
Extra options, like setting the prompt, can be set by the script.
Expand All @@ -96,8 +92,6 @@ For example to set the prompt:

.PP
The following extra options exists:

.RS
.IP \(bu 2
\fBprompt\fP: Update the prompt text.
.IP \(bu 2
Expand All @@ -113,8 +107,6 @@ The following extra options exists:
.IP \(bu 2
\fBno\-custom\fP: Only accept listed entries, ignore custom input.

.RE

.SH Parsing row options
.PP
Extra options for individual rows can be set.
Expand All @@ -134,17 +126,13 @@ For example:

.PP
The following options are supported:

.RS
.IP \(bu 2
\fBicon\fP: Set the icon for that row.
.IP \(bu 2
\fBmeta\fP: Specify invisible search terms.
.IP \(bu 2
\fBnonselectable\fP: If true the row cannot activated.

.RE

.SH SEE ALSO
.PP
rofi(1), rofi\-sensible\-terminal(1), dmenu(1), rofi\-theme(5), rofi\-theme\-selector(1)
Expand Down
4 changes: 0 additions & 4 deletions doc/rofi-theme-selector.1
Original file line number Diff line number Diff line change
Expand Up @@ -18,17 +18,13 @@ It lets you preview each theme with the Enter key and apply the theme to your
.SH Theme directories
.PP
\fBrofi\-theme\-selector\fP searches the following directories for themes:

.RS
.IP \(bu 2
${PREFIX}/share/rofi/themes
.IP \(bu 2
$XDG\_CONFIG\_HOME/rofi/themes
.IP \(bu 2
$XDG\_DATA\_HOME/share/rofi/themes

.RE

.PP
${PREFIX} reflects the install location of rofi. In most cases this will be "/usr".<br>
$XDG\_CONFIG\_HOME is normally unset. Default path is "$HOME/.config".<br>
Expand Down

0 comments on commit 151547a

Please sign in to comment.