Skip to content

Commit

Permalink
another rename...
Browse files Browse the repository at this point in the history
Signed-off-by: aserowy <serowy@hotmail.com>
  • Loading branch information
aserowy committed Feb 19, 2024
1 parent 2846ea4 commit 9643520
Show file tree
Hide file tree
Showing 49 changed files with 68 additions and 82 deletions.
10 changes: 5 additions & 5 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
Expand Up @@ -2,5 +2,5 @@
resolver = "2"

members = [
"y1337", "y1337-frontend", "y1337-keymap",
"yeet", "yeet-frontend", "yeet-keymap",
]
40 changes: 14 additions & 26 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,26 +1,14 @@
# y1337 (pronounced yeet)
# yeet (y337)

## the name, the vision

Yet Another Astoundingly Hackable, Keyboard-Controlled, Ultra-Intuitive,
Efficient, Versatile, Interactive, Fast, Elmish, Minimalistic, and Superlative
File Explorer with Vim-Inspired Keybindings, Designed to Revolutionize Terminal
Productivity, and Unleash Unprecedented Efficiency, All While Honoring the Spirit
of Open Source Collaboration and Embracing the Beauty, and Greatness of Rust Programming
Language, Crafted with Passion, Precision, Pain, and Perseverance, Aiming to Reshape
the Way We Navigate and Manipulate Files in the Digital Realm, Pioneering a New
Era of Command-Line Exploration and Empowering Users to Harness the Full Potential
of Their Command Shells, Forever Changing the Landscape of File Interaction, and
Leaving a Legacy Worthy of Legends, Echoing Through the Halls of Cyberspace and
Inspiring Generations of Developers Yet to Come, A Testament to Human Ingenuity
and the Endless Quest for Excellence, a Journey Beyond the Cursor, and a Beacon
of Innovation in the Vast Digital Wilderness, Infused with the Magic of Lua, Allowing
Users to Extend Its Functionality, Shape Its Behavior, and Create Customized Workflows
Tailored to Their Unique Needs, Enabling a Thriving Ecosystem of Community-Driven
Plugins, Where Imagination Meets Practicality, and Every Keystroke Holds the Promise
of Infinite Possibilities.

In short: y1337
Yet Another Astoundingly Hackable, Keyboard-Controlled, Efficient, Versatile,
Interactive, Fast, Elmish, Minimalistic, and Superlative File Explorer with
Vim-Inspired Keybindings, Infused with the Magic of Lua, Allowing Users to Extend
Its Functionality, Shape Its Behavior, and Create Customized Workflows Tailored
to Their Unique Needs!

In short: y337

## shortcuts

Expand Down Expand Up @@ -72,12 +60,12 @@ to navigation.

## architecture overview

### y1337
### yeet

The main crate is handling frontend and backend and resolves cli arguments to
pass them to the relevant components.

### y1337-frontend
### yeet-frontend

The frontend follows an elm architecture with one exception: The model is
mutable and will not get created every update.
Expand All @@ -90,9 +78,9 @@ AppEvents.
layout.rs defines the overall app layout, which is used by all view functions.

The modules model, update and view represent the elm philosophy. Messages
are defined in y1337-keymap to prevent cycling dependencies.
are defined in yeet-keymap to prevent cycling dependencies.

### y1337-keymap
### yeet-keymap

This crate holds all key relevant features. The MessageResolver uses buffer
and tree to resolve possible messages, which follow the elm architecture to
Expand All @@ -101,13 +89,13 @@ modify the model.
tree uses the keymap to build a key tree structure. Thus, in keymap all
key combinations are mapped indirectly to messages.

conversion translates crossterm key events to the y1337-keymap
conversion translates crossterm key events to the yeet-keymap
representation.

## faq

### opening files in linux does nothing

y1337 utilizes `xdg-open` to start files. Thus, not opening anything probably lies
yeet utilizes `xdg-open` to start files. Thus, not opening anything probably lies
in a misconfigured mime setup. Check `~/.local/share/applications/` for invalid entries.
Some programs causing problems regularly. Im looking at you `wine`...
10 changes: 5 additions & 5 deletions flake.nix
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# https://github.com/cpu/woodwidelog/blob/bb549af2b33c5c50ae6e7361da4af3b1993caa1d/content/articles/rust-flake/index.md?plain=1#L50
{
description = "y1337 the great flake";
description = "yeet the great flake";

inputs = {
flake-parts.url = "github:hercules-ci/flake-parts";
Expand Down Expand Up @@ -28,7 +28,7 @@
inherit system overlays;
};

toml = builtins.fromTOML (builtins.readFile ./y1337/Cargo.toml);
toml = builtins.fromTOML (builtins.readFile ./yeet/Cargo.toml);

package = (pkgs.makeRustPlatform {
cargo = pkgs.rust-bin.stable.latest.minimal;
Expand Down Expand Up @@ -64,12 +64,12 @@
in
{
overlayAttrs = {
inherit (config.packages) y1337;
inherit (config.packages) yeet;
};

packages = {
default = self'.packages.y1337;
y1337 = package;
default = self'.packages.yeet;
yeet = package;
};

devShells.default = shell;
Expand Down
11 changes: 0 additions & 11 deletions y1337-keymap/Cargo.toml

This file was deleted.

4 changes: 2 additions & 2 deletions y1337-frontend/Cargo.toml → yeet-frontend/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
[package]
name = "y1337-frontend"
name = "yeet-frontend"
version = "0.0.1"
edition = "2021"

[dependencies]
crossterm = { version = "0.27.0", features = ["event-stream"] }
futures = "0.3.30"
ratatui = "0.26.1"
y1337-keymap = { path = "../y1337-keymap" }
yeet-keymap = { path = "../yeet-keymap" }
tokio = { version = "1.35.1", features = ["full"] }
csv = "1.3.0"
thiserror = "1.0.56"
Expand Down
2 changes: 1 addition & 1 deletion y1337-frontend/src/error.rs → yeet-frontend/src/error.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
use thiserror::Error;
use y1337_keymap::message::Message;
use yeet_keymap::message::Message;

#[derive(Debug, Error)]
pub enum AppError {
Expand Down
2 changes: 1 addition & 1 deletion y1337-frontend/src/event.rs → yeet-frontend/src/event.rs
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ use tokio::{
oneshot, Mutex,
},
};
use y1337_keymap::{
use yeet_keymap::{
conversion,
message::{Message, Mode},
MessageResolver,
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
use std::time;

use y1337_keymap::message::Mode;
use yeet_keymap::message::Mode;

#[derive(Debug)]
struct Transaction {
Expand Down Expand Up @@ -268,7 +268,7 @@ mod test {

let mut undo = super::Undo::default();
undo.add(
&y1337_keymap::message::Mode::Insert,
&yeet_keymap::message::Mode::Insert,
vec![
BufferChanged::LineAdded(0, "a".to_string()),
BufferChanged::LineRemoved(4, "m".to_string()),
Expand All @@ -289,7 +289,7 @@ mod test {
);

undo.add(
&y1337_keymap::message::Mode::Normal,
&yeet_keymap::message::Mode::Normal,
vec![BufferChanged::LineAdded(2, "h".to_string())],
);
let changes = undo.get_uncommited_changes();
Expand All @@ -303,7 +303,7 @@ mod test {
);

undo.add(
&y1337_keymap::message::Mode::Insert,
&yeet_keymap::message::Mode::Insert,
vec![BufferChanged::LineRemoved(5, "m".to_string())],
);
let changes = undo.save();
Expand All @@ -318,7 +318,7 @@ mod test {
);

undo.add(
&y1337_keymap::message::Mode::Normal,
&yeet_keymap::message::Mode::Normal,
vec![BufferChanged::LineAdded(2, "s".to_string())],
);
let changes = undo.get_uncommited_changes();
Expand Down
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ fn get_history_path() -> Result<String, AppError> {
None => return Err(AppError::LoadHistoryFailed),
};

Ok(format!("{}{}", cache_dir, "/y1337/.history"))
Ok(format!("{}{}", cache_dir, "/yeet/.history"))
}

fn save_filtered(
Expand Down
File renamed without changes.
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
use std::path::PathBuf;

use y1337_keymap::message::Mode;
use yeet_keymap::message::Mode;

use self::{
buffer::{
Expand Down
File renamed without changes.
File renamed without changes.
2 changes: 1 addition & 1 deletion y1337-frontend/src/task.rs → yeet-frontend/src/task.rs
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ use tokio::{
sync::mpsc::Sender,
task::{AbortHandle, JoinSet},
};
use y1337_keymap::message::{ContentKind, Message};
use yeet_keymap::message::{ContentKind, Message};

use crate::{
error::AppError,
Expand Down
File renamed without changes.
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
use y1337_keymap::message::{NewLineDirection, TextModification};
use yeet_keymap::message::{NewLineDirection, TextModification};

use crate::model::buffer::{undo::BufferChanged, Buffer, BufferLine, Cursor, CursorPosition};

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
use y1337_keymap::message::{CursorDirection, Mode};
use yeet_keymap::message::{CursorDirection, Mode};

use crate::model::buffer::{Buffer, CursorPosition};

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
use y1337_keymap::message::{self, CursorDirection, Mode};
use yeet_keymap::message::{self, CursorDirection, Mode};

use crate::model::buffer::{Buffer, BufferLine, BufferResult, CursorPosition};

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
use y1337_keymap::message::ViewPortDirection;
use yeet_keymap::message::ViewPortDirection;

use crate::model::buffer::{Buffer, CursorPosition};

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
use y1337_keymap::message::{Buffer, Mode};
use yeet_keymap::message::{Buffer, Mode};

use crate::{
layout::AppLayout,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
use y1337_keymap::message::Buffer;
use yeet_keymap::message::Buffer;

use crate::{
event::{PostRenderAction, RenderAction},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ use std::{
path::{Path, PathBuf},
};

use y1337_keymap::message::Mode;
use yeet_keymap::message::Mode;

use crate::model::{buffer::Buffer, Model};

Expand Down
File renamed without changes.
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
use ratatui::prelude::Rect;
use y1337_keymap::message::{Buffer, Message, Mode};
use yeet_keymap::message::{Buffer, Message, Mode};

use crate::{
event::{PostRenderAction, PreRenderAction, RenderAction},
Expand Down Expand Up @@ -461,7 +461,7 @@ fn set_viewport_dimensions(vp: &mut ViewPort, rect: &Rect) {
mod test {
#[test]
fn test_get_mode_after_command() {
use y1337_keymap::message::Mode;
use yeet_keymap::message::Mode;

let mode_before = Some(Mode::Normal);
let result = super::get_mode_after_command(&mode_before);
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
use y1337_keymap::message::{Buffer, ViewPortDirection};
use yeet_keymap::message::{Buffer, ViewPortDirection};

use crate::{
layout::AppLayout,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
use std::path::{Path, PathBuf};

use ratatui::style::Color;
use y1337_keymap::message::ContentKind;
use yeet_keymap::message::ContentKind;

use crate::{
event::{PostRenderAction, PreRenderAction, RenderAction},
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
use y1337_keymap::message::Buffer;
use yeet_keymap::message::Buffer;

use crate::{layout::AppLayout, model::Model};

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
use y1337_keymap::message::Mode;
use yeet_keymap::message::Mode;

use crate::model::buffer::{
viewport::ViewPort, BufferLine, Cursor, CursorPosition, StylePartial, StylePartialSpan,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
use ratatui::{prelude::Rect, text::Line, widgets::Paragraph, Frame};
use y1337_keymap::message::Mode;
use yeet_keymap::message::Mode;

use crate::model::buffer::{viewport::ViewPort, Buffer, BufferLine, Cursor, StylePartialSpan};

Expand Down
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ use ratatui::{
widgets::Paragraph,
Frame,
};
use y1337_keymap::message::Mode;
use yeet_keymap::message::Mode;

use crate::model::Model;

Expand Down
File renamed without changes.
File renamed without changes.
9 changes: 9 additions & 0 deletions yeet-keymap/Cargo.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
[package]
name = "yeet-keymap"
version = "0.0.1"
edition = "2021"

[dependencies]
crossterm = "0.27.0"
dirs = "5.0.1"
thiserror = "1.0.56"
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
4 changes: 2 additions & 2 deletions y1337/Cargo.toml → yeet/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
[package]
name = "y1337"
name = "yeet"
version = "0.0.1"
edition = "2021"

# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html

[dependencies]
y1337-frontend = { path = "../y1337-frontend" }
yeet-frontend = { path = "../yeet-frontend" }
tokio = { version = "1.35.1", features = ["full"] }
thiserror = "1.0.56"
clap = "4.5.1"
Loading

0 comments on commit 9643520

Please sign in to comment.