mirror of
https://github.com/LGUG2Z/komorebi.git
synced 2026-03-10 12:45:58 +01:00
Compare commits
1 Commits
dependabot
...
master
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
5f629e1f1a |
6
.github/workflows/windows.yaml
vendored
6
.github/workflows/windows.yaml
vendored
@@ -87,7 +87,7 @@ jobs:
|
||||
fetch-depth: 0
|
||||
- shell: bash
|
||||
run: echo "VERSION=nightly" >> $GITHUB_ENV
|
||||
- uses: actions/download-artifact@v8
|
||||
- uses: actions/download-artifact@v7
|
||||
- run: |
|
||||
Compress-Archive -Force ./komorebi-x86_64-pc-windows-msvc-${{ github.sha }}/x86_64-pc-windows-msvc/release/*.exe komorebi-$Env:VERSION-x86_64-pc-windows-msvc.zip
|
||||
Copy-Item ./komorebi-x86_64-pc-windows-msvc-${{ github.sha }}/wix/*x86_64.msi -Destination ./komorebi-$Env:VERSION-x86_64.msi
|
||||
@@ -136,7 +136,7 @@ jobs:
|
||||
run: |
|
||||
TAG=${{ github.event.release.tag_name }}
|
||||
echo "VERSION=${TAG#v}" >> $GITHUB_ENV
|
||||
- uses: actions/download-artifact@v8
|
||||
- uses: actions/download-artifact@v7
|
||||
- run: |
|
||||
Compress-Archive -Force ./komorebi-x86_64-pc-windows-msvc-${{ github.sha }}/x86_64-pc-windows-msvc/release/*.exe komorebi-$Env:VERSION-x86_64-pc-windows-msvc.zip
|
||||
Copy-Item ./komorebi-x86_64-pc-windows-msvc-${{ github.sha }}/wix/*x86_64.msi -Destination ./komorebi-$Env:VERSION-x86_64.msi
|
||||
@@ -178,7 +178,7 @@ jobs:
|
||||
run: |
|
||||
TAG=${{ github.ref_name }}
|
||||
echo "VERSION=${TAG#v}" >> $GITHUB_ENV
|
||||
- uses: actions/download-artifact@v8
|
||||
- uses: actions/download-artifact@v7
|
||||
- run: |
|
||||
Compress-Archive -Force ./komorebi-x86_64-pc-windows-msvc-${{ github.sha }}/x86_64-pc-windows-msvc/release/*.exe komorebi-$Env:VERSION-x86_64-pc-windows-msvc.zip
|
||||
Copy-Item ./komorebi-x86_64-pc-windows-msvc-${{ github.sha }}/wix/*x86_64.msi -Destination ./komorebi-$Env:VERSION-x86_64.msi
|
||||
|
||||
@@ -2103,12 +2103,19 @@ impl WindowManager {
|
||||
|
||||
tracing::info!("focusing container");
|
||||
|
||||
let new_idx =
|
||||
if workspace.maximized_window.is_some() || workspace.monocle_container.is_some() {
|
||||
None
|
||||
} else {
|
||||
workspace.new_idx_for_direction(direction)
|
||||
if workspace.monocle_container.is_some() {
|
||||
let cycle_direction = match direction {
|
||||
OperationDirection::Left | OperationDirection::Down => CycleDirection::Previous,
|
||||
OperationDirection::Right | OperationDirection::Up => CycleDirection::Next,
|
||||
};
|
||||
return self.cycle_monocle(cycle_direction);
|
||||
}
|
||||
|
||||
let new_idx = if workspace.maximized_window.is_some() {
|
||||
None
|
||||
} else {
|
||||
workspace.new_idx_for_direction(direction)
|
||||
};
|
||||
|
||||
let mut cross_monitor_monocle_or_max = false;
|
||||
|
||||
@@ -3093,6 +3100,27 @@ impl WindowManager {
|
||||
workspace.reintegrate_monocle_container()
|
||||
}
|
||||
|
||||
#[tracing::instrument(skip(self))]
|
||||
pub fn cycle_monocle(&mut self, direction: CycleDirection) -> eyre::Result<()> {
|
||||
tracing::info!("cycling monocle container");
|
||||
|
||||
if self.focused_workspace()?.containers().is_empty() {
|
||||
return Ok(());
|
||||
}
|
||||
|
||||
self.focused_workspace_mut()?
|
||||
.cycle_monocle_container(direction)?;
|
||||
|
||||
for container in self.focused_workspace_mut()?.containers_mut() {
|
||||
container.hide(None);
|
||||
}
|
||||
|
||||
// borders were getting funny during cycles, can't be bothered to root cause it
|
||||
border_manager::destroy_all_borders()?;
|
||||
|
||||
self.update_focused_workspace(true, true)
|
||||
}
|
||||
|
||||
#[tracing::instrument(skip(self))]
|
||||
pub fn toggle_maximize(&mut self) -> eyre::Result<()> {
|
||||
self.handle_unmanaged_window_behaviour()?;
|
||||
|
||||
@@ -1515,6 +1515,23 @@ impl Workspace {
|
||||
Ok(())
|
||||
}
|
||||
|
||||
pub fn cycle_monocle_container(&mut self, direction: CycleDirection) -> eyre::Result<()> {
|
||||
if self.containers().is_empty() {
|
||||
return Ok(());
|
||||
}
|
||||
|
||||
self.reintegrate_monocle_container()?;
|
||||
|
||||
let new_idx = self
|
||||
.new_idx_for_cycle_direction(direction)
|
||||
.ok_or_eyre("there is no container to cycle monocle to")?;
|
||||
|
||||
self.focus_container(new_idx);
|
||||
self.new_monocle_container()?;
|
||||
|
||||
Ok(())
|
||||
}
|
||||
|
||||
pub fn new_maximized_window(&mut self) -> eyre::Result<()> {
|
||||
let focused_idx = self.focused_container_idx();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user