hello people,
i'm on a (hobby) quest to match all the themes in my desktop (linux) system and could not resist to try if i could add theme support to pd...
attached is my first experiment (theme.patch for current pd git master), that defines colors in tcl/pd_theme.tcl for following initial (as in, only before user select) colors:
before i dig much deeper (and make a branch and all that jazz), i was wondering:
or any other notes/comments/ideas/whishes you have.
cheerio .oskude
ps. the included theme colors are ugly by design, so i can easily spot what has not yet changed. (and the all-the-things.pd is just for testing)
Am 2. Jänner 2021 13:27:05 MEZ schrieb Andre Osku Schmidt andre@osku.de:
hello people,
- is someone working on this already? (i haven't used pd in a
~decade...)
check out: https://github.com/pure-data/pure-data/pull/196
mfg.hft.fsl IOhannes
On Sat, 02 Jan 2021 14:47:53 +0100 IOhannes m zmölnig zmoelnig@iem.at wrote:
Am 2. Jänner 2021 13:27:05 MEZ schrieb Andre Osku Schmidt andre@osku.de:
hello people,
- is someone working on this already? (i haven't used pd in a
~decade...)
but of course, i remember now... >.<*
well, at least i "learned" couple things while re-inventing the wheel ;P
sorry but i could not follow the hundreds of comments in that pull-request, what is there still todo?
fwiw, i agree that the scope should be kept minimal (i would even go as far as to not change tk(k) theme colors (it currently overwrites my tk(k) theme colors used by pd-window "terminal". but ultimately i don't actually care where i need to change the colors...))
not sure if i should comment on that pull-request that my "end-goal" would be to load the colors from system theme in /etc/whatever (and i assume some would like to load from ~/whatever & other os system/user config paths). and while i was doing my experiment, the "pkgIndex way" felt like a good place to add this new tcl code?
so maybe that pull-request could/should add the colors to tcl/pd_colors.tcl (or something, but instead tcl/pd-gui.tcl) and the system/user theme loading code could then later be added there?
but i don't actually know what i'm talking about, and mostly go by trial-and-error and "feel", so...
fwiw, i'll now keep using this pull-request (in case the merge is waiting for bug testing). it at least changes all the (and more) colors i need, cool!
cheerio .oskude
The pr should be good to go, maybe it should be consolidated it into fewer commits and some whitespace issues could be fixed but other than that I think all of the requested changes have been made..In order to set the array element colors there had to be some odd workaround in g_templateand g_array (setting the scalar color to a negative value will use the set tcl variable) But I think if you want system colors you might be able to set them from tcl variables that correspond to system themes. Idk that much about x11 but on aqua and windows there are colors like systemHighlight that correspond to system theme colors. I think on x11 the way to do it might be through setting .Xresources/.Xdefaults and xrdb, then perhaps you can get the tcl color variables by getting the option? (with the tk "option get" command) basically, if there is a way to get system colors stored in some system config/theme file/database from within tk then we can do that within the tcl-plugin file that we're using to set the color variables anyways. -seb -----Original Message----- From: Andre Osku Schmidt andre@osku.de To: pd-list@lists.iem.at Sent: Sat, Jan 2, 2021 3:17 pm Subject: Re: [PD] theme all the things
On Sat, 02 Jan 2021 14:47:53 +0100 IOhannes m zmölnig zmoelnig@iem.at wrote:
Am 2. Jänner 2021 13:27:05 MEZ schrieb Andre Osku Schmidt andre@osku.de:
hello people,
- is someone working on this already? (i haven't used pd in a
~decade...)
but of course, i remember now... >.<*
well, at least i "learned" couple things while re-inventing the wheel ;P
sorry but i could not follow the hundreds of comments in that pull-request, what is there still todo?
fwiw, i agree that the scope should be kept minimal (i would even go as far as to not change tk(k) theme colors (it currently overwrites my tk(k) theme colors used by pd-window "terminal". but ultimately i don't actually care where i need to change the colors...))
not sure if i should comment on that pull-request that my "end-goal" would be to load the colors from system theme in /etc/whatever (and i assume some would like to load from ~/whatever & other os system/user config paths). and while i was doing my experiment, the "pkgIndex way" felt like a good place to add this new tcl code?
so maybe that pull-request could/should add the colors to tcl/pd_colors.tcl (or something, but instead tcl/pd-gui.tcl) and the system/user theme loading code could then later be added there?
but i don't actually know what i'm talking about, and mostly go by trial-and-error and "feel", so...
fwiw, i'll now keep using this pull-request (in case the merge is waiting for bug testing). it at least changes all the (and more) colors i need, cool!
cheerio .oskude
Pd-list@lists.iem.at mailing list UNSUBSCRIBE and account-management -> https://lists.puredata.info/listinfo/pd-list
On Sun, 3 Jan 2021 04:55:07 +0000 (UTC) Sebastian Shader sebfumaster@aol.com wrote:
Idk that much about x11 but on aqua and windows there are colors like systemHighlight that correspond to system theme colors. I think on x11 the way to do it might be through setting .Xresources/.Xdefaults and xrdb
i know that we can set new names (for colors) in xrdb, but can we do it on osx and ms-windows? (i doubt a general theme will have enough colors/names for all use-cases, so we need new names)
i know that we can use multiple files with xrdb, but can we do it on osx and ms-windows? (the bigger (as in scope) a file grows, the harder it gets to manage it)
but xrdb is sadly only used by old/legacy apps and almost no new app since a long while now uses it...
therefor i was planning on doing the "compromise standard", that every app/toolkit has its own theme/color/config file and the app manages its handling. so for pd, something like:
and the load order would be the "standard" (latter overwrites previous):
if this feature is not needed/wanted in vanilla pd, then i would like the included/default colors in pd to be in an own file (instead in pd-gui.tcl) so i can simply overwrite that file in my system after installing pd package. :P
but in any case, thank you for doing all the hard work to get custom colors in pd! (that white pd-patch background was blowing my eyes in my dim-lit studio)
cheerio .oskude
ps. on a funny side-note, i am experimenting to see if i can (as in will it be feasible to me) color my whole linux system (from linux console to last app) with just 8(16) colors (cause thats the default of linux console) :D
well, the way that the tk handles this kind of thing is generally the "options" database. The way you would do it with this pr would be to set the colors using a .tcl file in the pd path, which hypothetically already has system, user, and app-specific paths. It wouldn't be any more complex than any other kind of "configuration" file (see the last uncommented part of doc/7.stuff/colors-plugin.txt for an example. saved with the extension .tcl and put into the pd path this acts to set the various colors to override the defaults) I suppose I'm not sure what you're after.. if you want some kind of system-wide configuration/theme to apply to the colors then you might be able to do it with tcl options and xrdb, and on windows and mac there exist tk color names to access system themes. Otherwise, if you want app-specific configuration files/paths for colors then the .tcl plugin file in conjunction with the standard pd paths is pretty much that. (not sure about load order though) so the way to override the default colors is to put a -plugin.tcl file in the pd path, not change the values in pd-gui.tcl -seb -----Original Message----- From: Andre Osku Schmidt andre@osku.de Sent: Sun, Jan 3, 2021 3:59 am
On Sun, 3 Jan 2021 04:55:07 +0000 (UTC) Sebastian Shader sebfumaster@aol.com wrote:
Idk that much about x11 but on aqua and windows there are colors like systemHighlight that correspond to system theme colors. I think on x11 the way to do it might be through setting .Xresources/.Xdefaults and xrdb
i know that we can set new names (for colors) in xrdb, but can we do it on osx and ms-windows? (i doubt a general theme will have enough colors/names for all use-cases, so we need new names)
i know that we can use multiple files with xrdb, but can we do it on osx and ms-windows? (the bigger (as in scope) a file grows, the harder it gets to manage it)
but xrdb is sadly only used by old/legacy apps and almost no new app since a long while now uses it...
therefor i was planning on doing the "compromise standard", that every app/toolkit has its own theme/color/config file and the app manages its handling. so for pd, something like:
- (and the same on other operatingsystem, if they have such standard paths)
- (and the same on other operatingsystem, if they have such standard paths)
and the load order would be the "standard" (latter overwrites previous):
if this feature is not needed/wanted in vanilla pd, then i would like the included/default colors in pd to be in an own file (instead in pd-gui.tcl) so i can simply overwrite that file in my system after installing pd package. :P
but in any case, thank you for doing all the hard work to get custom colors in pd! (that white pd-patch background was blowing my eyes in my dim-lit studio)
cheerio .oskude
ps. on a funny side-note, i am experimenting to see if i can (as in will it be feasible to me) color my whole linux system (from linux console to last app) with just 8(16) colors (cause thats the default of linux console) :D