GithubHelp home page GithubHelp logo

philer / polycore Goto Github PK

View Code? Open in Web Editor NEW
79.0 3.0 5.0 5.34 MB

A conky config and library of Lua widgets

Home Page: https://philer.github.io/polycore

License: MIT License

Lua 100.00%
conky conky-theme conky-widget lua cairo lua-widgets conkyrc drive-temperature widgets cpu

polycore's Issues

Missing License file.

Hi,
I'd like to include this as part of a distro so its easier for more people to use, If your generally reasonably happy for people to use the lua code however then the MIT license is a good simple solution that's used with a number of other configs. All you'd need to do is copy the license text from here https://opensource.org/licenses/MIT into a copying or license file or maybe tot he bottom of your ReadMe.md if your happy with it, or pick any one of a number of other different licenses.

Significantly Expanding Polycore.

Firstly, I think its worth explaining what i'm trying to solve, then how i'd like to adapt Polycore to solve these issues.

Currently I am looking at Conky from the perspective of a distro maintainer trying to provide the best possible out of the box experience when running Conky with a "Default" config. Currently there are three major issues with upstream Conky that I am trying to address, firstly the current conky config cannot adapt automatically to different system setups ie the number of CPU Cores, where drives are mounted, Network interface names etc. The second major issue I see is the out of the box styling is very dated and there are much better options out there. Thirdly if you want to do a custom config / layout its really painful in upstream conky.

I think the best solution to all of these issues is moving to a 100% lua based config. With that in mind I think that Polycore already solves 3 really well and with brndnmtthws/conky#1501 fixing the Lua text rendering issues when it is accepted I think it would be possible to move Polycore to 100% lua config. Polycore also can be adapted to help resolve the first issue by creating more advanced / higher level widgets that autodetect hardware where possible.

In terms of look Polycore already provides a great option, but i'd like to extend it with more inspired from

Once I have some of this done id like to approach other theme developers along with upstream about working together to create a more lua based "2.0 Config" for conky so we can all collaborate together in the same place, either in the upstream conky repo if they are happy with that or in some other form of "conky extended" repo. Long term I might even add a graphical tool for generating configs.

This is obviously a lot of new work so my first obvious question for you is would you like to be involved? and if so to what extent, for example I have a couple of small improvements to the core of your widget system and I could just send those as PR's or as I develop new widgets / modify the current widgets to use the new text rendering API I could send those, I guess the question is at the moment would you like me to send you everything? just the stuff that will make your Polycore theme function better or nothing? and I'll just keep working out of my repo.

I probably have other new questions around design / structure as well, an initial one being that having all the widgets in a single directory probably won't scale so i'm thinking of splitting them into lower level "Core" Widgets, text, graph etc and higher level based on type such as CPU Memory etc. and i'd like to know your thoughts on that if the answer to the previous question was keep sending stuff.

Thanks again for all the work you've put into polycore, initially when I started looking at doing this I thought i'd have to write my own widget and layout system.

Simon

Tests failing on Manjaro Linux.

I really like the look of the Polycore graph, but have been unable to get it to work. I have removed any of the nvidia / drive sections. I did not modify the core count, and have more than 6 cores, in case that makes a difference.

Linux version: 5.4.0-2-MANJARO (Manjaro Testing Branch)
Conky version: 1.11.3 (conky-lua from AUR)

conky -c test/test_util.lua

test clamp passed
test CycleQueue passed

conky -c test/test_layout.lua

test columns passed
test frame passed
test/test_layout.lua:58: render of at /tmp/conky_test.png does not match expected result at test/expected_outputs/complex_layout.png
stack traceback:
	test/test_layout.lua:190: in function 
	[C]: in function 'assert'
	test/test_layout.lua:58: in upvalue 'check_renderer'
	test/test_layout.lua:178: in function 
	[C]: in function 'xpcall'
	test/test_layout.lua:197: in function 'conky_update'
test complex_layout failed
test group passed

conky -c conkyrc.lua

conky: desktop window (400010) is subwindow of root window (6b4)
conky: window type - normal
conky: drawing to created window (0x2c00002)
conky: drawing to double buffer
./layout.lua:25: invalid value (nil) at index 3 in table for 'concat'
stack traceback:
	./src/polycore.lua:50: in function <./src/polycore.lua:49>
	[C]: in function 'table.concat'
	./layout.lua:25: in method 'update'
	./src/widget.lua:138: in method 'update'
	./src/polycore.lua:30: in function <./src/polycore.lua:25>
	[C]: in function 'xpcall'
	./src/polycore.lua:60: in function 'conky_update'

The stack traceback repeats every 1 second, which makes sense given the update timer.

Note: if I used window_type override I get a completely different error, but I think that is from this conky issue: brndnmtthws/conky#424

Conky does not start using polycore conkyrc.lua

Hello there,
I'm having this error:

conky -c ~/.config/conky/polycore/conkyrc.lua -DDD
DEBUG(0) [/build/conky-USSzL9/conky-1.10.8/src/conky.cc:2740]: reading contents from config file '/home/blitux/.config/conky/polycore/conkyrc.lua'
DEBUG(0) [/build/conky-USSzL9/conky-1.10.8/src/x11.cc:494]: Fixed xinerama area to: 0 0 1920 1080
DEBUG(0) [/build/conky-USSzL9/conky-1.10.8/src/x11.cc:494]: Fixed xinerama area to: 0 0 1920 1080
conky: desktop window (1800011) is subwindow of root window (4db)
DEBUG(0) [/build/conky-USSzL9/conky-1.10.8/src/x11.cc:631]: Found ARGB Visual
conky: window type - override
conky: drawing to created window (0x6400002)
X Error of failed request:  BadMatch (invalid parameter attributes)
  Major opcode of failed request:  1 (X_CreateWindow)
  Serial number of failed request:  135
  Current serial number in output stream:  139

I just removed the mounts part and nvidia related stuff on both, layout.lua and conkyrc.lua.

This is my conky version (installed with sudo apt install conky-all on elementary os 5.1.4 Hera):

conky -v                                          
conky 1.10.8 compiled Wed Feb 28 17:11:42 UTC 2018 for Linux 4.4.0-101-generic x86_64

Compiled in features:

System config file: /etc/conky/conky.conf
Package library path: /usr/lib/conky


 General:
  * math
  * hddtemp
  * portmon
  * IPv6
  * Curl
  * RSS
  * Weather (METAR)
  * Weather (XOAP)
  * wireless
  * support for IBM/Lenovo notebooks
  * nvidia
  * eve-online
  * builtin default configuration
  * old configuration syntax
  * Imlib2
  * apcupsd
  * iostats
  * ncurses
  * Internationalization support
  * PulseAudio

 Lua bindings:
  * Cairo
  * Imlib2
  * RSVG
 X11:
  * Xdamage extension
  * Xinerama extension (virtual display)
  * Xshape extension (click through)
  * XDBE (double buffer extension)
  * Xft
  * ARGB visual
  * Own window

 Music detection:
  * Audacious
  * MPD
  * MOC
  * XMMS2

 Default values:
  * Netdevice: eth0
  * Local configfile: $HOME/.conkyrc
  * Localedir: /usr/share/locale
  * Maximum netdevices: 64
  * Maximum text size: 16384
  * Size text buffer: 256

Any clues of what is failing? Thanks!

conky: X Error: type 0 Display

Hi,

Your conky setup is awesome, thanks for it!
I'm trying to use it on Solus Linux (conky version - 1.11.5), but:

 conky -c conkyrc.lua 
conky: desktop window (160004d) is subwindow of root window (1f0)
conky: window type - override
conky: drawing to created window (0x4a00002)
conky: X Error: type 0 Display 23ef1d0 XID 23068749 serial 135 error_code 8 request_code 1 minor_code 0 other Display: 23ef1d0

Aborted

Would you be so kind to help me fixing it ?

Best Regards,
PY

Unexpected right margin not filled in by frame

I've been trying to use Polycore to replicate an existing setup I have that makes use of a Lua script to draw boxes (it's quite old, but I think I initially took the code from here.

My initial experimentation seems to be stuck because I'm trying to draw a text widget in a frame to fill the entire width - but it seems to leave 12 pixels on the right. While the settings for Conky specify a maximum width of 200, if I I print out the value of conky_window.width in cairo_helpers.create_cr, it prints out a value of 212. text_width is 200.

I don't know where the extra 12 pixels are coming from - I don't mind necessarily that it's bigger than I expected (I'm sure that's a Conky decision rather than a Polycore one), it would be good if Polycore could fill in the entire size of the Conky window. I know it must be doable (I don't have the same problem with the existing Lua script I use), but I can't figure out how to get Polycore to do it.

I've included a screenshot of what I'm getting, and a stripped down version of the text.lua example that produces it. Any idea how I could achieve what I'm after (either by stripping out those 12 pixels, or getting Polycore to fill it)?

Screenshot from 2023-02-09 13-54-39
baretext.lua.txt

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.