aonez / Keka

The macOS & iOS file archiver
https://www.keka.io
4.91k stars 241 forks source link

'Compression' shortcut to compress files in Finder. #189

Closed Ornataweaver closed 6 years ago

Ornataweaver commented 6 years ago

Right now I have to use Finders 'Compress' ability, and it opens a new window for the compressed file. This bothers me and I didn't find any way to disable opening a new window in Finder.

gingerbeardman commented 6 years ago

Using Keka in Finder

There a few alternative methods:

    CFBundleDocumentTypes = (
        {   CFBundleTypeExtensions = ( );
            CFBundleTypeRole = "Viewer";
            LSItemContentTypes = ( "public.data", "public.executable", "public.text", "public.archive", "public.disk-image",
                "public.image", "public.audio", "public.movie", "com.adobe.pdf", "****"
            );
        },
    );

Finder Window

Keka then has this option to not open the Finder window after compression: screen shot 2018-05-17 at 14 01 33

aonez commented 6 years ago

@Ornataweaver the default compress option in the Finder's contextual menu is no used with Keka. Use the alternatives @gingerbeardman pointed 👍

aonez commented 6 years ago

Keka should register its compatibility with more file types to make this easier @aonez - eg.

@gingerbeardman I think the services are the way to go with files that Keka can't extract. But not sure here. For example a file that has no other handler, double clicking it will compress it...

gingerbeardman commented 6 years ago

What does Archive Utility do? I'm not at my Mac right now, sorry.

https://developer.apple.com/library/content/documentation/Miscellaneous/Reference/UTIRef/Articles/System-DeclaredUniformTypeIdentifiers.html

aonez commented 6 years ago

The bundled Archive Utility is only registered on compressed files, as far as I can tell. Maybe I'm missing something on this topic.

I thought you meant to create a generic item so all type of files are registered with Keka. Is that right?

For example this is the current definition in Keka for Zip:

<dict>
    <key>CFBundleTypeExtensions</key>
    <array>
        <string>zip</string>
    </array>
    <key>LSTypeIsPackage</key>
    <false/>
    <key>NSPersistentStoreTypeKey</key>
    <string>XML</string>
    <key>OnTab</key>
    <true/>
    <key>CFBundleTypeName</key>
    <string>ZIP Archive</string>
    <key>CFBundleTypeIconFile</key>
    <string>zip</string>
    <key>IconVariant</key>
    <string>orange</string>
    <key>LSItemContentTypes</key>
    <array>
        <string>com.pkware.zip-archive</string>
        <string>public.zip-archive</string>
        <string>public.zip-archive.first-part</string>
    </array>
    <key>CFBundleTypeRole</key>
    <string>Viewer</string>
</dict>
Ornataweaver commented 6 years ago

Right now I use "ctrl + shift + C" to compress files. I think anything that takes more time than this wouldn't be interesting. "Open with... > Keka.app" would definitely take longer than "ctrl + shift + C" and then "cmd + W" for quitting the window that opens. I'm just suggesting for better experience.

aonez commented 6 years ago

@Ornataweaver now I get it 👍🏼

aonez commented 6 years ago

Coming in next release:

Obviously those can be changed in the Services list (System Preferences).