polycore icon indicating copy to clipboard operation
polycore copied to clipboard

Split Widgets into seperate files / modules

Open simotek opened this issue 2 years ago • 4 comments

This will hopefully make them easier to maintain in the long term. The main polycore config all the examples and tests have been updated although the test suite isn't rendering for me. For now the split is as follows, but open to changes and suggestions:

  • widget_core * Widget * Rows * Columns * Filler * Frame
  • widget_cpu
    • Cpu
    • CpuRound * CpuFrequencies
  • widget_drive * Drive
  • widget_gpu
    • Gpu
    • GpuTop
  • widget_graph - This could have a better name * Bar * Graph * LED
  • widget_memory
    • MemoryBar
    • MemoryGrid
  • widget_network * Network
  • widget_text
    • Text
    • StaticText * TextLine

simotek avatar May 01 '23 13:05 simotek

This should probably be accepted after https://github.com/philer/polycore/pull/14 as due to the file add remove etc its already been included.

simotek avatar May 01 '23 13:05 simotek

Nice, I think the splits make sense. I don't like splitting files like this because it completely obscures the git history (I frequently backtrack to understand what I was doing in the past). But I guess by now that file has just gotten way to long.

widget_graph - This could have a better name * Bar * Graph * LED

I agree. How about indicator.lua?

philer avatar May 06 '23 10:05 philer

indicator.lua sounds like good suggestion, i'll add it to tomorrows list.

simotek avatar May 08 '23 12:05 simotek

Changes made, I also included the updates to https://github.com/philer/polycore/pull/14 so they don't get lost.

simotek avatar May 09 '23 02:05 simotek