Improve tab_current_workspace (less flicker)

timeout_old
Tassilo Horn 3 years ago
parent 52cab3bf94
commit 6cbce99892
  1. 4
      Cargo.lock
  2. 13
      src/cmds.rs

4
Cargo.lock generated

@ -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"

@ -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(())

Loading…
Cancel
Save