~tsdh/swayr

6cbce998923757a92bfa65a1e7ff33dfd2b77fdc — Tassilo Horn 2 months ago 52cab3b
Improve tab_current_workspace (less flicker)
2 files changed, 9 insertions(+), 8 deletions(-)

M Cargo.lock
M src/cmds.rs
M Cargo.lock => Cargo.lock +2 -2
@@ 436,9 436,9 @@ checksum = "8895849a949e7845e06bd6dc1aa51731a103c42707010a5b591c0038fb73385b"

[[package]]
name = "unicode-width"
version = "0.1.8"
version = "0.1.9"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "9337591893a19b88d8d87f2cec1e73fad5cdfd10e5a6f349f498ad6ea2ffb1e3"
checksum = "3ed742d4ea2bd1176e236172c8429aaf54486e7ac098db29ffe6529e0ce50973"

[[package]]
name = "unicode-xid"

M src/cmds.rs => src/cmds.rs +7 -6
@@ 351,7 351,6 @@ fn tile_current_workspace(include_floating: bool, shuffle: bool) {
            }
            for win in wins {
                if win.is_floating() {
                    std::thread::sleep(std::time::Duration::from_millis(25));
                    con.run_command(format!(
                        "[con_id={}] floating disable",
                        win.get_id()


@@ 391,16 390,18 @@ fn tab_current_workspace(include_floating: bool) {
            let mut placed_wins = vec![];
            wins.reverse();
            for win in wins {
                if win.is_floating() {
                    con.run_command(format!(
                        "[con_id={}] floating disable",
                        win.get_id()
                    ))?;
                }

                std::thread::sleep(std::time::Duration::from_millis(25));
                con.run_command(format!(
                    "[con_id={}] move to workspace current",
                    win.get_id()
                ))?;
                std::thread::sleep(std::time::Duration::from_millis(25));
                con.run_command(format!(
                    "[con_id={}] floating disable",
                    win.get_id()
                ))?;
                placed_wins.push(win);
            }
            Ok(())