Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[ wip ] Waybar Rework #215

Open
wants to merge 18 commits into
base: master
Choose a base branch
from
Open

[ wip ] Waybar Rework #215

wants to merge 18 commits into from

Conversation

kRHYME7
Copy link
Contributor

@kRHYME7 kRHYME7 commented Feb 6, 2025

Pull Request: Native Waybar Configuration & Enhanced Management

Main Objective:

To provide a more flexible and user-friendly Waybar configuration experience by leveraging native Waybar features and CSS styling, while also offering a robust wrapper script for enhanced management.

Key Features and Benefits:

  • Native Waybar Configuration:

    • Eliminates unnecessary abstractions, allowing users to directly utilize Waybar manpages and documentation.
    • Employs native CSS for dynamic scaling and styling, giving users complete control over visual customization.
    • Supports user-created styles and layouts that can be easily selected.
    • Enables native Waybar menus for improved functionality and integration.
  • Waybar Wrapper Script:

    • Addresses Waybar crashes, icon size adjustments, and other dynamic aspects not yet natively supported.
    • Provides command-line options: --next, --prev, --config, --style, --select, --watch, and --update.
    • Implements --select to launch a Rofi menu for easy layout and style selection.
    • --watch option will relaunch Waybar if killed.

Implemented Features (feat):

  • Style Selection
  • Layout Selection
  • Layout Override via ~/.config/waybar/config
  • Manual Waybar Configuration
  • Extra Group Styling (pill-like groupings/islands)
  • Native Menus
  • Top, Right, Bottom, Left Position Support (using CSS)
  • Dynamic border-radius (according to rounding)
  • Hyprdots Layout and Style Porting

To Do (todo):

  • Waybar selector script
  • Documentation
  • Menu for changing Waybar layout, style, and more
  • Dynamic Shadows (according to compositor)
  • Refinement

Why This Approach?

  • The current Hyprdots Waybar configuration is too restrictive.
  • While a configuration interface like config.ctl is helpful, directly using JSON/CSS offers greater flexibility and creative possibilities. A selector script will compensate for the ease of use of config.ctl by providing a simple way to navigate layouts and styles.
  • This implementation adheres to Waybar documentation and GTK principles, making it easier for users to find solutions and customize their Waybar.

Preview

Available groups that can dynamically scaled across 4 positions

waybar has a selector that determines the bar position.

250204_14h07m26s_screenshot

leaf-reverse

image

leaf

image

pill

image

pill-up pill-left pill-right pill-down

These are the half pill that the curve points to

pill-in pill-out

These are the half pill but the curves always points inner or outer.
image

Menus

image

Known Issues

  1. Image icons won't dynamically scale and should be added in the config.json instead of css.

    To mitigate this, all modules that is using image icons are required to be written as json instead of jsonc. This way the helper script will parse all icon-size key and dynamically scale the icons. This is the cleanest way I know atm.

  2. GTK theming issues. Some gtk themes have a weird border in it. Dunno how to fix yet as the problems are in the gtk theme itself.

feat:
- Style selection
- Layout Selection
- Can override layout by using ~/.config/waybar/config
- Modify waybar manually
-  have extra groups styling, this is the pill like groupings/islands in hyprdots
- menus
- see todos

todo:
- [ ]  Script to handle dynamic stuff
- [ ] Docs
- [ ] Menu to change wayabr layout and style and more++
- [ ] Dynamic borderradisu according to rounding
- [ ] Dynamic shadows according to compositor
- [ ] Port hyprdots and other layouts and style
- [ ] Have fun!

why?
- hyprdots waybar configuration is too limiting.
- Also giving users easy interface like the config.ctl is practically okayish, but learning  json/c a  is much better and opens more window of ideas.  To compensate with that a selector will be used to naviagte through layouts and styles.
- New imple adheres to wayabr documentation and some gtk stuff which you search engine and your A! can answer for you.
Sync any existing files/ files in directories: modules styles layouts menus config.jsonc theme.css style.css
Populates only when missing else preserve  user-style.css
@kRHYME7
Copy link
Contributor Author

kRHYME7 commented Feb 6, 2025

@kRHYME7 kRHYME7 changed the title Waybar Rework [ wip ] Waybar Rework Feb 6, 2025
@dieBakterie
Copy link
Contributor

dieBakterie commented Feb 7, 2025

What's your overall vision and how exactly does the new approach works, do you intend it to work. It's complicate to write docs for something you ain't know how it works...

@kRHYME7
Copy link
Contributor Author

kRHYME7 commented Feb 8, 2025

This PR might be staled until this https://github.com/Alexays/Waybar/issues/3927

I guess I should build this on stable.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants