You are not logged in.

#1 2007-07-24 13:27:24

cerise
Member
From: gondwanaland
Registered: 2006-10-28
Posts: 125

Tango pkgbuild mimetype icons

I have some simple icons that I use for pkgbuild files, but you'll need to make sure that you have your system set up to recognize the PKBUILD file as a text-x-pkgbuild mimetype (of type text/plain) in order to have these icons work.

pkgbuild-mimetype-icons.tar.bz2

Offline

#2 2007-07-24 14:04:36

dtw
Forum Fellow
From: UK
Registered: 2004-08-03
Posts: 4,439
Website

Re: Tango pkgbuild mimetype icons

cerise wrote:

you'll need to make sure that you have your system set up to recognize the PKBUILD file as a text-x-pkgbuild mimetype (of type text/plain)

What's the best way to do that would you say?  I have a pkg for http://rox.sourceforge.net/phpwiki/inde … IME-Editor in [community], is that still a good tool?

Offline

#3 2007-07-24 14:07:44

atlas95
Member
Registered: 2007-02-11
Posts: 98

Re: Tango pkgbuild mimetype icons

Thanks cerise but how to add the mimetype handly of gnome don't recognise it please smile
Best regards

Offline

#4 2007-07-26 06:26:14

cerise
Member
From: gondwanaland
Registered: 2006-10-28
Posts: 125

Re: Tango pkgbuild mimetype icons

well, there is a small program that I use to handle mimetypes in gnome called assogiate - it's in AUR

It's pretty handy for times when you need to fix/create mimetypes in your gnome installation.

Offline

#5 2007-07-26 06:27:07

cerise
Member
From: gondwanaland
Registered: 2006-10-28
Posts: 125

Re: Tango pkgbuild mimetype icons

dtw wrote:
cerise wrote:

you'll need to make sure that you have your system set up to recognize the PKBUILD file as a text-x-pkgbuild mimetype (of type text/plain)

What's the best way to do that would you say?  I have a pkg for http://rox.sourceforge.net/phpwiki/inde … IME-Editor in [community], is that still a good tool?

Hmmmm, I've never used that one - I've only used assogiate.  If it edits mimetypes / creates them, then I'm assuming it should work?

Offline

#6 2007-07-26 07:26:24

cerise
Member
From: gondwanaland
Registered: 2006-10-28
Posts: 125

Re: Tango pkgbuild mimetype icons

I've also got a quick way of adding the new mimetype as well (AFTER you have added the icons to your icon theme) - in five easy steps:

1. Open ~/.local/share/mime/packages/Override.xml in your favorite editor.
2. Add the following lines: (in between the <mime-info></mime-info> tags)

  <mime-type type="text/x-pkgbuild">
    <glob pattern="PKGBUILD"/>
    <magic priority="50"><match type="string" offset="0:10" value="pkgname"/></magic>
    <magic priority="50"><match type="string" offset="0:15" value="pkgver"/></magic>
    <sub-class-of type="text/plain"/>
    <comment>PKGBUILD document</comment>
    <comment xml:lang="en_US">PKGBUILD document</comment>
  </mime-type>

3. Save the file & exit the editor.
4. in a terminal, type:  (no need for root nor sudo.)

update-mime-database ~/.local/share/mime

5. restart nautilus:

killall nautilus

And there you go, PKGBUILD files now show with the new icon.

Offline

#7 2007-07-26 10:09:41

dtw
Forum Fellow
From: UK
Registered: 2004-08-03
Posts: 4,439
Website

Re: Tango pkgbuild mimetype icons

cerise wrote:

Hmmmm, I've never used that one - I've only used assogiate.  If it edits mimetypes / creates them, then I'm assuming it should work?

Aside from the gnome deps yours looks like the better choice ;-)

Offline

#8 2007-07-26 10:49:10

atlas95
Member
Registered: 2007-02-11
Posts: 98

Re: Tango pkgbuild mimetype icons

Ok thanks you but could you give me the settings next? For the new type we set.

Offline

#9 2007-07-26 14:31:36

cerise
Member
From: gondwanaland
Registered: 2006-10-28
Posts: 125

Re: Tango pkgbuild mimetype icons

dtw wrote:
cerise wrote:

Hmmmm, I've never used that one - I've only used assogiate.  If it edits mimetypes / creates them, then I'm assuming it should work?

Aside from the gnome deps yours looks like the better choice ;-)

Better is in the eye of the beholder (or... beer holder if I'm making decisions about whether or not I want a software-raid-with-software-lvm2-with-jfs-on-top when I reformat my file system, oi....)

I know assogiate works and is fairly simple and straight forward to use... (unless you are comfortable writing xml code for mimetypes - then the Override.xml file is as straight forward as you can get.)

The trick is the update-mime-database command - that's what makes all changes happen.  big_smile

Offline

#10 2007-07-26 14:32:08

cerise
Member
From: gondwanaland
Registered: 2006-10-28
Posts: 125

Re: Tango pkgbuild mimetype icons

atlas95 wrote:

Ok thanks you but could you give me the settings next? For the new type we set.

using assogiate?

Offline

#11 2007-07-26 14:42:38

cerise
Member
From: gondwanaland
Registered: 2006-10-28
Posts: 125

Re: Tango pkgbuild mimetype icons

If you want to use assogiate, instead of dealing with the Override.xml file, follow these steps:  (all of the underlined items you will have to either type in or choose from a drop-down box.)

1. Open assogiate and click on New.

2. Choose the following options for the General tab -
Category: Text and source code
Name: text/x-pkgbuild
Description PKGBUILD document

3. In the Related types tab -
Parent types: text/plain
(you'll need to click add and then just type in text/plain and click add again.)

4. In the Filenames tab -
Filename pattern: PKGBUILD
(click add, type in PKGBUILD, click add)

5. File Contents tab -
add the following two lines: (clicking add after each one - don't worry about priority nor mask.)
Type: String, Value: pkgname, Offsets: 0 to 10  (you will have to checkmark the "to" box.)
Type: String, Value: pkgver, Offsets: 0 to 15

6. Click OK & exit assogiate.

7.  in a terminal window, type:

update-mime-database ~/.local/share/mime

8. then, also in a terminal window, type:

killall nautilus

and now you have updated your local mime type database to include the pkgbuild file.

Last edited by cerise (2007-07-26 14:43:04)

Offline

#12 2007-07-26 19:17:44

atlas95
Member
Registered: 2007-02-11
Posts: 98

Re: Tango pkgbuild mimetype icons

Thanks you for all cerise, you are very cool.

Offline

#13 2007-07-26 19:25:21

atlas95
Member
Registered: 2007-02-11
Posts: 98

Re: Tango pkgbuild mimetype icons

If you have other icons cerise ... smile

Offline

#14 2007-07-27 05:40:15

cerise
Member
From: gondwanaland
Registered: 2006-10-28
Posts: 125

Re: Tango pkgbuild mimetype icons

kdau wrote:

Hello, I'm the author of assoGiate. I'm glad that you have found it useful.

You mentioned needing to run update-mime-database after using the program, but it should be doing this automatically after each change is made. Did assoGiate fail to update for some of your changes? If so, there is probably a conflict with Arch's version of shared-mime-info which I need to fix.

Yes, it does not seem to run the mime update.  When I ran it by hand, then my mime updates were fine. 

It seems to write the mime changes just fine, but it doesn't seem to run the update command.

(by the way, I love assogiate!)

Last edited by cerise (2007-07-27 05:40:36)

Offline

#15 2007-07-27 05:46:04

cerise
Member
From: gondwanaland
Registered: 2006-10-28
Posts: 125

Re: Tango pkgbuild mimetype icons

atlas95 wrote:

If you have other icons cerise ... smile

smile

I've posted ones here for exaile and gajim.  I've been working with .jar file icon changes lately too... so, freemind and azureus I've been able to look like tango applications.  I can post a howto for how to make those changes, and possibly some of the icons as well.

hmmm.  I can also post things like how to change your gnome emblem placement or write themes. 

Let me go digging around here and see what I've got to offer.  smile

Offline

Board footer

Powered by FluxBB