Commit graph

1880 commits

Author SHA1 Message Date
lbonn
8e53896bbd Avoid some indirections 2020-07-24 19:30:02 +02:00
lbonn
183b6b618e Factorize some view code 2020-07-24 19:30:02 +02:00
lbonn
98a9635173 Make xcb and wayland implementations coexist 2020-07-24 19:30:02 +02:00
lbonn
97ea1c6d0b Continue work on wayland mode
- Fix mouse support
- Handle key repeats
- Positioning
- Fix periodic count updates
2020-07-24 19:30:02 +02:00
lbonn
7d94413675 Display something on wayland with layer shell
Based on sardemff7 previous wayland attempt
2020-07-24 19:30:02 +02:00
lbonn
90cfdf9990 Move some generic stuff from xcb.h to display.h 2020-07-24 19:30:02 +02:00
lbonn
eb63d83a99 Start moving xcb-specific stuff to their own directory 2020-07-24 19:30:02 +02:00
nick87720z
57ee69367d
micro-refactoring: widget.c (#1148)
* widget.c: microrefactoring

* widget.c: join enable/disable functions
2020-07-11 14:48:58 +02:00
Dave Davenport
641cd4ef46 [Widget] Fix inconsistency in argument checking. 2020-07-09 17:47:32 +02:00
Dave Davenport
fc0ea0b22e Update changelog a bit. 2020-07-05 11:41:04 +02:00
nick87720z
e52094ee7a
Widget bg draw (#1147)
* Improved background draw code

- Better to read (precalculated coordinates)
- Unnecessary line_to in the end
- Don't use radius in calculations if zero

* Background draw - separate rounded rect function

* Limit background & border overlap size

Overlap is too good against artifacts when stiching antialiased areas to
be avoided, unless intermediate image is used for additive stiching. But
it doesn't look good with transparent borders, when overlaping background
is visible. It seems, that 1px overlap is right enough to completely
prevent artifacts. Though things may differ if one if side is 1px or
even 0px, while adjacent is still enough thick.

* Style: alignment, less noise, limit var scope
2020-06-17 14:10:48 +02:00
Dave Davenport
bf17e1c65e When no dpi set (-1) set the default one for fonts handling. 2020-06-09 22:51:44 +02:00
nick87720z
fb2ba8ada3
Millimeter support for distance (#1144) 2020-06-09 22:19:43 +02:00
nick87720z
e275ed2283
Again final workaround for #303 (#1142) 2020-06-09 17:17:50 +02:00
Quentin Glidic
3d5f0f086c
script: Fix parsing of extras (#1141)
Signed-off-by: Quentin Glidic <sardemff7+git@sardemff7.net>
2020-06-06 18:32:14 +02:00
nick87720z
ae701ce54e
Entry info was not used at entry selection (#1140) 2020-06-06 18:28:39 +02:00
Dave Davenport
4821320833 [Listview] Try to fix sizing of barview.
Issue: #1137
2020-06-02 09:17:06 +02:00
Dave Davenport
da8c666e80 [Script] Initialize info entry. Don't pass entry at custom input.
Fixes: #1138
2020-05-30 10:44:37 +02:00
Dave Davenport
1342b733af [Script] Add 'info' row option, that gets passed to ROFI_INFO environment. 2020-05-24 19:10:49 +02:00
Dave Davenport
0e880e76a2 [Window] On window name list, Check if we go out of range. 2020-05-24 17:14:12 +02:00
Dave Davenport
3604b12fde Add check that looks if rofi is running inside rofi script mode. 2020-05-21 09:35:55 +02:00
Jason Kim
a4c5a92199
Support rasi config character type options (#1131)
* style: remove extra space

* feat: handle xrm_Char in config parser

Handle the `xrm_Char` case in the (rasi theme) config file parser.  This
should properly handle configuration like

```
matching-negate-char: "\0";
```

and

```
matching-negate-char: "-";
```

* refactor: don't handle mem in xrm_Char case

`mem` shouldn't ever be set when `XrmOption` is `type` `xrm_Char`.
Therefore, there is no need to check it and free it.  Remove that logic.

* refactor: further condense logic

* style: s/Everythin/Everything/

* style: s/parsing an section/parsing a section/

...and missing period.

* feat(lexer): add CHAR token

Add a `CHAR` token that takes things of the form `'<char>'` or some
specific backslash escape sequences like `'\''` and `'\0'`.  For now,
save it as a `T_STRING`.

* refactor: define char property type

* feat(parser): add cval and T_CHAR

* refactor: use char property for xrm_Char

Instead of using strings for property elements of type char, use
characters, which were recently added to the grammar.
2020-05-17 14:50:38 +02:00
Dave Davenport
191f49dbea [LISTVIEW] Support more customization in element. 2020-05-13 17:17:15 +02:00
Dave Davenport
f2b6cf6b3c [Widget] Propaget set_state to children. 2020-05-13 16:25:12 +02:00
nick87720z
8a2e67f6fe
workaround for #303 (#1122)
* workaround for #303

Subpixel rendering may be disabled by some clip paths or when text
itself is clipped.

* optimize draw_pango_layout()
2020-05-12 12:05:56 +02:00
Dave Davenport
2ccc65ff52 Add some ui benchmark code 2020-05-12 10:40:50 +02:00
Dave Davenport
865821f829 Update help for option in source code. 2020-05-10 15:47:20 +02:00
Dave Davenport
1a9e6450e3 [Helper] Throw error when shell parsing fails. 2020-05-04 14:10:35 +02:00
Dave Davenport
86cdcae55b [Window] Update manpage and --help. 2020-04-29 12:59:49 +02:00
Dave Davenport
9a3d4b1d2e [Test] Fix compiler warning, theme test (bug in lexer) and more. 2020-04-26 11:43:14 +02:00
Dave Davenport
151547a99e
[Themes] add calc() support to distance in theme format. (#1105)
* 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.
2020-04-24 19:54:08 +02:00
Dave Davenport
906b520daf [Script] Add no-custom mode. 2020-04-22 23:41:25 +02:00
Jaakko Luttinen
ccfecef936
fix xetc to config_path (#1097) 2020-04-19 19:07:58 +02:00
Dave Davenport
ed55b6c634 check before xresource config file parsing if it exist 2020-04-19 16:24:17 +02:00
Dave Davenport
e7554da627 Parse XDG_CONFIG_DIRS for default configuration file. 2020-04-19 11:55:53 +02:00
Dave Davenport
3a9c60804b Add ROFI_PLUGIN_PATH environment variable. 2020-04-19 11:34:28 +02:00
Dave Davenport
3e64e4422d [DMenu] Implement -keep-right
Fixes: #1089
2020-04-16 23:31:43 +02:00
Dave Davenport
1104d1d53a [DRun] cleanup debug message. 2020-04-15 19:08:01 +02:00
Dave Davenport
0214d5a6e4 [DRun] Adding %% as escape character. 2020-04-15 19:06:39 +02:00
Dave Davenport
7587149950 [Script] Update example and doc. 2020-04-07 13:20:16 +02:00
Dave Davenport
de38e0f4a9 [Script|Dmenu] Don't -1 in a unsigned variable. 2020-04-07 13:14:53 +02:00
Dave Davenport
34a278f943 [Combi] Remove strchrnull
Issue: #1083
2020-04-07 12:48:53 +02:00
Dave Davenport
f63da72ea6 [Dmenu] Fix possible crash.
Don't pass empty string.

Issue: #1083
2020-04-06 23:31:45 +02:00
Dave Davenport
825fe4ae58 [Script] Fix crash when custom input with custom keybinding. 2020-04-05 13:19:22 +02:00
Dave Davenport
bacecf3044 [Script] Add environment variable to indicate state.
* ROFI_RETV shows the state rofi was in before calling rofi.
2020-04-05 12:56:33 +02:00
Dave Davenport
5879fd6099 [Script] Free g_shell_parse result. 2020-04-05 11:48:03 +02:00
Dave Davenport
aa07b8ef94 [Script] Add option to set deliminter and example script.
Issue: #1041
2020-04-01 13:58:01 +02:00
Dave Davenport
8be08007f8 [Textbox] Round estimated size up. 2020-03-31 14:05:12 +02:00
Dave Davenport
c6a405e840 Fix hack for height calc. 2020-03-30 00:09:28 +02:00
Dave Davenport
ca067234ff [Textbox|Listview] Fix sizing of textbox.
- don't get height of layout, but calculate height using metrics.
- listview, set string with right number of lines.

Issue: #925, #1069
2020-03-29 16:31:47 +02:00