Comments (10)
looks like the WM_CLASS of some window looks different than expected.. if you can identify from which window it comes that would be helpful (you can use xprop |grep WM_CLASS
to find out the wm class of programs, should be two strings
from timetrackrs.
So far I "fixed" it commenting out the panic:
// "2\u{0}4\u{0}5\u{0}6\u{0}8\u{0}9\u{0}1\u{0}" to array of strings
pub fn split_zero(s: &str) -> Vec<String> {
let mut vec: Vec<String> = s.split('\0').map(String::from).collect();
// let last = vec.pop().unwrap();
// if !last.is_empty() {
// panic!("not zero terminated");
// }
vec
}
from timetrackrs.
and yes:
❯ xprop | grep WM_CLASS
WM_CLASS(STRING) = "konsole", "konsole"
from timetrackrs.
that konsole string looks fine - it could be in another window. maybe you could add a log::warn!("unexpected class: {vec:#?}") in the if !last.is_empty()
?
from timetrackrs.
Ok, I guess it happens because of my custom desktop names:
from timetrackrs.
uh, that's weird that those are in the window class though - can you say which window manager and status bar etc you are using?
from timetrackrs.
bspwm and polybar
from timetrackrs.
and I think it called from here: let desktop_names = split_zero(&get_property_text(...
, so desktop names
from timetrackrs.
ah, i forgot that that function is also used there. I guess the panic should only apply to classes then, where it makes sense to strip out the last empty bit
from timetrackrs.
There seems to be an inconsistency in the way the string lists are created, bspwm not zero-terminating the list. I've added a check that only removes the last element if it is empty, this should fix it. Let me know if you still encounter this issue.
from timetrackrs.
Related Issues (20)
- Broken on Firefox 96 beta
- Creating new group causing '405 HTTP method not allowed' HOT 5
- Rule editor is broken HOT 1
- Linting (cargo check / rustfmt etc) via Github CI
- Compile cross-platform binaries with GitHub Actions HOT 1
- Show a status tray icon
- Windows + MacOS service / autorun
- Build instructions HOT 2
- Fix the single event viewer HOT 1
- where is the data stored? in the .local/timetrackr/*.sqlite files? HOT 1
- Windows build failed - openssl & vcpkg
- [ERROR] esbuild error when trying to build on FreeBSD
- build failed on Windows HOT 1
- compile error in hashbrown HOT 5
- timeline counts with no end HOT 2
- Auto detect installed supported programs and suggest or make config changes
- capturer tries to "catch up" on windows after standby
- Full screen game is not in window list (windows)
- youtube-dl windows popup from time to time on windows
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 timetrackrs.