gBar icon indicating copy to clipboard operation
gBar copied to clipboard

Feature request (custom module, calendar and workspace improvement)

Open bluebyt opened this issue 2 years ago • 5 comments

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) }

bluebyt avatar Apr 30 '23 21:04 bluebyt

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)

scorpion-26 avatar Apr 30 '23 22:04 scorpion-26

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

bluebyt avatar Apr 30 '23 23:04 bluebyt

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.

scorpion-26 avatar May 03 '23 16:05 scorpion-26

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.

bluebyt avatar May 03 '23 19:05 bluebyt

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

ThatOneCalculator avatar Nov 22 '23 01:11 ThatOneCalculator