No description
  • C 98.9%
  • Makefile 1.1%
Find a file
Repository files (latest commit first)
Filename Latest commit message Latest commit date
Emmett1 fa2da7f650 filer: a small ROX-style GTK3 file manager for Wayland
One window per directory, the whole menu on the right mouse button, no
sidebar, no tabs, no gvfs — plain POSIX paths read with g_dir/g_lstat.

* icon and details views over one shared GtkListStore, folders sort first
* threaded copy/move/delete with a progress window, conflict prompts and
  an EXDEV copy-then-delete fallback
* back/forward history, an editable path box, live inotify watching
* properties window with a chmod grid, clipboard interop with other
  file managers via x-special/gnome-copied-files

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01ELGTQcuuVELvE2yJWCrkD8
2026-09-07 00:07:39 +08:00
data filer: a small ROX-style GTK3 file manager for Wayland 2026-09-07 00:07:39 +08:00
src filer: a small ROX-style GTK3 file manager for Wayland 2026-09-07 00:07:39 +08:00
.gitignore filer: a small ROX-style GTK3 file manager for Wayland 2026-09-07 00:07:39 +08:00
Makefile filer: a small ROX-style GTK3 file manager for Wayland 2026-09-07 00:07:39 +08:00
README.md filer: a small ROX-style GTK3 file manager for Wayland 2026-09-07 00:07:39 +08:00

filer — a small GTK 3 file manager

A ROX-Filer style file manager in C: one window shows one directory, the whole menu is on the right mouse button, and there is no sidebar, no tabs and no gvfs. It works on plain POSIX paths (opendir/lstat/rename/unlink), so it has no daemons to talk to and nothing to configure.

make          # -> build/filer
make run      # run forcing the Wayland backend
sudo make install
filer ~/Documents

Needs only gtk+-3.0 (>= 3.22) development files, a C compiler and make. Install an icon theme (adwaita-icon-theme) if you want icons.

How it works

  • One directory per window. Double-click a folder to enter it, Alt+Up or Backspace to go to the parent, middle-click (or the menu) to open something in a new window. Alt+Left / Alt+Right (or the ← → toolbar buttons, or the thumb buttons on a mouse) step back and forward through where you have been; both go insensitive when there is nowhere left to go.
  • Right-click is the menu. With files selected you get Open / Open With, Copy, Cut, Paste Into, Rename, Delete and Properties; on empty space you get New Folder, New File, Paste, Select All, Show Hidden, Details View, Sort By, Open Terminal Here, New Window and the folder's own Properties. The ☰ toolbar button and F10 open the same menu.
  • Two views. Large icons, or a details list with size, permissions, owner and modification time (Ctrl+D toggles). Folders always sort first.
  • Toolbar: back, forward, parent, home, refresh, new folder, an editable path box, details toggle, menu. That is the whole chrome.
  • Live directory watching — a file created or removed by something else shows up on its own (debounced 300 ms), keeping the selection.
  • Copy, move and delete run on a worker thread with a progress window that only appears if the job takes longer than half a second, and a Cancel button. Moves inside one filesystem are a plain rename(); across filesystems they fall back to copy-then-delete. Name clashes ask Replace / Keep Both / Skip, with "do this for all". Symlinks are copied as symlinks; permissions and timestamps are preserved.
  • Delete is permanent (with a confirmation) — there is no trash, which is what avoids needing gvfs.
  • Clipboard and drag & drop use the standard x-special/gnome-copied-files and text/uri-list formats, so copy/paste and dragging work with other file managers and applications. Dragging onto a folder row puts files inside it.
  • Properties shows type, size, location, owner, and a 3×3 grid of permission checkboxes that chmods as you click.

Keys

Alt+↑, Backspace Parent folder Ctrl+C / Ctrl+X / Ctrl+V Copy / Cut / Paste
Alt+← / Alt+→ Back / Forward F2 Rename
Alt+Home Home Delete Delete (asks first)
F5, Ctrl+R Refresh Ctrl+Shift+N New folder
Ctrl+L Path box Ctrl+A Select all
Ctrl+N / Ctrl+W New / close window Ctrl+H Show hidden
Ctrl+D Details view Alt+Return Properties
F4 Terminal here F10 Menu

Wayland

GTK 3 uses the Wayland backend automatically when WAYLAND_DISPLAY is set; make run sets GDK_BACKEND=wayland to force it. g_set_prgname() in main.c makes the Wayland app_id org.gtk.Filer, matching data/org.gtk.Filer.desktop so the compositor can match icons and window rules. Menus use gtk_menu_popup_at_pointer(), which is the only positioning API that works under Wayland. Clipboard and drag & drop go over wl_data_device through GTK, so no extra code is needed.

Source

File Lines Contents
src/window.c ~900 Window, toolbar, both views, menu, actions, DnD, directory reading
src/ops.c ~700 Threaded copy/move/delete, conflict prompt, clipboard
src/props.c ~250 Properties window and permission grid
src/util.c ~230 Icon cache, formatting, small dialogs
src/main.c ~110 GtkApplication, accelerators, command line
src/filer.h ~80 The Filer struct and prototypes

A directory is read synchronously into a GtkListStore (fast enough for local filesystems — /usr/bin is instant) with a GtkTreeModelSort on top that both views share, so switching between icons and details is free. The window struct is freed when the window object is finalised, and background jobs hold a reference to the window plus an alive flag, so closing a window during a copy is safe.

Not included

No trash, no undo, no recursive search, no tabs, no bookmarks, no remote filesystems, no thumbnails, no configuration dialog.