Skip to content

Commit

Permalink
Added README.md
Browse files Browse the repository at this point in the history
  • Loading branch information
aymanfarsi committed Jun 28, 2024
1 parent c0d89f7 commit 1e13c93
Show file tree
Hide file tree
Showing 13 changed files with 158 additions and 46 deletions.
48 changes: 24 additions & 24 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,5 +1,5 @@
[package]
name = "Stash"
name = "stash"
version = "0.5.1"
authors = ["evilDAVE <aymanfarsi99@proton.me>"]
edition = "2021"
Expand Down
96 changes: 96 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,96 @@
# Stash

<p align="center">
<a href="https://github.com/aymanfarsi/Stash"><img src="assets/stash.png" alt="Stash" height="120" /></a>
</p>

<p align="center">
<strong>Stash is a new way to manage your bookmarks for no need to keep tabs open.</strong>
</p>

## Contents
- [Features](#features)
- [Installation](#installation)
- [Building from source](#building-from-source)
- [Contributing](#contributing)
- [Credits](#credits)
- [License](#license)

## Features

- **Cross-platform**: Stash is built using Rust and egui, making it highly portable and compatible with Windows, macOS, and Linux.
- **Secure**: Stash only stores your bookmarks locally on your device, ensuring your privacy and security.
- Portable: Stash is a single binary that you can run from anywhere on your system. Also, all configuration files are stored in your documents folder.

## Installation

To use Stash, you only need to have Rust installed on your system if you want to build it from source. Otherwise, you can download the pre-built binaries for your platform from the [releases page](https://www.github.com/aymanfarsi/Stash/releases).

## Building from source

To install Rust:

```bash
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh
```

1. Clone the repository:

```bash
git clone https://github.com/aymanfarsi/Stash.git
```

2. Change into the project directory and rename it to avoid issues with building the executable:

```bash
mv Stash stash
cd stash
```

3. Build the project:

```bash
cargo build --release
```

4. The binary will be located in the `target/release` directory. You can run it using:

```bash
./target/release/stash
```

5. You can also install the binary to your system using:

```bash
cargo install --path .
```

6. Otherwise, run the install script:

```bash
./install-stash # Unix systems
sh install-stash # Windows
```

7. You can now run the binary using `stash` or search for it in your system's application menu.

## Contributing

Contributions are welcome! Feel free to open an issue or submit a pull request if you have any ideas, bug reports, or feature requests.

1. Fork the repository and clone it to your local machine.
2. Create a new branch for your changes.
3. Make your changes and commit them.
4. Push the changes.
5. Submit a pull request.

## Credits

Stash is built using the following technologies:

- [Rust](https://www.rust-lang.org/): A systems programming language that focuses on safety, speed, and concurrency.
- [egui](https://www.github.com/emilk/egui): A simple, fast, and highly portable immediate mode GUI library.

## License

Stash is licensed under the MIT License. See the [LICENSE](LICENSE) file for more information.
File renamed without changes.
File renamed without changes
6 changes: 3 additions & 3 deletions build.rs
Original file line number Diff line number Diff line change
Expand Up @@ -4,17 +4,17 @@ fn main() {

let mut res = winres::WindowsResource::new();

res.set_icon_with_id("assets/favicon.ico", "1");
res.set_icon_with_id("assets/stash.ico", "1");

res.compile().unwrap();
}

#[cfg(target_os = "linux")]
fn main() {
println!("cargo:rerun-if-changed=assets/favicon.ico");
println!("cargo:rerun-if-changed=assets/stash.ico");
}

#[cfg(target_os = "macos")]
fn main() {
println!("cargo:rerun-if-changed=assets/favicon.ico");
println!("cargo:rerun-if-changed=assets/stash.ico");
}
30 changes: 30 additions & 0 deletions install-stash
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
#!/bin/bash

echo "Building Stash"

desktop_file=$(cat << EOM
[Desktop Entry]
Type=Application
Name=Stash
Comment=Stash is a new way to manage your bookmarks for no need to keep tabs open.
Exec=stash
Icon=$HOME/.local/share/icons/stash.png
Terminal=false
Categories=Utility;Application;
EOM
)

if [[ $(uname -s) == *NT* ]]; then
echo "Building for Linux"
cargo install --path .
elif [[ $(uname -s) == *Darwin* ]]; then
echo "Building for MacOS"
cargo install --path .
else
echo "Building for Linux"
cargo install --path .
echo "$desktop_file" > $HOME/.local/share/applications/stash.desktop
cp assets/stash.png $HOME/.local/share/icons/stash.png
fi

echo "Stash built successfully"
13 changes: 0 additions & 13 deletions set_linux_desktop_app

This file was deleted.

1 change: 0 additions & 1 deletion src/backend/bookmark_manager.rs
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,6 @@ impl BookmarkManager {

a.cmp(&b)
});
println!("{:?}", json);

for (topic, links) in json {
let mut split = topic.split('_').collect::<Vec<&str>>();
Expand Down
2 changes: 1 addition & 1 deletion src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

use tokio::runtime::Runtime;

use Stash::utils::{run_first_error_app::run_first_error_app, run_main_app::run_main_app};
use stash::utils::{run_first_error_app::run_first_error_app, run_main_app::run_main_app};

fn check_env() -> Result<(), String> {
#[cfg(any(target_os = "windows", target_os = "linux"))]
Expand Down
2 changes: 1 addition & 1 deletion src/ui/about.rs
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ impl AboutViewport {

ui.vertical_centered(|ui| {
ui.add(
Image::new(include_image!("../../assets/app-icon.png"))
Image::new(include_image!("../../assets/stash.png"))
.rounding(Rounding::same(4.0))
.fit_to_exact_size(vec2(100., 100.))
.show_loading_spinner(true),
Expand Down
2 changes: 1 addition & 1 deletion src/utils/run_first_error_app.rs
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ pub fn run_first_error_app(error: String) -> Result<(), eframe::Error> {
.with_window_level(WindowLevel::Normal)
.with_min_inner_size(min_size)
.with_icon(
from_png_bytes(include_bytes!("../../assets/app-icon.png"))
from_png_bytes(include_bytes!("../../assets/stash.png"))
.expect("Failed to load icon"),
)
.with_app_id("io.github.aymanfarsi.stash"),
Expand Down
2 changes: 1 addition & 1 deletion src/utils/run_main_app.rs
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ pub fn run_main_app() -> Result<(), eframe::Error> {
.with_taskbar(true)
.with_visible(true)
.with_icon(
from_png_bytes(include_bytes!("../../assets/app-icon.png"))
from_png_bytes(include_bytes!("../../assets/stash.png"))
.expect("Failed to load icon"),
)
.with_app_id("io.github.aymanfarsi.stash"),
Expand Down

0 comments on commit 1e13c93

Please sign in to comment.