Script 'mail_helper' called by obssrc
Hello community,

here is the log from the commit of package autotiling-rs for openSUSE:Factory 
checked in at 2026-10-20 12:38:28
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/autotiling-rs (Old)
 and      /work/SRC/openSUSE:Factory/.autotiling-rs.new.3698736 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "autotiling-rs"

Tue Oct 20 12:38:28 2026 rev:3 rq:1386162 version:0.2.1

Changes:
--------
--- /work/SRC/openSUSE:Factory/autotiling-rs/autotiling-rs.changes      
2026-02-10 21:13:29.854265792 +0100
+++ /work/SRC/openSUSE:Factory/.autotiling-rs.new.3698736/autotiling-rs.changes 
2026-10-20 12:39:22.849147486 +0200
@@ -1,0 +2,10 @@
+Mon Oct 19 06:47:30 UTC 2026 - Matej Cepl <[email protected]>
+
+- Update to 0.2.1:
+- Add --limit/-l to stop alternating splits at a container depth.
+- Fix automatic splitting inside tabbed and stacked containers.
+- Update swayipc to version 4.
+- Regenerate vendored dependencies.
+- Install LICENSE with %license.
+
+-------------------------------------------------------------------

Old:
----
  v0.1.8.tar.gz

New:
----
  v0.2.1.tar.gz

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Other differences:
------------------
++++++ autotiling-rs.spec ++++++
--- /var/tmp/diff_new_pack.Bq2HbX/_old  2026-10-20 12:39:24.334209639 +0200
+++ /var/tmp/diff_new_pack.Bq2HbX/_new  2026-10-20 12:39:24.337209765 +0200
@@ -17,7 +17,7 @@
 
 
 Name:           autotiling-rs
-Version:        0.1.8
+Version:        0.2.1
 Release:        0
 Summary:        Container layout switcher for sway/i3 with automatic tiling
 License:        MIT
@@ -51,6 +51,7 @@
 %{cargo_test}
 
 %files
+%license LICENSE
 %doc README.md
 %{_bindir}/%{name}
 

++++++ v0.1.8.tar.gz -> v0.2.1.tar.gz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/autotiling-rs-0.1.8/Cargo.lock 
new/autotiling-rs-0.2.1/Cargo.lock
--- old/autotiling-rs-0.1.8/Cargo.lock  2026-02-04 18:12:44.000000000 +0100
+++ new/autotiling-rs-0.2.1/Cargo.lock  2026-10-18 10:18:37.000000000 +0200
@@ -10,7 +10,7 @@
 
 [[package]]
 name = "autotiling-rs"
-version = "0.1.8"
+version = "0.2.0"
 dependencies = [
  "clap",
  "swayipc",
@@ -142,9 +142,9 @@
 
 [[package]]
 name = "swayipc"
-version = "3.0.3"
+version = "4.0.0"
 source = "registry+https://github.com/rust-lang/crates.io-index";
-checksum = "2b8c50cb2e98e88b52066a35ef791fffd8f6fa631c3a4983de18ba41f718c736"
+checksum = "7fd6ee13016b1ae2fbf741ddb2133d983a3fecdc34686eec6202e2a80612d82f"
 dependencies = [
  "serde",
  "serde_json",
@@ -153,9 +153,9 @@
 
 [[package]]
 name = "swayipc-types"
-version = "1.4.3"
+version = "2.0.3"
 source = "registry+https://github.com/rust-lang/crates.io-index";
-checksum = "a59277899d1da02e8d04f5118d780ba8d769c3c3c9f9fdbae4c2e77a56312a4f"
+checksum = "a38abba293875141fd89c08df734fc1621218ef3b4adf0e585c155ff62c0cc4d"
 dependencies = [
  "serde",
  "serde_json",
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/autotiling-rs-0.1.8/Cargo.toml 
new/autotiling-rs-0.2.1/Cargo.toml
--- old/autotiling-rs-0.1.8/Cargo.toml  2026-02-04 18:12:44.000000000 +0100
+++ new/autotiling-rs-0.2.1/Cargo.toml  2026-10-18 10:18:37.000000000 +0200
@@ -1,12 +1,12 @@
 [package]
 name = "autotiling-rs"
-version = "0.1.8"
+version = "0.2.0"
 authors = ["Jason Nader <[email protected]>"]
 description = "Autotiling for sway (and possibly i3)"
 edition = "2018"
 
 [dependencies]
-swayipc = "3.0"
+swayipc = "4.0"
 
 [dependencies.clap]
 version = "4.5"
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/autotiling-rs-0.1.8/src/main.rs 
new/autotiling-rs-0.2.1/src/main.rs
--- old/autotiling-rs-0.1.8/src/main.rs 2026-02-04 18:12:44.000000000 +0100
+++ new/autotiling-rs-0.2.1/src/main.rs 2026-10-18 10:18:37.000000000 +0200
@@ -3,7 +3,11 @@
 
 use clap::Parser;
 
-fn switch_splitting(conn: &mut Connection, workspaces: &[i32]) -> Result<(), 
String> {
+fn switch_splitting(
+    conn: &mut Connection,
+    workspaces: &[i32],
+    depth_limit: usize,
+) -> Result<(), String> {
     // Check if focused workspace is in "allowed list".
     // If `workspaces` is empty, skip allow all workspaces.
     if !workspaces.is_empty() {
@@ -26,11 +30,19 @@
     let focused_node = tree
         .find_focused_as_ref(|n| n.focused)
         .ok_or("Could not find the focused node")?;
+    let parent = tree
+        .find_focused_as_ref(|n| n.nodes.iter().any(|n| n.focused))
+        .ok_or("No parent")?;
 
     {
-        // get info from the focused child node
-        let is_stacked = focused_node.layout == NodeLayout::Stacked;
-        let is_tabbed = focused_node.layout == NodeLayout::Tabbed;
+        // Tabbed and stacked are read off the parent because the focused node
+        // is a leaf, and a leaf's layout is always None - so checking it here
+        // never matched and we split inside tabbed containers. Sway answers
+        // that by wrapping the leaf in a new split con, which leaves the
+        // tabbed parent holding one child and drawing a tab bar that has
+        // nothing to switch to.
+        let is_stacked = parent.layout == NodeLayout::Stacked;
+        let is_tabbed = parent.layout == NodeLayout::Tabbed;
         let is_floating = focused_node.node_type == NodeType::FloatingCon;
         let is_full_screen = focused_node.percent.unwrap_or(1.0) > 1.0;
         if is_floating || is_full_screen || is_stacked || is_tabbed {
@@ -38,14 +50,25 @@
         }
     }
 
+    if depth_limit > 0 {
+        let workspace = tree.find_focused_as_ref(|n| n.node_type == 
NodeType::Workspace);
+        let depth = std::iter::successors(workspace, |n| {
+            let id = *n.focus.first()?;
+            n.nodes.iter().find(|c| c.id == id)
+        })
+        .take_while(|n| !n.focused)
+        .filter(|n| n.nodes.len() > 1)
+        .count();
+        if depth >= depth_limit {
+            return Ok(());
+        }
+    }
+
     let new_layout = if focused_node.rect.height > focused_node.rect.width {
         NodeLayout::SplitV
     } else {
         NodeLayout::SplitH
     };
-    let parent = tree
-        .find_focused_as_ref(|n| n.nodes.iter().any(|n| n.focused))
-        .ok_or("No parent")?;
     if new_layout == parent.layout {
         return Ok(());
     }
@@ -64,6 +87,10 @@
     /// Activate autotiling only on this workspace. More than one workspace 
may be specified.
     #[clap(long, short = 'w', value_delimiter = ' ', num_args = 1..)]
     workspace: Vec<i32>,
+
+    /// Stop alternating split direction after reaching this container depth.
+    #[clap(long, short = 'l', default_value_t = 0)]
+    limit: usize,
 }
 
 fn main() -> Result<(), std::io::Error> {
@@ -72,7 +99,7 @@
     let mut conn = Connection::new().unwrap();
     for event in Connection::new()
         .unwrap()
-        .subscribe(&[EventType::Window])
+        .subscribe([EventType::Window])
         .unwrap()
     {
         match event.unwrap() {
@@ -83,7 +110,7 @@
                     // delete a node we find that the e.container.rect.height 
and e.container.rect.width are stale,
                     // and therefore we make the wrong decision on which 
layout our next window should be.
                     // Refer to https://github.com/swaywm/sway/issues/5873
-                    if let Err(err) = switch_splitting(&mut conn, 
&args.workspace) {
+                    if let Err(err) = switch_splitting(&mut conn, 
&args.workspace, args.limit) {
                         eprintln!("err: {}", err);
                     }
                 }

++++++ vendor.tar.gz ++++++
++++ 466311 lines of diff (skipped)

Reply via email to