scorpion-26 / gBar

Blazingly fast status bar written with GTK
MIT License
478 stars 17 forks source link

Feature request (custom module, calendar and workspace improvement) #14

Open bluebyt opened 1 year ago

bluebyt commented 1 year ago

Hi, I use gBar and I really like it, the bar is very light and also I like the animation for CPU, Disk, RAM...

However they are some features that I missed.

1- Custom module, I know that gBar have a Plugins module, but not anybody have the skill to program in C++, with a custom module we can make or find a script easily.

Example from waybar "custom/pacmanAlt": { "format": " {}", "interval": 3600, "exec": "checkupdates | wc -l", or "exec": "~/.config/gBar/script/updates.sh",

2- Calendar module Example: calendar

3- When the mouse hover a workspace item the background will change color.
That will will make the workspace module more dynamic.

https://user-images.githubusercontent.com/18442224/235377782-4e782040-e3a2-43a7-a47d-a994c9031bce.mp4

Example: style.css .ws-hover { background-color: rgba(0, 0, 0, 0.2) }

scorpion-26 commented 1 year ago

1- Custom module

I already had the idea of a pacman/packages widget, so I'll probably implement that in upstream gBar at some point in the near future. For custom text-only widgets: That should be possible, albeit a bit finicky to implement.

2- Calendar module

I can implement that, though it will take probably a while to do so, since it is a relatively complicated widget.

3- When the mouse hover a workspace item the background will change color.

This is already possible with the :hover pseudo-class. You can put e.g. the following in your scss/css config

.ws-active:hover,.ws-dead:hover,.ws-inactive:hover,.ws-visible:hover,.ws-current:hover {
    // your style here
}

There you can also animate the colors with css animations (You can look at the bluetooth css classes for some inspiration)

bluebyt commented 1 year ago

Thank you for your quick response, I will try css animations now!

scorpion-26 commented 1 year ago

1- Custom module, I know that gBar have a Plugins module, but not anybody have the skill to program in C++, with a custom module we can make or find a script easily.

A "Check Updates" widget has been added. It should work just like your example (Except for the icon). It is configurable via "CheckPackagesCommand" and "CheckUpdateInterval". Let me know if a fully custom script widget is still appreciated and I'll implement that too.

bluebyt commented 1 year ago

The Check Updates is working! When there is no update the icon disappears, this is nice! Here the options I put in config file.

~/.config/gBar/config

Check Updates: true
CheckPackagesCommand: checkupdates | wc -l
CheckUpdateInterval: 300

~/.config/gBar/style.css

.package-outofdate {
    font-size: 24px;
    margin-right: -5px;
    margin-left: -5px;
    color: #a3be8c;
}

screenshot

Regarding the custom module it is up to you to decide, the majority of users want a bar that they can configure as they wish. It depends what you want to do with gBar in the future. Anyway thank you for listening to the users! that really appreciated.

ThatOneCalculator commented 9 months ago

+1 on this, a custom module to launch Rofi/Wofi for example would be great