iconthemeswitcher in lua
Forum: Programming and Scripting
Topic: iconthemeswitcher in lua
started by: jaapz
Posted by jaapz on April 09 2008,21:45hiya,
i figured it would be quite cool when DSL got the ability to switch to a different icon theme. although i do not yet have any different icon theme i could use, i made a script in lua which does what i want.
would someone plz test it on their pc? i tested it here and it works fine for me. dont think some could go wrong anyway, but still it would be nice to be sure...
its not for versions < 4.0 cos this script uses the DFM dir (though the icon dir can be changed in the script itself)
also would be nice when some people made some nice iconthemes xD
heres the code:
Posted by jaapz on April 10 2008,20:28no interest in this at all?
Posted by lucky13 on April 10 2008,20:59Nope. The problem you'll have with this is conforming to a standard icon naming convention between DSL, jwm, and whatever icon sets are chosen. If DSL were to use an icon naming convention adopted by (e.g.) KDE or Gnome (Free Desktop) it might be easier. But with things as they are right now, your script won't do diddly squat unless users change their icon names to match what's already in jwmrc/dfm.
I really don't think most DSL users are all worked up about the aesthetics-thing. Function trumps form. To paraphrase (edit) Rousseau: "Let them dress up Ubuntu."
Posted by lucky13 on April 10 2008,21:28Another thing after looking at the code...
While one certainly can go to /usr/share and first tar then delete the default icons there, it's probably a better idea to add/edit the icon path in jwmrc and the user's dfm config file for new icons. Most apps give precedence to what's in a user's own config files over system config anyway. That would prevent errors if icons are either missing or mis-named. Besides, this isn't Puppy; we don't have to do all this messy root stuff.
Posted by lucky13 on April 11 2008,01:33Finally, I have a better idea if you want to be able to switch out icons like this: UNC. Make a UNC that overlays /usr/share/dfm/icons with the icons you want using the same names of what's already there. That way you use the oversized icons you want without any hassles between jwm and dfm and whatever else leverages those particular icons in the future.
Posted by jaapz on April 11 2008,22:09
of course the icon set used with this iconthemeswitcher should be made ready for DSL, so the theme will contain all icons with the same name as the default ones.
But, if nobody got interest in this, i wont make this script bigger anyway. Good learning again though xD
Posted by roberts on April 12 2008,03:19jaapz wrote:
Glad to see you are learning and writing murgaLua. Not much interest in the icon area, is likely due to lack of many small .xpm icons that DSL uses.
I know that I have asked for some .xpm icons to be contributed and so far, I have received very few.
mikshaw even wrote a really cool icon editor. I would stiil like someone who is artisic to do a database xpm icon.
Posted by jaapz on April 12 2008,21:37roberts, why not post a list of xpm's that have to be made? i'll be glad to make some!
and hows the list of murgaLua gui's that have to be made? also would like to do some of that
but that icon editor, is it iconview.lua? if it is, its not an editor, but it is cool anyway xD
Posted by mikshaw on April 13 2008,00:16You're right, it isn't an editor. But it does launch mtpaint with the selected icon, which is an excellent xpm icon editor. In that sense it is sort of tied into icon editing.
I'm interested in knowing what a "database icon" would be linked to. If it's an icon for the mydsl database, that would be more of a mydsl icon and not too difficult to create, but if it's something more general for applications that use a database, it would be more difficult in my opinion.
Posted by roberts on April 13 2008,03:05Most of the xpm icons are very small - around 1500 or so.
So just doing a ls -Sr /usr/share/dfm/icons will show the fat icons. These could be reduced to save space and probably look nicer too. So here is a list that needs to be reduced or replaced:
Re: The database icon would be generic for sqlite databases.
I have seen "disk-pack" looking icons used or ?
Just note that the icon should look good at dfm 32x32 but also by jwm automatic size reduction used in jwm menu and jwm tray.
Posted by mikshaw on April 13 2008,10:21In other words, stick with simple shapes and lines no smaller than 2-pixels wide. As I noticed with one of my own XPMs, if a 32-px icon gets scaled to 16, 1-px lines will either get horribly mutilated or disappear entirely.
Does that mean a stack of disks or ?
Posted by jaapz on April 13 2008,12:18@mikshaw: I think a database icon won't be too hard to create.
And i'll try too make some nice icons, starting with the console icon
Posted by mikshaw on April 13 2008,13:28
As an example, the first google hit for a database icon reference was this:
< http://www.aha-soft.com/stock-icons/database-icons.htm >
Personally I don't see "database" when I look at these icons....I see an oil drum. But apparently this disk stack concept has somehow come to represent database. Does that mean this representation is accurate?
In my eyes it is one of the biggest problems with an icon-centric desktop. Only after the user learns to associate a given image with a given concept does that image serve a useful purpose, and some concepts are much easier to associate with an image than others.
Posted by lucky13 on April 13 2008,13:42mikshaw:
Concur on the point that a MyDSL icon is probably better than stacked disk icons. Two icons might work, one for the app (MyDSL db Browser) and one for database MIME-type association. The latter is probably easier because it could use an existing icon and edit in SQL/SQLite (or just "db") in place of whatever is on a stock icon -- and then it would stay relatively small in size. The former is still a puzzle unless it's specific to MyDSL. I thought of something like a penguin with a waiter's tray but I would associate that more with some other server application. Plus that would be a bloated icon since it would have too many lines and colors.
Please remember the preference is smaller. The more lines and the more colors, the bigger it will be.:)
Posted by curaga on April 13 2008,14:59I made an executable icon, and reduced colors on the xpdf one. The executable could replace files-yellow-exec.xpm.
< Png previews > (that don't look quite right, seems shareapic crops a bit)
The icons themselves: < http://rapidshare.com/files/107170976/icons.tgz.html >
Posted by roberts on April 13 2008,16:31Thanks curaga! I got them in for the next cut.
mikshaw, you are probably right, the disk-pack shows my age. Most you young'ns would see it as relating to oil. Even more since the price of such is on everyone's mind. But that is another topic not suited to be dicussed here. So... perhaps something with db or sql that looks nice and sizes nice too.