https://github.com/0xgingi/kagi-fastgpt-hyprland
A simple popup chat interface using the Kagi FastGPT API
https://github.com/0xgingi/kagi-fastgpt-hyprland
Last synced: 15 days ago
JSON representation
A simple popup chat interface using the Kagi FastGPT API
- Host: GitHub
- URL: https://github.com/0xgingi/kagi-fastgpt-hyprland
- Owner: 0xGingi
- Created: 2025-05-03T13:07:58.000Z (27 days ago)
- Default Branch: main
- Last Pushed: 2025-05-03T13:15:34.000Z (27 days ago)
- Last Synced: 2025-05-13T23:49:59.842Z (17 days ago)
- Language: Python
- Size: 7.81 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# 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**
```bash
git clone https://github.com/0xgingi/kagi-fastgpt-hyprland
2. **Install dependencies:**
```bash
sudo pacman -S --needed jq pyside6 python-requests python-dotenv
```
3. **Set API Token:**
Create a `.env` file with the following content:
```dotenv
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:
```bash
PYTHON_SCRIPT_PATH="/home/$USER/kagi-fastgpt-hyprland/main.py"
```
Make the script executable:
```bash
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:```hyprland
bind = $mainMod, X, exec, /path/to/your/kagi-fastgpt-hyprland/toggle_chat.shwindowrulev2 = float, class:^(python3)$,title:^(Kagi FastGPT)$
windowrulev2 = size 60% 70%, class:^(python3)$,title:^(Kagi FastGPT)$
windowrulev2 = center, class:^(python3)$,title:^(Kagi FastGPT)$
```