Kando registers its shortcut under its desktop file name, so the ID is menu.kando.Kando:popups, not kando:popups. Co-Authored-By: Claude Opus 5.5 <[email protected]>
6.5 KiB
CLAUDE.md
This file provides guidance to Claude Code (claude.ai/code) when working with code in this repository.
Overview
This is a dotfiles/config repository for Arch Linux (Manjaro) using yay as the package manager. Configs are installed by symlinking or sourcing from ~/scripts/ into their standard locations. The repo targets Wayland-based desktops (Hyprland and Sway) with an i3 fallback for X11.
Repository Structure
- Window managers:
hypr/,sway/,i3/- config files for each WM - Hyprland cursor follow + popups:
hypr/cursor_follow.lua(required frombase.lua) keeps a floating window glued beside the mouse cursor (PiP videos,$mod+z) and handles the$mod+apopups: thepopupstable maps window classes to sizes and whether they follow until Enter is pressed (anon_consumingReturn bind pauses them;stay_focusedholds keyboard focus while following, sincefollow_mouse = 1). Opening the Kando menu also pauses a following popup and hands focus to the menu, since the menu needs the keyboard to see SUPER released.hypr/popup.sh <name>launches each popup. It also starts Kando onhyprland.startand keeps xpad sticky notes inspecial:scratchpad - Pie menu:
kando/menus.json(thepopupsmenu, items runpopup.sh) andkando/config.json(theme), file-symlinked into~/.config/kando(the rest of that dir is Kando runtime state). Kando writes settings-window edits through the symlinks, and watches the files, so edits here apply live. Its Hyprland shortcut ID ismenu.kando.Kando:popups(hl.dsp.global("menu.kando.Kando:popups"); the app ID is the desktop file name, notkando, andhyprctl globalshortcutsshows it); the launcher needsKANDO_OZONE_PLATFORM=wayland, otherwise it runs under XWayland - AI popups:
hypr/aichat/config.yaml(modelclaude:claude-haiku-5-5,repl_prelude: temp:quick, thinking disabled viapatchso no empty<think>block) andhypr/aichat/roles/quick.md(short answers; code requests get library + functions until asked for the code).popup.shsetsAICHAT_CONFIG_FILE/AICHAT_ROLES_DIR; the API key is only in~/.config/aichat/.envasCLAUDE_API_KEY— never put it in the repo (.envis gitignored) - KDE Plasma (Steam Deck):
kde/-apply.shinstalls Krohnkite and runsshortcuts.py, which sets Hyprland-style global shortcuts live via kglobalaccel D-Bus (don't hand-editkglobalshortcutsrc; edit theBINDINGStable). AvoidKGlobalAccel.globalShortcutsByKeyover D-Bus because a malformed call crashes kwin_wayland - Waybar:
waybar/- separate config JSONs per WM (waybar_hyprland_config.json,waybar_sway_config.json) plus sharedwaybar_style.css - Shell:
bashrc,zshrc- sourced from the user's dotfiles, not used directly - Terminal:
alacritty.toml(imported via alacritty's import system),kitty.conf - Scripts:
sh/- shell utilities added to PATH (sharefile,getfile,waybar-history) - Submodule:
hatsune-miku-windows-linux-cursors- cursor theme (init withgit submodule update --init --recursive) - Packages:
packages.txt- list of packages installed viayay -S
Build System
Some configs are built by concatenating a colors.* file with a base.* file. The build outputs are gitignored. Always edit the source (base.*) files, never the built outputs.
| Component | Sources | Build output | Build command |
|---|---|---|---|
| Hyprland | hypr/colors.lua + hypr/base.lua |
hypr/hyprland.lua |
hypr/build.sh |
| Waybar CSS | waybar/colors.css + waybar/base.css |
waybar/style.css |
waybar/build.sh |
After editing a base file, run the corresponding build.sh to regenerate the output.
colors.conf is the single palette; sh/gen-colors writes the colors.* fragments and also rewrites menuThemeColors.purity in the tracked kando/config.json (in place, to keep the symlink).
hypr/cursor_follow.lua and hypr/popup.sh are not built: hyprctl reload picks up Lua changes (then check hyprctl configerrors), and popup.sh / the aichat files are read on each launch.
Key Conventions
- Configs are symlinked into
~/.config/(see README.md for exact symlink commands per component) - Shell configs (
bashrc,zshrc) are sourced, not symlinked alacritty.tomluses alacritty's import mechanism rather than symlinking- Hyprland is the primary/active WM (most recent changes)
$modin WM configs refers to the Super/Windows key- Keybindings use vim-style hjkl navigation across all WMs and tmux
- When adding a package dependency, add it to
packages.txt - Prefer existing programs over custom scripts for popups and tools (the user asked for this)
Working on the live Hyprland session
- The config is Lua (Hyprland 0.56).
hyprctl dispatchtakes a Lua expression, so module functions can be called directly:hyprctl dispatch 'require("cursor_follow").toggle_sticky'. Window props:hyprctl getprop address:<addr> stay_focused. Shortcuts registered by apps:hyprctl globalshortcuts - The user is usually at the desktop. Anything that opens a window takes their keyboard (the following popups even lock it with
stay_focused), so don't open popups to test them while they may be typing. To check a mouse popup's class and rules without stealing focus, launch it on a hidden workspace and close it afterwards:hyprctl dispatch 'hl.dsp.exec_cmd("pavucontrol", { workspace = "special:probe silent" })' - Chromium ignores
--classfor--appwindows on Wayland; their class comes from the URL (e.g.chrome-127.0.0.1__-Default), which is what thepopupstable matches for the receipt printer page - To try something that may crash Hyprland, run a nested one on a hidden workspace and drive it with
hyprctl -i <instance>(its dir appears in$XDG_RUNTIME_DIR/hypr; clients spawned with itsexec_cmdopen inside it):hyprctl dispatch 'hl.dsp.exec_cmd("env HYPRLAND_NO_SD_VARS=1 HYPRLAND_NO_SD_NOTIFY=1 Hyprland --config /path/test.lua", { workspace = "special:probe silent" })'. Its crash reports also land in~/.cache/hyprland - Hyprland 0.56 bug: a pinned window sent to a hidden workspace (silent move) keeps its layout there once it's focused, and floating or tiling it after that workspace is destroyed segfaults (
CSpace::toggleTargetFloating). So$mod+CTRL+Nunpins before moving; don't silently move pinned windows elsewhere - aichat's REPL (reedline) waits for a reply to cursor-position queries, so it hangs under
script; drive it with a pty that answers\e[6n(or test one-shotaichat -r quick "..." </dev/null, which needs stdin closed)