Puppy Linux Discussion Forum Forum Index Puppy Linux Discussion Forum
Puppy HOME page : puppylinux.com
"THE" alternative forum : puppylinux.info
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

The time now is Thu 23 Nov 2017, 13:01
All times are UTC - 4
 Forum index » House Training » Users ( For the regulars )
Folder icons with a green dot. How to do it?
Moderators: Flash, Ian, JohnMurga
Post new topic   Reply to topic View previous topic :: View next topic
Page 2 of 2 [25 Posts]   Goto page: Previous 1, 2
Author Message
amigo

Joined: 02 Apr 2007
Posts: 2614

PostPosted: Sun 05 Nov 2017, 12:15    Post subject:  

Sorry -sort of. That's something new, I believe in newer versions of rox than the one I use and have studied the sources.

Anyway, xattr (extended attributes) support is filesystem-dependent. Not all FS's support it, and not all software will use it. attr and xattr libraries may be hard requirements of some basic system software, likeacl, fdisk, extfs-tools and others, so they may be present and necessary on your system.

For changing normal attributes, use the tool 'attr', 'getfattr' and 'setfattr'. I'll speculate that 'xattr' & Co. is what you are looking for.

I'm pretty sure that anything on an sfs -which is much of P, will not support this, but try and tell us what happens.

You could also use mount to 'bind' those dirs so rox would see them as mount points and use dots. You could also create a .DirIcon (hidden *.png or *.xpm) inside the directory which will make it display any image you like. For anything more then you'd need to make the dir into a ROX AppDIr -with an icon, an AppInfo.xml and an AppRun script (which could even be a dummy).
Back to top
View user's profile Send private message 
fernan

Joined: 23 Jan 2007
Posts: 372
Location: Buenos Aires

PostPosted: Sun 05 Nov 2017, 13:34    Post subject:  

What I'd like to do is the same I do in OSX, to have different folder colors to choose and organize things. Perhaps the ".Diricon" file is the easiest way, just taking the time to make colored icons once, and then choose them from the "Set icon" contextual menu.
Back to top
View user's profile Send private message 
step

Joined: 04 May 2012
Posts: 950

PostPosted: Sun 05 Nov 2017, 17:35    Post subject:  

fernan wrote:
What I'd like to do is the same I do in OSX, to have different folder colors to choose and organize things. Perhaps the ".Diricon" file is the easiest way, just taking the time to make colored icons once, and then choose them from the "Set icon" contextual menu.
Indeed, .DirIcon is the way to do colorful icon folders in rox. I suggest that you create a master folder with all your icons, then for each folder that should show a different icon symlink its .DirIcon to a suitable icon in the master folder.
Code:

master/
├── blue.png
└── red.png
project_1
└── .DirIcon -> ../master/red.png
project_2
└── .DirIcon -> ../master/blue.png
project_3
└── .DirIcon -> ../master/red.png

The example above shows relative links, but most likely you will find that absolute links are more manageable, i.e.
Code:

/root/master
├── blue.png
└── red.png
/root/project_1
└── .DirIcon -> /root/master/red.png
/root/project_2
└── .DirIcon -> /root/master/blue.png
/root/project_3
└── .DirIcon -> /root/master/red.png

If you really want color dots, draw red.png and blue.png as regular folder icons with a color dot. You can draw anything you want.

Back to your last xattr question, you can't use xattrs to display specific rox emblems. All you can do is to show the rox-xattr.png emblem. That's it. Just set _any_ xattr and rox will display the rox-xattr.png emblem on the regular file/folder icon. Remove _all_ xattrs for the file/folder and rox will hide the emblem.

Emblems aren't a substitute for .DirIcons. They look different and serve a different purpose.

_________________
Fatdog64-710|+Packages|Kodi|Findnrun|+forum|gtkmenuplus
Back to top
View user's profile Send private message 
fernan

Joined: 23 Jan 2007
Posts: 372
Location: Buenos Aires

PostPosted: Sun 05 Nov 2017, 22:37    Post subject:  

Changed the color of one Rox icon, saved as png with a different name, and tried to use it as .DirIcon, but it doesn't work.

Do I need some specific way to save the png file? I simply edited an existing Rox icon file, 48x48 pix, changed the color in Mtpaint, and "saved as" with a new name.
Back to top
View user's profile Send private message 
MochiMoppel


Joined: 26 Jan 2011
Posts: 1392
Location: Japan

PostPosted: Sun 05 Nov 2017, 23:20    Post subject:  

fernan wrote:
Changed the color of one Rox icon, saved as png with a different name, and tried to use it as .DirIcon, but it doesn't work.
Should work with any png file. How did you do it? If you use the context menu and choose "Copy image into directory" it should place a copy of your edited image, already renamed to .DirIcon, into the selected directory. The only time when this does not work for me is when I try to "diriconify" a mount point. The directory icon would not change. May be a bug. However what always works is to use the option "Only for the file <directory name>". This method does not place any icon file into the marked directory. Some advantages over .DirIcons, some disadvantages, eventually depends on your needs
Back to top
View user's profile Send private message 
amigo

Joined: 02 Apr 2007
Posts: 2614

PostPosted: Mon 06 Nov 2017, 05:23    Post subject:  

May be a bug. It's a feature, I'd say. I mean, it's just one of those things that rox does arbitrarily, like setting the text-color to green for any executables.
Back to top
View user's profile Send private message 
fernan

Joined: 23 Jan 2007
Posts: 372
Location: Buenos Aires

PostPosted: Mon 06 Nov 2017, 08:32    Post subject:  

I have the PNG, set the icon from the contextual menu, the image is copied into the dir, but the icon doesn't change. Restarted the system a couple of times since yesterday, no change, the .DirIcon file is there, but the icon doesn't change.

I'll forget about this. Too complex just to change one icon, I can't imagine how complex will be to mark folders with colors.
This is the image in question: (I removed the dot at the beginning of the name and added png extension to avoid problems when uploading the file)
DirIcon.png
 Description   
 Filesize   4.49 KB
 Viewed   43 Time(s)

DirIcon.png

Back to top
View user's profile Send private message 
MochiMoppel


Joined: 26 Jan 2011
Posts: 1392
Location: Japan

PostPosted: Mon 06 Nov 2017, 09:31    Post subject:  

fernan wrote:
I have the PNG, set the icon from the contextual menu, the image is copied into the dir, but the icon doesn't change.
Works fine for me. Check directory /usr/local/apps. If the ROX apps in this directory display their .DirIcons your icon should work.
Quote:
I'll forget about this. Too complex just to change one icon, I can't imagine how complex will be to mark folders with colors.
There is nothing complex about it and a very simple script could make it painless. 1) Select directories you want to mark and 2) drag them to a desktop icon, representing your DirIcon. That's all. Provided of course that your ROX-Filer works as expected.
diricons.png
 Description   
 Filesize   48.84 KB
 Viewed   31 Time(s)

diricons.png

Back to top
View user's profile Send private message 
fernan

Joined: 23 Jan 2007
Posts: 372
Location: Buenos Aires

PostPosted: Mon 06 Nov 2017, 10:24    Post subject:  

It seems the icon works on some folders, but not on others:

In /root, i could change one folder, but in /mnt/home/Sync, not. The 2 dirs with BOLD have the icon changed, .DirIcon file inside, but not shown.

Never mind, I'll leave it alone, spent too many time already for this simple task.
capture17394.png
 Description   
 Filesize   51.1 KB
 Viewed   27 Time(s)

capture17394.png

capture16501.png
 Description   
 Filesize   53.3 KB
 Viewed   24 Time(s)

capture16501.png

Back to top
View user's profile Send private message 
belham2

Joined: 15 Aug 2016
Posts: 1305

PostPosted: Wed 08 Nov 2017, 14:42    Post subject:  

I just wanted to say "thanks" for this thread, and 'thank you' to Step and Mochi for explaining about .DirIcons.

I never realized it was this easy to set them up. My first experience doing it, inside my Green Machine (peebee's latest Artfulpup).
dirIcons-root-and-all-folders.png
 Description   
 Filesize   86.54 KB
 Viewed   12 Time(s)

dirIcons-root-and-all-folders.png

Back to top
View user's profile Send private message 
Display posts from previous:   Sort by:   
Page 2 of 2 [25 Posts]   Goto page: Previous 1, 2
Post new topic   Reply to topic View previous topic :: View next topic
 Forum index » House Training » Users ( For the regulars )
Jump to:  

You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You can download files in this forum


Powered by phpBB © 2001, 2005 phpBB Group
[ Time: 0.0475s ][ Queries: 12 (0.0053s) ][ GZIP on ]