I was wondering if the DBus interface and the cmd could be redesigned to obtain additional information, such as the title of the currently focused window and its current position.
It would be super useful for me to make a better "bar" for myself.
Absolutely, and I'll update it right away.
It'll probably include:
- window title
- window dimensions
- window state (ex: floating, full screen, etc.)
- window cooridnates
- and number of open windows.
Do you think there is anything else it shoudl have?
Wow, actually I didn't expect such a fast and open reply! I'll check Hyprland and Sway and actually i3, and then, I'll share what is on my mind.
Noting these
hyprctl --help usage: hyprctl [(opt)flags] [command] [(opt)args] commands: monitors workspaces activeworkspace clients -> all of the windows activewindow layers -> I don't know devices binds dispatch -> runs any internal command (like switching workspace etc.) keyword version kill splash hyprpaper -> it should be about wallpaper reload setcursor getoption cursorpos switchxkblayout seterror setprop plugin notify globalshortcuts flags: -j -> output in JSON --batch -> execute a batch of commands, separated by ';'
and https://manpages.debian.org/experimental/sway/swaymsg.1.en.html and also https://git.sr.ht/~brocellous/wlrctl
My suggestions are these two options
We can expose every command from the layout, why not :)))? https://git.sr.ht/~atha/newm-atha/tree/HEAD/item/doc/layout.md
But if I want to be inclusive and pragmatic
getters:
- window management
- current window: (title, class, state, coordinates, etc)
- list of all windows: (id, title, class)
- current workspace (may be I am wrong about the code, but I think workspace is the model that contains the current view of the screen)
- inputs
- xkb_active_layout_name
listeners:
- window management
- change_focus
- move (not now)
- zoom_in/out (not now)
commands/setters:
- window management
- maybe move, focus, ....(not now)
Absolutely! This is probably what I will base the implementation of off(with your aproval of course). Additionally, I think we should include
layers
- like hyprland, which gives info about the diffrent 'layers' on screen(layer-shell protocol is supported in newm and is essential to a lot of things). By the way, layers/layer-shell protocol defines the idea that there are multiple on screen layers with diffrent things being rendered on diffrent ones,i.eswaylock
is rendered on the top one.
Oh, I didn't know that concept. That would also be a thing. Tell me if there is something that I could do.
hey ~sesajad, I implemented some of your ideas in this commit.
The specific ones are:
- window title name
- window ssd status
- current workspace number
Can you take the for a spin ASAP and let me know how it goes? Let me know how it goes!
yeah. right now. I think there is a typo (no semicolon) in https://git.sr.ht/~atha/pywm-atha/tree/cc5092882ecdcf33000aa1f0e393731a63bd6c26/item/src/wm/wm_seat.c#L158 which prevents me from a successful build from AUR. I'll try to ignore it somehow.
update: It raises
{'exception': "'Layout' object has no attribute 'find_focused_window'"}
which seems to be from
https://git.sr.ht/~atha/newm-atha/tree/HEAD/item/newm/dbus/command.py#L37
Noting that we have
find_focused_view(self) -> Optional[View]
in layout class, it should be changed to that.
After solving that, I arrived at this (by replacing
window
withview
)
{'exception': "'View' object has no attribute 'is_present'"}
Ah.... I'm sorry for your troubles, I'm stupid.
No worries, mate. It was ok. Tell me if I could do anything.
great. I will test it right now.
hahaha yeah. It reminded me of the famous covfefe.
yes, thats a very similar message too. Let me know if
current-window-title
now works for you too, I will fix the others after this one is confirmed working.
oops wrong button
touchscreen is hard
Awesome. It was working properly. I forgot to send the message yesterday. Thanks
OK, thank you! I'll commit ASAP making the other two work.
btw ~sesajad, the experimental version with these commands is in
newmctl
notnewm-cmd
, so that extensive changes can be carried out without breaking peoples configs, especially the people who are rolling with git here. I forgot to let you know, sorry.
great. I'll check it out.