milgra / sov

An overlay that shows schemas for all workspaces to make navigation in sway easier.
GNU General Public License v3.0
320 stars 14 forks source link

When new output is created and old output is gone, sov still draws to the old dead output #38

Open jasyip opened 1 year ago

jasyip commented 1 year ago

I use a tool named kanshi that dynamically manages my outputs and workspaces. However, whenever kanshi activates after a new output is created and the former output is gone, sov thinks there are 0 workspaces. Debug messages below were generated after first running it, switching between two workspaces (that works fine), then migrating to a new output, then switching between two workspaces (thinks there are 0 workspaces, so it just shows a blank bar in the middle of the screen).

tail -f $XDG_RUNTIME_DIR/sov.sock| sov -v                                            INT|INT ✘  38s  19:32:24 
Sway Overview v0.9b by Milan Toth ( www.milgra.com )
If you like this app try :
- Wayland Control Panel ( github.com/milgra/wcp )
- Visual Music Player (github.com/milgra/vmp)
- Multimedia File Manager (github.com/milgra/mmfm)
- SwayOS (swayos.github.io)
Games :
- Brawl (github.com/milgra/brawl)
- Cortex ( github.com/milgra/cortex )
- Termite (github.com/milgra/termite)

DEBUG  Set log level to DEBUG                                                                        19:32:54:746652 ../sov-0.9b/src/mt_core/mt_log.c : 172 
style path    : /home/lj/.config/sov
css path      : /home/lj/.config/sov/html/main.css
html path     : /home/lj/.config/sov/html/main.html
image path    : /home/lj/.config/sov/img
ratio         : 8
anchor        : 
margin        : 0
timeout       : 0
columns       : 5
use_name      : false
DEBUG  xdg output handle logical size, 1920 1080 for monitor 0                                       19:32:54:764918 ..
/sov-0.9b/src/kinetic_ui/ku_connector_wayland.c : 1488 
DEBUG  Found workspace, name: 1: ‭‬  num : 1 output : eDP-1                                           19:32:56:736169 ../sov-0.9b/src/sov/tree.c : 153 
DEBUG  Found workspace, name: 2: ‭‬ ‭‬ ‭‬  num : 2 output : eDP-1                                       19:32:56:736194 ../sov-0.9b/src/sov/tree.c : 153 
DEBUG  Found workspace, name: 3 num : 3 output : eDP-1                                               19:32:56:736206 ../sov-0.9b/src/sov/tree.c : 153 
DEBUG  Found window, appid betterbird title Inbox - School - Betterbird 0 57 1920 1023               19:32:56:736832 ../sov-0.9b/src/sov/tree.c : 220 
DEBUG  Found window, appid kitty title journalctl -b 0 57 960 500                                    19:32:56:736872 ../sov-0.9b/src/sov/tree.c : 220 
DEBUG  Found window, appid kitty title tail -f $XDG_RUNTIME_DIR/sov.sock| sov -v 0 580 960 500       19:32:56:736895 ../sov-0.9b/src/sov/tree.c : 220 
DEBUG  Found window, appid kitty title config (~/.config/sway) - NVIM 960 57 960 1023                19:32:56:736913 ../sov-0.9b/src/sov/tree.c : 220 
DEBUG  Creating layer for eDP-1 : workspaces 3 cols 5 rows 1 ratio 8 width 1320 height 175           19:32:56:736938 ../sov-0.9b/src/sov/sov.c : 119 
DEBUG  Drawing layer eDP-1 : workspaces 3 cols 5 rows 1 ratio 8                                      19:32:56:737069 ../sov-0.9b/src/sov/sov.c : 150 
DEBUG  adding row row0                                                                               19:32:56:737100 ../sov-0.9b/src/sov/gen.c : 140 
DEBUG  xdg output handle logical size, 2127 1196 for monitor 1                                       19:33:09:963239 ../sov-0.9b/src/kinetic_ui/ku_connector_wayland.c : 1488 
DEBUG  handle global remove                                                                          19:33:10:507083 ../sov-0.9b/src/kinetic_ui/ku_connector_wayland.c : 1743 
DEBUG  Found workspace, name: 1: ‭‬  num : 1 output : DP-5                                            19:33:18:065635 ../sov-0.9b/src/sov/tree.c : 153 
DEBUG  Found workspace, name: 2: ‭‬ ‭‬ ‭‬  num : 2 output : DP-5                                        19:33:18:065654 ../sov-0.9b/src/sov/tree.c : 153 
DEBUG  Found workspace, name: 3 num : 3 output : DP-5                                                19:33:18:065660 ../sov-0.9b/src/sov/tree.c : 153 
DEBUG  Found window, appid betterbird title Inbox - School - Betterbird 1920 57 2127 1139            19:33:18:066027 ../sov-0.9b/src/sov/tree.c : 220 
DEBUG  Found window, appid kitty title journalctl -b 1920 57 1064 558                                19:33:18:066049 ../sov-0.9b/src/sov/tree.c : 220 
DEBUG  Found window, appid kitty title tail -f $XDG_RUNTIME_DIR/sov.sock| sov -v 1920 638 1064 558   19:33:18:066063 ../sov-0.9b/src/sov/tree.c : 220 
DEBUG  Found window, appid kitty title config (~/.config/sway) - NVIM 2984 57 1063 1139              19:33:18:066078 ../sov-0.9b/src/sov/tree.c : 220 
DEBUG  Creating layer for eDP-1 : workspaces 0 cols 5 rows 0 ratio 8 width 1320 height 20            19:33:18:066105 ../sov-0.9b/src/sov/sov.c : 119 
DEBUG  Drawing layer eDP-1 : workspaces 0 cols 5 rows 0 ratio 8                                      19:33:18:066194 ../sov-0.9b/src/sov/sov.c : 150 
DEBUG  Found workspace, name: 1: ‭‬  num : 1 output : DP-5                                            19:33:20:661534 ../sov-0.9b/src/sov/tree.c : 153 
DEBUG  Found workspace, name: 2: ‭‬ ‭‬ ‭‬  num : 2 output : DP-5                                        19:33:20:661565 ../sov-0.9b/src/sov/tree.c : 153 
DEBUG  Found window, appid betterbird title Inbox - School - Betterbird 1920 57 2127 1139            19:33:20:662191 ../sov-0.9b/src/sov/tree.c : 220 
DEBUG  Found window, appid kitty title journalctl -b 1920 57 1064 558                                19:33:20:662231 ../sov-0.9b/src/sov/tree.c : 220 
DEBUG  Found window, appid kitty title tail -f $XDG_RUNTIME_DIR/sov.sock| sov -v 1920 638 1064 558   19:33:20:662254 ../sov-0.9b/src/sov/tree.c : 220 
DEBUG  Found window, appid kitty title config (~/.config/sway) - NVIM 2984 57 1063 1139              19:33:20:662271 ../sov-0.9b/src/sov/tree.c : 220 
DEBUG  Creating layer for eDP-1 : workspaces 0 cols 5 rows 0 ratio 8 width 1320 height 20            19:33:20:662293 ../sov-0.9b/src/sov/sov.c : 119 
DEBUG  Drawing layer eDP-1 : workspaces 0 cols 5 rows 0 ratio 8                                      19:33:20:662404 ../sov-0.9b/src/sov/sov.c : 150 

Edit: it seems that sov thinks the old output, which is gone, is still being focused, so it sees that the old output has 0 workspaces. At least it recognizes the new output's workspaces in the debug messages that happen right after kanshi activates.

milgra commented 1 year ago

Hi, I will try kanshi ( it seems like a very useful tool ) and will check the problem.