Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion assets/desktop/dev.noctalia.luciole.desktop
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,6 @@ Exec=luciole %F
Icon=dev.noctalia.luciole
Terminal=false
Categories=System;FileTools;FileManager;
MimeType=inode/directory;
MimeType=inode/directory;application/zip;application/x-tar;application/x-7z-compressed;application/vnd.rar;application/x-rar;application/x-rar-compressed;application/x-compressed-tar;application/x-bzip2-compressed-tar;application/x-bzip-compressed-tar;application/x-xz-compressed-tar;application/x-zstd-compressed-tar;application/gzip;application/x-bzip2;application/x-xz;application/zstd;
StartupNotify=true
StartupWMClass=dev.noctalia.luciole
2 changes: 2 additions & 0 deletions docs/user/archives.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,8 @@ Open a supported archive member to browse its contents inside Luciole. The bread

Other members open in their associated application. Large members and nested archives stream into private temporary storage. Luciole checks available space when the output size is known and reports write failures if space runs out. There is no fixed member-size or member-count quota. Closing the archive view keeps externally opened files available. Temporary files can remain while the tab is available to reopen and are removed when Luciole exits. If another file operation is still finishing, Luciole says so instead of opening.

Luciole also registers itself for archive types, so you can choose it as the default application for archives, for example to open ones downloaded in a chat app. `luciole path/to/archive.zip` does the same from a terminal: Luciole opens the archive's folder and browses the archive there.

## Extract

Select one or more supported native archives and choose **Extract Here** or **Extract To**. **Extract Here** creates a separate folder beside each archive. For one archive, **Extract To** chooses its new output-folder path. For multiple archives, it chooses an existing parent folder and creates a separate output folder for each archive inside it. The folder takes the archive's name without its suffix. If a file or another archive in the batch already uses that name, the folder is numbered, such as `photos (1)`.
Expand Down
5 changes: 3 additions & 2 deletions src/app/cli.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -15,12 +15,13 @@
namespace {

constexpr std::string_view kHelp =
R"(Usage: luciole [--] [directory]
R"(Usage: luciole [--] [directory | archive]
luciole -h | --help | -v | --version
luciole completions <shell>
luciole config validate <file>
Open Luciole in Home, or browse one directory path or URI.
Open Luciole in Home, browse one directory path or URI, or open one archive's
folder and browse the archive.
Options:
-h, --help Show this help
Expand Down
12 changes: 9 additions & 3 deletions src/app/page/browser_page.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@
#include "core/timer_manager.h"
#include "core/ui_phase.h"
#include "cursor-shape-v1-client-protocol.h"
#include "fs/archive_type.h"
#include "fs/background_job.h"
#include "fs/drive_monitor.h"
#include "fs/gio_ptr.h"
Expand Down Expand Up @@ -296,10 +297,15 @@ void BrowserPage::fontChanged() {
}

bool BrowserPage::initialize(const std::optional<std::string>& initialLocation) {
if (initialLocation) {
(void)browser().openText(*initialLocation);
} else {
if (!initialLocation) {
browser().home();
} else if (luciole::isSupportedArchive(luciole::Location::fromUri(*initialLocation), "")) {
// An archive handed over by another app opens its folder and browses it; the name check keeps folders sync.
(void)browser().openTypedText(*initialLocation, [this](const luciole::Location& archive) {
m_archiveController.browse(archive);
});
} else {
(void)browser().openText(*initialLocation);
}
return true;
}
Expand Down
Loading