From 048dec3e6bb35a2fbfc7ba6b31020b91747ed38a Mon Sep 17 00:00:00 2001 From: jrosh Date: Sun, 14 Sep 2025 21:41:48 +0200 Subject: [PATCH] add readme and name --- Cargo.toml | 2 +- README.md | 76 +++++++++++++++++++++++++++++++++++++++++++++++++++ src/config.rs | 2 +- src/main.rs | 2 +- 4 files changed, 79 insertions(+), 3 deletions(-) create mode 100644 README.md diff --git a/Cargo.toml b/Cargo.toml index 142f078..93c84ef 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,5 +1,5 @@ [package] -name = "ollama-chat" +name = "ollama-chat-gtk4" version = "0.1.0" edition = "2021" diff --git a/README.md b/README.md new file mode 100644 index 0000000..f214846 --- /dev/null +++ b/README.md @@ -0,0 +1,76 @@ +# Minimal Ollama Gtk-4 client + +A minimal, native GTK4 desktop client for Ollama with real-time streaming and markdown support. + +## Installation + +### Dependencies + +#### Ubuntu/Debian +```bash +sudo apt install libgtk-4-dev build-essential +``` + +#### Fedora +```bash +sudo dnf install gtk4-devel gcc +``` + +#### Arch Linux +```bash +sudo pacman -S gtk4 base-devel +``` + +## Configuration + +Configuration file is automatically created at: +- Linux: `~/.config/ollama-chat-gtk4/config.toml` +- Windows: `%APPDATA%\ollama-chat-gtk4\config.toml` +- macOS: `~/Library/Application Support/ollama-chat-gtk4/config.toml` + +## Building + +```bash +# Release build +cargo build --release +# or +cargo install --path . --root ~/.local + +``` + +### Configuration Options + +```toml +[ui] +window_font_size = 16 +chat_font_size = 18 +input_font_size = 16 +code_font_family = "BlexMono Nerd Font Mono" + +[colors] +chat_background = "#ffffff" +code_background = "#f5f5f5" +window_background = "#fafafa" +primary_text = "#333333" +code_text = "#d63384" +link_text = "#0066cc" +think_text = "#6666cc" +send_button = "#007bff" +stop_button = "#dc3545" + +[ollama] +url = "http://localhost:11434" +timeout_seconds = 120 +``` + +## Building + +```bash +# Release build +cargo build --release +# or +cargo install --path . --root ~/.local + +``` + +MIT licence \ No newline at end of file diff --git a/src/config.rs b/src/config.rs index 7b7be36..fb93705 100644 --- a/src/config.rs +++ b/src/config.rs @@ -124,7 +124,7 @@ impl Config { fn get_config_path() -> Result> { let config_dir = dirs::config_dir() .ok_or("Could not determine config directory")? - .join("ollama-chat"); + .join("ollama-chat-gtk4"); Ok(config_dir.join("config.toml")) } diff --git a/src/main.rs b/src/main.rs index b1eba97..012faea 100644 --- a/src/main.rs +++ b/src/main.rs @@ -9,7 +9,7 @@ mod markdown_renderer; mod ui; mod config; -const APP_ID: &str = "com.example.ollama-chat"; +const APP_ID: &str = "com.example.ollama-chat-gtk4"; fn main() -> glib::ExitCode { let app = Application::builder().application_id(APP_ID).build();