Commit Graph

327 Commits

Author SHA1 Message Date
raichoo b6484749b7 improve `libinput` configuration for pointer devices
This patch introduces more configuration options for pointer devices:

* adds `tap` option
* adds `tap-drag` option
* adds `tap-drag-lock` option
* adds `natural-scrolling` option
* adds `no-scroll` to `scroll-method`

This also changes the way unconfigured options are handled. `hikari` is no
longer going to overwrite unconfigured values with its own default but rather
keeps them unchanged.
2020-05-08 12:33:29 +00:00
andy 63e34a2a8a Configure Xwayland views with layout coordinates
Xwayland uses layout coordinates for positioning surfaces, while hikari uses
coordinates relative to the position of a view's output. That means that
coordinates need to be converted first before they are used in Xwayland calls
(and vice versa).

This basically reverts fdcada068164e5d4c89a932fdea94eb42d3e7c09 and
(hopefully) fixes the remaining places where a conversion was missing.
2020-05-08 07:22:56 +00:00
raichoo b51f78d9ad show group views in reverse order to maintain order 2020-05-07 13:48:18 +00:00
raichoo 78b0c261e1 allow view migration via mouse
This allows `move-mode` to migrate views between outputs as it it were just
movement.
2020-05-07 13:34:47 +00:00
raichoo 9e5ee6b784 separate reset and migrate
These are very different operations and this should be reflected in the code as
well. This patch also allows to write code that can migrate views on demand.
2020-05-07 12:32:56 +00:00
raichoo 63730ac383 `workspace-show-group` should raise `focus_view`
If this does not happen the focus can change to a different view during this
action. This is disorienting. To prevent this we raise the view to the top at
the beginning of the action.
2020-05-06 16:01:11 +00:00
raichoo 50237c0a34 remove unused function 2020-05-06 15:55:54 +00:00
raichoo cee60887b5 lift restriction that tiled views cannot be moved
This restriction has been bogus since symmetric resize has arrived, so we might
as well just remove it entirely for the next major release.
2020-05-06 14:20:49 +00:00
raichoo 9308270879 add missing argument to assert 2020-05-06 12:42:30 +00:00
raichoo f5b1420518 allow output relative view positioning
This patch allows to position views relative to the output by stating one of the
following values as position:

* `bottom-left`
* `bottom-middle`
* `bottom-right`
* `center`
* `center-left`
* `center-right`
* `top-left`
* `top-middle`
* `top-right`
2020-05-06 12:31:00 +00:00
raichoo 6458dec842 add `workspace-clear` action 2020-05-05 19:21:25 +00:00
raichoo fa3e2479a1 add `workspace-show-all` action 2020-05-05 19:16:22 +00:00
raichoo 29e43bb555 add `workspace-show-invisible` action 2020-05-05 19:02:18 +00:00
raichoo d9e5072e90 add `workspace-show-group` action 2020-05-05 19:00:06 +00:00
raichoo 7a02ab6188 add `sheet-show-group` action 2020-05-05 18:21:05 +00:00
raichoo 7ddba60c3c use "monospace 10" as default font setting 2020-05-05 18:18:38 +00:00
raichoo 667ce6430f handle layer destroy before map
As documented in issue #1 destroying a layer before mapping it leads to the
freed memory still being linked to the `layer_surfaces` list. This patch adds
the invariant the we always need to be able to remove this link. This is ensured
by doing a `wl_list_init` after every `wl_list_remove`.
2020-05-05 14:09:18 +00:00
raichoo d524815f90 add `floating` to view configuration
This patch allows to configure floating state for views.
2020-05-05 16:14:33 +00:00
raichoo acbd637500 add `invisible` to view configuration
This patch allows to configure invisible state for views.
2020-05-05 16:10:29 +00:00
raichoo f2ab7f7e9e factor out position configuration
Views and outputs can be configured with an explicit position. This can be
generalized into a single struct which streamlines the code.
2020-05-05 15:01:57 +00:00
raichoo 16bb84a003 rename `output` to `wlr_ouptut` 2020-04-30 19:25:10 +00:00
raichoo 9abd6d783e handle xcursor environment configuration variables
This handles theme and size and falls back to default values if they are not
defined.
2020-04-30 19:23:27 +00:00
raichoo 527091acff assert existing `focus` function for view interfaces 2020-04-30 12:36:50 +00:00
raichoo 2091de7625 refactor cursor handling
Cursor handling is moved into its own module and normal mode. This adds to
readability and removes the need for a couple of checks.
2020-04-30 12:35:18 +00:00
raichoo 05c7294d43 add initial client side cursor setting
This allows clients to set the cursor surface. There is still a bug lurking in
`wlroots` that might cause some unpleasant screen flickering which is triggered
by this patch. To prevent this from happening one can set `WLR_DRM_NO_ATOMIC` to
`1` in the environment before startup.
2020-04-30 10:41:30 +00:00
raichoo f460063311 remove redundant whitespace 2020-04-29 13:31:15 +00:00
raichoo 8ffac46d08 remove unused wl_list from view 2020-04-29 13:20:24 +00:00
raichoo 401b118ae2 use tile geometry for exchange
Exchanging maximized views can lead to confusing results since they happen to
resize tiles to the maximized size. They lose their maximization state and
cannot be unmaximized anymore because this is now the actual tile size. This
patch uses the size of the tiles leading to more predictable behavior.
2020-04-28 13:14:26 +00:00
raichoo 7d76f82ae8 drag and drop fixes
Using surface local coordinates for cursor motion as well as removing some
redundant debug output.
2020-04-28 08:08:11 +00:00
raichoo 691e4c516e cursor focus on entering normal mode
Entering normal mode is now used in all modes to quit their current mode, this
centralizes cursor focus in this function since we need to refresh it after
exiting a mode.
2020-04-27 16:23:23 +00:00
raichoo ddc879c607 use `seat` pointer througout function 2020-04-27 16:22:42 +00:00
raichoo 5949a550d5 initial drag and drop support
This allows drag and drop support inside of a view. This does not work across
views yet.
2020-04-27 16:21:45 +00:00
raichoo 5e3212adeb refactor damage handling
This patch reworks entirely how `hikari` marks areas as damaged. Instead of
damaging all views during indication just the views that actually change
indication get damaged.
2020-04-25 10:33:12 +00:00
raichoo 4a6bdb8fcc move pointer_config initialization to pointer_config module 2020-04-22 13:50:26 +00:00
raichoo 375e1bac62 fix xwayland coordinates on first map
We don't need to check for negative coordinates anymore since this is done via
autoconf. Also the view coordinates are absolute.
2020-04-24 19:34:01 +00:00
andy 6aae26baf6 Xwayland view coordinates are absolute, not relative to output 2020-04-22 20:56:46 +00:00
raichoo b605de7176 raise focus view on layout apply
The view in focus should be the first on in the layout, to achieve this we raise
it before applying the layout.
2020-04-18 21:28:45 +00:00
raichoo 08e925042d center cursor at first layout view after applying it
This way the focus will always and up with the view that currently has focus,
which is less disorienting.
2020-04-18 21:01:13 +00:00
raichoo 5f57058c83 rename layout_func_t to hikari_layout_func
This conforms to the hikari naming convention. The `t` suffix is also reserved
for POSIX.
2020-04-18 20:57:27 +00:00
raichoo 0682f8508b centralize layout apply
There are currently two different code paths where layouts get applied. One in
layout mode and one for directly applying a layout via a shortcut. This leads do
confusing behavior, hence we centralize the action in the workspace module.
2020-04-18 20:30:12 +00:00
raichoo a16bb5970d move mode enter code into mode modules
The code for entering each mode is currently in the server module, moving those
into the appropriate mode modules allows for more optimizations (like properly
refreshing indicators).
2020-04-17 11:43:32 +00:00
raichoo 00da3beed2 make topmost layer view grab focus
Applications like `wofi` and others should grab the focus when they appear,
otherwise the user needs to manually cycle to those views.

Views from the `top` and `overlay` layer gain focus if they happen to request
it.
2020-04-21 16:47:56 +00:00
raichoo 592977007d handle layers on output destroy
Layers need to be closed when an output gets destroyed.
2020-04-21 12:13:57 +00:00
raichoo 97165dedb5 refactor layer-shell
Move linking and unlinking of events into map and unmap handlers, matching the
behavior of other shells.
2020-04-21 12:11:38 +00:00
andy 4e3f2b3d65 Honor output parameter for wlr_layer_shell's get_layer_surface request 2020-04-20 19:48:11 +00:00
raichoo ea99149391 remove check to invalid group name
Since sheet groups have been removed this does not need to be checked for
anymore. Group names can now start with digits since there are no special
purpose groups anymore that can overlap.
2020-04-19 11:35:31 +00:00
raichoo f234c68c01 check for app_id NULL
xwayland views can have NULL as a class. We stuff those into a group with an
empty string as name which cannot be created or addressed by users.
2020-04-19 10:59:58 +00:00
raichoo b55734b544 clean up damage code
Adjust damage_data struct according to naming convention. Got rid of unnecessary
copies and pointless branch on empty damage.
2020-04-15 14:01:43 +00:00
raichoo 4ad0b8bb1f only damage visible subsurfaces on commit
If this is not checked the damage of a subsurface will get processed even though
the view that contains it (and therefore the subsurface) is hidden. This can be
seen when e.g. a Youtube video is running on another sheet.
2020-04-15 13:55:14 +00:00
raichoo 529fe7b55a add `hikari_view_damage_border`
Damages the whole view surface including its border.
2020-04-15 08:10:05 +00:00
raichoo 69a420ee65 damage whole view before committing pending operations
Before this we only damaged the surface are of the view that was operated on,
this does not take things like subsurfaces into account and leads to damage
artifacts when subsurfaces get resized before the operation is being committed.

This also makes the `geometry_before` parameter redundant.
2020-04-14 18:21:36 +00:00
raichoo 315e654a63 fix center cursor on exchange
The cursor needs to be centered during `commit_tile` otherwise the cursor might
center the opposite view of the exchange. This happens when the tile operation
shortcuts if the size of the source and target tile are equal.
2020-04-14 18:11:15 +00:00
raichoo 56ec580869 reorder xdg listeners and `set_title` linking
This orders the listeners so that they are linked and unlinked in the same
order. This way it's easier to spot missing unlinks.

`set_title` should also be linked during `map` since it gets unlined during
`unmap`.
2020-04-14 13:09:55 +00:00
raichoo ff3e902014 add dynamic layout scaling
This allows layouts to derive theirs `scale` value from the first view of each
container.
2020-04-14 07:36:24 +00:00
raichoo 42f95928fd use local variable 2020-04-13 15:26:55 +00:00
raichoo 94aeeee353 use fallback layout view if focus view belongs to different layout
Trying to cycle from a borrowed tiled view on a tiled sheet causes a crash. We
need to check if the layout of the view and the sheet differ, if that's the case
have to fall back.
2020-04-13 15:14:54 +00:00
raichoo a08780100e add symetric resize operations
Resizing should be possible in every direction, this is especially useful for
views that have been tiled.

This patch adds the following action to complete the set of resize operations.

* view-increase-size-up
* view-decrease-size-down
* view-increase-size-left
* view-decrease-size-right
2020-04-12 16:46:24 +00:00
raichoo e11be8698b remove unused split render code 2020-04-12 13:22:42 +00:00
raichoo 7458ee1799 unify namespacing for split containers 2020-04-12 13:18:41 +00:00
raichoo 83fec9f1e9 unify namespacing for vertial and horizontal split 2020-04-12 13:07:03 +00:00
raichoo 711a7ebe92 fix move for xwayland views
This accidentally used the x coordinate twice. There is also a redundant call
for getting screen width and height.
2020-04-12 09:17:48 +00:00
raichoo 0baefa1fca un/register xwayland commit on un/map
Commit only gets registered on the first map but unmapped every with every
unmap.
2020-04-11 07:10:24 +00:00
raichoo 1b697d31bf refactor xdg event handling
This makes event handling for xdg views more like `sway` handles it. Some events
only make sense on mapped views, and this patch reflects that.
2020-04-07 11:18:04 +00:00
raichoo 830c58ff68 add support for xdg toplevel decorations
The lack of this caused applications like `alacritty` to segfault on startup.
2020-04-06 20:56:35 +00:00
raichoo 8f39371316 remove redundant printf 2020-04-06 20:38:51 +00:00
raichoo daa71ebbfc check for unmapped xwayland views on iteration
This needs to be done since iterating over unmapped xwayland views causes a null
pointer dereference on sending a "frame done" to an unmapped view.
2020-04-06 21:37:51 +00:00
raichoo 658906513c add layer-shell support
This adds layer-shell support to hikari. Outputs now have a usable area instead
of just the view geometry. This is used to prevent views from being placed under
status bars etc. Support for layer shell is optional and can be compiled in via
`WITH_LAYERSHELL=YES`.
2020-04-06 12:19:30 +00:00
raichoo 145dd899ff use button enum instead of key enum 2020-04-04 12:29:10 +00:00
raichoo 4a20e2f697 add step configuration
Move and resize distance should be configurable.
2020-03-31 09:11:50 +00:00
raichoo 566bebd7aa update cursor focus on tiling
Cursor focus needs to be triggered after tiling because the view under the
cursor might change. Currently this event will not change focus which is
confusing.
2020-03-31 08:49:59 +00:00
raichoo 84db444199 send "frame done" to all output views
This event should be sent to all output views and not only those present on the
workspace. Leaving out views can cause the impression of view content lagging
behind when displaying views that have been hidden and updated during that time
period.
2020-03-31 08:47:31 +00:00
raichoo 0127524190 remove sheet groups
Sheets no longer have a special group. Each view needs to be part of a group
though, therefore we take the app id or class of a view when no explicit group
is assigned. This conveniently allows the user to figure out app id or class of
a view without the need for additional tooling.
2020-03-31 07:51:49 +00:00
raichoo b230b375cf add append/prepend layout operations
The operations allow for new views to be attached to an existing layout. The
operation behaves just like setting layout but without changing layout order.
2020-03-31 06:52:30 +00:00
raichoo 25f1096764 remove tiling mode
This has been dead code for quite some time.
2020-03-30 18:22:22 +00:00
raichoo 4cd673fd73 refactor reset/migration code
Reset and migration are currently to complicated and can cause faulty behavior.
One thing that can happen is that detached tiles can get detached again. This
patch ensures that reset views are all in a detached state so commit actions
always do the right thing.
2020-03-30 16:18:15 +00:00
raichoo 24231e267c reset sheet before applying a new layout
This automatically hides borrowed views and moves views of sheet 0 to the bottom
of the stack. Hidden views automatically get displayed and do not need to be
shown with the scan function which also makes things a lot more consistent.
2020-03-30 09:06:06 +00:00
raichoo ae1547bab1 raise floating views after applying a tiling split
This raises floating views to the top of the stack after a tiling operation.
This should be a little less surprising for users of tiling window managers it
also makes a bit more sense for tiling semantics.
2020-03-30 08:56:55 +00:00
raichoo 0fd6203c8e move group raise/lower functions to group 2020-03-27 20:10:32 +00:00
raichoo ab177a4624 move layout reset into layout 2020-03-27 17:40:14 +00:00
raichoo 7b1c35c1a0 make assign modes understand `CTRL-d` and `CTRL-c`
It should be possible to cancel modes using those keys.
2020-03-26 13:17:27 +00:00
raichoo 913bfdb545 make `check_modifier` helper publicly available
We can need this operation in several places.
2020-03-26 13:13:08 +00:00
raichoo 14acec5559 add 'remove word' to group assign prompt
The group assign prompt should be more readline compatible and people might also
want group names that include whitespace where this becomes handy.
2020-03-26 12:18:26 +00:00
raichoo 951c07edb3 factor out empty check for input buffer 2020-03-26 12:16:57 +00:00
raichoo 9068b38994 clean up mode code
This patch unifies checking if we are in the correct mode for the assign modes.
2020-03-26 09:22:14 +00:00
raichoo 74e1feef48 remove cancellation and confirmation from keyboard
Both of these functions can now be realized using the keysym iterator functions
in a more efficient and reabable way.
2020-03-26 08:51:58 +00:00
raichoo 487e1180ac move mark resolve out of keyboard
This really didn't belong here in the first place. This patch replaces the
resolver with a generic keysym iterator that allows for module site
implementation of the wanted functionality.
2020-03-25 14:50:21 +00:00
raichoo d45f2ec9ca autoconfigure XKB_DEFAULT_RULES
If no explicit rules are given we are going to use `evdev` here.
2020-03-23 15:13:38 +00:00
raichoo f555876f9a remove outdated TODO comment 2020-03-23 14:29:54 +00:00
raichoo 9403532a1c cached font metrics
Font metrics are now cached in the font struct and do not need to be recomputed
with every indicator bar update. This also fixes issues with reloading the
configuration and related font changes.
2020-03-23 14:18:45 +00:00
raichoo a8441b7d80 refresh indication when views disappear
In some cases indicator frames do not get damaged properly, we
need to refresh indication more often especially when the
focus view disappears and overlapping indicator frames exist.
2020-03-22 08:47:21 +00:00
raichoo d5635f21b2 graceful exit in startup errors
The first thing people see should not be a segfault if they happen to forget
setting XDG_RUNTIME_DIR etc.
2020-03-23 08:33:55 +00:00
raichoo eade900a25 deprecate release bindings for action begin/end
Binding actions to the release event for a certain key is not enough for
functionality like "push to talk". The release action might get lost when a user
releases modifiers first.

This patch introduces *begin* and *end* actions. The *begin* action is followed
by the *end* action once we release any key or push more keys.
2020-03-22 14:27:56 +00:00
raichoo 5724831bed fix operation commit for hidden views
Hidden views that get raised to the top of the stack have to be treated
differently. This code generalizes the commit for pending operations.
2020-03-20 15:57:50 +00:00
raichoo 53b4b24744 remove unused function 2020-03-18 13:29:23 +00:00
raichoo e1c4deed30 add key release event configuration
Due to increased use of features like "push-to-talk" because of pandemic
reasons, people have requested to be able to bind release key events to actions.
This can now be done by prefixing a binding with `^`.
2020-03-18 08:58:19 +00:00
raichoo e5ea0a55d2 ignore decorations for surfaces that do not belong to an xdg_view
This can happen with some SDL applications like `openra` and cause crashes.
2020-03-18 12:42:48 +00:00
raichoo d5db8b11e9 formatting 2020-03-14 13:39:35 +00:00
raichoo 2ea45beb6f add output position configure
Output positions can now be configured in the configuration file using the
position attribute.
2020-03-14 13:39:20 +00:00
raichoo d7d656242b turn keyboard grab mode into input grab mode
This mode is now capable of redirecting all input to its view meaning keyboard
and mouse events instead of only keyboard events.
2020-03-12 15:32:10 +00:00
raichoo da1d3dea6e add command line flag for autostart
The autostart executable can now be specified via `-a` on startup.
2020-03-11 13:47:23 +00:00
raichoo 36f9f6a0e4 add command line option to specify configuration
Configuration files can now be specified on startup using the `-c` option.
2020-03-11 13:07:00 +00:00
raichoo 16551aedf9 use `strcmp` instead of `strcasecmp`
This is used consistently throughout the configuration so it might as well be
used here.
2020-03-11 10:15:53 +00:00
raichoo 8fa65949dd rename iconified to invisible
Iconified state has always been a misnomer. The view is not iconified at all,
there is no icon laying around it is just invisible when a sheet is shown.
2020-03-10 09:13:35 +00:00
raichoo b4cae73e7c handle reset during pending tiling
Resetting geometry should always work even when the view is marked as dirty.
This means that there can be a pending tile structure which would not be
properly freed in this case. We now force cancellation of the tiling operation
and free the pending tile in the process. This is the same operation that
happens when we destroy a view with a pending tile.
2020-03-09 18:09:35 +00:00
raichoo bbb219e266 handle size unexpected changes
When resizing a view, it might not exactly change to the size we expected. `mpv`
is a good test case for this.
2020-03-07 18:39:04 +00:00
raichoo b0a2f5b6c9 do not damage hidden xdg views 2020-03-07 18:38:10 +00:00
raichoo 511b30a54c add inline function to check for unmanaged view state 2020-03-07 18:36:29 +00:00
raichoo 3008a9ba80 add compile time option for adding gammacontrol
This is needed to make tools like `redshift` work. To enable this compile with
`WITH_GAMMACONTROL=YES`.
2020-03-07 16:34:27 +00:00
raichoo 9fab9e2505 formatting 2020-03-07 15:54:59 +00:00
raichoo 914bb9db33 add `screencopy` as an option
You can compile with `hikari` with support for the `wlroots` screencopy protocol
by compiling it with `WITH_SCREENCOPY=YES`.
2020-03-07 15:50:24 +00:00
raichoo 7cfc304498 assure that sheet is always initialized
During sheet assignment mode the sheet should never become `NULL`. A couple
asserts are checking for this. During input processing we should always fall
back to the sheet currently selected by the mode, which is never `NULL`.
2020-03-07 13:10:48 +00:00
raichoo b3e5bec20c remove unsused headers 2020-03-07 11:29:39 +00:00
raichoo 9ee9328977 silence gcc warning for cast 2020-03-07 11:28:39 +00:00
raichoo 55399ebd1f remove command from error output
This is `NULL` anyway so it makes little sense.
2020-03-07 11:28:01 +00:00
raichoo d2a206b664 rename sheet switch actions to focus on workspace
Sheet switching is something that manipulates the current sheet property of the
workspace. It really does not make sense to call them sheet actions.
2020-03-06 13:35:03 +00:00
raichoo d407882d3f fold background-fit into background object
Backgrounds can now be defined just by specifying the path to the wallpaper
image or by an object specifying the fit as well. This ties `fit` to the
background image in a more specify way and allows for better configuration
processing.
2020-03-06 10:43:57 +00:00
raichoo f64a8d8ec1 do not enable outputs during lock
When `hikari` is locked and a new output gets attached it should stay disabled
until unlocking.
2020-03-06 09:05:47 +00:00
raichoo da58760751 set cursor image on cursor activate
This needs to be done to make the cursor re-appear after suspending during a
locked screen.
2020-03-05 20:28:04 +00:00
raichoo c80752946c rename auto section to views
`auto` is basically just an abbreviation and all other sections are not.
`views` feels more consistent here.
2020-03-05 13:43:39 +00:00
raichoo 98a890b15f rename execute section to marks section 2020-03-05 13:43:11 +00:00
raichoo 4fa0f62069 remove need to hikari-session
The script that is now automatically run on startup resides at
`$HOME/.config/hikari/autostart`. That way we do not need a session script in
the path.
2020-03-04 19:07:44 +00:00
raichoo 6eec26e85f check accel value boundaries 2020-03-04 19:05:42 +00:00
raichoo 5cffb43dd1 use the same keycode values that wev displays for configuration
Otherwise folks do need to calculate the offset of 8 themselves which is a bit
annoying.
2020-03-04 16:33:05 +00:00
raichoo cedc7f7ab3 use auto instead of autoconf which is a weird abbreviation 2020-03-04 16:30:36 +00:00
raichoo c2e23d8e8d use hyphen in background-fit option like everywhere else 2020-03-04 16:30:04 +00:00
raichoo ec1ffbf0d1 streamline colorscheme naming
The naming for colors in the colorscheme is a bit too specific, those colors are
used for more things than just indicatiors.
2020-03-04 16:28:52 +00:00
raichoo 415b39b612 rename layout actions 2020-03-03 14:12:37 +00:00
raichoo 53a2bf1ab3 remove redundant mode type enum 2020-03-03 13:16:49 +00:00
raichoo 6349cda6cb respect `XCURSOR_THEME` environment variable 2020-03-03 10:45:49 +00:00
raichoo 29ef1066b9 streamline cycling
Since layout mode the default bindings for layout cycling have been bound to
`L+n` and `L+p` by default. Cycling through views can be done with `LS+n` and
`LS+p.` This leads to muscle memory issues when going to the "previous" view
because `hikari` interprets the next view as the one going down the stack and
the previous one as going up the stack. This is counterintuitive because going
back to the previous view requires the user to issue `LS+n`. Therefore we just
switch the meaning for next and previous around for everything by layout
cycling.

Also cycling through sheet views only can be very disorienting with borrowed
views on the workspace. Therefore we replace sheet cycling with cycling though
all the views on the workspace.
2020-03-03 10:17:44 +00:00
raichoo 8652ec330b change cursor for layout and mark select 2020-03-02 21:42:07 +00:00
raichoo 395d115001 factor out keycode to codepoint translation 2020-03-02 18:01:28 +00:00
raichoo f66ccecd92 factor out mark resolve 2020-03-02 15:44:03 +00:00
raichoo b0d466cd2f factor out keyboard confirm and cancel 2020-03-02 15:14:17 +00:00
raichoo 59fe0b2249 merge execute-mode and mark-select
`execute-mode` was always kind of a crutch that aimed to be a simple program
runner. It's functionality is now merged with mark selection. If a mark gets
selected that is not set to any view `hikari` is going to execute a specified
command. It is left to the user if that application is going to take up that
mark when it started. The user needs to configure an `autoconf` settings for
this.
2020-03-02 14:53:43 +00:00
raichoo 48f5396ae3 add mark actions
Mark actions can now also be bound to a keybinding. That way one does not need
to enter `mark-select` or `mark-switch-select` mode and marks can be selected
just by a issuing a keybinding. The actions are called `mark-show-a` to `z` and
`mark-switch-to-a` to `z`.
2020-03-02 10:42:27 +00:00
raichoo 729befd3e7 use macros for binding parser 2020-03-01 15:09:31 +00:00
raichoo 4da2b6edac allow binding layout registers to keys
Some users might want to bind certain layouts to a key binding. This introduces
actions `layout-apply-a` to `layout-apply-z`. Empty layout registers will result
in a no-op.
2020-03-01 13:18:41 +00:00
raichoo 28e7246980 refactor migration code
Migrating views from one output to another during output destroy turns out to be
a lot trickier. The commit logic needs to be adjusted as well to prevent views
from jumping around on show. Also view geometry needs to be reset and therefore
tiles need to be detached from layouts, which leads to layout deallocation when
there are no more views left inside the layout.
2020-03-01 08:52:55 +00:00
raichoo 8dad490e7a add workspace merging
When workspaces get destroyed due to outputs being detached, we are going to
merge all of its sheets into the next workspace.
2020-02-25 14:51:59 +00:00
raichoo 122683407c prevent damage on disabled outputs 2020-02-25 14:27:10 +00:00
raichoo a8663985e7 correctly update group indicator on group assign cancel
If a view is a member of the sheet group and we cancel during assignment, the
indicator displays the sheet group name instead of being hidden.
2020-02-25 14:24:48 +00:00
raichoo 513775c425 reset tiled view geometry on pinning
Pinning a tiled view to a different sheet should reset its geometry and take it
out of the layout.
2020-02-25 13:51:09 +00:00
raichoo 9657719da3 add layout select mode
Layout bindings are taking up valuable key bindings and since one can have quite
a lot of them it is better to move them into registers just like we are already
doing with execute registers.
2020-02-24 10:07:20 +00:00
raichoo 849769857b add sheet assign mode
Since it's now possible to move views between sheets this adds a mode where one
can manually select the target sheet. On entering the mode a sheet is selected
by pressing the number of the target sheet. Tab is used to cycle between target
workspaces.
2020-02-21 18:29:48 +00:00
raichoo bed9efdef6 disallow user defined groups that start with a digit
Sheet group names now contain their output's name. This means that a user could
potentially create a group for a sheet that does not exist yet and gets created
on a monitor hotplug event, leading to a confusing state. To prevent this we
disallow groups that start with digits.
2020-02-21 12:56:01 +00:00
raichoo cf051c04b6 free zero length group name on configuration error 2020-02-21 12:48:49 +00:00
raichoo 910138dff9 extend view pinning to support workspace migration 2020-02-20 20:53:39 +00:00
raichoo b52296732f include output name in sheet group names 2020-02-20 19:24:46 +00:00
raichoo 56f1930865 handle monitor hotplugging 2020-02-20 17:48:51 +00:00
raichoo d9aa3d1d9f improve "actions" and "layouts" parsing
"actions" and "layouts" are parsed only when they are being bound which leads to
the possibility of having faulty configurations without noticing.
We now parse those two sections entirely during startup. This also leads to a
simpler cleanup routine for configuration finalization.
2020-02-20 14:16:07 +00:00
raichoo c216863a40 rewrite layout configuration
This makes configuration of layouts far simpler with a lot less noise and curly
braces.
2020-02-19 15:31:20 +00:00
raichoo 6774bec9f2 rename "horizontal" and "vertical" layouts
Splits are also named "horizontal" and "vertical" this is sort of confusing when
there exist layouts also named "vertical" and "horizontal". Therefore we rename
those layouts to "stack" and "queue".
2020-02-19 10:28:40 +00:00
raichoo 468de6f841 add orientation to splits
This way we can arbitrarily define the main side of the split to allow more
complex layouts (e.g. nautilus spiral).
2020-02-18 20:09:54 +00:00
andy be139d3062 add option to fit background image 2020-02-18 20:05:21 +00:00
raichoo 2ef5204f97 introduce "single" and "empty" containers
"single" is a fullscreen container that only contains a single view. "empty"
containers contain no views and only take up space. These can be used to model
more complex layouts. All other container types now start with a minimum of 2
views and a maximum of 256.
2020-02-18 19:03:06 +00:00
andy 31ed86abd7 add action to change VTs 2020-02-17 15:10:47 +00:00
raichoo 027bd4ccc2 position popups correctly on multi monitor setup
Popup geometry is already relative and does not need to be adjusted to the
monitor geometry.
2020-02-16 11:03:01 +00:00
raichoo 99800f62c8 tiled views should not be movable 2020-02-16 09:58:22 +00:00
raichoo b39b6024b7 new tiling semantics for iconified and hidden views
Iconified views can never be tiled. Tiling views now includes hidden views as
well by forcing them to be displayed before tiling.
2020-02-16 09:30:50 +00:00
raichoo f7fb18bddf check for parser fail on loading the configuration 2020-02-16 09:21:47 +00:00
raichoo eacc50d5e7 refresh borders on configuration reload 2020-02-15 08:51:38 +00:00
raichoo bf414bb460 reconfigure pointer devices on configuration reload 2020-02-14 21:20:35 +00:00
raichoo a86fe09d6a reload output configuration on configuration reload 2020-02-14 21:20:35 +00:00
raichoo 9c90dde976 make configuration reloadable
This patch introduces a new action called `reload`.
2020-02-14 21:20:35 +00:00
raichoo 7a10715702 use descriptive names for scroll-button 2020-02-14 21:20:35 +00:00
raichoo ee7e9a8114 introduce "outputs" configuration section
For future releases we want to be able to configure outputs. This makes the
"backgrounds" section redundant, we are merging it with this new section.
2020-02-14 21:20:34 +00:00
raichoo 9ed329578a rename `ratio` to `scale` for splits
Naming this property `ratio` does not make a whole lot of sense. Hence we rename
it to `scale` and also make it reflect the scaling of the main side of the split.
This effectively means one should subtract the current value from 1.0 to convert
it to the new scaling value (e.g. 0.25 becomes 0.75).
2020-02-14 21:20:30 +00:00
raichoo cd8c01f65b refactor configuration.c to emit useful error messages 2020-02-13 14:08:05 +00:00
andy b5d6fa04ed allow descriptive names instead of key codes in key bindings
Key codes still work, but it's now possible to use key symbols as well by
using "+" as separator between modifiers and key. Note that libucl requires
keys containing a "+" to be quoted.
2020-02-11 12:15:04 +00:00
andy 249c8321eb check for absent group name in auto configuration 2020-02-07 23:30:54 +00:00
raichoo 3c5ed5882f re-enable XWayland support
XWayland support has not been maintained for quite a while so we need to make it
work in the new infrastructure. This patch introduces the view method `move_resize`
which allows to move and resize a view atomically, this is needed for properly
handling XWayland views.
2020-02-07 21:18:23 +00:00
raichoo 6c19e40df1 fix indicator damage on maximize
When views are small enough so that their damage does not cover the indicator
the latter can leave artifacts.
2020-02-07 19:09:27 +00:00
raichoo af51ffb8ed port to linux
Add `Makefile` options to enable building on Linux. And replace `bzero` with
`memset`.
2020-02-06 19:59:04 +00:00
raichoo fddbf3071f add missing ifdefs to exclude xwayland headers
We do not want that header when we build without Xwayland.
2020-02-06 19:58:45 +00:00
raichoo bbd84da9a6 make gcc compile hikari without errors and warnings 2020-02-06 13:42:46 +00:00
raichoo 9e81a0fa92 Let there be light! 2020-02-05 10:02:33 +00:00