Aylur / dotfiles

My personal config files
Other
2.52k stars 129 forks source link

Dock Widget: Advice and/or Pointers on (re-)implemening indicators for active/focused apps? #207

Closed nine7nine closed 5 months ago

nine7nine commented 6 months ago

Hey Aylur (and Co.)

I'm looking for pointers on how to re-implement indicators for a Dock widget ( I forward ported the old JS dock, fixed the connections/binds stuff && did some other refactoring )... I have all of the basics in place, a functioning dock, but I have yet to be able to get functioning indicators -- and I'm looking for advice on how to properly do it with AGS.

my dock code lives here: https://github.com/nine7nine/n7n-AGS-Shell/tree/main/ags/widget/dock

For now, I've removed all of the indicator stuff, as it wasn't working... But i have had a few different attempts at trying to re-implement them, using the new reactivity methods -> but every time I just can't get it to work. ~ Although, admittedly I'm not a JS or TS guy, and not super solid with AGS either...

so if Aylur, or anyone else who may be reading this - has any advice, pointers or interest: I'd like to hear from you!

note: obviously, I know you aren't personally interested in having a dock, Aylur - or you would've ported it over, so I'm not asking for you to integrate it into your dotfiles or anything like that.

thanks!

Aylur commented 5 months ago

a bit late but you can probably copy https://github.com/Aylur/dotfiles/blob/main/ags/widget/bar/buttons/Taskbar.ts if you also want a launcher part, you can copy it from https://github.com/Aylur/dotfiles/blob/main/ags/widget/launcher/AppLauncher.ts, but it should be trivial to make it so that the launchers indicate that its already running, you would have to update their state and filter the list of the taskbar somewhere in the sorting part in taskbar.ts

nine7nine commented 5 months ago

Ya, previously I had looked at the taskbar (as obviously it provides similar indicators), but at the time it just didn't work for me... I'm going to have another stab at it though soon. ~ Sometimes a break helps: coming back at it fresh... Regardless, for now my App dock has been still pretty useful, just as a launcher or navigating between open apps.

AppLauncher: I'm not so hot on (although, that said: it's very nice!). I took your older version and converted it into a more standard drop-down menu. ~ With search intact, but sorting and a few other bits added... I prefer that old-school Application menu, just personal taste.

As an aside, something that I've been doing that you may be interested in: I forked Hyprspace to make an integrated Workspace Switcher in AGS: https://github.com/nine7nine/Hyprspace-n7n - it currently doesn't support blur on window dragging, but it does render properly and fit in nicely with the Shell. You just set: plugin:overview:reservedArea = 36 to your Bar height and it fits perfectly.

AGS-Hyprspace

Obviously, OOTB Hyprspace can't do this. It's more like a Gnome-Shell-style Overview plugin. I'm going to see if the Hyprspace dev is interested in supporting both modes (static switcher && Overview).

I ended up replacing your shell's Overview with this -- I've been pretty happy with it, aside from Hyprland breaking plugins a lot recently (swapping out wlroots stuff).