Add ability to set width with percentage of monitor instead of just pixels.
With this the OSD sizes itself properly on both my 4k and 2k monitors.
example: 50% or 75% instead of 600, max 100%
...and unify region overlay and snap-to-edge overlay into overlay.c.
Snap-to-edge overlay is delayed for 500ms to prevent flickering when
the view is dragged from an output to another (demo in discussion labwc#1613).
This also fixes a bug that region overlay is not shown when a modifier
key is re-pressed.
1. All '*.env' files in an 'environment.d' directory alongside each
potential 'environment' file will be parsed and added to the
environment.
2. For the purposes of configuration merging, an environment definition
exists at one level if either the 'environment' file is defined or
its corresponding 'environment.d' contains any valid '*.env' file.
3. Variable declarations of the form "VARIABLE=", with no following
value, will be written to the environment as empty strings.
This allows configuring a headless fallback output that
is automatically created whenever there is no other output
around. It is destroyed when a new output is discovered.
It can be enabled by setting the environment variable
LABWC_FALLBACK_OUTPUT to the desired output name.
The feature benefits applications like wayvnc the most
as there is always an output available to connect to.
Co-Authored-By: Simon Long <simon@raspberrypi.com>
We were using the argument name 'name' before
which is already used by the action itself:
`<action name="MoveToOutput" name="HDMI-A-1" />`
Change the argument name to "output" which also
matches the `FocusOutput` action.
Fixes: #1589
Reported-by: @bnason (thanks!)
Also share common config option (rc.window_switcher.criteria) in osd.c and
desktop.c to make sure the window lists are always consistent.
Configure with `<windowSwitcher allWorkspaces="yes|no">`
Support `wrap` in view_get_adjacent_output(). This means that when seeking
an adjacent output in a particular direction from an output that is
already furthest in that direction within the layout, rather than
returning NULL, wrap around from the leftmost to the rightmost, or topmost
to the bottommost and vice versa.
Example usage:
<action name="MoveToOutput" direction="right" wrap="yes" />
Wrap is disabled by default to keep the user interface consistent.
Some distro packages install the example config at /etc/xdg/labwc/rc.xml
and thus users of those packages were having a gap 10 setting by default.
Lets remove the gap from the example config to match our intended default.
A .desktop file was previously added for the labwc session, this adds a
badge for it where it is supported. The .desktop files and the badges
are also moved to `data/`.
Ref: #36, 9fa783e, labwc/labwc-artwork#7
Add the -m|--merge-config command line option to iterate backwards over
XDG Base Dir paths and read config/theme files multiple times.
For example if both ~/.config/labwc/rc.xml and /etc/xdg/labwc/rc.xml
exist, the latter will be read first and then the former (if
--merge-config is enabled).
When $XDG_CONFIG_HOME is defined, make it replace (not augment)
$HOME/.config. Similarly, make $XDG_CONFIG_DIRS replace /etc/xdg when
defined.
XDG Base Dir Spec does not specify whether or not an application (or a
compositor!) should (a) define that only the file under the most important
base directory should be used, or (b) define rules for merging the
information from the different files.
ref: https://specifications.freedesktop.org/basedir-spec/basedir-spec-latest.html
In the case of labwc there is a use-case for both positions, just to be
clear, the default behaviour, described by position (a) above, does NOT
change.
This change affects the following config/theme files:
- rc.xml
- menu.xml
- autostart
- environment
- themerc
- themerc-override
- Theme buttons, for example max.xbm
Instead of caching global config/theme directories, create lists of paths
(e.g. '/home/foo/.config/labwc/rc.xml', '/etc/xdg/labwc/rc.xml', etc).
This creates more common parsing logic and just reversing the direction
of iteration and breaks early if config-merge is not wanted.
Enable better fallback for themes. For example if a particular theme does
not exist in $HOME/.local/share/themes, it will be searched for in
~/.themes/ and so on. This also applies to theme buttons which now
fallback on an individual basis.
Avoid using stat() in most situations and just go straight to fopen().
Fixes#1406
This builds on the work of @Consolatis in #1018.
Co-authored-by: Consolatis <35009135+Consolatis@users.noreply.github.com>
Co-authored-by: Andrew J. Hesford <ajh@sideband.org>
- typos: LINGUAS manually, rest with help of aspell(1)
- whitespace: some trailing spaces/tabs, one utf-8 NBSP (#xC2 #xA0)
- made most text in docs/ fit in max 80-column wide lines
- consistent trailing periods in sentences in labwc-actions.5.scd and
labwc-config.5.scd; labwc-theme.5.scd had different consistency,
changed it follow these other files with sentence-ending periods
- and ", respectively" (comma often used to separate)