Commit graph

236 commits

Author SHA1 Message Date
Dave Davenport
9cd1e3fac2 Indent 2017-11-07 20:04:07 +01:00
Dave Davenport
f992e0e21a Add the prompt colon to the default theme.
- Fix dumping of theme localization of the decimal-point. Force it to
be always a '.'.
2017-11-05 12:56:41 +01:00
Dave Davenport
0ef2ad0771 Use PACKAGE_VERSION as it is known to both make and meson. 2017-10-31 19:36:13 +01:00
Dave Davenport
ba0acd625f Remove leading # from dump theme and add mesg about rofi dumping it 2017-10-31 19:29:27 +01:00
Dave Davenport
5f1be779a2 Fixes parsing of non-existing fields.
Fixes: #700
2017-10-20 22:13:28 +02:00
Dave Davenport
fcaf8d8104 Fix color conversion from old ARGB to RGBA (new)
Fixes: #693
2017-10-19 07:48:48 +02:00
Dave Davenport
9ae62960c1 Indent files. 2017-10-05 17:45:50 +02:00
Dave Davenport
8a0563634f Fix conversion of border color to new theme format. 2017-09-24 15:32:53 +02:00
Dave Davenport
99f2a1a9bf Add @theme import command, that resets the current theme. 2017-09-18 17:48:13 +02:00
Dave Davenport
ff4946edaf Cleanup compiler warnings.
- Unused var.
- Missing switch statement.
- Change fallthrough for older compilers.
2017-09-17 18:17:26 +02:00
Dave Davenport
e01aefd773 Update shipped themes. 2017-09-09 14:50:23 +02:00
Dave Davenport
af369bd244 Update default theme and converter. 2017-09-09 12:07:11 +02:00
Dave Davenport
28ca3cb510 Fix tests. 2017-09-07 20:03:21 +02:00
Dave Davenport
2a5cb6f621 Alias 'color' property name to 'text-color' 2017-09-07 08:35:09 +02:00
Dave Davenport
7c1ecb4707 Add support for multiple selectors. #dummy0, dummy1 {} 2017-09-06 23:11:03 +02:00
Dave Davenport
0824a1e48c Inherit again, for modifiers. 2017-09-06 22:19:00 +02:00
Dave Davenport
6b43fed3aa use color, background-color and border-color 2017-09-06 19:02:09 +02:00
Dave Davenport
4dc9f29512 Add (untested) support for inherit keyword. 2017-09-06 18:26:04 +02:00
Dave Davenport
50998b8f04 Flatten hierarchy, don't inherit by default.
* add keyword inherit to language parser and theme structure.
2017-09-06 10:03:44 +02:00
Dave Davenport
9b0a430fd4 Indent. 2017-09-05 13:52:44 +02:00
Dave Davenport
ba296f9210 Add ch as size unit. 2017-09-05 13:52:21 +02:00
Dave Davenport
2b8179b684 Try to match line-padding in theme converter. 2017-09-04 22:46:50 +02:00
Dave Davenport
604779c444 Change order evaluation to make CPPCheck happy.
Code was not wrong.
2017-08-08 09:40:38 +02:00
Dave Davenport
474e3b3d63 Slight tweak to default theme 2017-07-24 16:58:03 +02:00
Dave Davenport
ecc9bcc270 Re-add some of the old theme options, so theme converter use them.
- line margin
 - separator style.
 - fake transparency.
 - line padding.
 - scrollbar width
2017-07-06 18:20:32 +02:00
Dave Davenport
7e1c02b04c [OldTheme] Re-add the padding/bw option. 2017-07-03 09:23:03 +02:00
Dave Davenport
69d32164c9 Fix test building. 2017-06-21 19:18:57 +02:00
Dave Davenport
77a4d97262 Add -dump-config option. 2017-06-21 08:19:47 +02:00
Dave Davenport
9af191de26 Fix tests by splitting types name into separate file. 2017-06-20 21:02:13 +02:00
Dave Davenport
da00848416 Do better error reporting on configuration entries in rasi format. 2017-06-20 18:10:18 +02:00
Dave Davenport
22aacb8f94 Add extra check for rofi_theme_parse_prepare_file 2017-06-14 16:19:17 +02:00
Dave Davenport
02ef2f41ef Extend list of printable properties names to include list and orientation. 2017-06-13 21:42:03 +02:00
Dave Davenport
07076d154a Load theme-str after loading fallback themes.
* If no theme loaded, try converting old theme.
 * If still no theme loaded, try default theme.
 * Then load modifications (theme-str option)
2017-06-07 07:53:33 +02:00
Dave Davenport
68641a2143 Add new keywords to theme printer 2017-06-03 20:45:16 +02:00
Dave Davenport
9a62bfd172 Run indenter. 2017-06-03 20:35:50 +02:00
Dave Davenport
1d622aa59c Change ThemeHighlight to RofiHighlightColorStyle 2017-06-02 16:46:28 +02:00
Dave Davenport
3e46228074 Change Padding to RofiPadding 2017-06-02 16:44:16 +02:00
Dave Davenport
ea7d20d150 Change Orientation enum to RofiOrientation. 2017-06-02 16:34:52 +02:00
Dave Davenport
9915857a2e Change Distance struct to RofiDistance. 2017-06-02 16:25:47 +02:00
Dave Davenport
7352f1c2ba Change PixelWidth to RofiPixelUnit. 2017-06-02 16:21:05 +02:00
Dave Davenport
48bf1709b6 Rename HL_ to ROFI_HL_ and fix box test. 2017-06-02 16:09:20 +02:00
Dave Davenport
eec5c6eadc Add orientation property. 2017-06-02 14:05:19 +02:00
Dave Davenport
b82e1c7a78 Merge remote-tracking branch 'origin/master' into barview 2017-05-28 10:17:12 +02:00
Quentin Glidic
04faad945a
Merge branch 'master' into wip/meson
Signed-off-by: Quentin Glidic <sardemff7+git@sardemff7.net>
2017-05-28 00:21:57 +02:00
Dave Davenport
0fdb1068da Allow layout to be overwritten 2017-05-27 17:08:46 +02:00
Dave Davenport
c23df70aeb Allow interface to be dynamically changed. 2017-05-25 23:41:15 +02:00
Dave Davenport
da092c53ac [BarView] Use exact match for entry width. 2017-05-24 08:50:45 +02:00
Dave Davenport
72afc7b039 Add strikethrough highlight method. 2017-05-18 07:59:37 +02:00
Dave Davenport
30fb8c514e Change ARGB to RGBA, fix in theme converter 2017-05-16 21:55:52 +02:00
Dave Davenport
494550d38d [ThemeParser] Add CSS color names support
* [ThemeParser] Add css color names

* Add CSS color support (WIP)

* Parse color names in the lexer.

* Add test for css color names

* Indent and fix ordering
2017-05-15 22:46:33 +02:00
Dave Davenport
67e38cde40 Fix some clang compiler warnings 2017-05-11 18:30:44 +02:00
Dave Davenport
aaea2b2c8a Add hsl and cmyk test, add extra error checking 2017-05-10 20:54:16 +02:00
Quentin Glidic
7fd8ce4c0a
Add Meson build system support
Signed-off-by: Quentin Glidic <sardemff7+git@sardemff7.net>
2017-05-04 21:50:07 +02:00
Quentin Glidic
4fccb3efdc
theme-parser: Drop lexer/ in #includes
Signed-off-by: Quentin Glidic <sardemff7+git@sardemff7.net>
2017-05-04 13:40:12 +02:00
Dave Davenport
ce4b1b23b4 Re-Indent code 2017-04-27 22:59:14 +02:00
Dave Davenport
ac2390c76d [Lexer] More tests.
Fix return of double.
2017-04-26 23:24:14 +02:00
Dave Davenport
fb318f0ff8 Cleanups, fix arguments mismatch 2017-04-23 15:17:15 +02:00
Quentin Glidic
9a68b22009
Fix licenses headers
Signed-off-by: Quentin Glidic <sardemff7+git@sardemff7.net>
2017-04-15 12:32:05 +02:00
Quentin Glidic
cfbe4027bc
Consolidate logging
Signed-off-by: Quentin Glidic <sardemff7+git@sardemff7.net>
2017-04-15 12:07:29 +02:00
Dave Davenport
ba9e1fb92a Switch to g_{debug,warning} instead of g_log 2017-04-15 11:37:50 +02:00
Dave Davenport
d6af6d29fc Small memory leak in theme-config parser. 2017-04-12 09:22:26 +02:00
Dave Davenport
f1c23c5bfa When query theme for exact match, do not consider state. 2017-04-11 21:11:09 +02:00
Dave Davenport
27339bf9bf Avoid possible buffer overflow 2017-04-10 17:30:11 +02:00
Dave Davenport
79c33cfca6 Improve error messages when type does not match. 2017-04-09 15:27:23 +02:00
Dave Davenport
b227fece10 Fix some warning that converity scan picked up. 2017-04-06 19:55:47 +02:00
Dave Davenport
c40bb4fc35 Fix small bug and extend test for theme parser 2017-04-04 23:02:08 +02:00
Dave Davenport
abaae5f403 Add (initial) check for theme parser. 2017-04-04 08:56:19 +02:00
Dave Davenport
358759e0ab Reset pointer to NULL after free'ing. 2017-04-04 08:31:25 +02:00
Dave Davenport
ae200fd164 Fix checks compiling 2017-04-03 12:04:07 +02:00
Dave Davenport
a754815d14 Add converter back for old theme format. 2017-04-02 12:32:11 +02:00
Dave Davenport
eeee200d8f Remove old theme support. (part 1) 2017-03-29 20:18:41 +02:00
Dave Davenport
61e537a05f ISSUE 576: Clutching at straws.
* Don't use atexit anymore. (what happens with g_spawn and atexit?
should be fine, but a test).
 * Even though not needed, force wait on running thread (of which there
should be none) when destroy thread pool.
2017-03-25 14:23:31 +01:00
Dave Davenport
c27921f99a Small change to make cppcheck happy 2017-03-18 16:06:41 +01:00
Dave Davenport
6447ddf0d7 clang-check fixes 2017-03-17 14:27:08 +01:00
Dave Davenport
50477a0b99 [Keys] Cleanup view a bit. 2017-03-17 14:07:11 +01:00
Dave Davenport
d52c80d76f [Textbox] Remove unneeded calls to pango_layout_get_pixel_size.
This was 21% of the widget update time.
2017-03-14 17:02:03 +01:00
Dave Davenport
9cfb075bc4 Add filename to location in error message. 2017-03-13 16:42:17 +01:00
Dave Davenport
be036f086d Reset location when importing, correctly resolve relative path 2017-03-13 08:54:55 +01:00
Dave Davenport
b7f4b7484f Some initial support for @import in theme and try to fall back when theme fails to load 2017-03-11 17:06:06 +01:00
Dave Davenport
cee753bd3c Zeltakmadness (#572)
* Allow modi to set extra pango attributes on displayed rows

* Fix some documentation, only highlight the mode name with color.

* Small rename.
2017-03-10 23:39:29 +01:00
Dave Davenport
88cde09055 Merge remote-tracking branch 'gitcreate/master' 2017-03-06 10:35:20 +01:00
Dave Davenport
9938317dc5 Don't g_strsplit everytime, use strtok. 2017-03-06 09:56:02 +01:00
Dave Davenport
cb9255bbea Allow slice allocator for theme 2017-03-04 20:09:19 +01:00
Dave Davenport
dc7e4aa96e Install some headers for use in plugins 2017-02-17 14:06:31 +01:00
Dave Davenport
0ebd6a260b Add auto-detect option to DPI setting. 2017-01-21 12:58:52 +01:00
Dave Davenport
13a83e3495 Give a visible (popup) error message when failed to open theme 2017-01-19 18:49:55 +01:00
Dave Davenport
25dff63006 Improve error handling string. 2017-01-09 22:40:11 +01:00
Dave Davenport
ca01af6338 Try to improve error handling and messages 2017-01-09 22:29:31 +01:00
Dave Davenport
854aa55453 Better error reporting (1) 2017-01-09 18:32:26 +01:00
Dave Davenport
a199fa3275 Improve error message theme a little bit 2017-01-09 08:55:51 +01:00
Dave Davenport
5188e36147 Remove unused functions and other small fixes 2017-01-09 08:39:02 +01:00
Dave Davenport
713d41f619 Allow matching highlighting to be set. Fixes #522 2017-01-09 00:09:02 +01:00
Dave Davenport
baab2047ad Indent magic, rework makefile so lexer and yacc file are not passed. 2017-01-08 21:36:06 +01:00
Dave Davenport
35a9b04f87 Print position as textual in dump-theme. 2017-01-08 18:03:31 +01:00
Dave Davenport
5d1fa66c30 Fix dumping of theme 2017-01-08 17:50:42 +01:00
Dave Davenport
8543ac8438 Fix doxygen. 2017-01-08 16:23:17 +01:00
Dave Davenport
c57e7348d2 Add some better error message. Allow -theme-str option to override part of theme 2017-01-08 16:09:24 +01:00
Dave Davenport
06c5f51e7d Allow to set anchor position on normitor and anchor position on window. 2017-01-06 19:04:25 +01:00
Dave Davenport
9aaf21cd85 Fix theme converter and check. 2017-01-06 16:53:21 +01:00
Dave Davenport
af8a6541a2 Order entries in box based on index, allow theme to override. 2017-01-06 16:41:23 +01:00
Dave Davenport
e6a6d5f894 Fix printing of link element. 2017-01-05 18:23:27 +01:00
Dave Davenport
4cc21b93a5 Allow linking to top level properties. 2017-01-05 18:22:34 +01:00
Dave Davenport
b8ff85adb6 Improve exporting of theme. 2017-01-04 23:11:25 +01:00
Dave Davenport
5d70985bb9 Reset line style, reset state after drawing border. 2017-01-04 22:46:46 +01:00
Dave Davenport
9dd3cb312e Support linestyle on border 2017-01-04 22:27:27 +01:00
Dave Davenport
b618cd63d8 Fix transparency in theme converter.
Implicitely convert P_INTEGER to P_PADDING if asked for a padding.
2017-01-04 15:18:12 +01:00
Dave Davenport
85a0e1a57e Remove class system from new theme format. Fix theme converter. 2017-01-04 15:05:39 +01:00
Dave Davenport
645fe24890 Add debug output to themer that indicates unset properties. 2017-01-04 14:01:28 +01:00
Dave Davenport
f9fc01b176 Add percentage option to border,padding 2017-01-03 19:23:09 +01:00
Dave Davenport
b60ca07f1f Remove border-width property from window. 2017-01-03 15:57:40 +01:00
Dave Davenport
e982a439fb Fix spacing in listview and box. 2017-01-03 14:25:24 +01:00
Dave Davenport
ccf3f23d9b Update comments, rename Widget to ThemeWidget. 2017-01-01 18:08:49 +01:00
Dave Davenport
d20587da54 Fix? tests 2017-01-01 16:32:01 +01:00
Dave Davenport
7d16d1a552 Slowly move more settings to the configuration convert. 2017-01-01 15:39:02 +01:00
Dave Davenport
d35e70d817 Support converting old theme internally, add first option to dump theme 2017-01-01 01:06:38 +01:00
Dave Davenport
05871703d5 Fall back to old style padding (with int) if no metric specified. 2016-12-31 23:34:48 +01:00
Dave Davenport
fb2d8b37a6 Fall back to integer setting for distance 2016-12-31 23:30:57 +01:00
Dave Davenport
7b0e0643c8 Make spacing be of type distance. 2016-12-31 23:27:17 +01:00
Dave Davenport
068592414e Support em format in padding 2016-12-31 22:47:22 +01:00
Dave Davenport
5f424fa598 Padding should be specified in px now and 4 borders can be specified on
one pixel line.
2016-12-31 21:37:19 +01:00
Dave Davenport
843ccc1e41 Update drawing, background per widget. 2016-12-28 12:21:42 +01:00
Dave Davenport
1c611b0eec First start at adding 4 sided padding 2016-12-27 22:19:15 +01:00
Dave Davenport
cd529acd9a Fix typo in resolving theme element. 2016-12-20 10:27:23 +01:00
Dave Davenport
8793475501 Fix and document resolving. 2016-12-20 09:17:19 +01:00
Dave Davenport
5b1b8d4d05 Destroy the lexer after parsing 2016-12-19 15:50:35 +01:00
Dave Davenport
b8e58b0342 Make parser more flexible, allow global properties to be anywhere in file and allow multiple similar entries. 2016-12-16 09:28:13 +01:00
Dave Davenport
efd1e07755 Fix typo in theme name. 2016-12-15 09:46:42 +01:00
Dave Davenport
38035568f3 Fix separator class and tweak parser inheritance. 2016-12-13 00:09:51 +01:00
Dave Davenport
fd64bb7a41 Improve lexer by adding support for modes. 2016-12-12 23:40:43 +01:00
Dave Davenport
be0677cf49 Update theme to new format.
- @class state {

}
- #name state {

}
2016-12-12 21:14:57 +01:00
Dave Davenport
c6030063c6 Keep track of location in parser 2016-12-12 16:55:31 +01:00
Dave Davenport
d6ec7b1de8 Cleanup, fix missing initializer. 2016-12-12 09:11:57 +01:00
Dave Davenport
1dfac3c4da Update to new theme 2016-12-11 12:19:46 +01:00
Dave Davenport
5fd76b75b1 Add some color stuff 2016-12-10 19:48:44 +01:00
Dave Davenport
2d01d1566a Add some properties to themes 2016-12-09 22:16:31 +01:00
Dave Davenport
d18f037d1c Add lex/bison parser for theme. 2016-12-09 19:49:49 +01:00