I think this got broken as part of the automatic Rust version syntax
upgrades which joined two if clauses together with && which should have
been kept separate.
Now, if the user gives the --bar flag to the start command, and a static
config file is not resolved, or if the static config file does not have
a bar_configurations stanza, it will fallthrough to the default
PowerShell snippet to try and start komorebi-bar without an explicit
--config flag.
This commit fixes the stupidest of stupid bugs. Column width
calculations on the Scrolling layout should take the number of windows
into account, especially when lower than the configured column count.
I was getting really tired of having to switch between display inputs to
different platform-specific machines to be able to make and test changes
on komorebi for Windows and komorebi for Mac.
With this commit, the `flake.nix` provides a Nix devShell and crane
build for users to make and validate changes with `cargo check`, `cargo
clippy` and `cargo build` with the Windows MSVC toolchain on Linux and
macOS.
Getting tired of making little changes in both this and the komorebi for
Mac repo - I think eventually either komorebi-themes will live in its
own repo or komorebi for Mac will be integrated here.
But for now, at least everything is defined in komorebi-themes and I
don't have to redefine any theme-related stuff in komorebi for Mac.
This commit ensures that the various default values that the different
Option<T> config properties can be unwrapped to are encoded by schemars
so that they can be picked up by docgen.
This commit changes the way how the default interface and network
activity is loaded by spawning a new thread on each request. This way
the main thread is not blocked by this process.
There has been instances where getting the default interface blocked the
egui ui thread, resulting in a frozen bar.
fix#1423#1499
- When promoting a container it is using the
`remove_focused_container()` and `insert_container_at_idx` functions
which will remove the focused container size from `resize_dimensions`
and then add the new container with size `None`. Then it was adding
the previously stored size of the main container back to the first
one. However this would result in at least 3 issues:
1. We were removing the size from index 0, however when inserting it
back on the primary_idx we might not add it to index 0, specially
now that there could be locked containers so if container 0 is
locked we would be adding it to the next container, which would
result in the main container having no size information which
would result in a recalculation on the next update and it would
revert back to default, so if a user had resized their containers
that information would be lost.
2. We were removing the size from index 0. Then on
`remove_focused_container` it would remove the size from the
focused container index, but since we had already removed one
size from the `resize_dimensions` that index would no longer
match the actual focused container, so once again we would be
losing information.
3. Since we were removing the size of the focused container idx from
`resize_dimensions` (albeit the wrong one as stated above), this
would mean that the container that moved to that position would
have no resize information so it would show up as if the main
container was taking up half width of the area, ignoring any user
resize, until the next workspace update was triggered.
- This commit completely ignores the `resize_dimensions` since promoting
a container simply means moving one container from one position to the
main one (usually index 0) and then shift all the rest to the "right".
The existing `resize_dimensions` should be kept untouched. To do this
we use the functions `remove_respecting_locks` and
`insert_respecting_locks` on the containers themselves, which simply
move the container and shifts the others which is precisely what we
want.
This commit ensures that we are using show_total_activity and
show_activity instead of show_total_data_transmitted and
show_network_activity in the komorebi.bar.example.json file which is
populated for users in the quickstart command.
JSONSchema is not smart enough to resolve aliases for backwards compat,
which results in confusing behaviour for new users trying to edit this
file.
fix#1596
This commit makes the komorebic promote-swap command reversible by
storing the previous container index in the Workspace state.
If the current container index is the same as the layout's primary
index, and there is a previous promotion swap container index available,
the two containers at those indices will be swapped, effectively making
a second call to promote-swap an undo.
This commit adds a new SocketMessage variant PromoteSwap and
corresponding komorebic promote-swap command.
PromoteSwap will also promote the focused window container to the
largest tile in the layout, but instead of removing the focused
container x from the Ring and inserting it into position 0, possibly
changing the positions of other windows between 0 and x, the indices x
and 0 in the Ring will be swapped directly.
This commit adds visual feedback in the form of a ghost tile for
preselections made by the preselect-direction command.
A container with the id "PRESELECT" will be added to the workspace, and
replaced when the next manage-able window is spawned.
A new command, cancel-preselect, has been added to remove both the
preselection index and the ghost tile if the user changes their mind.
This commit adds a new feature to preselect the direction of the next
spawned window with a corresponding komorebic preselect-direction
command which takes an OperationDirection.
If the OperationDirection is valid from the current position, it will be
stored in the Workspace state, and then read, applied, and deleted when
the next manage-able window is spawned.
Direction preselection does not (yet?) support the Grid layout.
This commit makes the `stack-all` command simpler, by simply making a
`VecDeque` with all the tiled windows of the workspace, then it creates
a new container with that `VecDeque` and changes the workspace
containers to be just this new container which has all the windows in
it.
Then and only then do we focus and show the previously focused window
and hide all the rest.
This way we don't have a bunch of `FocusChange`/`Cloak`/`Uncloak` events
coming up which might conflict with each other when the user has
transparency and animations enabled.
With this commit, there will only be one focus event for the focused
window and one cloak event for each of the other windows.
Marking all --ahk flags in the start/stop/kill/enable-autostart commands
as EOL; there are any number of ways that users can manage their own
launching of AutoHotKey scripts and the complexity of the different ways
that AHK can be installed is not worth the maintenance burden for this
project.