Jas-SinghFSU / HyprPanel

A Bar/Panel for Hyprland with extensive customizability.
MIT License
964 stars 68 forks source link

Bar module custom icons #268

Open paiyayay opened 2 months ago

paiyayay commented 2 months ago

Is your feature request related to a problem? Please describe. It would be cool to configure icons of the battery, bluetooth, wifi, sound to our liking. Right now only date (clock) icon can be set.

Describe the solution you'd like Additional menu items to set icons. Like probably battery needs 5ish icons, sound 3 icons. The waybar way.

Describe alternatives you've considered Straight forward.

Additional context None

rubiin commented 1 month ago

Also @Jas-SinghFSU is there a way to define a module yourself. User custom module

rubiin commented 1 month ago

Maybe we can break this into multiple features:

paiyayay commented 1 month ago

Also @Jas-SinghFSU is there a way to define a module yourself. User custom module

there are custom modules but this feature should use the ones that are stock. and give more customizablity.

rubiin commented 1 month ago

image

image

Regarding icons, we should allow a field to specify comma separate values similar to waybar as on the above screenshot while preserving the current as default

paiyayay commented 1 month ago

this will make it a true waybar replacement

rubiin commented 1 month ago

@Jas-SinghFSU what do you think ? should we use object or array like the above for things like volumes, bluetooth?

Jas-SinghFSU commented 1 month ago

How does Waybar determine which icon to view? For instance, I see 9 in the format-icons array but which value determines when to display it?

paiyayay commented 1 month ago

i think most reasonable function is like this: divide 100 by list length and give the corresponding icon by that value. for example 100 divided by 10 is 10, this means if the battery percentage is 35 we get the 4th element.

step = 100 / icon_array.length

icon_array[ battery_percentage // step ]

// is no remainder division operator

rubiin commented 1 month ago

for volume it would work. But for bluetooth and other modules that only have two states (on and off), it would create a confusion on UX

paiyayay commented 1 month ago

we can leave a note under the icon list input field. says first element = off, second element = on or something.

then I guess take the boolean value of the bluetooth for example get icon_list[bluetoothIsOn]

rubiin commented 1 month ago

I guess we can do something like this with instruction on label

    ["icon1","icon2","icon2","icon3","icon4"] with label as [20%, 30%, 50%, 80%, 100%]

        ["icon1","icon2"]   with label [on, off]
Jas-SinghFSU commented 3 weeks ago
[
  ["icon1", "on"],
  ["icon2", "off"],
]

I think this would make more sense.