docs: update zellij-ps to reflect project switcher functionality
- Update package description and fix mainProgram typo - Rewrite documentation to describe project switching, not process viewing - Add PROJECT_FOLDERS configuration and usage examples - Update all references across docs (README, guides, module overviews)
This commit is contained in:
206
docs/packages/code2prompt.md
Normal file
206
docs/packages/code2prompt.md
Normal file
@@ -0,0 +1,206 @@
|
||||
# code2prompt
|
||||
|
||||
A CLI tool that converts your codebase into a single LLM prompt with a source tree, prompt templating, and token counting.
|
||||
|
||||
## Description
|
||||
|
||||
code2prompt is a command-line tool designed to help developers prepare their codebases for analysis by Large Language Models (LLMs). It creates a comprehensive prompt that includes:
|
||||
|
||||
- Source code tree structure
|
||||
- Concatenated file contents
|
||||
- Prompt templates
|
||||
- Token counting for context management
|
||||
|
||||
## Features
|
||||
|
||||
- 📁 **Source Tree Generation**: Visual representation of your codebase structure
|
||||
- 📝 **Code Concatenation**: Merges multiple files into a single prompt
|
||||
- 🧩 **Prompt Templates**: Customizable prompt templates
|
||||
- 🔢 **Token Counting**: Accurate token counting for various LLMs
|
||||
- 🎯 **Selective Inclusion**: Choose specific files and directories
|
||||
- 🔒 **Smart Filtering**: Exclude files by pattern (.git, node_modules, etc.)
|
||||
|
||||
## Installation
|
||||
|
||||
### Via Overlay
|
||||
|
||||
```nix
|
||||
{pkgs, ...}: {
|
||||
environment.systemPackages = with pkgs; [
|
||||
code2prompt
|
||||
];
|
||||
}
|
||||
```
|
||||
|
||||
### Direct Reference
|
||||
|
||||
```nix
|
||||
{pkgs, ...}: {
|
||||
environment.systemPackages = with pkgs; [
|
||||
inputs.m3ta-nixpkgs.packages.${pkgs.system}.code2prompt
|
||||
];
|
||||
}
|
||||
```
|
||||
|
||||
### Run Directly
|
||||
|
||||
```bash
|
||||
nix run git+https://code.m3ta.dev/m3tam3re/nixpkgs#code2prompt
|
||||
```
|
||||
|
||||
## Usage
|
||||
|
||||
### Basic Usage
|
||||
|
||||
```bash
|
||||
# Generate prompt for current directory
|
||||
code2prompt
|
||||
|
||||
# Generate for specific directory
|
||||
code2prompt /path/to/project
|
||||
|
||||
# Output to file
|
||||
code2prompt -o prompt.txt
|
||||
|
||||
# Use custom template
|
||||
code2prompt --template my_template.md
|
||||
```
|
||||
|
||||
### Common Options
|
||||
|
||||
```bash
|
||||
# Include specific files
|
||||
code2prompt --include "*.py" "*.js"
|
||||
|
||||
# Exclude specific files
|
||||
code2prompt --exclude "*.test.*" "node_modules/*"
|
||||
|
||||
# Generate source tree only
|
||||
code2prompt --tree-only
|
||||
|
||||
# Add custom context
|
||||
code2prompt --context "This is a Node.js project"
|
||||
```
|
||||
|
||||
### Examples
|
||||
|
||||
#### Prepare Codebase for GPT-4
|
||||
|
||||
```bash
|
||||
code2prompt \
|
||||
--template gpt4-template.md \
|
||||
--include "*.ts" "*.tsx" \
|
||||
--exclude "node_modules" "*.test.ts" \
|
||||
--context "Review this TypeScript codebase" \
|
||||
-o codebase_prompt.txt
|
||||
|
||||
# Then feed to GPT-4
|
||||
cat codebase_prompt.txt
|
||||
```
|
||||
|
||||
#### Analyze Specific Directory
|
||||
|
||||
```bash
|
||||
# Analyze only src directory
|
||||
code2prompt src/ \
|
||||
--include "*.rs" \
|
||||
--context "Analyze this Rust codebase" \
|
||||
-o src_analysis.txt
|
||||
```
|
||||
|
||||
#### Create Source Tree
|
||||
|
||||
```bash
|
||||
# Generate only source tree
|
||||
code2prompt --tree-only > tree.txt
|
||||
|
||||
cat tree.txt
|
||||
```
|
||||
|
||||
## Use Cases
|
||||
|
||||
### Code Review
|
||||
|
||||
Prepare code for AI-assisted code review:
|
||||
|
||||
```bash
|
||||
code2prompt \
|
||||
--template code-review.md \
|
||||
--include "*.py" \
|
||||
--context "Review this Python code for security issues" \
|
||||
-o review_prompt.txt
|
||||
```
|
||||
|
||||
### Documentation Generation
|
||||
|
||||
Generate documentation using LLMs:
|
||||
|
||||
```bash
|
||||
code2prompt \
|
||||
--template docs-template.md \
|
||||
--include "*.js" "*.md" \
|
||||
--context "Generate API documentation" \
|
||||
-o docs_prompt.txt
|
||||
```
|
||||
|
||||
### Code Migration
|
||||
|
||||
Prepare code for migration assistance:
|
||||
|
||||
```bash
|
||||
code2prompt \
|
||||
--template migration-template.md \
|
||||
--include "*.js" \
|
||||
--context "Migrate this JavaScript to TypeScript" \
|
||||
-o migration_prompt.txt
|
||||
```
|
||||
|
||||
## Configuration
|
||||
|
||||
### Environment Variables
|
||||
|
||||
- `CODE2PROMPT_TEMPLATE_DIR`: Directory containing custom templates
|
||||
- `CODE2PROMPT_DEFAULT_TEMPLATE`: Default template to use
|
||||
|
||||
### Template Files
|
||||
|
||||
Custom templates can include:
|
||||
|
||||
```markdown
|
||||
# Codebase Analysis
|
||||
|
||||
## Context
|
||||
{context}
|
||||
|
||||
## Directory Tree
|
||||
{tree}
|
||||
|
||||
## Code
|
||||
{code}
|
||||
|
||||
## Instructions
|
||||
{instructions}
|
||||
```
|
||||
|
||||
## Build Information
|
||||
|
||||
- **Version**: 4.0.2
|
||||
- **Language**: Rust
|
||||
- **License**: MIT
|
||||
- **Source**: [GitHub](https://github.com/mufeedvh/code2prompt)
|
||||
|
||||
## Dependencies
|
||||
|
||||
- `openssl` - Secure communication
|
||||
- `pkg-config` - Build configuration
|
||||
|
||||
## Platform Support
|
||||
|
||||
- Linux (primary)
|
||||
- macOS (may work)
|
||||
- Windows (not tested)
|
||||
|
||||
## Related
|
||||
|
||||
- [Adding Packages](../guides/adding-packages.md) - How to add new packages
|
||||
- [Quick Start](../QUICKSTART.md) - Getting started guide
|
||||
190
docs/packages/hyprpaper-random.md
Normal file
190
docs/packages/hyprpaper-random.md
Normal file
@@ -0,0 +1,190 @@
|
||||
# hyprpaper-random
|
||||
|
||||
Minimal random wallpaper setter for Hyprpaper.
|
||||
|
||||
## Description
|
||||
|
||||
hyprpaper-random is a shell script that randomly selects and applies a wallpaper from a configured directory for use with Hyprpaper on Hyprland. It's designed to be minimal and fast.
|
||||
|
||||
## Features
|
||||
|
||||
- 🎲 **Random Selection**: Picks a random wallpaper from directory
|
||||
- 🖼️ **Multi-Monitor Support**: Applies wallpaper to all monitors
|
||||
- 📁 **Flexible Directory**: Configurable via environment variable
|
||||
- 🔍 **Format Support**: jpg, jpeg, png, webp, avif
|
||||
- ⚡ **Fast**: Uses `fd` for quick file searching
|
||||
- 🔄 **Safe**: Null-safe handling and error checking
|
||||
|
||||
## Installation
|
||||
|
||||
### Via Overlay
|
||||
|
||||
```nix
|
||||
{pkgs, ...}: {
|
||||
environment.systemPackages = with pkgs; [
|
||||
hyprpaper-random
|
||||
];
|
||||
}
|
||||
```
|
||||
|
||||
### Direct Reference
|
||||
|
||||
```nix
|
||||
{pkgs, ...}: {
|
||||
environment.systemPackages = with pkgs; [
|
||||
inputs.m3ta-nixpkgs.packages.${pkgs.system}.hyprpaper-random
|
||||
];
|
||||
}
|
||||
```
|
||||
|
||||
### Run Directly
|
||||
|
||||
```bash
|
||||
nix run git+https://code.m3ta.dev/m3tam3re/nixpkgs#hyprpaper-random
|
||||
```
|
||||
|
||||
## Usage
|
||||
|
||||
### Basic Usage
|
||||
|
||||
```bash
|
||||
# Use default directory ($XDG_CONFIG_HOME/hypr/wallpapers or ~/.config/hypr/wallpapers)
|
||||
hyprpaper-random
|
||||
|
||||
# Use custom directory
|
||||
WALLPAPER_DIR=~/Pictures/wallpapers hyprpaper-random
|
||||
|
||||
# Or set directory permanently
|
||||
export WALLPAPER_DIR=~/Pictures/wallpapers
|
||||
hyprpaper-random
|
||||
```
|
||||
|
||||
### With Hyprpaper
|
||||
|
||||
Make sure Hyprpaper is running and loaded:
|
||||
|
||||
```bash
|
||||
# Start Hyprpaper
|
||||
hyprpaper &
|
||||
|
||||
# Set random wallpaper
|
||||
hyprpaper-random
|
||||
```
|
||||
|
||||
### Automate with Keybinding
|
||||
|
||||
Add to Hyprland config:
|
||||
|
||||
```nix
|
||||
{pkgs, ...}: {
|
||||
wayland.windowManager.hyprland.settings = {
|
||||
bindm = [
|
||||
"SUPER, mouse, movewindow"
|
||||
];
|
||||
|
||||
bind = [
|
||||
# Set random wallpaper on SUPER + W
|
||||
"SUPER, W, exec, ${pkgs.hyprpaper-random}/bin/hyprpaper-random"
|
||||
];
|
||||
};
|
||||
}
|
||||
```
|
||||
|
||||
### Automate with Cron
|
||||
|
||||
```bash
|
||||
# Change wallpaper every hour
|
||||
0 * * * * hyprpaper-random
|
||||
```
|
||||
|
||||
## Configuration
|
||||
|
||||
### Directory Setup
|
||||
|
||||
Default wallpaper directory:
|
||||
|
||||
```
|
||||
$XDG_CONFIG_HOME/hypr/wallpapers/
|
||||
# or
|
||||
~/.config/hypr/wallpapers/
|
||||
```
|
||||
|
||||
Custom directory:
|
||||
|
||||
```bash
|
||||
# Temporary
|
||||
WALLPAPER_DIR=~/Pictures/my-wallpapers hyprpaper-random
|
||||
|
||||
# Permanent (add to shell config)
|
||||
export WALLPAPER_DIR=~/Pictures/my-wallpapers
|
||||
```
|
||||
|
||||
### Environment Variables
|
||||
|
||||
- `WALLPAPER_DIR`: Path to wallpaper directory (default: `$XDG_CONFIG_HOME/hypr/wallpapers`)
|
||||
- `XDG_CONFIG_HOME`: Config directory base (default: `~/.config`)
|
||||
|
||||
## Requirements
|
||||
|
||||
- `hyprland`: Hyprland window manager (for `hyprctl`)
|
||||
- `hyprpaper`: Wallpaper utility for Hyprland
|
||||
- `fd`: Fast file search
|
||||
- `coreutils`: For `shuf` command
|
||||
- `gawk`: Text processing
|
||||
|
||||
## Platform Support
|
||||
|
||||
- Linux (primary, requires Hyprland)
|
||||
- macOS (not supported)
|
||||
- Windows (not supported)
|
||||
|
||||
## Build Information
|
||||
|
||||
- **Version**: 0.1.1
|
||||
- **Type**: Shell script
|
||||
- **License**: MIT
|
||||
|
||||
## Troubleshooting
|
||||
|
||||
### No Wallpapers Found
|
||||
|
||||
Error: `No wallpapers found in: /path/to/dir`
|
||||
|
||||
**Solution**: Ensure wallpaper directory exists and contains images:
|
||||
|
||||
```bash
|
||||
ls -la $WALLPAPER_DIR # Check directory exists
|
||||
ls -la $WALLPAPER_DIR/*.jpg # Check for images
|
||||
```
|
||||
|
||||
### Hyprctl Not Found
|
||||
|
||||
Error: `hyprctl: command not found`
|
||||
|
||||
**Solution**: Ensure Hyprland is installed:
|
||||
|
||||
```nix
|
||||
{pkgs, ...}: {
|
||||
environment.systemPackages = with pkgs; [
|
||||
hyprland
|
||||
hyprpaper
|
||||
];
|
||||
}
|
||||
```
|
||||
|
||||
### Wallpaper Not Changing
|
||||
|
||||
**Solution**: Check if Hyprpaper is running:
|
||||
|
||||
```bash
|
||||
# Check status
|
||||
hyprctl hyprpaper listloaded
|
||||
|
||||
# Check for errors
|
||||
journalctl -u hyprpaper -f
|
||||
```
|
||||
|
||||
## Related
|
||||
|
||||
- [Adding Packages](../guides/adding-packages.md) - How to add new packages
|
||||
- [Quick Start](../QUICKSTART.md) - Getting started guide
|
||||
180
docs/packages/launch-webapp.md
Normal file
180
docs/packages/launch-webapp.md
Normal file
@@ -0,0 +1,180 @@
|
||||
# launch-webapp
|
||||
|
||||
Launches a web app using your default browser in app mode.
|
||||
|
||||
## Description
|
||||
|
||||
launch-webapp is a shell script that launches web applications (like Discord, Spotify Web, etc.) in your default browser's "app mode". This provides a more native-like experience for web apps.
|
||||
|
||||
## Features
|
||||
|
||||
- 🌐 **Auto-Detection**: Detects your default web browser
|
||||
- 🚀 **App Mode**: Launches in dedicated app window (no address bar)
|
||||
- 🎨 **Native Feel**: Removes browser chrome for app-like experience
|
||||
- 🔄 **Session Management**: Keeps web apps separate from regular browsing
|
||||
- 🖥️ **Wayland Support**: Works with Wayland session managers (via `uwsm`)
|
||||
|
||||
## Installation
|
||||
|
||||
### Via Overlay
|
||||
|
||||
```nix
|
||||
{pkgs, ...}: {
|
||||
environment.systemPackages = with pkgs; [
|
||||
launch-webapp
|
||||
];
|
||||
}
|
||||
```
|
||||
|
||||
### Direct Reference
|
||||
|
||||
```nix
|
||||
{pkgs, ...}: {
|
||||
environment.systemPackages = with pkgs; [
|
||||
inputs.m3ta-nixpkgs.packages.${pkgs.system}.launch-webapp
|
||||
];
|
||||
}
|
||||
```
|
||||
|
||||
### Run Directly
|
||||
|
||||
```bash
|
||||
nix run git+https://code.m3ta.dev/m3tam3re/nixpkgs#launch-webapp
|
||||
```
|
||||
|
||||
## Usage
|
||||
|
||||
### Basic Usage
|
||||
|
||||
```bash
|
||||
# Launch web app
|
||||
launch-webapp https://web.telegram.org
|
||||
|
||||
# Launch with additional arguments
|
||||
launch-webapp https://web.whatsapp.com --app-name="WhatsApp"
|
||||
```
|
||||
|
||||
### Examples
|
||||
|
||||
#### Launch Discord Web
|
||||
|
||||
```bash
|
||||
launch-webapp https://discord.com/app
|
||||
```
|
||||
|
||||
#### Launch Spotify Web
|
||||
|
||||
```bash
|
||||
launch-webapp https://open.spotify.com
|
||||
```
|
||||
|
||||
#### Launch Google Chat
|
||||
|
||||
```bash
|
||||
launch-webapp https://chat.google.com
|
||||
```
|
||||
|
||||
## Configuration
|
||||
|
||||
### Supported Browsers
|
||||
|
||||
The script auto-detects and supports:
|
||||
|
||||
- Google Chrome
|
||||
- Brave Browser
|
||||
- Microsoft Edge
|
||||
- Opera
|
||||
- Vivaldi
|
||||
- Chromium (fallback)
|
||||
|
||||
### Default Browser
|
||||
|
||||
The script uses `xdg-settings` to detect your default browser.
|
||||
|
||||
```bash
|
||||
# Check your default browser
|
||||
xdg-settings get default-web-browser
|
||||
```
|
||||
|
||||
### Wayland Support
|
||||
|
||||
The script uses `uwsm` (Wayland Session Manager) for proper Wayland support. Ensure `uwsm` is installed and configured.
|
||||
|
||||
## Desktop Integration
|
||||
|
||||
### Create Desktop Entry
|
||||
|
||||
Create `~/.local/share/applications/webapp-discord.desktop`:
|
||||
|
||||
```ini
|
||||
[Desktop Entry]
|
||||
Name=Discord Web
|
||||
Comment=Discord Web App
|
||||
Exec=launch-webapp https://discord.com/app
|
||||
Icon=discord
|
||||
Type=Application
|
||||
Categories=Network;InstantMessaging;
|
||||
```
|
||||
|
||||
### Add to Menu
|
||||
|
||||
The desktop entry will appear in your application menu after creating it.
|
||||
|
||||
## Requirements
|
||||
|
||||
- `xdg-utils`: For default browser detection
|
||||
- `uwsm`: Wayland session manager
|
||||
- Your preferred browser (Chrome, Brave, etc.)
|
||||
|
||||
## Platform Support
|
||||
|
||||
- Linux (primary, requires Wayland)
|
||||
- macOS (not tested)
|
||||
- Windows (not supported)
|
||||
|
||||
## Build Information
|
||||
|
||||
- **Version**: 0.1.0
|
||||
- **Type**: Shell script
|
||||
- **License**: MIT
|
||||
|
||||
## Troubleshooting
|
||||
|
||||
### Browser Not Found
|
||||
|
||||
If the script doesn't find your browser, ensure it's installed:
|
||||
|
||||
```nix
|
||||
{pkgs, ...}: {
|
||||
environment.systemPackages = with pkgs; [
|
||||
google-chrome
|
||||
# or brave-browser, microsoft-edge, etc.
|
||||
];
|
||||
}
|
||||
```
|
||||
|
||||
### Wayland Issues
|
||||
|
||||
If you encounter Wayland issues:
|
||||
|
||||
```bash
|
||||
# Check uwsm is installed
|
||||
which uwsm
|
||||
|
||||
# Check Wayland session
|
||||
echo $XDG_SESSION_TYPE # Should be "wayland"
|
||||
```
|
||||
|
||||
### App Won't Launch
|
||||
|
||||
Check the browser supports app mode:
|
||||
|
||||
```bash
|
||||
# Test manually
|
||||
google-chrome --app=https://example.com
|
||||
```
|
||||
|
||||
## Related
|
||||
|
||||
- [Adding Packages](../guides/adding-packages.md) - How to add new packages
|
||||
- [Quick Start](../QUICKSTART.md) - Getting started guide
|
||||
268
docs/packages/mem0.md
Normal file
268
docs/packages/mem0.md
Normal file
@@ -0,0 +1,268 @@
|
||||
# mem0
|
||||
|
||||
Long-term memory layer for AI agents with REST API support.
|
||||
|
||||
## Description
|
||||
|
||||
Mem0 provides a sophisticated memory management system for AI applications and agents. It enables AI assistants to maintain persistent memory across conversations and sessions using vector storage.
|
||||
|
||||
## Features
|
||||
|
||||
- 💾 **Long-term Memory**: Persistent memory across conversations
|
||||
- 🔍 **Semantic Search**: Vector-based similarity search
|
||||
- 🤖 **Multiple LLM Support**: OpenAI, Anthropic, Groq, Ollama, etc.
|
||||
- 📊 **Vector Stores**: Qdrant, Chroma, Pinecone, pgvector, etc.
|
||||
- 🌐 **REST API**: Easy integration via HTTP endpoints
|
||||
- 🎯 **Multi-modal Support**: Text and image memories
|
||||
- 🔧 **Configurable**: Flexible LLM and embedding models
|
||||
|
||||
## Installation
|
||||
|
||||
### Via Overlay
|
||||
|
||||
```nix
|
||||
{pkgs, ...}: {
|
||||
environment.systemPackages = with pkgs; [
|
||||
mem0
|
||||
];
|
||||
}
|
||||
```
|
||||
|
||||
### Direct Reference
|
||||
|
||||
```nix
|
||||
{pkgs, ...}: {
|
||||
environment.systemPackages = with pkgs; [
|
||||
inputs.m3ta-nixpkgs.packages.${pkgs.system}.mem0
|
||||
];
|
||||
}
|
||||
```
|
||||
|
||||
### Run Directly
|
||||
|
||||
```bash
|
||||
nix run git+https://code.m3ta.dev/m3tam3re/nixpkgs#mem0
|
||||
```
|
||||
|
||||
## Usage
|
||||
|
||||
### Command Line
|
||||
|
||||
```bash
|
||||
# Start mem0 server
|
||||
mem0-server
|
||||
|
||||
# With custom port
|
||||
MEM0_PORT=8080 mem0-server
|
||||
|
||||
# With LLM provider
|
||||
MEM0_LLM_PROVIDER=openai OPENAI_API_KEY=sk-xxx mem0-server
|
||||
```
|
||||
|
||||
### Python Library
|
||||
|
||||
```python
|
||||
from mem0 import Memory
|
||||
|
||||
# Initialize with OpenAI
|
||||
memory = Memory(
|
||||
llm_provider="openai",
|
||||
llm_model="gpt-4o-mini",
|
||||
vector_store="qdrant",
|
||||
openai_api_key="sk-xxx"
|
||||
)
|
||||
|
||||
# Add a memory
|
||||
result = memory.add(
|
||||
"I prefer coffee over tea",
|
||||
metadata={"user_id": "123"}
|
||||
)
|
||||
|
||||
# Search memories
|
||||
memories = memory.search("What does the user prefer?")
|
||||
```
|
||||
|
||||
### REST API
|
||||
|
||||
```bash
|
||||
# Start server
|
||||
mem0-server
|
||||
|
||||
# Add memory
|
||||
curl -X POST http://localhost:8000/v1/memories \
|
||||
-H "Content-Type: application/json" \
|
||||
-d '{"content": "User likes Python"}'
|
||||
|
||||
# Search memories
|
||||
curl http://localhost:8000/v1/memories/search?q=Python
|
||||
```
|
||||
|
||||
## Configuration
|
||||
|
||||
### Environment Variables
|
||||
|
||||
```bash
|
||||
# LLM Configuration
|
||||
export MEM0_LLM_PROVIDER=openai
|
||||
export MEM0_LLM_MODEL=gpt-4o-mini
|
||||
export MEM0_LLM_TEMPERATURE=0.7
|
||||
export OPENAI_API_KEY=sk-xxx
|
||||
|
||||
# Vector Store
|
||||
export MEM0_VECTOR_PROVIDER=qdrant
|
||||
export QDRANT_HOST=localhost
|
||||
export QDRANT_PORT=6333
|
||||
|
||||
# Server
|
||||
export MEM0_HOST=0.0.0.0
|
||||
export MEM0_PORT=8000
|
||||
export MEM0_WORKERS=4
|
||||
export MEM0_LOG_LEVEL=info
|
||||
```
|
||||
|
||||
### NixOS Module (Recommended)
|
||||
|
||||
Use the NixOS module for production:
|
||||
|
||||
```nix
|
||||
{config, ...}: {
|
||||
imports = [m3ta-nixpkgs.nixosModules.mem0];
|
||||
|
||||
m3ta.mem0 = {
|
||||
enable = true;
|
||||
port = 8000;
|
||||
llm = {
|
||||
provider = "openai";
|
||||
apiKeyFile = "/run/secrets/openai-api-key";
|
||||
model = "gpt-4o-mini";
|
||||
};
|
||||
vectorStore = {
|
||||
provider = "qdrant";
|
||||
config = {
|
||||
host = "localhost";
|
||||
port = 6333;
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
```
|
||||
|
||||
See [mem0 Module](../modules/nixos/mem0.md) for full module documentation.
|
||||
|
||||
## Supported LLM Providers
|
||||
|
||||
| Provider | Model Examples | Notes |
|
||||
|----------|---------------|-------|
|
||||
| `openai` | gpt-4, gpt-3.5-turbo | Most tested |
|
||||
| `anthropic` | claude-3-opus, claude-3-sonnet | Requires key |
|
||||
| `groq` | mixtral-8x7b-32768 | Fast inference |
|
||||
| `ollama` | llama2, mistral | Local only |
|
||||
| `together` | llama-2-70b | API access |
|
||||
|
||||
## Supported Vector Stores
|
||||
|
||||
| Provider | Requirements | Notes |
|
||||
|----------|--------------|-------|
|
||||
| `qdrant` | qdrant server | Recommended |
|
||||
| `chroma` | chroma server | Simple setup |
|
||||
| `pgvector` | PostgreSQL + pgvector | SQL-based |
|
||||
| `pinecone` | Pinecone API | Cloud only |
|
||||
| `redis` | Redis stack | Fast |
|
||||
| `elasticsearch` | ES cluster | Scalable |
|
||||
|
||||
## Use Cases
|
||||
|
||||
### AI Chatbot with Memory
|
||||
|
||||
```python
|
||||
from mem0 import Memory
|
||||
|
||||
memory = Memory()
|
||||
|
||||
# During conversation
|
||||
memory.add("User works at Google as a software engineer")
|
||||
|
||||
# Later conversations
|
||||
memories = memory.search("Where does the user work?")
|
||||
# Returns: ["User works at Google as a software engineer"]
|
||||
```
|
||||
|
||||
### Personal Assistant
|
||||
|
||||
```python
|
||||
memory = Memory()
|
||||
|
||||
# Store preferences
|
||||
memory.add("User prefers dark mode", metadata={"category": "preferences"})
|
||||
memory.add("User is vegetarian", metadata={"category": "diet"})
|
||||
|
||||
# Retrieve relevant info
|
||||
memories = memory.search("What should I cook for the user?")
|
||||
```
|
||||
|
||||
### Code Assistant
|
||||
|
||||
```python
|
||||
memory = Memory()
|
||||
|
||||
# Store project context
|
||||
memory.add("This is a NixOS project with custom packages")
|
||||
|
||||
# Later analysis
|
||||
memories = memory.search("What kind of project is this?")
|
||||
```
|
||||
|
||||
## Requirements
|
||||
|
||||
### Vector Store
|
||||
|
||||
You need a vector store running. Example with Qdrant:
|
||||
|
||||
```nix
|
||||
services.qdrant = {
|
||||
enable = true;
|
||||
port = 6333;
|
||||
};
|
||||
```
|
||||
|
||||
### LLM Provider
|
||||
|
||||
You need API keys or local models:
|
||||
|
||||
```nix
|
||||
# OpenAI
|
||||
services.mem0.llm.apiKeyFile = "/run/secrets/openai-api-key";
|
||||
|
||||
# Or use agenix
|
||||
age.secrets.openai-api-key.file = ./secrets/openai.age;
|
||||
```
|
||||
|
||||
## Build Information
|
||||
|
||||
- **Version**: 1.0.0
|
||||
- **Language**: Python
|
||||
- **License**: Apache-2.0
|
||||
- **Source**: [GitHub](https://github.com/mem0ai/mem0)
|
||||
|
||||
## Python Dependencies
|
||||
|
||||
- `litellm` - Multi-LLM support
|
||||
- `qdrant-client` - Qdrant client
|
||||
- `pydantic` - Data validation
|
||||
- `openai` - OpenAI client
|
||||
- `fastapi` - REST API
|
||||
- `uvicorn` - ASGI server
|
||||
- `sqlalchemy` - Database ORM
|
||||
|
||||
## Platform Support
|
||||
|
||||
- Linux (primary)
|
||||
- macOS (may work)
|
||||
- Windows (not tested)
|
||||
|
||||
## Related
|
||||
|
||||
- [mem0 Module](../modules/nixos/mem0.md) - NixOS module documentation
|
||||
- [Adding Packages](../guides/adding-packages.md) - How to add new packages
|
||||
- [Port Management](../guides/port-management.md) - Managing service ports
|
||||
- [Quick Start](../QUICKSTART.md) - Getting started guide
|
||||
172
docs/packages/msty-studio.md
Normal file
172
docs/packages/msty-studio.md
Normal file
@@ -0,0 +1,172 @@
|
||||
# msty-studio
|
||||
|
||||
Msty Studio enables advanced, privacy‑preserving AI workflows entirely on your local machine.
|
||||
|
||||
## Description
|
||||
|
||||
Msty Studio is a desktop application that provides a powerful AI development environment with a focus on privacy. All AI processing happens locally on your machine, ensuring your data never leaves your system.
|
||||
|
||||
## Features
|
||||
|
||||
- 🔒 **Privacy-First**: All AI processing happens locally
|
||||
- 🤖 **Local AI Models**: Support for running local LLMs
|
||||
- 📝 **Code Editor**: Integrated development environment
|
||||
- 🔄 **Multiple Models**: Switch between different AI models
|
||||
- 📊 **Model Management**: Download and manage local models
|
||||
- 🎨 **Modern UI**: Clean, intuitive interface
|
||||
- ⚡ **Fast Performance**: Optimized for speed
|
||||
|
||||
## Installation
|
||||
|
||||
### Via Overlay
|
||||
|
||||
```nix
|
||||
{pkgs, ...}: {
|
||||
environment.systemPackages = with pkgs; [
|
||||
msty-studio
|
||||
];
|
||||
}
|
||||
```
|
||||
|
||||
### Direct Reference
|
||||
|
||||
```nix
|
||||
{pkgs, ...}: {
|
||||
environment.systemPackages = with pkgs; [
|
||||
inputs.m3ta-nixpkgs.packages.${pkgs.system}.msty-studio
|
||||
];
|
||||
}
|
||||
```
|
||||
|
||||
### Run Directly
|
||||
|
||||
```bash
|
||||
nix run git+https://code.m3ta.dev/m3tam3re/nixpkgs#msty-studio
|
||||
```
|
||||
|
||||
## Usage
|
||||
|
||||
### Launch Application
|
||||
|
||||
```bash
|
||||
# Launch Msty Studio
|
||||
msty-studio
|
||||
|
||||
# Or from application menu
|
||||
# Applications -> Msty Studio
|
||||
```
|
||||
|
||||
### First Run
|
||||
|
||||
On first launch, you'll need to:
|
||||
|
||||
1. Download an AI model (if not already downloaded)
|
||||
2. Configure model settings
|
||||
3. Set up your workspace
|
||||
|
||||
### Managing Models
|
||||
|
||||
Through the Msty Studio interface, you can:
|
||||
|
||||
- Download new models
|
||||
- Remove unused models
|
||||
- Switch between models
|
||||
- Configure model parameters
|
||||
|
||||
## Configuration
|
||||
|
||||
### Model Directory
|
||||
|
||||
Models are stored in your home directory:
|
||||
|
||||
```
|
||||
~/.local/share/msty-studio/models/
|
||||
```
|
||||
|
||||
### Settings
|
||||
|
||||
Msty Studio stores settings in:
|
||||
|
||||
```
|
||||
~/.config/msty-studio/
|
||||
```
|
||||
|
||||
### Integration with Nix
|
||||
|
||||
The package includes required dependencies:
|
||||
|
||||
- Node.js (for runtime)
|
||||
- npm (for package management)
|
||||
- uv (for Python packages)
|
||||
- Python (for AI models)
|
||||
|
||||
## Requirements
|
||||
|
||||
### System Requirements
|
||||
|
||||
- Linux (x86_64)
|
||||
- 8GB RAM minimum (16GB+ recommended)
|
||||
- Modern CPU with AVX2 support
|
||||
- GPU recommended (for faster inference)
|
||||
|
||||
### Dependencies
|
||||
|
||||
The package includes these dependencies:
|
||||
|
||||
- `nodejs` - JavaScript runtime
|
||||
- `nodePackages.npm` - Package manager
|
||||
- `uv` - Python package installer
|
||||
- `python3` - Python runtime
|
||||
|
||||
## Platform Support
|
||||
|
||||
- Linux (x86_64 only)
|
||||
- macOS (not supported)
|
||||
- Windows (not supported)
|
||||
|
||||
**Note**: Msty Studio is distributed as an AppImage for Linux.
|
||||
|
||||
## Build Information
|
||||
|
||||
- **Version**: 2.0.0-beta.4
|
||||
- **Type**: AppImage
|
||||
- **License**: Proprietary (Unfree)
|
||||
- **Source**: [msty.studio](https://msty.studio)
|
||||
|
||||
## Troubleshooting
|
||||
|
||||
### AppImage Won't Launch
|
||||
|
||||
Ensure executable bit is set:
|
||||
|
||||
```bash
|
||||
chmod +x ~/.local/share/applications/msty-studio.desktop
|
||||
```
|
||||
|
||||
### Models Not Downloading
|
||||
|
||||
Check disk space and network:
|
||||
|
||||
```bash
|
||||
# Check disk space
|
||||
df -h
|
||||
|
||||
# Check network
|
||||
ping google.com
|
||||
```
|
||||
|
||||
### Performance Issues
|
||||
|
||||
- Ensure you're using a GPU-accelerated model
|
||||
- Close other resource-intensive applications
|
||||
- Check system resources:
|
||||
|
||||
```bash
|
||||
htop
|
||||
nvidia-smi # If using NVIDIA GPU
|
||||
```
|
||||
|
||||
## Related
|
||||
|
||||
- [Adding Packages](../guides/adding-packages.md) - How to add new packages
|
||||
- [Quick Start](../QUICKSTART.md) - Getting started guide
|
||||
220
docs/packages/pomodoro-timer.md
Normal file
220
docs/packages/pomodoro-timer.md
Normal file
@@ -0,0 +1,220 @@
|
||||
# pomodoro-timer
|
||||
|
||||
A work timer based on the Pomodoro Technique.
|
||||
|
||||
## Description
|
||||
|
||||
A simple, shell-based Pomodoro timer that uses `timer`, Kitty terminal, Rofi, libnotify, and speech synthesis to provide visual and audio feedback for work and break sessions.
|
||||
|
||||
## Features
|
||||
|
||||
- ⏱️ **Pomodoro Technique**: 45-minute work, 10-minute break cycles
|
||||
- 🎨 **Terminal UI**: Floating Kitty terminal window
|
||||
- 📋 **Rofi Menu**: Easy session selection
|
||||
- 🔔 **Notifications**: Desktop and voice notifications
|
||||
- ⚙️ **Custom Times**: Set custom durations
|
||||
- 🎯 **Quick Access**: Simple keybinding integration
|
||||
|
||||
## Installation
|
||||
|
||||
### Via Overlay
|
||||
|
||||
```nix
|
||||
{pkgs, ...}: {
|
||||
environment.systemPackages = with pkgs; [
|
||||
launch-timer # The main program is named launch-timer
|
||||
];
|
||||
}
|
||||
```
|
||||
|
||||
### Direct Reference
|
||||
|
||||
```nix
|
||||
{pkgs, ...}: {
|
||||
environment.systemPackages = with pkgs; [
|
||||
inputs.m3ta-nixpkgs.packages.${pkgs.system}.launch-timer
|
||||
];
|
||||
}
|
||||
```
|
||||
|
||||
### Run Directly
|
||||
|
||||
```bash
|
||||
nix run git+https://code.m3ta.dev/m3tam3re/nixpkgs#launch-timer
|
||||
```
|
||||
|
||||
## Usage
|
||||
|
||||
### Basic Usage
|
||||
|
||||
```bash
|
||||
# Launch timer selection menu
|
||||
launch-timer
|
||||
```
|
||||
|
||||
This opens a Rofi menu with three options:
|
||||
|
||||
1. **work** - 45-minute work session
|
||||
2. **break** - 10-minute break session
|
||||
3. **custom** - Custom time duration
|
||||
|
||||
### Session Options
|
||||
|
||||
#### Work Session
|
||||
|
||||
```bash
|
||||
# Select "work" from menu
|
||||
# Starts 45-minute timer
|
||||
```
|
||||
|
||||
#### Break Session
|
||||
|
||||
```bash
|
||||
# Select "break" from menu
|
||||
# Starts 10-minute timer
|
||||
```
|
||||
|
||||
#### Custom Time
|
||||
|
||||
```bash
|
||||
# Select "custom" from menu
|
||||
# Enter time in format: 25m, 1h, 30s
|
||||
|
||||
# Examples:
|
||||
# 25m - 25 minutes
|
||||
# 1h - 1 hour
|
||||
# 30s - 30 seconds
|
||||
```
|
||||
|
||||
### Time Formats
|
||||
|
||||
Supported formats:
|
||||
|
||||
| Format | Example | Description |
|
||||
|---------|----------|-------------|
|
||||
| `Xm` | `25m` | X minutes |
|
||||
| `Xh` | `1h` | X hours |
|
||||
| `Xs` | `30s` | X seconds |
|
||||
|
||||
## Configuration
|
||||
|
||||
### Keybinding Integration
|
||||
|
||||
Add to Hyprland config:
|
||||
|
||||
```nix
|
||||
{pkgs, ...}: {
|
||||
wayland.windowManager.hyprland.settings = {
|
||||
bind = [
|
||||
# Launch Pomodoro timer with SUPER + T
|
||||
"SUPER, T, exec, ${pkgs.launch-timer}/bin/launch-timer"
|
||||
];
|
||||
};
|
||||
}
|
||||
```
|
||||
|
||||
### Custom Defaults
|
||||
|
||||
Modify the script for custom defaults:
|
||||
|
||||
```bash
|
||||
# Change work duration
|
||||
start_timer "60m" "work"
|
||||
|
||||
# Change break duration
|
||||
start_timer "15m" "break"
|
||||
```
|
||||
|
||||
## Requirements
|
||||
|
||||
### Dependencies
|
||||
|
||||
- `timer` - Terminal timer utility
|
||||
- `kitty` - Terminal emulator
|
||||
- `rofi` - Application launcher
|
||||
- `libnotify` - Desktop notifications
|
||||
- `speechd` - Text-to-speech synthesis
|
||||
|
||||
### System Requirements
|
||||
|
||||
- Linux (primary)
|
||||
- Desktop environment with notification support
|
||||
- Audio output for speech synthesis
|
||||
|
||||
## Platform Support
|
||||
|
||||
- Linux (primary)
|
||||
- macOS (not supported)
|
||||
- Windows (not supported)
|
||||
|
||||
## Behavior
|
||||
|
||||
### Timer Window
|
||||
|
||||
- Opens as floating Kitty window
|
||||
- Window class: `floating-pomodoro`
|
||||
- Window title: `floating-pomodoro`
|
||||
|
||||
### Notifications
|
||||
|
||||
When session ends, you'll receive:
|
||||
|
||||
1. Desktop notification: "work session ended!" or "break session ended!"
|
||||
2. Voice announcement: "work session ended" or "break session ended"
|
||||
|
||||
### Input Validation
|
||||
|
||||
For custom times:
|
||||
|
||||
- Valid: `25m`, `1h`, `30s`, `1h30m`
|
||||
- Invalid: `25`, `abc`, `1.5h`
|
||||
|
||||
## Build Information
|
||||
|
||||
- **Version**: 0.1.0
|
||||
- **Type**: Shell script
|
||||
- **License**: MIT
|
||||
- **Main Program**: `launch-timer`
|
||||
|
||||
## Troubleshooting
|
||||
|
||||
### Kitty Not Found
|
||||
|
||||
Ensure Kitty is installed:
|
||||
|
||||
```nix
|
||||
{pkgs, ...}: {
|
||||
environment.systemPackages = with pkgs; [
|
||||
kitty
|
||||
];
|
||||
}
|
||||
```
|
||||
|
||||
### No Notifications
|
||||
|
||||
Ensure notification daemon is running:
|
||||
|
||||
```bash
|
||||
# Check for notification daemon
|
||||
ps aux | grep -i notify
|
||||
|
||||
# Start notification daemon
|
||||
# Depends on your DE: dunst, mako, etc.
|
||||
```
|
||||
|
||||
### Speech Not Working
|
||||
|
||||
Check if speech synthesis is working:
|
||||
|
||||
```bash
|
||||
# Test speech
|
||||
spd-say "Hello"
|
||||
|
||||
# Check if speech-dispatcher is running
|
||||
ps aux | grep speech-dispatcher
|
||||
```
|
||||
|
||||
## Related
|
||||
|
||||
- [Adding Packages](../guides/adding-packages.md) - How to add new packages
|
||||
- [Quick Start](../QUICKSTART.md) - Getting started guide
|
||||
248
docs/packages/tuxedo-backlight.md
Normal file
248
docs/packages/tuxedo-backlight.md
Normal file
@@ -0,0 +1,248 @@
|
||||
# tuxedo-backlight
|
||||
|
||||
Keyboard backlight control for Tuxedo laptops.
|
||||
|
||||
## Description
|
||||
|
||||
A shell script that sets up RGB keyboard backlight colors for Tuxedo laptops with customizable colors for different key groups.
|
||||
|
||||
## Features
|
||||
|
||||
- ⌨️ **RGB Backlight**: Full RGB keyboard backlight support
|
||||
- 🎨 **Color Groups**: Different colors for different key groups
|
||||
- 🔤 **Key Highlighting**: Special colors for modifier keys
|
||||
- 🎯 **One-Command Setup**: Apply all colors with single command
|
||||
- ⚡ **Fast**: Direct sysfs control
|
||||
|
||||
## Installation
|
||||
|
||||
### Via Overlay
|
||||
|
||||
```nix
|
||||
{pkgs, ...}: {
|
||||
environment.systemPackages = with pkgs; [
|
||||
tuxedo-backlight
|
||||
];
|
||||
}
|
||||
```
|
||||
|
||||
### Direct Reference
|
||||
|
||||
```nix
|
||||
{pkgs, ...}: {
|
||||
environment.systemPackages = with pkgs; [
|
||||
inputs.m3ta-nixpkgs.packages.${pkgs.system}.tuxedo-backlight
|
||||
];
|
||||
}
|
||||
```
|
||||
|
||||
### Run Directly
|
||||
|
||||
```bash
|
||||
nix run git+https://code.m3ta.dev/m3tam3re/nixpkgs#tuxedo-backlight
|
||||
```
|
||||
|
||||
## Usage
|
||||
|
||||
### Basic Usage
|
||||
|
||||
```bash
|
||||
# Apply default color scheme
|
||||
tuxedo-backlight
|
||||
```
|
||||
|
||||
### Colors
|
||||
|
||||
The script applies these colors by default:
|
||||
|
||||
| Key Group | Color (RGB) | Description |
|
||||
|-----------|-------------|-------------|
|
||||
| Main keys | `0 150 255` | Blue (Cyan-ish) |
|
||||
| Function keys (F1-F12) | `0 255 80` | Green (Lime) |
|
||||
| Arrow keys | `0 255 80` | Green (Lime) |
|
||||
| Numpad area | `255 150 0` | Orange |
|
||||
| DEL key | `255 0 155` | Pink/Magenta |
|
||||
| ESC key | `255 0 155` | Pink/Magenta |
|
||||
|
||||
## Customization
|
||||
|
||||
### Modify Colors
|
||||
|
||||
Edit the script to customize colors:
|
||||
|
||||
```nix
|
||||
# In pkgs/tuxedo-backlight/default.nix
|
||||
|
||||
# All keys
|
||||
echo 'R G B' | tee /sys/class/leds/rgb:kbd_backlight*/multi_intensity
|
||||
|
||||
# Specific key (e.g., ESC)
|
||||
echo 'R G B' | tee /sys/class/leds/rgb:kbd_backlight/multi_intensity
|
||||
```
|
||||
|
||||
RGB format: `Red Green Blue` (0-255 each)
|
||||
|
||||
### Color Examples
|
||||
|
||||
| Color | RGB Value |
|
||||
|--------|-----------|
|
||||
| Red | `255 0 0` |
|
||||
| Green | `0 255 0` |
|
||||
| Blue | `0 0 255` |
|
||||
| Cyan | `0 255 255` |
|
||||
| Magenta | `255 0 255` |
|
||||
| Yellow | `255 255 0` |
|
||||
| White | `255 255 255` |
|
||||
| Orange | `255 150 0` |
|
||||
| Purple | `150 0 255` |
|
||||
|
||||
## Automatic Startup
|
||||
|
||||
### Systemd Service
|
||||
|
||||
Create `/etc/systemd/system/tuxedo-backlight.service`:
|
||||
|
||||
```ini
|
||||
[Unit]
|
||||
Description=Tuxedo Keyboard Backlight
|
||||
After=multi-user.target
|
||||
|
||||
[Service]
|
||||
Type=oneshot
|
||||
ExecStart=/run/current-system/sw/bin/tuxedo-backlight
|
||||
|
||||
[Install]
|
||||
WantedBy=multi-user.target
|
||||
```
|
||||
|
||||
Enable and start:
|
||||
|
||||
```bash
|
||||
sudo systemctl enable tuxedo-backlight.service
|
||||
sudo systemctl start tuxedo-backlight.service
|
||||
```
|
||||
|
||||
### NixOS Configuration
|
||||
|
||||
```nix
|
||||
{pkgs, ...}: {
|
||||
# Run at boot
|
||||
systemd.services.tuxedo-backlight = {
|
||||
description = "Set Tuxedo keyboard backlight";
|
||||
after = ["multi-user.target"];
|
||||
wantedBy = ["multi-user.target"];
|
||||
serviceConfig = {
|
||||
Type = "oneshot";
|
||||
ExecStart = "${pkgs.tuxedo-backlight}/bin/tuxedo-backlight";
|
||||
};
|
||||
};
|
||||
}
|
||||
```
|
||||
|
||||
## Requirements
|
||||
|
||||
### Hardware
|
||||
|
||||
- Tuxedo laptop with RGB keyboard backlight
|
||||
- Linux kernel with appropriate driver support
|
||||
|
||||
### System Requirements
|
||||
|
||||
- Linux (Tuxedo laptops)
|
||||
- Write access to `/sys/class/leds/`
|
||||
|
||||
### Permissions
|
||||
|
||||
The script requires write access to sysfs:
|
||||
|
||||
```bash
|
||||
# Check permissions
|
||||
ls -la /sys/class/leds/rgb:kbd_backlight*
|
||||
|
||||
# If permissions are needed
|
||||
sudo tuxedo-backlight
|
||||
```
|
||||
|
||||
## Platform Support
|
||||
|
||||
- Linux (Tuxedo laptops only)
|
||||
- macOS (not supported)
|
||||
- Windows (not supported)
|
||||
|
||||
## Troubleshooting
|
||||
|
||||
### No Such Device
|
||||
|
||||
Error: `No such file or directory`
|
||||
|
||||
**Solution**: Ensure you're on a Tuxedo laptop with RGB keyboard:
|
||||
|
||||
```bash
|
||||
# Check if RGB backlight exists
|
||||
ls -la /sys/class/leds/rgb:kbd_backlight*
|
||||
```
|
||||
|
||||
### Permission Denied
|
||||
|
||||
Error: `Permission denied`
|
||||
|
||||
**Solution**: Run with sudo or configure udev rules:
|
||||
|
||||
```bash
|
||||
# Run with sudo
|
||||
sudo tuxedo-backlight
|
||||
|
||||
# Or create udev rule for user access
|
||||
sudo vim /etc/udev/rules.d/99-tuxedo-backlight.rules
|
||||
```
|
||||
|
||||
udev rule:
|
||||
|
||||
```
|
||||
SUBSYSTEM=="leds", ATTR{brightness}=="*", ACTION=="add", RUN+="/usr/bin/chgrp -R input /sys/class/leds/rgb:*"
|
||||
SUBSYSTEM=="leds", ATTR{brightness}=="*", ACTION=="add", RUN+="/usr/bin/chmod -R g+w /sys/class/leds/rgb:*"
|
||||
```
|
||||
|
||||
### Colors Not Applied
|
||||
|
||||
**Solution**:
|
||||
|
||||
1. Check RGB backlight is supported:
|
||||
|
||||
```bash
|
||||
cat /sys/class/leds/rgb:kbd_backlight*/multi_intensity
|
||||
```
|
||||
|
||||
2. Ensure driver is loaded:
|
||||
|
||||
```bash
|
||||
# Check for Tuxedo drivers
|
||||
lsmod | grep tuxedo
|
||||
|
||||
# Load if needed
|
||||
sudo modprobe tuxedo_keyboard
|
||||
```
|
||||
|
||||
## Key Layout Reference
|
||||
|
||||
The script sets colors for these key groups:
|
||||
|
||||
### Key Numbers
|
||||
|
||||
- **All keys**: Main keyboard area (except special keys)
|
||||
- **15**: DEL key
|
||||
- **No number**: ESC key
|
||||
- **1-12, 102**: Function keys (F1-F12, Fn)
|
||||
- **16-19, 36-39, 56-59, 76-79, 96-99, 117-119**: Numpad and keys above numpad
|
||||
- **95, 114-116**: Arrow keys
|
||||
|
||||
## Build Information
|
||||
|
||||
- **Version**: 0.1.0
|
||||
- **Type**: Shell script
|
||||
- **License**: MIT
|
||||
|
||||
## Related
|
||||
|
||||
- [Adding Packages](../guides/adding-packages.md) - How to add new packages
|
||||
- [Quick Start](../QUICKSTART.md) - Getting started guide
|
||||
204
docs/packages/zellij-ps.md
Normal file
204
docs/packages/zellij-ps.md
Normal file
@@ -0,0 +1,204 @@
|
||||
# zellij-ps
|
||||
|
||||
A Zellij project switcher for quickly navigating and opening project workspaces.
|
||||
|
||||
## Description
|
||||
|
||||
zellij-ps is a Fish script inspired by ThePrimeagen's tmux-sessionizer. It provides a fast, interactive way to switch between project folders in Zellij. Using `fd` for fast directory discovery and `fzf` for fuzzy selection, it helps you quickly jump into your work.
|
||||
|
||||
The script searches through your configured project folders (`$PROJECT_FOLDERS`) and either creates a new Zellij session for the selected project or attaches to an existing one.
|
||||
|
||||
## Installation
|
||||
|
||||
### Via Overlay
|
||||
|
||||
```nix
|
||||
{pkgs, ...}: {
|
||||
environment.systemPackages = with pkgs; [
|
||||
zellij-ps
|
||||
];
|
||||
}
|
||||
```
|
||||
|
||||
### Direct Reference
|
||||
|
||||
```nix
|
||||
{pkgs, ...}: {
|
||||
environment.systemPackages = with pkgs; [
|
||||
inputs.m3ta-nixpkgs.packages.${pkgs.system}.zellij-ps
|
||||
];
|
||||
}
|
||||
```
|
||||
|
||||
### Run Directly
|
||||
|
||||
```bash
|
||||
nix run git+https://code.m3ta.dev/m3tam3re/nixpkgs#zellij-ps
|
||||
```
|
||||
|
||||
## Usage
|
||||
|
||||
### Basic Usage
|
||||
|
||||
```bash
|
||||
# Run from outside Zellij to start a project session
|
||||
zellij-ps
|
||||
|
||||
# Or pass a project path directly
|
||||
zellij-ps ~/projects/my-project
|
||||
```
|
||||
|
||||
This will:
|
||||
|
||||
1. Search through your `$PROJECT_FOLDERS` for directories
|
||||
2. Open fzf for fuzzy project selection (if no argument provided)
|
||||
3. Create a new Zellij session or attach to existing one for the selected project
|
||||
|
||||
### Configuration
|
||||
|
||||
Set your project folders in your shell configuration:
|
||||
|
||||
**Fish example:**
|
||||
```fish
|
||||
set -x PROJECT_FOLDERS ~/projects:~/code:~/work
|
||||
```
|
||||
|
||||
**Bash/Zsh example:**
|
||||
```bash
|
||||
export PROJECT_FOLDERS="$HOME/projects:$HOME/code:$HOME/work"
|
||||
```
|
||||
|
||||
Folders should be delimited by `:` and can include `~` for home directory.
|
||||
|
||||
## Home Manager Module
|
||||
|
||||
### Enable Module
|
||||
|
||||
```nix
|
||||
{config, ...}: {
|
||||
imports = [m3ta-nixpkgs.homeManagerModules.default];
|
||||
|
||||
m3ta.cli.zellij-ps = {
|
||||
enable = true;
|
||||
};
|
||||
}
|
||||
```
|
||||
|
||||
### Module Options
|
||||
|
||||
#### `m3ta.cli.zellij-ps.enable`
|
||||
|
||||
Enable the zellij-ps module.
|
||||
|
||||
- Type: `boolean`
|
||||
- Default: `false`
|
||||
|
||||
#### `m3ta.cli.zellij-ps.package`
|
||||
|
||||
Custom package to use.
|
||||
|
||||
- Type: `package`
|
||||
- Default: `pkgs.zellij-ps`
|
||||
|
||||
## Requirements
|
||||
|
||||
### System Requirements
|
||||
|
||||
- Linux or Unix-like system
|
||||
- Configured `$PROJECT_FOLDERS` environment variable
|
||||
|
||||
## Platform Support
|
||||
|
||||
- Linux (primary)
|
||||
- macOS (may work)
|
||||
- Windows (not supported)
|
||||
|
||||
## Build Information
|
||||
|
||||
- **Version**: 0.1.0
|
||||
- **Type**: Fish script
|
||||
- **License**: MIT
|
||||
- **Inspired by**: [ThePrimeagen's tmux-sessionizer](https://github.com/ThePrimeagen/.dotfiles/blob/master/bin/.local/scripts/tmux-sessionizer)
|
||||
- **Source**: [Gitea](https://code.m3ta.dev/m3tam3re/helper-scripts)
|
||||
|
||||
## Source Code
|
||||
|
||||
The script is available at:
|
||||
|
||||
```
|
||||
https://code.m3ta.dev/m3tam3re/helper-scripts/src/branch/main/zellij-ps.fish
|
||||
```
|
||||
|
||||
## Troubleshooting
|
||||
|
||||
### No Projects Found
|
||||
|
||||
If fzf shows no results, check your `$PROJECT_FOLDERS` variable:
|
||||
|
||||
```bash
|
||||
# In fish
|
||||
echo $PROJECT_FOLDERS
|
||||
|
||||
# In bash/zsh
|
||||
echo $PROJECT_FOLDERS
|
||||
```
|
||||
|
||||
Ensure the folders exist and contain subdirectories.
|
||||
|
||||
### Already in Zellij Session
|
||||
|
||||
If you're already inside a Zellij session, you'll see:
|
||||
|
||||
```
|
||||
You are in a Zellij Session!
|
||||
Please use the session manager to switch sessions.
|
||||
```
|
||||
|
||||
Use Zellij's built-in session manager (`Ctrl+p` → `s`) to switch sessions instead.
|
||||
|
||||
### fd Not Found
|
||||
|
||||
Error: `fd: command not found`
|
||||
|
||||
**Solution**: Ensure fd is installed:
|
||||
|
||||
```nix
|
||||
{pkgs, ...}: {
|
||||
environment.systemPackages = with pkgs; [
|
||||
fd
|
||||
];
|
||||
}
|
||||
```
|
||||
|
||||
### Fish Not Found
|
||||
|
||||
Error: `fish: command not found`
|
||||
|
||||
**Solution**: Ensure Fish is installed:
|
||||
|
||||
```nix
|
||||
{pkgs, ...}: {
|
||||
programs.fish = {
|
||||
enable = true;
|
||||
};
|
||||
}
|
||||
```
|
||||
|
||||
### fzf Not Working
|
||||
|
||||
Ensure fzf is installed and configured:
|
||||
|
||||
```bash
|
||||
# Check fzf
|
||||
which fzf
|
||||
|
||||
# Test fzf
|
||||
echo -e "item1\nitem2\nitem3" | fzf
|
||||
```
|
||||
|
||||
## Related
|
||||
|
||||
- [zellij-ps Module](../modules/home-manager/cli/zellij-ps.md) - Home Manager module documentation
|
||||
- [Using Modules](../guides/using-modules.md) - How to use modules
|
||||
- [Adding Packages](../guides/adding-packages.md) - How to add new packages
|
||||
- [Quick Start](../QUICKSTART.md) - Getting started guide
|
||||
Reference in New Issue
Block a user