← back
girl_up cover

girl_up by malvika.jain on instagram

a background keylogger that detects passive or hedging language as you type and fires a macos notification to prompt more direct phrasing.

description

girl_up runs as a python background process using pynput to monitor every keystroke system-wide. it maintains a rolling 100-character buffer and checks it against a list of passive language patterns (e.g. 'i think', 'just ', 'sorry to bother'). when a match is found and a cooldown of 8 seconds has elapsed, it triggers a macos notification via osascript with the caught phrase and a prompt to rephrase.

steps

0 / 6 done

  1. install pynput

    • run: pip install pynput
    • python 3 is required
  2. grant accessibility permissions on macos

    • go to system settings → privacy & security → accessibility
    • add your terminal or python binary to the allowed list — pynput requires this to capture keystrokes
  3. run the script

    • run: python3 girl_up.py
    • the process will print a confirmation line and begin monitoring in the background
  4. trigger a test notification

    • type a passive phrase such as 'i think' or 'just a little' in any application
    • a macos notification should appear with the caught phrase and the prompt message
  5. edit patterns or messages

    • add or remove entries in passive_patterns to change what is detected
    • edit messages to change the notification prompt text
    • adjust cooldown_seconds to control notification frequency
  6. stop the monitor

    • press ctrl+c in the terminal where the script is running

scripts

01 · girl_up.py

download
#!/usr/bin/env python3
from pynput import keyboard
import subprocess
import time

PASSIVE_PATTERNS = [
    "i think",
    "i feel like",
    "maybe",
    "i guess",
    "i'm not sure",
    "im not sure",
    "kind of",
    "kinda",
    "sort of",
    "probably",
    "just ",
    "a little",
    "i might",
    "i don't know if",
    "i dont know if",
    "if that makes sense",
    "does that make sense",
    "hopefully",
    "sorry to bother",
    "sorry for",
    "not sure if",
]

MESSAGES = [
    "do you think, or do you know?",
]

buffer = []
last_notif_time = 0
COOLDOWN_SECONDS = 8
message_index = 0


def fire_notification(phrase_found):
    global message_index, last_notif_time
    now = time.time()
    if now - last_notif_time < COOLDOWN_SECONDS:
        return
    last_notif_time = now
    msg = MESSAGES[message_index % len(MESSAGES)]
    message_index += 1
    subtitle = f"caught: {phrase_found}"
    result = subprocess.run([
        "osascript", "-e",
        f'display notification "{subtitle}" with title "{msg}" sound name "Funk"'
    ])


def check_buffer():
    text = "".join(buffer).lower()
    for phrase in PASSIVE_PATTERNS:
        if phrase in text:
            fire_notification(phrase.strip())
            buffer.clear()
            return


def on_press(key):
    global buffer
    try:
        if hasattr(key, 'char') and key.char:
            buffer.append(key.char)
            if len(buffer) > 100:
                buffer = buffer[-100:]
            check_buffer()
        elif key == keyboard.Key.space:
            buffer.append(" ")
            check_buffer()
        elif key == keyboard.Key.backspace:
            if buffer:
                buffer.pop()
        elif key in (keyboard.Key.enter, keyboard.Key.esc):
            buffer.clear()
    except Exception:
        pass


if __name__ == "__main__":
    print("👀 Watching for passive language... (Ctrl+C to stop)")
    with keyboard.Listener(on_press=on_press) as listener:
        listener.join()

comments

no comments yet — be the first