Comments (6)
Are you able to give me the hash that this was last working on? It would also really help if you can put some logging into your hook and determine exactly when it is exiting. Looking over the code you have provided there are quite a few places where you could be exiting early.
from penrose.
from penrose.
@crypt17 I've rewritten your hook a bit to make it easier to reason about and added some simple print logging to trace the execution:
struct RmClientHook {}
impl Hook for RmClientHook {
fn remove_client(&mut self, wm: &mut WindowManager, _: WinId) {
if let Some(ws) = wm.workspace(&Selector::Focused) {
println!("have focused workspace: {}", ws.name());
if ws.len() > 1 {
println!("more than one client (n={})", ws.len());
let last = wm.client(&Selector::Index(ws.len() - 1));
if last != wm.client(&Selector::Focused) {
println!("new focused is not last");
wm.cycle_client(Backward);
}
}
}
}
}
From what I can see, this is firing (yours was as well) and cycle_client
is being called. cycle_client
is also doing the right thing. When using a layout that does not trigger on a focus change it works fine but it results in an infinite loop of cycling clients for the example paper
layout config. Working around that is something that you'll need to handle in your hook if this is how you are wanting to implement it.
from penrose.
from penrose.
from penrose.
This behaviour is a breaking change for layouts that follow focus. It will not be added to core. If you want to implement it as am extension as already discussed then feel free to do so.
from penrose.
Related Issues (20)
- Holding onto destroyed client Xids in a state extension breaks NamedScratchpad behaviour HOT 5
- toggle full screeen example HOT 1
- Add a BSP manual tiling layout HOT 1
- Find an alternative to pango/cairo for penrose_ui HOT 3
- Question: Are you sure file redirection can be used in `Exec=` of `Desktop Entry` HOT 1
- weird behavior caused by reload HOT 6
- Escape key not functional HOT 4
- Error: Io(Os { code: 2, kind: NotFound, message: "No such file or directory" }) HOT 1
- penrose crashes due to unknown client and using expect. prefer if let HOT 2
- Ability to cycle to next/previous tag HOT 6
- Allow the use of other bars e.g. polybar HOT 5
- penrose_ui: Setting background color of status bar to black (0x000000 or 0x000000ff) results in crash HOT 1
- Question: Use xmodmap-pke-umberwm? HOT 4
- ActiveWindowName won't respect max_chars HOT 4
- Support Wayland as a backend HOT 4
- switching between two different scratchpads on the same screen
- SpawnOnStartup - 'then' method cannot be invoked on a trait object
- Adding AltGr as a modifier HOT 1
- Add the ability to combine `Query`s into composite Queries HOT 1
- max_char check fails in in the ActiveWindowName bar box HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from penrose.