{"id":13451066,"url":"https://github.com/mananapr/cfiles","last_synced_at":"2025-04-05T13:09:11.348Z","repository":{"id":39042826,"uuid":"163684725","full_name":"mananapr/cfiles","owner":"mananapr","description":"A ncurses file manager written in C with vim like keybindings","archived":false,"fork":false,"pushed_at":"2021-08-28T14:54:26.000Z","size":2728,"stargazers_count":494,"open_issues_count":22,"forks_count":38,"subscribers_count":17,"default_branch":"master","last_synced_at":"2025-03-29T12:09:37.842Z","etag":null,"topics":["c","console","file-explorer","file-launcher","file-manager","ncurses","terminal","w3mimgdisplay"],"latest_commit_sha":null,"homepage":"","language":"C","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/mananapr.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2018-12-31T16:56:51.000Z","updated_at":"2025-03-24T07:39:43.000Z","dependencies_parsed_at":"2022-09-12T14:23:20.593Z","dependency_job_id":null,"html_url":"https://github.com/mananapr/cfiles","commit_stats":null,"previous_names":[],"tags_count":12,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mananapr%2Fcfiles","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mananapr%2Fcfiles/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mananapr%2Fcfiles/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mananapr%2Fcfiles/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/mananapr","download_url":"https://codeload.github.com/mananapr/cfiles/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247339158,"owners_count":20923014,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["c","console","file-explorer","file-launcher","file-manager","ncurses","terminal","w3mimgdisplay"],"created_at":"2024-07-31T07:00:47.072Z","updated_at":"2025-04-05T13:09:11.316Z","avatar_url":"https://github.com/mananapr.png","language":"C","funding_links":[],"categories":["C","File Management","Packages","\u003ca name=\"file-manager\"\u003e\u003c/a\u003eFile manager"],"sub_categories":["CLI Tools"],"readme":"\u003ch1 align=\"center\"\u003ecfiles\u003c/h1\u003e\n\n\u003cp align=\"center\"\u003e\n\u003ca href=\"https://github.com/mananapr/cfiles/releases/latest\"\u003e\u003cimg src=\"https://img.shields.io/github/release/mananapr/cfiles/all.svg\" alt=\"Latest release\" /\u003e\u003c/a\u003e\n\u003ca href=\"https://aur.archlinux.org/packages/cfiles/\"\u003e\u003cimg src=\"https://img.shields.io/aur/version/cfiles.svg\" alt=\"Arch Linux\" /\u003e\u003c/a\u003e\n\u003ca href=\"https://github.com/mananapr/homebrew-cfiles\"\u003e\u003cimg src=\"https://img.shields.io/badge/homebrew-v1.8-blue.svg\" alt=\"Homebrew\" /\u003e\u003c/a\u003e\n\u003c/p\u003e\n\n\u003cp align=\"center\"\u003e\n\u003ca href=\"https://github.com/mananapr/cfiles/blob/master/LICENSE\"\u003e\u003cimg src=\"https://img.shields.io/badge/license-MIT-yellow.svg\" alt=\"License\" /\u003e\u003c/a\u003e\n\u003c/p\u003e\n\n`cfiles` is a terminal file manager with vim like keybindings, written in C using the ncurses\nlibrary. It aims to provide an interface like [ranger](https://github.com/ranger/ranger) while being lightweight, fast and\nminimal.\n\n![screenshot](cf.png)\n\n## Dependencies\n- `ncursesw`\n- `cp`and `mv` for copying and moving\n- `fzf` for searching\n- `w3mimgdisplay` or `Überzug` for image previews\n- `mediainfo` for viewing media info and file sizes\n- `atool` for archive previews\n- `poppler`(specifically `pdftoppm`) for pdf previews\n\n## Compiling and Installation\n#### Arch Linux\nArch Linux users can use the [AUR](https://aur.archlinux.org/packages/cfiles) package.\n\n#### macOS\nmacOS users can use [brew](https://github.com/mananapr/homebrew-cfiles) or [macports](https://github.com/macports/macports-ports/tree/master/sysutils/cfiles)\n\n\n#### Others\nTo compile, run\n\n    make\n\nand then run,\n\n    sudo make install\n\nto install.\n\n## Keybindings\n| Key | Function |\n|:---:| --- |\n| \u003ckbd\u003eh j k l\u003c/kbd\u003e | Navigation keys |\n| \u003ckbd\u003eG\u003c/kbd\u003e | Go to end |\n| \u003ckbd\u003eg\u003c/kbd\u003e | Go to top |\n| \u003ckbd\u003eH\u003c/kbd\u003e | Go to top of current view |\n| \u003ckbd\u003eM\u003c/kbd\u003e | Go to middle of current view |\n| \u003ckbd\u003eL\u003c/kbd\u003e | Go to bottom of current view |\n| \u003ckbd\u003epgup\u003c/kbd\u003e | Scroll Up One Page |\n| \u003ckbd\u003epgdn\u003c/kbd\u003e | Scroll Down One Page |\n| \u003ckbd\u003ef\u003c/kbd\u003e | Search using fzf |\n| \u003ckbd\u003eF\u003c/kbd\u003e | Search using fzf in the present directory |\n| \u003ckbd\u003eS\u003c/kbd\u003e | Open Shell in present directory |\n| \u003ckbd\u003espace\u003c/kbd\u003e | Add/Remove to/from selection list |\n| \u003ckbd\u003etab\u003c/kbd\u003e | View selection list |\n| \u003ckbd\u003ee\u003c/kbd\u003e | Edit selection list |\n| \u003ckbd\u003eu\u003c/kbd\u003e | Empty selection list |\n| \u003ckbd\u003ey\u003c/kbd\u003e | Copy files from selection list |\n| \u003ckbd\u003ev\u003c/kbd\u003e | Move files from selection list |\n| \u003ckbd\u003ea\u003c/kbd\u003e | Rename Files in selection list |\n| \u003ckbd\u003edd\u003c/kbd\u003e | Move files from selection list to trash |\n| \u003ckbd\u003edD\u003c/kbd\u003e | Remove selected files |\n| \u003ckbd\u003ei\u003c/kbd\u003e | View mediainfo and general info |\n| \u003ckbd\u003eI\u003c/kbd\u003e | View preview |\n| \u003ckbd\u003e.\u003c/kbd\u003e | Toggle hidden files |\n| \u003ckbd\u003eb\u003c/kbd\u003e | Toggle borders |\n| \u003ckbd\u003e'\u003c/kbd\u003e | View/Goto bookmarks |\n| \u003ckbd\u003em\u003c/kbd\u003e | Add bookmark |\n| \u003ckbd\u003eE\u003c/kbd\u003e | Edit bookmarks |\n| \u003ckbd\u003ep\u003c/kbd\u003e | Run external script |\n| \u003ckbd\u003er\u003c/kbd\u003e | Reload |\n| \u003ckbd\u003eq\u003c/kbd\u003e | Quit |\n\n## Directories Used\n`cfiles` uses `$XDG_CONFIG_HOME/cfiles` directory to store the clipboard file. This is used so that the clipboard\ncan be shared between multiple instances of `cfiles`. That's why I won't be adding tabs in `cfiles` because multiple\ninstances can be openend and managed by any terminal multiplexer or your window manager.\nNote that this also means the selection list will persist even if all instances are closed.\n\n`cfiles` also uses `$HOME/.local/share/Trash/files` as the Trash Directory, so make sure this directory exists before you try to delete a file.\n\nFor storing bookmarks, `cfiles` uses `$XDG_CONFIG_HOME/cfiles/bookmarks` file. Bookmarks are stored in the form `\u003ckey\u003e:\u003cpath\u003e`. You can either edit this file directly\nor press `m` in `cfiles` to add new bookmarks.\n\n`cfiles` looks for external scripts in the `$XDG_CONFIG_HOME/cfiles/scripts` directory. Make sure the scripts are executable before moving them to the scripts directory.\n\nIf `$XDG_CONFIG_HOME` is not set, then `$HOME/.config` is used.\n\n## Opening Files\nYou can set `FILE_OPENER` in `config.h` to specify your file opening program. It is set to use `xdg-open` by default but you can change it to anything like `thunar`. macOS users need to set it to `open`.\n\n## Image Previews\nYou can either go with `w3mimgdisplay` or `Überzug` ([link](https://github.com/seebye/ueberzug)) for image previews.\nEach method has it's own pros and cons.\n\n1. **Überzug**\n\nTo use `Überzug` for image previews, set `DISPLAYIMG` and `CLEARIMG` in `config.h` to the paths of `displayimg_uberzug` and `clearimg_uberzug` scripts respectively.\n  * Pros\n    1. Better previews when compared to `w3mimgdisplay`\n  * Cons\n    1. Can't generate previews for mp3 album arts\n    2. Non functional scrolling with arrow keys\n\nI recommend `Überzug` because the previews scale well with change in terminal size and don't disappear on changing workspaces.\n\n2. **w3mimgdisplay**\n\nTo use `w3mimgdisplay` for image previews, set `DISPLAYIMG` and `CLEARIMG` in `config.h` to the paths of `displayimg` and `clearimg` scripts respectively.\n  * Pros\n    1. Faster scrolling\n    2. Can generate previews of album arts for mp3 files\n  * Cons\n    1. Previews are very inconsistent and may disappear on resizing the terminal or changing workspaces\n    2. You may have to redraw the UI while scrolling by pressing `KEY_RELOAD` (defaults to \u003ckbd\u003eR\u003c/kbd\u003e)\n\nYou may have to modify the scripts a little, about which you can read [here](https://wiki.vifm.info/index.php/How_to_preview_images).\n\n## Why C?\nI wanted to improve my C and learn ncurses so I decided this would be an ideal project.\n\nApart from this, I have always wanted an alternative to ranger that is faster while still having\na similar UI.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmananapr%2Fcfiles","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmananapr%2Fcfiles","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmananapr%2Fcfiles/lists"}