Skip to content

Commit

Permalink
Merge pull request #156 from kyoheiu/develop
Browse files Browse the repository at this point in the history
v2.2.0
  • Loading branch information
kyoheiu authored Dec 12, 2022
2 parents e71e5a2 + d7ea2f2 commit 5413774
Show file tree
Hide file tree
Showing 12 changed files with 417 additions and 377 deletions.
21 changes: 21 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,26 @@

## Unreleased

## v2.2.0 (2022-12-12)

### Changed

- **IMPORTANT**: Trash and log directory path changed.
- from v2.2.0, felix will use `dirs::data_local_dir()` to store the deleted items and log files, instead of `dirs::config_dir()`.
- Due to this change, the path for linux will be `$XDG_DATA_HOME/felix/{Trash, log}`, in most case `/home/user/.local/share/felix/{Trash, log}`. For Windows `{FOLDERID_LocalAppData}\felix\{Trash, log}`, typically `C:\Users\user\AppData\Local\felix\{Trash, log}`. No change for macOS users.
- Note that config file path is unchanged for any OS!
- Please don't forget deleting old trash diretory and log files if you don't want them anymore.
- Refactoring overall.

### Added

- `:trash` to go to the trash directory.

### Fixed

- Support NetBSD to open file in a new window.
- Properly remove broken symlink in Windows as well. Also, when deleting/puttiing a directory, broken symlink(s) in it won't cause any error and will be removed from the file system after deleting/putting.

## v2.1.1 (2022-12-02)

### Fixed
Expand All @@ -16,6 +36,7 @@

- Some refactoring around text-printing in the preview space.
- When you change the sort key, felix refresh the list more efficiently than ever by avoiding to read all the items.
- Item order(Name): Case-insensitive instead of sensitive.

## v2.1.0 (2022-11-19)

Expand Down
50 changes: 25 additions & 25 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "felix"
version = "2.1.1"
version = "2.2.0"
authors = ["Kyohei Uto <[email protected]>"]
edition = "2021"
description = "tui file manager with vim-like key mapping"
Expand Down
70 changes: 54 additions & 16 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,25 +2,50 @@

# _felix_

A tui file manager with vim-like key mapping, written in Rust.
A tui file manager with Vim-like key mapping, written in Rust.
Fast, simple, and easy to configure & use.

For the detailed document, please see https://kyoheiu.dev/felix.
For an overview of this app, take a look at this README, especially [key manual](#key-manual).
For more detailed document, visit https://kyoheiu.dev/felix.

- [New release](#new-release)
- [Status](#status)
- [Installation](#installation)
- [Integrations](#integrations)
- [Usage](#usage)
- [Key manual](#key-manual)
- [Preview feature](#preview)
- [Configuration](#configuration)

![sample](screenshots/sample.gif)

## New Release
<a id="new-release"></a>

## New release

## v2.2.0 (2022-12-12)

### Changed

## v2.1.1 (2022-12-02)
- **IMPORTANT**: Trash and log directory path changed.
- from v2.2.0, felix will use `dirs::data_local_dir()` to store the deleted items and log files, instead of `dirs::config_dir()`.
- Due to this change, the path for linux will be `$XDG_DATA_HOME/felix/{Trash, log}`, in most case `/home/user/.local/share/felix/{Trash, log}`. For Windows `{FOLDERID_LocalAppData}\felix\{Trash, log}`, typically `C:\Users\user\AppData\Local\felix\{Trash, log}`. No change for macOS users.
- Note that config file path is unchanged for any OS!
- Please don't forget deleting old trash diretory and log files if you don't want them anymore.

### Added

- `:trash` to go to the trash directory.

### Fixed

- You can now open a file in a new window on Wayland environment too.
- Proper handling of wide characters: Even if e.g. file name includes some wide charatcters such as CJK, the layout won't break anymore.
- Fix cursor color after printing the text preview.
- Support NetBSD to open file in a new window.
- Properly remove broken symlink in Windows as well. Also, when deleting/puttiing a directory, broken symlink(s) in it won't cause any error and will be removed from the file system after deleting/putting.

For more details, see `CHANGELOG.md`.

<a id="status"></a>

## Status

| OS | Status |
Expand All @@ -32,6 +57,8 @@ For more details, see `CHANGELOG.md`.

_For Windows users: From v1.3.0, it can be at least compiled on Windows (see `.github/workflows/install_test.yml`.) If you're interested, please try and report any problems._

<a id="installation"></a>

## Installation

### Prerequisites
Expand Down Expand Up @@ -59,7 +86,7 @@ yay -S felix-rs

### NetBSD

available from the official repositories:
Available from the official repositories.

```
pkgin install felix
Expand All @@ -73,6 +100,8 @@ cd felix
cargo install --path .
```

<a id="integrations"></a>

## Integrations

In addition, you can use felix more conveniently by installing these two apps:
Expand All @@ -82,6 +111,8 @@ In addition, you can use felix more conveniently by installing these two apps:

These apps do not need any configuration to use with felix!

<a id="usage"></a>

## Usage

```
Expand All @@ -90,15 +121,17 @@ These apps do not need any configuration to use with felix!
Both relative and absolute path available.
```

## Options
### Options

```
`-h` | `--help` => Print help.
`-v` | `--version` => Check update.
`-l [path]` | `--log [path]` => Launch the app and create a log file.
```

## Key Manual
<a id="key-manual"></a>

### Key manual

```
j / Down :Go down.
Expand Down Expand Up @@ -134,40 +167,45 @@ Esc :Return to the normal mode.
:cd / :z :Go to the home directory.
:z <keyword> :Same as `z <keyword>`.
:e :Reload the current directory.
:trash :Go to the trash directory.
:empty :Empty the trash directory.
:h :Show help.
:q / ZZ :Exit.
```

<a id="preview"></a>

## Preview feature

By default, text files and directories can be previewed.
Install `chafa` and you can preview images without any configuration.

<a id="configuration"></a>

## Configuration

### Linux

```
config file : $XDG_CONFIG_HOME/felix/config.yaml
trash directory : $XDG_CONFIG_HOME/felix/trash
log files : \$XDG_CONFIG_HOME/felix/log
trash directory : $XDG_DATA_HOME/felix/Trash
log files : $XDG_DATA_HOME/felix/log
```

### macOS

```
config file : $HOME/Library/Application Support/felix/config.yaml
trash directory : $HOME/Library/Application Support/felix/trash
log files : \$HOME/Library/Application Support/felix/log
trash directory : $HOME/Library/Application Support/felix/Trash
log files : $HOME/Library/Application Support/felix/log
```

### Windows

```
config file : $PROFILE\AppData\Roaming\felix\config.yaml
trash directory : $PROFILE\AppData\Roaming\felix\trash
log files : $PROFILE\AppData\Roaming\felix\log
trash directory : $PROFILE\AppData\Local\felix\Trash
log files : $PROFILE\AppData\Local\felix\log
```

For more details, visit https://kyoheiu.dev/felix.
4 changes: 2 additions & 2 deletions config.yaml
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
# v2.1.1

# (Optional)
# Default exec command when opening files.
# Default exec command when opening file.
# If not set, will default to $EDITOR.
# default: nvim

# (Optional)
# key (the command you want to use when opening certain files): [values] (extensions)
# key (the command you want to use when opening file): [values] (extensions)
# exec:
# feh:
# [jpg, jpeg, png, gif, svg]
Expand Down
4 changes: 2 additions & 2 deletions src/config.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
use super::errors::FxError;
use super::state::FX_CONFIG_DIR;
use super::state::FELIX;

use serde::Deserialize;
use std::collections::BTreeMap;
Expand Down Expand Up @@ -200,7 +200,7 @@ pub fn make_config_if_not_exists(config_file: &Path, trash_dir: &Path) -> Result
fn config_file_path() -> Result<PathBuf, FxError> {
let mut config =
dirs::config_dir().ok_or_else(|| FxError::Dirs("Cannot read config dir.".to_string()))?;
config.push(FX_CONFIG_DIR);
config.push(FELIX);
config.push(CONFIG_FILE);
Ok(config)
}
Expand Down
Loading

0 comments on commit 5413774

Please sign in to comment.