No description
  • Python 93%
  • Shell 7%
Find a file
Repository files (latest commit first)
Filename Latest commit message Latest commit date
2025-05-03 09:15:34 -04:00
.gitignore init release 2025-05-03 09:08:25 -04:00
main.py init release 2025-05-03 09:08:25 -04:00
README.md Update README.md 2025-05-03 09:15:34 -04:00
requirements.txt init release 2025-05-03 09:08:25 -04:00
toggle_chat.sh init release 2025-05-03 09:08:25 -04:00

Kagi FastGPT Popup for Hyprland

A simple popup chat interface using the Kagi FastGPT API, designed to be toggled with a keybind in Hyprland.

Setup

  1. Clone the repository

    git clone https://github.com/0xgingi/kagi-fastgpt-hyprland
    
  2. Install dependencies:

    sudo pacman -S --needed jq pyside6 python-requests python-dotenv
    
  3. Set API Token: Create a .env file with the following content:

    KAGI_API_TOKEN=your_kagi_api_token_here
    
  4. Configure Toggle Script: Edit kagi-fastgpt-hyprland/toggle_chat.sh and set PYTHON_SCRIPT_PATH to the path of kagi-fastgpt-hyprland/main.py. For example:

    PYTHON_SCRIPT_PATH="/home/$USER/kagi-fastgpt-hyprland/main.py"
    

    Make the script executable:

    chmod +x toggle_chat.sh
    
  5. Configure Hyprland: Add the following to your hyprland.conf, changing your preferred bind and path to toggle_chat.sh:

    bind = $mainMod, X, exec, /path/to/your/kagi-fastgpt-hyprland/toggle_chat.sh
    
    windowrulev2 = float, class:^(python3)$,title:^(Kagi FastGPT)$
    windowrulev2 = size 60% 70%, class:^(python3)$,title:^(Kagi FastGPT)$
    windowrulev2 = center, class:^(python3)$,title:^(Kagi FastGPT)$