File tree Expand file tree Collapse file tree 3 files changed +26
-2
lines changed Expand file tree Collapse file tree 3 files changed +26
-2
lines changed Original file line number Diff line number Diff line change 2
2
3
3
## [ Unreleased]
4
4
5
+ ### Fixed
6
+
7
+ - Fixed reading workspaces failing with komorebi v0.1.36
8
+
5
9
## [ 0.6.1] - 2025-04-08
6
10
7
11
### Changed
Original file line number Diff line number Diff line change @@ -11,13 +11,29 @@ use winit::event_loop::EventLoopProxy;
11
11
12
12
use crate :: app:: AppMessage ;
13
13
14
+ #[ derive( Debug , Deserialize ) ]
15
+ #[ serde( untagged) ]
16
+ enum MaybeRingOrVec < T > {
17
+ Ring ( Ring < T > ) ,
18
+ Vec ( Vec < T > ) ,
19
+ }
20
+
21
+ impl < T > MaybeRingOrVec < T > {
22
+ fn is_empty ( & self ) -> bool {
23
+ match self {
24
+ MaybeRingOrVec :: Ring ( ring) => ring. is_empty ( ) ,
25
+ MaybeRingOrVec :: Vec ( vec) => vec. is_empty ( ) ,
26
+ }
27
+ }
28
+ }
29
+
14
30
#[ derive( Debug , Deserialize ) ]
15
31
struct KWorkspace {
16
32
name : Option < String > ,
17
33
containers : Ring < serde_json:: Value > ,
18
34
maximized_window : Option < serde_json:: Value > ,
19
35
monocle_container : Option < serde_json:: Value > ,
20
- floating_windows : Vec < serde_json:: Value > ,
36
+ floating_windows : MaybeRingOrVec < serde_json:: Value > ,
21
37
}
22
38
23
39
impl KWorkspace {
Original file line number Diff line number Diff line change @@ -94,7 +94,11 @@ impl MainWindowView {
94
94
proxy : EventLoopProxy < AppMessage > ,
95
95
window_info : WindowRegistryInfo ,
96
96
) -> anyhow:: Result < Self > {
97
- let workspaces = crate :: komorebi:: read_workspaces ( ) . unwrap_or_default ( ) ;
97
+ let workspaces = crate :: komorebi:: read_workspaces ( )
98
+ . inspect_err ( |e| {
99
+ tracing:: error!( "Failed to read workspaces: {e}" ) ;
100
+ } )
101
+ . unwrap_or_default ( ) ;
98
102
99
103
let mut view = Self {
100
104
window,
You can’t perform that action at this time.
0 commit comments