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 Tue 21 Nov 2017, 19:25
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 1 of 2 [25 Posts]   Goto page: 1, 2 Next
Author Message
fernan

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

PostPosted: Thu 02 Nov 2017, 16:35    Post subject:  Folder icons with a green dot. How to do it?
Subject description: I'd like to add some mark as "dropbox" does to the folders.
 

Hello. In ROX filer, I wonder if there is some easy way to "mark" folders with colors, like in the Dropbox folder I have, the sync. items are marked with a green dot, even if I move the folders to another directory, the icon keeps that green dot.

I'm running tharpup and the default file manager.
Back to top
View user's profile Send private message 
Mike Walsh


Joined: 28 Jun 2014
Posts: 3143
Location: King's Lynn, UK.

PostPosted: Thu 02 Nov 2017, 18:57    Post subject:  

Hallo, fernan.

Mm. Well, I'm no expert in this.....but I believe you would need to have something like the transparent overlay that goes over your 'home' partition (to be found in /usr/local/lib/X11/pixmaps - with the little house icon in the top-right corner) and then 'link' that to each folder that's marked as being a Dropbox-synced folder).

The icon's easy enough to do. Just copy, then modify the icon marked 'locked_outline48.png' with something like mtPaint (which can work with SVG transparent images). You'd need to remove the house image, and then add a green dot (or whatever you want to use for the 'synced' folders. Then give it a unique name (something like, oh, I don't know.....'dropbox_marker48.png', perhaps)..?

The '48' identifier is simply because ROX automatically resizes standard system icons to 48x48 pixels...

The tricky part would be how to 'add' this to the 'synced' folder's icons. A script would be needed to identify these (linked somehow to the Dropbox config file, I would guess), so that it would 'stick' to them, even when moved around in the file-system. And that's the part I can't help with, I'm afraid. I wouldn't even know where to start... Laughing

But that's how I would tackle it, personally. It's quite possible somebody else can think of a simpler solution than mine. Hang in there. We'll probably think of something..!


Mike. Wink

_________________
If I've helped you.....please say 'Thanks'!
MY PUPPY PACKAGES
--------------------------------------


Last edited by Mike Walsh on Thu 02 Nov 2017, 20:04; edited 1 time in total
Back to top
View user's profile Send private message Visit poster's website 
fernan

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

PostPosted: Thu 02 Nov 2017, 19:43    Post subject:  

Hello Mike.

What I tried to ask, was to do what "Dropbox" already does. The syncronyzed files and folders are marked automatically with that green dot. I think if we could see how this is done, we could "mark" folders by hand, as you do in Mac OSX, with colored dots.
capture32535.png
 Description   
 Filesize   24.92 KB
 Viewed   180 Time(s)

capture32535.png

capture923.png
Description 
png

 Download 
Filename  capture923.png 
Filesize  51.95 KB 
Downloaded  13 Time(s) 
Back to top
View user's profile Send private message 
Mike Walsh


Joined: 28 Jun 2014
Posts: 3143
Location: King's Lynn, UK.

PostPosted: Thu 02 Nov 2017, 19:54    Post subject:  

Hi again, fernan.

Upon reflection, there is another method you could use. It's not so obvious (no 'green dots'), but it would keep all your Dropbox-synced folders together in one place.....and you would know which they are.

It's one I use myself for the Syncthing local file-syncing application I use on my small LAN. You would put all your Dropbox folders into a 'common' folder (marked 'Dropbox', obviously), which can then be placed at /mnt/home. Or better still, on a separate DATA partition (if you use one). Or, even better, on a flash-drive, plugged permanently into your computer, and set to auto-mount at boot.

You'd then sym-link these into /root. That way, Puppy would 'see' them', but they wouldn't be filling up your save-file/folder. You could then re-name the sym-links with a '-D', or '(D)', or something similar, at the end of the name, in /root. (You can do this with sym-links, without it affecting the name of the item it's linked to).

For instance, 'my-documents(D)'.

'Downloads(D)'.

Etc., etc.

Not perhaps such an elegant solution, but it wouldn't need all that messing around with the icons, nor require new scripts to be created (or existing ones modified).....and could be implemented fairly quickly & simply.

Just an idea.....


Mike.

_________________
If I've helped you.....please say 'Thanks'!
MY PUPPY PACKAGES
--------------------------------------

Back to top
View user's profile Send private message Visit poster's website 
Mike Walsh


Joined: 28 Jun 2014
Posts: 3143
Location: King's Lynn, UK.

PostPosted: Thu 02 Nov 2017, 20:02    Post subject:  

fernan wrote:
Hello Mike.

What I tried to ask, was to do what "Dropbox" already does. The syncronyzed files and folders are marked automatically with that green dot. I think if we could see how this is done, we could "mark" folders by hand, as you do in Mac OSX, with colored dots.


Mm. Oh, I grant you, it looks simple enough.....but I can almost guarantee it'll require modifications to existing scripts, plus the use of icon 'overlays'.

In your ROX screenshot, you say Dropbox is already doing that.....automatically? In that case, I'm a wee bit lost; what exactly is it that you want to do, again?


Mike. Wink

_________________
If I've helped you.....please say 'Thanks'!
MY PUPPY PACKAGES
--------------------------------------

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

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

PostPosted: Fri 03 Nov 2017, 07:51    Post subject:  

Hello.

I'd like to "mark" folders with the file manager, outside the "Dropbox" folder. Since Dropbox software does it automatically, I think it's possible to do it by hand on other files and folders.

I'd like to know how this is done by Dropbox, to see a way to implement it. As said , this marked files keep the green dot even when moved outside the original folder to any other place in the filesystem.
Back to top
View user's profile Send private message 
MochiMoppel


Joined: 26 Jan 2011
Posts: 1392
Location: Japan

PostPosted: Fri 03 Nov 2017, 08:08    Post subject:  

fernan wrote:
The syncronyzed files and folders are marked automatically with that green dot. I think if we could see how this is done, we could "mark" folders by hand
It appears that these tiny green dots are automatically applied by ROX-Filer to directories/files that have extended attributes set. I've never seen these dots, mainly because my filesystem does not support extended attributes and I can't verify which, if any, attributes trigger these dots.

ROX stores its overlay icons in /usr/local/apps/ROX-Filer/images and rox-xattr.png would be the one you are interested in. More common are rox-mounted.png or symlink.png. ROX lays these icons over icons representing files of certain mime types. If you change these overlay icons to bigger icons, ROX will scale them down so that they don't cover the underlying main icons. You need to restart ROX to see the effects. I don't know dropbox, but I assume that it makes use of extended attributes and that ROX consequently adds the dots. You could experiment with extended attributes (using chattr ) and see if ROX reacts or you could use lsattr to examine the attributes of your "dotted" files.

A completely different approach would be to "mark" directories (not regular files) with special icons. A .DirIcon file would have to be added to each directory. This would be relatively easy and more flexible but would require some scripting.
ROX_compound_icons.png
 Description   
 Filesize   70.74 KB
 Viewed   140 Time(s)

ROX_compound_icons.png

Back to top
View user's profile Send private message 
Mike Walsh


Joined: 28 Jun 2014
Posts: 3143
Location: King's Lynn, UK.

PostPosted: Fri 03 Nov 2017, 16:10    Post subject:  

@MochiMoppel:-

MochiMoppel wrote:
ROX stores its overlay icons in /usr/local/apps/ROX-Filer/images and rox-xattr.png would be the one you are interested in.


Interesting. I'm currently in Tahr64.....and the directory you mention doesn't even exist. In /usr/local/apps are the app-links.....and nothing else. There is no directory titled 'ROX-Filer'(just a ROX-Filer runlink), so.....where might these overlays be hiding in Tahr64?

In fact, I can'r discover this particular directory in a single one of more than 10 Pups.....with the exception of Tahr 32 (but there's no 'images' there.) Are you sure your location's correct, Mochi?

(Hm. Even more curious; what the hell is 'quickpet_precise' doing in Tahr64's /usr/local directory? What on earth did Phil do here?)


Mike. Confused

_________________
If I've helped you.....please say 'Thanks'!
MY PUPPY PACKAGES
--------------------------------------

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

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

PostPosted: Fri 03 Nov 2017, 16:38    Post subject:  

Mike Walsh wrote:
@MochiMoppel:-

MochiMoppel wrote:
ROX stores its overlay icons in /usr/local/apps/ROX-Filer/images and rox-xattr.png would be the one you are interested in.


Interesting. I'm currently in Tahr64.....and the directory you mention doesn't even exist. In /usr/local/apps are the app-links.....and nothing else. There is no directory titled 'ROX-Filer'(just a ROX-Filer runlink), so.....where might these overlays be hiding in Tahr64?

In fact, I can'r discover this particular directory in a single one of more than 10 Pups.....with the exception of Tahr 32 (but there's no 'images' there.) Are you sure your location's correct, Mochi?

(Hm. Even more curious; what the hell is 'quickpet_precise' doing in Tahr64's /usr/local directory? What on earth did Phil do here?)


Mike. Confused


You need to "right click" on the directory titled 'ROX-Filer', and choose "look inside".
Back to top
View user's profile Send private message 
Mike Walsh


Joined: 28 Jun 2014
Posts: 3143
Location: King's Lynn, UK.

PostPosted: Fri 03 Nov 2017, 16:49    Post subject:  

Well, I'll be damned.

I never even knew you could do that with a run-link. Unless ROX's is unique in that respect.....

That's summat I've learnt today! I stand corrected, Mochi...


Mike. Wink

_________________
If I've helped you.....please say 'Thanks'!
MY PUPPY PACKAGES
--------------------------------------

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

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

PostPosted: Fri 03 Nov 2017, 18:02    Post subject:  

there are some folders in Mac OSX that work the same. An action when you click, but you have the opttion to "look inside".
Back to top
View user's profile Send private message 
MochiMoppel


Joined: 26 Jan 2011
Posts: 1392
Location: Japan

PostPosted: Fri 03 Nov 2017, 20:10    Post subject:  

fernan wrote:
You need to "right click" on the directory titled 'ROX-Filer', and choose "look inside".
...or Shift+click
Back to top
View user's profile Send private message 
step

Joined: 04 May 2012
Posts: 950

PostPosted: Sun 05 Nov 2017, 05:07    Post subject:  

Adding to MochiMoppel's info, extended attributes can refer to ext2 file system attributes (man lsattr) and, confusingly, extended attribute name-value pais (man xattr). Those are different, and many puppies don't include the latter. Fatdog64:
Code:

# lsattr ~/Downloads/a.iso
-------------e-- /root/Downloads/a.iso
# getfattr ~/Downloads/a.iso
getfattr: Removing leading '/' from absolute path names
# file: root/Downloads/a.iso
user.xdg.origin.url
user.xdg.referrer.url

Rox adds the rox-xattr.png overlay icon when xattrs are set (setfattr).

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

Joined: 02 Apr 2007
Posts: 2614

PostPosted: Sun 05 Nov 2017, 07:51    Post subject:  

Lets' backup two steps. Those icons with the green (or red) dot are created internally by ROX, by overlaying a normal directory icon with a separate small image of the dot. ROX does this automatically for *mount points* -using a green dot for 'mounted' and a red dot for 'unmounted'

Prove it to yourself:
Create an ordinary directory and leave it empty. Browse to the location with ROX and you'll see it shows a normal directory icon. Now, temporarily mount some drive you have connected to that dir -I mean mount it to that directory. Refresh ROX, if necessary -for old versions you might have to browse away from the location and back to it to do this. Anyway, once ROX has refreshed, you'll see that the dir icon now has a green dot. Then, if you unmount the drive the icon probably will disappear. ROX reads mtab and/or fstab, so any mount-points/drives listed in fstab will retain their icons. I mean, that if there's an entry in fstab for a drive -rox will show it as a mount-point -with a red dot if currently unmounted, green dot if mounted.
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, 09:49    Post subject:  

I see, looking at file properties , it says "extended attributes: present" on the files with the green dot, and not present in the regular files.

Now the question is: can I manage those attributes, and what attributes should I set to make Rox to overlay some image?, let's say colored dots or change to colored icons.
Back to top
View user's profile Send private message 
Display posts from previous:   Sort by:   
Page 1 of 2 [25 Posts]   Goto page: 1, 2 Next
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.1627s ][ Queries: 12 (0.0279s) ][ GZIP on ]