From b8863025498af883e070a9bfa78388152ddc724a Mon Sep 17 00:00:00 2001 From: Javier Feliz Date: Thu, 28 Aug 2025 18:44:32 -0400 Subject: [PATCH] Update readme --- README.md | 186 ++++++++++++++++++++++++++++++++++++++++++++++++++++- flake.lock | 61 ++++++++++++++++++ flake.nix | 15 +++-- 3 files changed, 257 insertions(+), 5 deletions(-) create mode 100644 flake.lock diff --git a/README.md b/README.md index acebca6..2b2c348 100644 --- a/README.md +++ b/README.md @@ -1,3 +1,187 @@ # WayCast -Raycast for linux. We deserve this. \ No newline at end of file +A Raycast-like application launcher for Linux with Qt6 and Wayland support. We deserve this. + +## Features + +- **Fast fuzzy search** with AVX2 acceleration +- **Desktop application discovery** via XDG desktop entries +- **File search** with path-based filtering (e.g., `wallpapers/sunset.jpg`) +- **Plugin system** for extensible functionality +- **Modern UI** with Material Dark theme +- **Wayland native** with layer shell support +- **Semi-transparent** window + +## Installation + +### Quick Install (Nix) + +```bash +nix profile install git+https://gitgud.foo/thegrind/waycast +``` + +### Run Without Installing + +```bash +nix run git+https://gitgud.foo/thegrind/waycast +``` + +### NixOS System-Wide Installation + +Add to your `flake.nix`: + +```nix +{ + inputs = { + nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable"; + waycast.url = "git+https://gitgud.foo/thegrind/waycast"; + }; + + outputs = { nixpkgs, waycast, ... }: { + nixosConfigurations.yourhost = nixpkgs.lib.nixosSystem { + modules = [ + waycast.nixosModules.waycast + { + programs.waycast.enable = true; + } + ]; + }; + }; +} +``` + +Then rebuild your system: +```bash +sudo nixos-rebuild switch --flake . +``` + +### Home Manager Installation + +Add to your home-manager configuration: + +```nix +{ + inputs = { + home-manager.url = "github:nix-community/home-manager"; + waycast.url = "git+https://gitgud.foo/thegrind/waycast"; + }; + + outputs = { home-manager, waycast, ... }: { + homeConfigurations.youruser = home-manager.lib.homeManagerConfiguration { + modules = [ + waycast.homeManagerModules.waycast + { + programs.waycast.enable = true; + } + ]; + }; + }; +} +``` + +Then apply the configuration: +```bash +home-manager switch --flake . +``` + +### Traditional Installation + +If you're not using Nix, you can build from source: + +#### Dependencies +- Qt6 (Core, Gui, Qml, Quick, QuickControls2, Widgets, Wayland) +- Layer Shell Qt +- GLib/GIO +- CMake 3.21+ +- Ninja (recommended) +- C++20 compiler + +#### Build +```bash +git clone https://gitgud.foo/thegrind/waycast +cd waycast +make configure # or: cmake -S . -B build -G Ninja +make bld # or: cmake --build build +make install # or: cp ./build/waycast ~/bin/waycast +``` + +## Usage + +Launch waycast and start typing: + +- **Applications**: Type app name (e.g., `firefox`, `kate`) +- **Files**: Type filename (e.g., `config.txt`) +- **Path search**: Type path + filename (e.g., `wallpapers/sunset`) +- **Directory browse**: Type path ending with `/` (e.g., `Documents/`) + +### Keyboard Shortcuts + +- `Escape` - Close launcher +- `↑/↓` - Navigate results +- `Enter` - Execute selected item + +## Development + +### Development Shell + +```bash +nix develop git+https://gitgud.foo/thegrind/waycast +``` + +Or locally: +```bash +nix develop +``` + +Inside the dev shell: +```bash +make configure # Configure build +make bld # Build project +make run # Run waycast +make br # Build and run +``` + +### Architecture + +- **Plugin system**: `lib/plugins/` - Extensible search providers +- **Fuzzy search**: `lib/fuzzy.hpp` - AVX2-accelerated string matching +- **UI**: Qt6 QML with Material Dark theme +- **File utilities**: `lib/files.hpp` - File system operations +- **Icon resolution**: `lib/IconUtil.hpp` - System theme integration + +### Build Systems + +WayCast supports multiple build systems: + +- **CMake + Ninja** (recommended): `make configure && make bld` +- **Zig**: `zig build run` +- **Nix**: `nix build` + +## Configuration + +Currently, WayCast works out of the box with sensible defaults: + +- **Search directories**: `~/Documents`, `~/Desktop`, `~/Downloads` +- **Search depth**: 3 levels +- **File limit**: 1000 files +- **Ignored directories**: `node_modules`, `.git`, `build`, etc. + +## Requirements + +- **Linux** with Wayland compositor (Sway, Hyprland, KDE Plasma, GNOME, etc.) +- **Qt6** with Wayland support +- **Layer Shell Qt** for proper window positioning + +## License + +MIT + +## Contributing + +1. Fork the repository +2. Create your feature branch +3. Make your changes +4. Test with `nix build` and `nix run` +5. Submit a pull request + +The development environment includes all dependencies and development tools needed to contribute. \ No newline at end of file diff --git a/flake.lock b/flake.lock new file mode 100644 index 0000000..204b508 --- /dev/null +++ b/flake.lock @@ -0,0 +1,61 @@ +{ + "nodes": { + "flake-utils": { + "inputs": { + "systems": "systems" + }, + "locked": { + "lastModified": 1731533236, + "narHash": "sha256-l0KFg5HjrsfsO/JpG+r7fRrqm12kzFHyUHqHCVpMMbI=", + "owner": "numtide", + "repo": "flake-utils", + "rev": "11707dc2f618dd54ca8739b309ec4fc024de578b", + "type": "github" + }, + "original": { + "owner": "numtide", + "repo": "flake-utils", + "type": "github" + } + }, + "nixpkgs": { + "locked": { + "lastModified": 1756266583, + "narHash": "sha256-cr748nSmpfvnhqSXPiCfUPxRz2FJnvf/RjJGvFfaCsM=", + "owner": "NixOS", + "repo": "nixpkgs", + "rev": "8a6d5427d99ec71c64f0b93d45778c889005d9c2", + "type": "github" + }, + "original": { + "owner": "NixOS", + "ref": "nixos-unstable", + "repo": "nixpkgs", + "type": "github" + } + }, + "root": { + "inputs": { + "flake-utils": "flake-utils", + "nixpkgs": "nixpkgs" + } + }, + "systems": { + "locked": { + "lastModified": 1681028828, + "narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=", + "owner": "nix-systems", + "repo": "default", + "rev": "da67096a3b9bf56a91d16901293e51ba5b49a27e", + "type": "github" + }, + "original": { + "owner": "nix-systems", + "repo": "default", + "type": "github" + } + } + }, + "root": "root", + "version": 7 +} diff --git a/flake.nix b/flake.nix index 1843116..0735aa4 100644 --- a/flake.nix +++ b/flake.nix @@ -38,7 +38,7 @@ qt6.qtwayland # Layer Shell Qt for Wayland - layer-shell-qt + kdePackages.layer-shell-qt # GLib/GIO dependencies glib @@ -50,8 +50,8 @@ # Set Qt6 module path and other environment variables qtWrapperArgs = [ - "--prefix QML2_IMPORT_PATH : ${qt6.qtdeclarative}/${qt6.qtbase.qtQmlPrefix}" - "--prefix QT_PLUGIN_PATH : ${qt6.qtbase.qtPluginPrefix}" + "--prefix QML2_IMPORT_PATH : ${pkgs.qt6.qtdeclarative}/${pkgs.qt6.qtbase.qtQmlPrefix}" + "--prefix QT_PLUGIN_PATH : ${pkgs.qt6.qtbase.qtPluginPrefix}" ]; cmakeFlags = [ @@ -59,6 +59,13 @@ "-DCMAKE_BUILD_TYPE=Release" ]; + installPhase = '' + runHook preInstall + mkdir -p $out/bin + cp waycast $out/bin/ + runHook postInstall + ''; + # Enable Qt6 and Wayland features postPatch = '' # Ensure we can find Qt6 components @@ -101,7 +108,7 @@ qt6.qttools # For Qt development tools # Layer Shell Qt - layer-shell-qt + kdePackages.layer-shell-qt # GLib/GIO glib.dev