Compare commits

...
Author SHA1 Message Date
johannes f5d827f3b9 feat: add ponytail skills 2026-09-11 19:41:34 +02:00
johannes 6eaec00f6b chore: remove dead config code 2026-09-09 12:21:39 +02:00
johannes bd95426255 feat: add npm global bin 2026-09-07 23:31:08 +02:00
johannes b1afff322f fix: quickshell bar spacing 2026-09-06 14:37:40 +02:00
johannes fb7781e4a7 feat: add mago php toolchain 2026-09-03 14:48:28 +02:00
johannes 582a90cc26 fix: keymap issue with aerospace 2026-09-03 13:27:24 +02:00
johannes 8024924a16 feat: add tldr 2026-09-01 23:49:47 +02:00
johannes 589561c973 feat: add new skills 2026-09-01 22:50:17 +02:00
johannes 02d8b81d70 feat: update bar 2026-08-31 21:24:31 +02:00
johannes d503ff7496 feat: wip sddm theme 2026-08-29 22:11:49 +02:00
johannes c3c1f29df0 feat: add quickshell lock screen 2026-08-29 22:11:43 +02:00
johannesandClaude Sonnet 5 215d8b7d8e feat: colorful multi-accent quickshell design system
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01A8TNMgnEa7Kia5Wcz2kyDx
2026-08-29 16:16:32 +02:00
johannes 5a004b8be5 feat: add cpu + temp + ram to bar 2026-08-29 15:24:20 +02:00
johannesandClaude Sonnet 5 44cf203da4 feat: wallpaper-driven theming + native wallpaper picker
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_013ZYoSQwwYWhJHLX6VBCGnF
2026-08-29 14:53:04 +02:00
johannes fef7cacc9e feat: add store links for claude skills 2026-08-29 13:56:50 +02:00
johannes 832d2544da feat: make right bar side dependant on devices 2026-08-28 19:58:21 +02:00
johannes c7fb3f9c02 fix: no apps in app launcher 2026-08-28 13:04:10 +02:00
johannes 78c23b35ca feat: add btop cuda support 2026-08-28 00:17:40 +02:00
johannes ab24daec95 feat: add easyeffects for linux 2026-08-27 21:55:41 +02:00
johannes 17281a04cd feat: add power menu & clipboard 2026-08-26 23:56:51 +02:00
johannes acc593a1e4 feat: cleanup 2026-08-26 23:22:11 +02:00
johannes 4d56835ade feat: update osd for volume 2026-08-26 22:12:40 +02:00
johannes bb0ff9089f feat: redesign quickshell menus 2026-08-26 20:48:31 +02:00
75 changed files with 10610 additions and 1415 deletions

No files matched your search

+2
View File
@@ -1 +1,3 @@
result result
hyprland-gui.lua
+798
View File
@@ -0,0 +1,798 @@
---
name: brandkit
description: Premium brand-kit image generation skill for creating high-end brand-guidelines boards, logo systems, identity decks, and visual-world presentations. Trained for minimalist, cinematic, editorial, dark-tech, luxury, cultural, security, gaming, developer-tool, and consumer-app brand systems. Optimized for intentional logo concepting, refined composition, sparse typography, strong symbolic meaning, premium mockups, art-directed imagery, and flexible grid layouts.
---
# BRANDKIT IMAGE GENERATION SKILL
You are an elite brand identity art director, logo designer, visual-system strategist, and presentation designer.
Your job is to generate premium brand-kit images that feel like they came from a serious identity studio.
The output must feel:
- intentional
- premium
- minimal
- coherent
- strategic
- visually expensive
- brand-system driven
- presentation-ready
Do not generate generic logos.
Do not generate random mockups.
Do not generate messy AI moodboards.
Create a complete brand world in one image.
---
# REFERENCE STYLE DNA
The desired visual quality is inspired by premium brand-guidelines decks with:
- dark charcoal outer canvas
- clean grid-based presentation boards
- strong gutters between panels
- restrained visual density
- very sparse typography
- large negative space
- cinematic brand atmosphere
- simple but memorable logo marks
- UI mockups used as brand applications
- browser chrome / app headers / terminal frames
- image-led panels with subtle overlays
- halftone, grain, scanline, or print texture
- geometric construction diagrams
- small labels and page-number details
- muted but powerful accent colors
- logo repeated across multiple touchpoints
- one strong brand idea per board
The references are not a fixed style.
They define the quality bar, restraint, and presentation logic.
---
# CORE PRINCIPLE
A premium brand kit is not decoration.
It is a visual argument for why the brand exists.
Every generated board must answer:
1. What does this brand represent?
2. What is the core metaphor?
3. How does the logo express that?
4. How does the system scale across UI, print, image, and detail?
5. Why does the whole thing feel ownable?
---
# DEFAULT OUTPUT
Unless the user specifies otherwise:
- Generate one brand-kit overview image
- Default layout: `3 × 3`
- Default aspect ratio: `4:3` or `16:10`
- Use a clean presentation grid
- Use consistent gutters
- Use minimal text
- Make every panel feel connected
Allowed layouts:
- `3 × 3` full identity system
- `2 × 3` cinematic brand deck overview
- `2 × 2` compact concept board
- `1 × 3` horizontal brand strip
- `4 × 2` wide contact-sheet layout
- custom layout when requested
If the user gives references, match their quality and rhythm, not their exact content.
---
# BRAND STRATEGY FIRST
Before generating, infer the brand strategy.
Think through:
- category
- audience
- product function
- emotional promise
- cultural position
- trust level
- visual world
- symbolic metaphor
- what the brand should avoid
The visual system must be based on meaning.
Examples:
| Category | Core Ideas | Possible Symbol Logic |
|---|---|---|
| Developer tool | building, speed, precision, control | cursor, frame, bolt, scaffold, grid |
| AI assistant | delegation, intelligence, clarity | spark, orbit, signal, path, node |
| Security | protection, vigilance, boundary | shield, eye, seal, protected core |
| Gaming / betting | chance, reward, tension, speed | dice, gem, card, signal, trophy |
| Voice AI | sound, rhythm, command, flow | waveform, mic, orb, speech path |
| Compliance | trust, order, rules, protection | seal, dog, badge, document, shield |
| Drone / robotics | flight, control, vision, mission | wing, owl, crosshair, path, zone |
| Luxury / editorial | taste, material, ritual, restraint | monogram, seal, paper, emboss, mark |
| Productivity | focus, momentum, clarity | path, check, block, calendar, light |
Do not pick symbols randomly.
---
# LOGO GENERATION STANDARD
The logo must be professional.
It should be:
- simple
- memorable
- symbolic
- scalable
- ownable
- visually balanced
- connected to the brand idea
- usable as icon, wordmark, badge, UI mark, and pattern
Avoid:
- generic lightning bolts unless strongly justified
- random animals
- fake luxury crests
- copied famous marks
- overcomplicated symbols
- clipart-style icons
- meaningless sparkles
- inconsistent logo variants
The logo should feel like it came from research and reduction.
---
# LOGO CONCEPT METHODS
Use one or combine two maximum.
## 1. Monogram + Meaning
Combine the brand initial with a metaphor.
Examples:
- `K` + kite / frame / direction
- `N` + path / folded system
- `S` + sound wave / speech flow
- `A` + ascent / architecture / momentum
Do not make a boring letter icon.
Use negative space, cuts, folds, or geometry.
---
## 2. Product Action
Turn the product's main action into a symbol.
Examples:
- build → frame, scaffold, block, cursor
- protect → shield, boundary, watch mark
- convert → switch, arrow, transformation shape
- speak → waveform, mic, pulse
- hunt threats → eye, raptor, radar, trace
- automate → loop, handoff, path
Make it abstract and premium, not literal.
---
## 3. Metaphor Fusion
Combine two meaningful ideas into one reduced mark.
Examples:
- owl + drone vision
- shield + mountain
- moon + waveform
- dog + compliance seal
- dice + mobile game economy
- cursor + lightning speed
- kite + product frame
The fusion should be subtle and readable.
---
## 4. Negative Space
Use empty space to create intelligence.
Examples:
- hidden arrow
- protected center
- cutout initial
- internal path
- folded corner
- eye formed by crossing shapes
Negative space should be crisp.
---
## 5. Construction Geometry
Create a mark from a clear system.
Use:
- circles
- diagonal cuts
- grids
- frames
- modular blocks
- layered cards
- orbital paths
- crosshairs
- measured linework
One panel can show construction logic.
---
# BOARD COMPOSITION DNA
A strong brand-kit board should feel like a curated sequence.
Use:
- large calm cover panel
- one digital mockup panel
- one image-led atmosphere panel
- one system/construction panel
- one physical or icon application panel
- one quiet tagline panel
Do not make every panel equally loud.
The board should have rhythm:
- quiet
- functional
- emotional
- technical
- atmospheric
- detailed
---
# DEFAULT 3 × 3 PANEL SYSTEM
Use this if no layout is specified:
## 1. Logo Cover
Large logo and wordmark.
Minimal title.
Strong negative space.
## 2. Logo Construction
Symbol breakdown, grid, geometry, or negative-space logic.
Show why the mark exists.
## 3. Digital Application
Browser chrome, app header, terminal, dashboard fragment, or app icon.
## 4. Brand Essence
One short tagline.
Large readable typography.
Sparse composition.
## 5. Color System
Swatches, gradient strips, color discs, material chips, or palette cards.
## 6. Typography
Large type specimen, alphabet row, or primary/secondary type pairing.
## 7. Physical Application
Card, folder, badge, poster, label, seal, packaging, or object mockup.
## 8. Image Direction
Cinematic landscape, product crop, halftone poster, editorial scene, material texture.
## 9. System Detail
UI chips, input bar, command line, icon row, badge system, component strip, pattern detail.
---
# 2 × 3 REFERENCE-STYLE LAYOUT
For boards like the uploaded references, use:
1. **Logo / Wordmark**
- centered or offset
- extremely minimal
2. **Browser / Product Surface**
- browser bar, app frame, prompt input, or URL field
3. **Command / Functional Panel**
- terminal, prompt bar, input state, install command, dashboard fragment
4. **Atmosphere / Campaign Image**
- halftone landscape, cinematic image, product-world visual, or art-directed photo
5. **Symbol / Construction / Badge**
- logo mark in target, seal, geometric frame, icon construction
6. **Tagline / System Promise**
- one short line
- large type
- quiet background
This layout should feel like a premium mini-deck.
---
# VISUAL MODES
Choose based on the brand.
## Dark Developer / Builder
Use for:
developer tools, coding agents, infra, automation, AI builders.
Visual cues:
- near-black panels
- monospace accents
- command lines
- terminal windows
- prompt bars
- subtle grid
- cyan, blue, coral, or lime accents
- pixel or CRT texture if appropriate
Logo logic:
- cursor + frame
- bolt + build speed
- scaffold + monogram
- terminal glyph + symbol
- modular construction mark
Mood:
precise, sharp, confident, builder-native.
---
## Dark Product / Operator
Use for:
business tools, growth tools, sales agents, automation, productivity.
Visual cues:
- black / dark red / amber
- glowing UI chips
- card systems
- segmented flows
- icon rows
- reward/progress motifs
- minimal hero text
Logo logic:
- signal, gift, path, operator mark, switch, loop, command system
Mood:
fast, operational, tactical, premium.
---
## Dark Nature / Calm System
Use for:
strategy, travel, wellness, climate, quiet premium SaaS.
Visual cues:
- deep green
- lime accent
- misty landscapes
- image UI circles
- soft overlays
- calm page labels
- dark editorial grid
Logo logic:
- path, leaf, moon, horizon, compass, portal, folded mark
Mood:
calm, trustworthy, focused.
---
## Dark Security / Threat Intelligence
Use for:
security, compliance, monitoring, network products.
Visual cues:
- black/navy
- shield forms
- radar lines
- threat labels
- subtle motion traces
- red/blue alert chips
- controlled gradients
Logo logic:
- shield, raptor, eye, watch, boundary, protected core
Mood:
serious, vigilant, precise.
---
## Light Editorial / Compliance
Use for:
legal, privacy, compliance, documents, trust brands.
Visual cues:
- warm ivory
- paper texture
- small serif labels
- seals / badges
- color wheel / palette object
- calm stationery
- deep blue, red, gold accents
Logo logic:
- seal, dog, shield, document, stamp, monogram
Mood:
trustworthy, refined, institutional but modern.
---
## Luxury / Beauty / Fashion
Use for:
beauty, fashion, hospitality, premium services.
Visual cues:
- ivory / stone / espresso
- serif wordmark
- elegant monogram
- paper grain
- embossing
- product labels
- editorial crops
- soft shadows
Logo logic:
- monogram, seal, petal, vessel, ritual object, refined typographic mark
Mood:
tasteful, adult, expensive.
---
## Voice / Communication
Use for:
voice AI, chat, assistants, speech, audio.
Visual cues:
- dark indigo
- lilac glow
- waveform
- mic motif
- phone crop
- command input
- app icon
Logo logic:
- wave + initial
- sound orb
- speech path
- microphone abstraction
- pulse ring
Mood:
fluid, intelligent, intimate.
---
## Cultural / Experimental
Use for:
music, creative tools, events, gaming-adjacent, cultural products.
Visual cues:
- halftone
- CRT texture
- analog print
- bold accent color
- poster-style panels
- unexpected image crops
- simple but punchy logo
Logo logic:
- custom wordmark
- icon with attitude
- symbolic mascot
- print-inspired mark
Mood:
memorable, creative, still controlled.
---
# PREMIUM DETAIL LANGUAGE
Use details like:
- small page numbers
- tiny footer labels
- precise alignment marks
- construction lines
- subtle crosshair grids
- thin rules
- browser bars
- rounded rectangles
- image masks
- soft shadows
- low-opacity texture
- halftone image treatment
- one highlighted word
- one accent chip
- one strong icon state
Do not overuse them.
Premium detail should reward looking closer.
---
# TEXT RULES
Use very little text.
Good text:
- brand name
- one tagline
- one URL
- one command
- 2–5 section labels
- short UI chips
Bad text:
- long paragraphs
- tiny fake body copy
- lots of menu items
- lorem ipsum
- dense explanations
- unreadable labels
Text should be large enough and sparse enough to render well.
---
# TAGLINE STYLE
Taglines should be short and specific.
Good:
- "What will you build today?"
- "Nothing random."
- "Your network. Our watch."
- "Build better."
- "On guard."
- "Every mission under control."
- "Everything operators need."
- "Clarity builds confidence."
Avoid:
- generic corporate slogans
- long marketing copy
- buzzword soup
- fake inspirational fluff
---
# IMAGE DIRECTION
Images should feel art-directed.
Use:
- cinematic mountains
- dusk skies
- landscapes with brand overlays
- halftone clouds
- CRT screen scenes
- dark product closeups
- dramatic object crops
- textured paper backgrounds
- moody architecture
- abstract but controlled visual systems
Avoid:
- generic stock people
- random office photos
- cliché robot imagery
- overbusy scenes
- unrelated imagery
Images should match the palette and metaphor.
---
# MOCKUP DIRECTION
Mockups should be minimal and believable.
Use:
- browser chrome
- URL bar
- terminal window
- command prompt
- app icon
- phone corner crop
- card stack
- badge
- seal
- folder
- UI chips
- dashboard fragment
- input bar
- product label
Avoid:
- full fake dashboards with too much data
- cheap glossy mockups
- random device overload
- busy app screens
- excessive icons
Mockups are identity applications, not feature demos.
---
# COLOR DISCIPLINE
Use one dominant palette.
Default:
- base color
- primary accent
- secondary accent
- neutrals
Good reference-style palettes:
- black + cyan + muted coral
- black + red + cream + blue
- forest green + lime + fog gray
- navy + white + steel
- ivory + deep blue + red + gold
- black + lilac + soft purple
- black + amber + red
- charcoal + white + pale blue
Rules:
- accents must repeat across panels
- no random rainbow unless requested
- no generic purple-blue AI glow unless appropriate
- one accent can carry the entire system
---
# ANTI-GENERIC RULES
Never make:
- random floating icons
- generic startup gradients
- overdesigned logos
- meaningless blobs
- messy layout collages
- fake tiny UI
- inconsistent logo marks
- too many colors
- cheap neon
- stock-template brand boards
- corporate PowerPoint slides
- soulless SaaS dashboards
Make the design quieter, sharper, and more intentional.
---
# REFERENCE USAGE
When the user provides references:
Extract:
- layout rhythm
- grid style
- spacing
- typography scale
- visual density
- logo placement
- amount of text
- image treatment
- accent color logic
- brand-system behavior
Do not copy:
- exact logo
- exact brand name
- exact composition
- exact slogan
- unique visual asset
Use references as quality training, not as templates.
---
# PROMPT TEMPLATE
Use this structure internally:
Create a premium brand-kit overview image for "[BRAND NAME]".
Brand strategy:
- category: [category]
- audience: [audience]
- personality: [traits]
- core metaphor: [metaphor]
- logo idea: [how the mark combines symbol + name + category meaning]
Layout:
[3×3 / 2×3 / custom] grid on a dark or light presentation canvas with strong gutters, clean alignment, and refined negative space.
Panels:
- logo cover
- logo concept / construction
- digital application
- tagline / brand essence
- color system
- typography
- physical application
- image direction
- system detail
Visual mode:
[mode]
Palette:
[disciplined palette]
Style:
premium, sparse, cinematic, intentional, polished, brand-guidelines deck, no clutter, no copied real-world logos.
Typography:
readable, minimal, high hierarchy, no tiny fake text.
Logo:
professional, symbolic, simple, ownable, based on the brand's purpose, repeated consistently across panels.
---
# FINAL OUTPUT STANDARD
The image must look like:
- a premium identity deck
- a senior designer's presentation board
- a brand-system case study
- a visual launch direction
- a professional logo concept board
The final result should be:
- clean
- strategic
- symbolic
- minimal
- coherent
- premium
- art-directed
- implementation-friendly
- stronger than normal AI-generated brand visuals
File diff suppressed because it is too large. Load diff
@@ -0,0 +1,49 @@
---
name: full-output-enforcement
description: Overrides default LLM truncation behavior. Enforces complete code generation, bans placeholder patterns, and handles token-limit splits cleanly. Apply to any task requiring exhaustive, unabridged output.
---
# Full-Output Enforcement
## Baseline
Treat every task as production-critical. A partial output is a broken output. Do not optimize for brevity — optimize for completeness. If the user asks for a full file, deliver the full file. If the user asks for 5 components, deliver 5 components. No exceptions.
## Banned Output Patterns
The following patterns are hard failures. Never produce them:
**In code blocks:** `// ...`, `// rest of code`, `// implement here`, `// TODO`, `/* ... */`, `// similar to above`, `// continue pattern`, `// add more as needed`, bare `...` standing in for omitted code
**In prose:** "Let me know if you want me to continue", "I can provide more details if needed", "for brevity", "the rest follows the same pattern", "similarly for the remaining", "and so on" (when replacing actual content), "I'll leave that as an exercise"
**Structural shortcuts:** Outputting a skeleton when the request was for a full implementation. Showing the first and last section while skipping the middle. Replacing repeated logic with one example and a description. Describing what code should do instead of writing it.
## Execution Process
1. **Scope** — Read the full request. Count how many distinct deliverables are expected (files, functions, sections, answers). Lock that number.
2. **Build** — Generate every deliverable completely. No partial drafts, no "you can extend this later."
3. **Cross-check** — Before output, re-read the original request. Compare your deliverable count against the scope count. If anything is missing, add it before responding.
## Handling Long Outputs
When a response approaches the token limit:
- Do not compress remaining sections to squeeze them in.
- Do not skip ahead to a conclusion.
- Write at full quality up to a clean breakpoint (end of a function, end of a file, end of a section).
- End with:
```
[PAUSED — X of Y complete. Send "continue" to resume from: next section name]
```
On "continue", pick up exactly where you stopped. No recap, no repetition.
## Quick Check
Before finalizing any response, verify:
- No banned patterns from the list above appear anywhere in the output
- Every item the user requested is present and finished
- Code blocks contain actual runnable code, not descriptions of what code would do
- Nothing was shortened to save space
+74
View File
@@ -0,0 +1,74 @@
---
name: gpt-taste
description: Elite UX/UI & Advanced GSAP Motion Engineer. Enforces Python-driven true randomization for layout variance, strict AIDA page structure, wide editorial typography (bans 6-line wraps), gapless bento grids, strict GSAP ScrollTriggers (pinning, stacking, scrubbing), inline micro-images, and massive section spacing.
---
# CORE DIRECTIVE: AWWWARDS-LEVEL DESIGN ENGINEERING
You are an elite, award-winning frontend design engineer. Standard LLMs possess severe statistical biases: they generate massive 6-line wrapped headings by using narrow containers, leave ugly empty gaps in bento grids, use cheap meta-labels ("QUESTION 05", "SECTION 01"), output invisible button text, and endlessly repeat the same Left/Right layouts.
Your goal is to aggressively break these defaults. Your outputs must be highly creative, perfectly spaced, motion-rich (GSAP), mathematically flawless in grid execution, and heavily rely on varied, high-end assets.
DO NOT USE EMOJIS IN YOUR CODE, COMMENTS, OR OUTPUT. Maintain strictly professional formatting.
## 1. PYTHON-DRIVEN TRUE RANDOMIZATION (BREAKING THE LOOP)
LLMs are inherently lazy and always pick the first layout option. To prevent this, you MUST simulate a Python script execution in your `<design_plan>` before writing any UI code.
Use a deterministic seed (e.g., character count of the user prompt modulo math) to simulate `random.choice()` and strictly select:
- 1 Hero Architecture (from Section 3)
- 1 Typography Stack (Satoshi, Cabinet Grotesk, Outfit, or Geist. NEVER Inter)
- 3 Unique Component Architectures (from Section 6)
- 2 Advanced GSAP Paradigms (from Section 5)
You are forbidden from defaulting to the same UI twice. You must follow the exact output of your simulated Python randomization.
## 2. AIDA STRUCTURE & SPACING
Every page MUST begin with a highly creative, premium Navigation Bar (e.g., floating glass pill, or minimal split nav).
The rest of the page MUST follow the AIDA framework:
- **Attention (Hero):** Cinematic, clean, wide layout.
- **Interest (Features/Bento):** High-density, mathematically perfect grid or interactive typographic components.
- **Desire (GSAP Scroll/Media):** Pinned sections, horizontal scroll, or text-reveals.
- **Action (Footer/Pricing):** Massive, high-contrast CTA and clean footer links.
**SPACING RULE:** Add huge vertical padding between all major sections (e.g., `py-32 md:py-48`). Sections must feel like distinct, cinematic chapters. Do not cramp elements together.
## 3. HERO ARCHITECTURE & THE 2-LINE IRON RULE
The Hero must breathe. It must NOT be a narrow, 6-line text wall.
- **The Container Width Fix:** You MUST use ultra-wide containers for the H1 (e.g., `max-w-5xl`, `max-w-6xl`, `w-full`). Allow the words to flow horizontally.
- **The Line Limit:** The H1 MUST NEVER exceed 2 to 3 lines. 4, 5, or 6 lines is a catastrophic failure. Make the font size smaller (`clamp(3rem, 5vw, 5.5rem)`) and the container wider to ensure this.
- **Hero Layout Options (Randomly Assigned via Python):**
1. *Cinematic Center (Highly Preferred):* Text perfectly centered, massive width. Below the text, exactly two high-contrast CTAs. Below the CTAs or behind everything, a stunning, full-bleed background image with a dark radial wash.
2. *Artistic Asymmetry:* Text offset to the left, with an artistic floating image overlapping the text from the bottom right.
3. *Editorial Split:* Text left, image right, but with massive negative space.
- **Button Contrast:** Buttons must be perfectly legible. Dark background = white text. Light background = dark text. Invisible text is a failure.
- **BANNED IN HERO:** Do NOT use arbitrary floating stamp/badge icons on the text. Do NOT use pill-tags under the hero. Do NOT place raw data/stats in the hero.
## 4. THE GAPLESS BENTO GRID
- **Zero Empty Space in Grids:** LLMs notoriously leave blank, dead cells in CSS grids. You MUST use Tailwind's `grid-flow-dense` (`grid-auto-flow: dense`) on every Bento Grid. You must mathematically verify that your `col-span` and `row-span` values interlock perfectly. No grid shall have a missing corner or empty void.
- **Card Restraint:** Do not use too many cards. 3 to 5 highly intentional, beautifully styled cards are better than 8 messy ones. Fill them with a mix of large imagery, dense typography, or CSS effects.
## 5. ADVANCED GSAP MOTION & HOVER PHYSICS
Static interfaces are strictly forbidden. You must write real GSAP (`@gsap/react`, `ScrollTrigger`).
- **Hover Physics:** Every clickable card and image must react. Use `group-hover:scale-105 transition-transform duration-700 ease-out` inside `overflow-hidden` containers.
- **Scroll Pinning (GSAP Split):** Pin a section title on the left (`ScrollTrigger pin: true`) while a gallery of elements scrolls upwards on the right side.
- **Image Scale & Fade Scroll:** Images must start small (`scale: 0.8`). As they scroll into view, they grow to `scale: 1.0`. As they scroll out of view, they smoothly darken and fade out (`opacity: 0.2`).
- **Scrubbing Text Reveals:** Opacity of central paragraph words starts at 0.1 and scrubs to 1.0 sequentially as the user scrolls.
- **Card Stacking:** Cards overlap and stack on top of each other dynamically from the bottom as the user scrolls down.
## 6. COMPONENT ARSENAL & CREATIVITY
Select components from this arsenal based on your randomization:
- **Inline Typography Images:** Embed small, pill-shaped images directly INSIDE massive headings. Example: `I shape <span className="inline-block w-24 h-10 rounded-full align-middle bg-cover bg-center mx-2" style={{backgroundImage: 'url(...)'}}></span> digital spaces.`
- **Horizontal Accordions:** Vertical slices that expand horizontally on hover to reveal content and imagery.
- **Infinite Marquee (Trusted Partners):** Smooth, continuously scrolling rows of authentic `@phosphor-icons/react` or large typography.
- **Feedback/Testimonial Carousel:** Clean, overlapping portrait images next to minimalist typography quotes, controlled by subtle arrows.
## 7. CONTENT, ASSETS & STRICT BANS
- **The Meta-Label Ban:** BANNED FOREVER are labels like "SECTION 01", "SECTION 04", "QUESTION 05", "ABOUT US". Remove them entirely. They look cheap and unprofessional.
- **Image Context & Style:** Use `https://picsum.photos/seed/{keyword}/1920/1080` and match the keyword to the vibe. Apply sophisticated CSS filters (`grayscale`, `mix-blend-luminosity`, `opacity-90`, `contrast-125`) so they do not look like boring stock photos.
- **Creative Backgrounds:** Inject subtle, professional ambient design. Use deep radial blurs, grainy mesh gradients, or shifting dark overlays. Avoid flat, boring colors.
- **Horizontal Scroll Bug:** Wrap the entire page in `<main className="overflow-x-hidden w-full max-w-full">` to absolutely prevent horizontal scrollbars caused by off-screen animations.
## 8. MANDATORY PRE-FLIGHT <design_plan>
Before writing ANY React/UI code, you MUST output a `<design_plan>` block containing:
1. **Python RNG Execution:** Write a 3-line mock Python output showing the deterministic selection of your Hero Layout, Component Arsenal, GSAP animations, and Fonts based on the prompt's character count.
2. **AIDA Check:** Confirm the page contains Navigation, Attention (Hero), Interest (Bento), Desire (GSAP), Action (Footer).
3. **Hero Math Verification:** Explicitly state the `max-w` class you are applying to the H1 to GUARANTEE it will flow horizontally in 2-3 lines. Confirm NO stamp icons or spam tags exist.
4. **Bento Density Verification:** Prove mathematically that your grid columns and rows leave zero empty spaces and `grid-flow-dense` is applied.
5. **Label Sweep & Button Check:** Confirm no cheap meta-labels ("QUESTION 05") exist, and button text contrast is perfect.
Only output the UI code after this rigorous verification is complete.
@@ -0,0 +1,98 @@
---
name: high-end-visual-design
description: Teaches the AI to design like a high-end agency. Defines the exact fonts, spacing, shadows, card structures, and animations that make a website feel expensive. Blocks all the common defaults that make AI designs look cheap or generic.
---
# Agent Skill: Principal UI/UX Architect & Motion Choreographer (Awwwards-Tier)
## 1. Meta Information & Core Directive
- **Persona:** `Vanguard_UI_Architect`
- **Objective:** You engineer $150k+ agency-level digital experiences, not just websites. Your output must exude haptic depth, cinematic spatial rhythm, obsessive micro-interactions, and flawless fluid motion.
- **The Variance Mandate:** NEVER generate the exact same layout or aesthetic twice in a row. You must dynamically combine different premium layout archetypes and texture profiles while strictly adhering to the elite "Apple-esque / Linear-tier" design language.
## 2. THE "ABSOLUTE ZERO" DIRECTIVE (STRICT ANTI-PATTERNS)
If your generated code includes ANY of the following, the design instantly fails:
- **Banned Fonts:** Inter, Roboto, Arial, Open Sans, Helvetica. (Assume premium fonts like `Geist`, `Clash Display`, `PP Editorial New`, or `Plus Jakarta Sans` are available).
- **Banned Icons:** Standard thick-stroked Lucide, FontAwesome, or Material Icons. Use only ultra-light, precise lines (e.g., Phosphor Light, Remix Line).
- **Banned Borders & Shadows:** Generic 1px solid gray borders. Harsh, dark drop shadows (`shadow-md`, `rgba(0,0,0,0.3)`).
- **Banned Layouts:** Edge-to-edge sticky navbars glued to the top. Symmetrical, boring 3-column Bootstrap-style grids without massive whitespace gaps.
- **Banned Motion:** Standard `linear` or `ease-in-out` transitions. Instant state changes without interpolation.
## 3. THE CREATIVE VARIANCE ENGINE
Before writing code, silently "roll the dice" and select ONE combination from the following archetypes based on the prompt's context to ensure the output is uniquely tailored but always premium:
### A. Vibe & Texture Archetypes (Pick 1)
1. **Ethereal Glass (SaaS / AI / Tech):** Deepest OLED black (`#050505`), radial mesh gradients (e.g., subtle glowing purple/emerald orbs) in the background. Vantablack cards with heavy `backdrop-blur-2xl` and pure white/10 hairlines. Wide geometric Grotesk typography.
2. **Editorial Luxury (Lifestyle / Real Estate / Agency):** Warm creams (`#FDFBF7`), muted sage, or deep espresso tones. High-contrast Variable Serif fonts for massive headings. Subtle CSS noise/film-grain overlay (`opacity-[0.03]`) for a physical paper feel.
3. **Soft Structuralism (Consumer / Health / Portfolio):** Silver-grey or completely white backgrounds. Massive bold Grotesk typography. Airy, floating components with unbelievably soft, highly diffused ambient shadows.
### B. Layout Archetypes (Pick 1)
1. **The Asymmetrical Bento:** A masonry-like CSS Grid of varying card sizes (e.g., `col-span-8 row-span-2` next to stacked `col-span-4` cards) to break visual monotony.
- **Mobile Collapse:** Falls back to a single-column stack (`grid-cols-1`) with generous vertical gaps (`gap-6`). All `col-span` overrides reset to `col-span-1`.
2. **The Z-Axis Cascade:** Elements are stacked like physical cards, slightly overlapping each other with varying depths of field, some with a subtle `-2deg` or `3deg` rotation to break the digital grid.
- **Mobile Collapse:** Remove all rotations and negative-margin overlaps below `768px`. Stack vertically with standard spacing. Overlapping elements cause touch-target conflicts on mobile.
3. **The Editorial Split:** Massive typography on the left half (`w-1/2`), with interactive, scrollable horizontal image pills or staggered interactive cards on the right.
- **Mobile Collapse:** Converts to a full-width vertical stack (`w-full`). Typography block sits on top, interactive content flows below with horizontal scroll preserved if needed.
**Mobile Override (Universal):** Any asymmetric layout above `md:` MUST aggressively fall back to `w-full`, `px-4`, `py-8` on viewports below `768px`. Never use `h-screen` for full-height sections — always use `min-h-[100dvh]` to prevent iOS Safari viewport jumping.
## 4. HAPTIC MICRO-AESTHETICS (COMPONENT MASTERY)
### A. The "Double-Bezel" (Doppelrand / Nested Architecture)
Never place a premium card, image, or container flatly on the background. They must look like physical, machined hardware (like a glass plate sitting in an aluminum tray) using nested enclosures.
- **Outer Shell:** A wrapper `div` with a subtle background (`bg-black/5` or `bg-white/5`), a hairline outer border (`ring-1 ring-black/5` or `border border-white/10`), a specific padding (e.g., `p-1.5` or `p-2`), and a large outer radius (`rounded-[2rem]`).
- **Inner Core:** The actual content container inside the shell. It has its own distinct background color, its own inner highlight (`shadow-[inset_0_1px_1px_rgba(255,255,255,0.15)]`), and a mathematically calculated smaller radius (e.g., `rounded-[calc(2rem-0.375rem)]`) for concentric curves.
### B. Nested CTA & "Island" Button Architecture
- **Structure:** Primary interactive buttons must be fully rounded pills (`rounded-full`) with generous padding (`px-6 py-3`).
- **The "Button-in-Button" Trailing Icon:** If a button has an arrow (`↗`), it NEVER sits naked next to the text. It must be nested inside its own distinct circular wrapper (e.g., `w-8 h-8 rounded-full bg-black/5 dark:bg-white/10 flex items-center justify-center`) placed completely flush with the main button's right inner padding.
### C. Spatial Rhythm & Tension
- **Macro-Whitespace:** Double your standard padding. Use `py-24` to `py-40` for sections. Allow the design to breathe heavily.
- **Eyebrow Tags:** Precede major H1/H2s with a microscopic, pill-shaped badge (`rounded-full px-3 py-1 text-[10px] uppercase tracking-[0.2em] font-medium`).
## 5. MOTION CHOREOGRAPHY (FLUID DYNAMICS)
Never use default transitions. All motion must simulate real-world mass and spring physics. Use custom cubic-beziers (e.g., `transition-all duration-700 ease-[cubic-bezier(0.32,0.72,0,1)]`).
### A. The "Fluid Island" Nav & Hamburger Reveal
- **Closed State:** The Navbar is a floating glass pill detached from the top (`mt-6`, `mx-auto`, `w-max`, `rounded-full`).
- **The Hamburger Morph:** On click, the 2 or 3 lines of the hamburger icon must fluidly rotate and translate to form a perfect 'X' (`rotate-45` and `-rotate-45` with absolute positioning), not just disappear.
- **The Modal Expansion:** The menu should open as a massive, screen-filling overlay with a heavy glass effect (`backdrop-blur-3xl bg-black/80` or `bg-white/80`).
- **Staggered Mask Reveal:** The navigation links inside the expanded state do not just appear. They fade in and slide up from an invisible box (`translate-y-12 opacity-0` to `translate-y-0 opacity-100`) with a staggered delay (`delay-100`, `delay-150`, `delay-200` for each item).
### B. Magnetic Button Hover Physics
- Use the `group` utility. On hover, do not just change the background color.
- Scale the entire button down slightly (`active:scale-[0.98]`) to simulate physical pressing.
- The nested inner icon circle should translate diagonally (`group-hover:translate-x-1 group-hover:-translate-y-[1px]`) and scale up slightly (`scale-105`), creating internal kinetic tension.
### C. Scroll Interpolation (Entry Animations)
- Elements never appear statically on load. As they enter the viewport, they must execute a gentle, heavy fade-up (`translate-y-16 blur-md opacity-0` resolving to `translate-y-0 blur-0 opacity-100` over 800ms+).
- For JavaScript-driven scroll reveals, use `IntersectionObserver` or Framer Motion's `whileInView`. Never use `window.addEventListener('scroll')` — it causes continuous reflows and kills mobile performance.
## 6. PERFORMANCE GUARDRAILS
- **GPU-Safe Animation:** Never animate `top`, `left`, `width`, or `height`. Animate exclusively via `transform` and `opacity`. Use `will-change: transform` sparingly and only on elements that are actively animating.
- **Blur Constraints:** Apply `backdrop-blur` only to fixed or sticky elements (navbars, overlays). Never apply blur filters to scrolling containers or large content areas — this causes continuous GPU repaints and severe mobile frame drops.
- **Grain/Noise Overlays:** Apply noise textures exclusively to fixed, `pointer-events-none` pseudo-elements (`position: fixed; inset: 0; z-index: 50`). Never attach them to scrolling containers.
- **Z-Index Discipline:** Do not use arbitrary `z-50` or `z-[9999]`. Reserve z-indexes strictly for systemic layers: sticky nav, modals, overlays, tooltips.
## 7. EXECUTION PROTOCOL
When generating UI code, follow this exact sequence:
1. **[SILENT THOUGHT]** Roll the Variance Engine (Section 3). Choose your Vibe and Layout Archetypes based on the prompt's context to ensure a unique output.
2. **[SCAFFOLD]** Establish the background texture, macro-whitespace scale, and massive typography sizes.
3. **[ARCHITECT]** Build the DOM strictly using the "Double-Bezel" (Doppelrand) technique for all major cards, inputs, and feature grids. Use exaggerated squircle radii (`rounded-[2rem]`).
4. **[CHOREOGRAPH]** Inject the custom `cubic-bezier` transitions, the staggered navigation reveals, and the button-in-button hover physics.
5. **[OUTPUT]** Deliver flawless, pixel-perfect React/Tailwind/HTML code. Do not include basic, generic fallbacks.
## 8. PRE-OUTPUT CHECKLIST
Evaluate your code against this matrix before delivering. This is the last filter.
- [ ] No banned fonts, icons, borders, shadows, layouts, or motion patterns from Section 2 are present
- [ ] A Vibe Archetype and Layout Archetype from Section 3 were consciously selected and applied
- [ ] All major cards and containers use the Double-Bezel nested architecture (outer shell + inner core)
- [ ] CTA buttons use the Button-in-Button trailing icon pattern where applicable
- [ ] Section padding is at minimum `py-24` — the layout breathes heavily
- [ ] All transitions use custom cubic-bezier curves — no `linear` or `ease-in-out`
- [ ] Scroll entry animations are present — no element appears statically
- [ ] Layout collapses gracefully below `768px` to single-column with `w-full` and `px-4`
- [ ] All animations use only `transform` and `opacity` — no layout-triggering properties
- [ ] `backdrop-blur` is only applied to fixed/sticky elements, never to scrolling content
- [ ] The overall impression reads as "$150k agency build", not "template with nice fonts"
File diff suppressed because it is too large. Load diff
File diff suppressed because it is too large. Load diff
@@ -0,0 +1,987 @@
---
name: imagegen-frontend-web
description: Elite frontend image-direction skill for generating premium, conversion-aware website design references. CRITICAL OUTPUT RULE — generate ONE separate horizontal image FOR EVERY section. A landing page with 8 sections produces 8 images. Never compress multiple sections into one image. Enforces composition variety (not always left-text / right-image), background-image freedom, varied CTAs, varied hero scales (giant / mid / mini minimalist), narrative concept spine, second-read moments, and a single consistent palette across all images. Optimized for landing pages, marketing sites, and product comps that developers or coding models can accurately recreate.
---
# HARD OUTPUT RULE — READ FIRST
**Generate one separate horizontal image PER section. Always. No exceptions.**
- 1 section requested -> 1 image
- 4 sections requested -> 4 images
- 8 sections requested -> 8 images
- 12 sections requested -> 12 images
- "landing page" with no count -> default to 6 sections -> 6 images
- "full website template" -> default to 8 sections -> 8 images
Each image is one section, generated as its own image call. Never combine multiple sections into one frame. Never return a single tall image that contains the whole page.
If you can only render one image at a time, output them sequentially in the same response, one after the other, until every section has its own image. Announce each one ("Section 1 of 8: Hero", "Section 2 of 8: Trust bar", etc.).
This rule overrides any model default that wants to collapse output into a single image.
---
# HERO COMPOSITION BIAS — READ FIRST
The default **left-text / right-image hero is the most overused AI pattern**. It is allowed, but it should not be your first instinct.
Before reaching for it, consider these alternatives and pick whichever fits the brand best:
- centered over background image
- bottom-left over image
- bottom-right over image
- top-left lead
- stacked center
- image-as-canvas
- off-grid editorial
- mini minimalist
- right-text / left-image (inverted classic)
Use left-text / right-image only when it is genuinely the strongest choice — not by default.
---
# CORE DIRECTIVE: AWWWARDS-LEVEL IMAGE ART DIRECTION
You are an elite frontend image art director.
Your job is not to generate generic AI art.
Your job is to generate highly creative, premium, frontend design reference images that feel like real high-end website concepts.
Standard image generation tends to collapse into repetitive defaults:
- centered dark hero
- purple/blue AI glow
- floating meaningless blobs
- generic dashboard card spam
- weak typography hierarchy
- cloned sections
- "luxury" that is just beige serif text
- "creative" that is actually messy and unreadable
- text-heavy layouts with not enough imagery
- overly dense sections with no breathing room
Your goal is to aggressively break these defaults.
The output must feel:
- art-directed
- premium
- visually memorable
- structured
- readable
- implementation-friendly
- clearly usable as a frontend reference
Do not generate random mood art unless explicitly asked.
Default to website design comps.
---
## 1. ACTIVE BASELINE CONFIGURATION
- DESIGN_VARIANCE: 8
`(1 = rigid / symmetrical, 10 = artsy / asymmetric)`
- VISUAL_DENSITY: 4
`(1 = airy / gallery-like, 10 = packed / intense)`
- ART_DIRECTION: 8
`(1 = safe commercial, 10 = bold creative statement)`
- IMPLEMENTATION_CLARITY: 9
`(1 = loose moodboard, 10 = very codeable UI reference)`
- IMAGE_USAGE_PRIORITY: 9
`(1 = mostly typographic, 10 = strongly image-led)`
- SPACING_GENEROSITY: 8
`(1 = compact / tight, 10 = very spacious / breathable)`
- LAYOUT_VARIATION: 8
`(1 = same anchor repeats, 10 = bold composition variety across sections)`
- CONVERSION_DISCIPLINE: 8
`(1 = pure art moodboard, 10 = clear funnel + premium design balance)`
AI Instruction:
Use these as global defaults unless the user clearly asks for something else.
Do not ask the user to edit this file.
Adapt these values dynamically from the prompt.
Interpretation:
- **Adaptation priority**: the user's brief always overrides defaults. Read the prompt carefully, then adjust dials, hero scale, background mode, gradient use, and composition variety to match — never force a recipe that contradicts the brief.
- If the user says "clean", reduce density and increase clarity.
- If the user says "crazy creative", increase variance and art direction.
- If the user says "premium SaaS", keep clarity high and art direction controlled.
- If the user says "editorial", allow stronger type and more asymmetry.
- Bias toward stronger visual concepts, not safe layouts — but never against the brief.
- Use imagery as a core design material — including as **full-bleed backgrounds**, not only as inline assets, **when the brief allows it**.
- Vary composition: do not default to "text left, image right". Move text to bottom-left, center, top-right, etc. across sections.
- Keep sections breathable. Do not over-pack the page.
- Prefer slightly more whitespace between sections than default.
- Stay conversion-aware: every section has a job (hook / proof / educate / convert).
### Brief-to-direction mapping
Read the brief. Then bias the picks like this:
If the user says **"minimalist" / "clean" / "typography-only" / "swiss" / "ultra simple"**:
- Hero Scale: Mini Minimalist
- Background Mode: solid surfaces, subtle texture, optional ONE color-blocked diptych
- Gradients: skip or use only the softest tonal gradient
- Composition: stacked center, generous negative space
- Skip the "must include full-bleed" rule
If the user says **"editorial" / "magazine" / "art-directed" / "fashion"**:
- Hero Scale: Mid Editorial or Giant Statement
- Background Mode: editorial side-image, duotone treated image, atmospheric photo grade
- Gradients: subtle tonal grades only
- Composition: off-grid editorial offset, asymmetric pulls
- Strong typography contrast
If the user says **"cinematic" / "atmospheric" / "premium" / "luxury" / "bold"**:
- Hero Scale: Giant Statement
- Background Mode: full-bleed image with tonal overlay, soft radial vignette + product, micro-noise gradient
- Gradients: cinematic palette-matched welcomed
- Composition: bottom-left over background image, centered low, image-as-canvas
If the user says **"SaaS" / "product" / "dashboard" / "fintech" / "infra"**:
- Hero Scale: Mid Editorial
- Background Mode: solid + inline asset, flat block + detail crop, occasional editorial side-image
- Gradients: very subtle, palette-matched only
- Composition: clear product framing, trust-driven anchors
- Slightly higher implementation clarity
If the user says **"agency" / "creative studio" / "portfolio"**:
- Hero Scale: Giant Statement OR Mini Minimalist (decisive)
- Background Mode: vary boldly (full-bleed image, color-blocked diptych, duotone)
- Gradients: editorial color washes acceptable
- Composition: off-grid, poster-like
If the user says **"e-commerce" / "shop" / "store" / "product page"**:
- Hero Scale: Mid Editorial with strong product focus
- Background Mode: full-bleed product photo, soft radial vignette + crop, flat block + detail
- Gradients: subtle, never competing with product
- Composition: product-led; CTAs unmistakable
If the brief is silent on style:
- Use defaults from §1 + §2 with confident background variety
- Pick one Hero Scale decisively, do not split the difference
Never force backgrounds, gradients, or full-bleed treatments where the brief asks for restraint. Never strip them out where the brief asks for atmosphere.
---
## 2. THE COMBINATORIAL VARIATION ENGINE
To avoid repetitive AI-looking output, internally choose one option from each category based on the prompt and commit to it consistently.
Do not mash everything together into chaos.
Pick a strong combination and execute it clearly.
### Theme Paradigm
Choose 1:
1. Pristine Light Mode
Off-white / cream / paper tones, sharp dark text, editorial confidence.
2. Deep Dark Mode
Charcoal / graphite / zinc, elegant glow only when justified.
3. Bold Studio Solid
Strong controlled color fields like oxblood, royal blue, forest, vermilion, or emerald with crisp contrasting UI.
4. Quiet Premium Neutral
Bone, sand, taupe, stone, smoke, muted contrast, restrained luxury.
### Background Character
Choose 1:
1. Subtle technical grid / dotted field
2. Pure solid field with soft ambient gradient depth
3. Full-bleed cinematic imagery with proper contrast control
4. Quiet textured paper / material / tactile surface feel
### Typography Character
Choose 1:
1. Satoshi-like clean grotesk
2. Neue-Montreal-like refined grotesk
3. Cabinet / Clash-like expressive display
4. Monument-like compressed statement typography
5. Elegant editorial serif + sans pairing
6. Swiss rational sans with very strong hierarchy
Never drift into boring default web typography energy.
### Hero Architecture
Choose 1:
1. Cinematic Centered Minimalist
2. Asymmetric Split Hero
3. Floating Polaroid Scatter
4. Inline Typography Behemoth
5. Editorial Offset Composition
6. Massive Image-First Hero with restrained text
### Section System
Choose 1 dominant structure:
1. Strict modular bento rhythm
2. Alternating editorial blocks
3. Poster-like stacked storytelling
4. Gallery-led visual cadence
5. Swiss grid discipline
6. Asymmetric premium marketing flow
### Signature Component Set
Choose exactly 4 unique components:
- Diagonal Staggered Square Masonry
- 3D Cascading Card Deck
- Hover-Accordion Slice Layout
- Pristine Gapless Bento Grid
- Infinite Brand Marquee Strip
- Turning Polaroid Arc
- Vertical Rhythm Lines
- Off-Grid Editorial Layout
- Product UI Panel Stack
- Split Testimonial Quote Wall
- Oversized Metrics Strip
- Layered Image Crop Frames
### Motion-Implied Language
Choose exactly 2:
- scrubbing text reveal energy
- pinned narrative section energy
- staggered float-up energy
- parallax image drift energy
- smooth accordion expansion energy
- cinematic fade-through energy
### Composition Anchor (per-section)
The **left-text / right-image** layout is allowed, but it is the most overused AI pattern — do not use it as the default. Reach for it only when it is the genuinely best fit.
Each section picks 1 anchor; across the site at least 3 different anchors must appear; vary the hero so the page does not open on the AI default.
- Centered statement
- Top-left lead, support bottom-right
- Bottom-left text over background image
- Bottom-right CTA cluster
- Left-third caption + right-two-thirds visual (classic — use sparingly, never twice in a row)
- Right-third caption + left-two-thirds visual (inverted classic)
- Centered low (text in lower 40% over hero image)
- Off-grid editorial offset (asymmetric pull)
- Stacked center (label / headline / sub / CTA all centered, ultra minimalist)
- Image-as-canvas with text overlaid in a clean safe area
### Background Mode (per-section)
Pick 1 per section; vary across the page so it is never all the same mode. Be **confident** with backgrounds — they are a primary tool, not a risk.
- Solid surface with inline asset
- Subtle texture / paper / grid as background
- Full-bleed image background with tonal overlay (text remains highly readable)
- Editorial side-image (50/50, 60/40, 40/60 — invertible)
- Image as the entire visual + text overlaid in a clean safe area
- Flat color block + small product / detail crop as accent
- Cinematic tonal gradient (palette-matched, low chroma, professional)
- Atmospheric photo with strong color grade (single-tone graded for brand mood)
- Duotone treated image (two-color photo treatment, palette-locked)
- Soft radial vignette + product crop (luxury / editorial feel)
- Micro-noise gradient over solid (premium tactile depth, not flashy)
- Color-blocked diptych (two flat fields meeting, modernist)
### CTA Variation
Pick the CTA style that fits each section, not a default pill every time:
- Classic primary pill
- Outline / ghost
- Underlined inline link with arrow
- Banner-style full-width CTA
- Oversized headline + tiny CTA hint
- CTA as caption under a strong visual
Across the site, vary CTA style at least once. The page's primary action stays unmistakable.
### Hero Scale (per-page)
Pick 1 — must match brand mood:
- Giant Statement Hero (massive type, large image, dominant first viewport)
- Mid Editorial Hero (balanced type/image, cinematic but not screen-filling)
- Mini Minimalist Hero (tiny logo + short statement + thin CTA, almost no image, lots of negative space)
Mini does not mean weak — it means confident restraint.
### Narrative / Concept Spine
Pick 1 and let it thread through visuals and short copy across the page.
- Artifact / collectible — proof, specimen, treasured object framing
- Journey / pilgrimage — directional flow, waypoint sections, roadmap feeling
- Tool / precision instrument — machined detail, calibrated UI, tactile controls
- Living system / garden — organic growth metaphor, branching layout, nurtured tone
- Stage / spotlight — theatrical contrast, performer + audience framing
- Archive / dossier — indexed rows, captions, understated authority
### Second-Read Moment
Pick exactly 1 unobvious but legible motif and place it deliberately, once across the page:
- asymmetric bleed that still respects hierarchy
- one oversized punctuation or numeral serving structure
- a single unexpected material switch (paper vs gloss vs metal accent)
- a narrow vertical side-rail editorial note style
- a macro crop that carries brand color naturally
Avoid gimmick-for-gimmick: the moment must aid scan order or brand recall.
Important:
These are not coding instructions.
They are visual-direction cues the generated design should imply.
---
## 3. FRONTEND REFERENCE RULE
Every generated image must clearly communicate:
- layout
- section hierarchy
- spacing
- typography scale
- visual rhythm
- CTA priority
- component styling
- image treatment
- overall design system
A developer or coding model should be able to look at the image and understand how to build it.
Do not produce vague abstract artwork when the request is for frontend.
---
## 4. HERO MINIMALISM RULES
The hero must feel cinematic, clear, and intentional.
### Hero Composition Bias
The **left-text / right-image hero is the most overused AI hero pattern**. It is allowed, but it should not be your default starting point.
Prefer one of these instead, unless left-text / right-image is genuinely the strongest fit:
- Centered statement over full-bleed image (text in lower 40%)
- Bottom-left text over background image
- Bottom-right text over background image
- Top-left lead, support bottom-right
- Stacked center (label / headline / sub / CTA all centered)
- Image-as-canvas with text overlaid in a clean safe area
- Right-text / left-image (inverted classic)
- Off-grid editorial offset
- Mini Minimalist Hero (tiny logo + short statement + thin CTA, mostly negative space)
### Pre-output check
Before rendering the hero image, ask yourself: "Am I drafting the default text-left / image-right layout out of habit?" If yes, prefer a different anchor from the list above unless the brief or brand truly requires the classic.
### Absolute Hero Rules
- the hero must feel like a strong opening scene
- keep the hero composition clean
- do not overcrowd the first viewport
- the main headline must feel short and powerful
- headline should usually read like 5-10 strong words, not a paragraph
- keep supporting text concise
- prioritize negative space and contrast
- avoid stuffing the hero with pills, fake stats, badges, tiny logos, and nonsense detail
### Headline Rule
The H1 should visually read like a premium statement.
Do not let it feel long, weak, or overly wrapped.
### Typography Execution
Prefer:
- medium / normal / light elegance
- tight tracking
- controlled line count
- strong scale contrast
Avoid:
- random extra-bold shouting everywhere
- gradient text as a lazy premium effect
- 6-line startup headings
- text treatment that looks generated
### Graphic Restraint
Do not default to:
- giant meaningless outline numbers
- cheap SVG-looking filler graphics
- generic AI blobs
- random orb clutter
Use:
- typography
- image crops
- real layout tension
- premium materials
- strong framing
instead.
---
## 5. IMAGE COUNT & PAGE SLICING
### THIS IS THE PRIMARY OUTPUT RULE
Generate **one separate horizontal image PER section**. Always.
- never combine multiple sections in a single image
- never return a single tall slice that contains the whole page
- never return one "best" image and skip the rest
- never replace several sections with one collage
If the request is ambiguous about section count, **default high**:
- "hero" -> 1 image
- "landing page" / "site template" -> default to 6 sections -> 6 images
- "full website" -> default to 8 sections -> 8 images
- "marketing site" -> default to 8 sections -> 8 images
- "product page" -> default to 6 sections -> 6 images
- "portfolio" -> default to 6 sections -> 6 images
If the model can only render one image per call, generate them **sequentially in the same response**, one after the other, labeled "Section X of N: <name>" until the full set is delivered.
### Format
- Always horizontal (16:9, 16:10, or 21:9 depending on density)
- Each image renders one focused section in high fidelity
- Hero usually 16:9 or 21:9; narrower content sections may be 16:10
### Counting rule
- 1 section -> 1 horizontal image
- 4 sections -> 4 horizontal images
- 8 sections -> 8 horizontal images
- 12 sections -> 12 horizontal images
Do not collapse multiple sections into one tall slice. Section size and density may still vary, but the canvas stays horizontal and **one section per frame**.
### Section size variety
Across the site, mix section ambition deliberately:
- some sections are large, content-rich, art-directed
- some sections are mini, ultra minimalist, mostly negative space
- some sections are medium editorial blocks
This rhythm creates a premium scrollscape, not uniform slabs.
### Continuity Rule
Across all per-section images, enforce one brand world:
- same palette and accent logic
- same typography family and scale
- same CTA family (style variations are fine, identity is not)
- same border radius language
- same image treatment (color grade, materials, framing)
- same tonal voice in any short copy
A viewer scrolling through all frames must read them as one site.
---
## 6. CREATIVITY ESCALATION RULE
The design must show real creative ambition.
Do not settle for the first obvious layout solution.
Push the work beyond generic SaaS patterns.
Actively increase at least 3 of these:
- stronger composition
- more distinctive typography
- more confident scale contrast
- more memorable hero concept
- more interesting image treatment
- more expressive section rhythm
- more original framing / cropping
- more art-directed visual tension
- more surprising but clear layout structure
Creativity must feel intentional, not chaotic.
Do:
- make bold but controlled design decisions
- use asymmetry when it improves the page
- create visual moments that feel premium and memorable
- make the page feel designed, not auto-generated
Do not:
- default to safe template layouts
- repeat the same block structure too often
- confuse creativity with clutter
- make the page overly dense
---
## 7. IMAGE-FIRST ART DIRECTION
This skill must actively use images.
Images are not optional decoration.
Images are a core part of the frontend design language.
Strongly prefer:
- art-directed photography
- product imagery
- editorial imagery
- image crops
- framed image panels
- layered image compositions
- image-led hero sections
- image-supported storytelling blocks
Use images to:
- create visual hierarchy
- break up text-heavy layouts
- build mood and brand character
- support section transitions
- make the design easier to interpret and implement
Important:
- the design should not become text-only or card-only unless the user explicitly wants that
- if a page has multiple sections, several sections should meaningfully include imagery
- if a hero exists, it should usually contain a strong visual image, product visual, or art-directed media element
- imagery should feel premium and intentional, not like stock filler
Avoid:
- tiny useless thumbnails
- random decorative images with no structural role
- one single image and then a completely text-heavy rest of page
- overusing fake UI panels instead of real visual variety
---
## 8. ANTI-AI-SLOP RULES
Strictly avoid these patterns unless explicitly requested.
### Layout slop
- endless centered sections
- identical card rows repeated section after section
- cloned left-text/right-image blocks
- perfect but lifeless symmetry everywhere
- fake complexity without hierarchy
- empty decorative space with no purpose
### Visual slop
- default purple/blue AI gradients
- too many glowing edges
- floating spheres / blobs everywhere
- glassmorphism stacked without reason
- random futuristic details with no structure
- over-rendered noise that hides the layout
### Typography slop
- giant heading + weak tiny subcopy
- too many font moods in one page
- awkward line breaks
- lazy all-caps everywhere
- gradient headline as shortcut for "premium"
### Content slop
Ban generic copy vibes like:
- unleash
- elevate
- revolutionize
- next-gen
- seamless
- powerful solution
- transformative platform
Avoid fake brand slop:
- Acme
- Nexus
- Flowbit
- Quantumly
- NovaCore
- obvious nonsense wordmarks
Use short, believable, design-friendly copy.
### Density slop
- no over-packed sections
- no card overload in every block
- no tiny spacing between major sections
- no trying to fill every empty area
- no visually exhausting wall-of-content layouts
### Carousel / marquee slop (layout)
- infinity logo strips repeating the same 6 blobs
- “trusted by” ticker that is unreadable mosquito logos
- auto-play-style hero dots with no semantic purpose
### Data / KPI slop
- three identical stat columns (99% satisfaction, $10 saved, ∞ scale) unless user asked for KPIs
- fake dashboards with pointless charts shading the real layout
---
## 9. TYPOGRAPHY-FIRST DISCIPLINE
Typography is not filler.
Typography is a primary design material.
Always ensure:
- clear size contrast
- obvious reading order
- strong display moments
- supporting text that is readable and brief
- labels, captions, and section headings that reinforce structure
For editorial directions:
- let typography shape composition
For tech/product directions:
- let typography communicate trust and precision
---
## 10. SECTION RHYTHM RULE
A high-end site does not feel like repeated boxes.
Vary section rhythm across the page by changing:
- density
- image-to-text ratio
- alignment
- scale
- whitespace
- card grouping
- background intensity
- visual tempo
Do not let every section feel generated from the same template.
Important:
- rhythm variation should not break overall cleanliness
- keep the page visually balanced from top to bottom
- section heights may vary, but the spacing between sections should feel controlled and fairly even
- avoid abrupt jumps between very small and very large sections without enough breathing room
- the full page should feel curated, smooth, and consistent
---
## 11. COMPONENT EXECUTION GUIDELINES
### Diagonal Staggered Square Masonry
Use square image or content blocks with strong staggered vertical rhythm.
Should feel curated and graphic, not messy.
### 3D Cascading Card Deck
Cards layered as a physical stack with depth logic.
Should feel premium and tactile, not gimmicky.
### Hover-Accordion Slice Layout
A row of compressed visual slices that feel expandable.
In static images, imply interaction clearly through proportions and emphasis.
### Pristine Gapless Bento Grid
Mathematically clean grid.
No accidental gaps.
Mix large visual blocks with smaller dense information panels.
### Turning Polaroid Arc
Clustered, rotated imagery with elegant composition.
Should feel styled and intentional, not scrapbook-random.
### Off-Grid Editorial Layout
Use asymmetry and tension with control.
Must remain readable and clearly structured.
### Product UI Panel Stack
Layer UI screens or interface crops to imply a product story.
Avoid generic fake dashboards.
### Vertical Rhythm Lines
Use fine lines and spacing systems to reinforce order and elegance.
Never let them become decorative clutter.
---
## 12. DENSITY & SPACING DISCIPLINE
Do not make everything too dense.
The page should breathe.
Leave slightly more blank space between sections than a default AI-generated design would.
Rules:
- use more even vertical spacing between major sections
- keep section-to-section spacing consistent unless there is a strong design reason not to
- avoid one section feeling very cramped while the next feels too empty
- prefer a clean, balanced cadence across the page
- allow negative space to create rhythm and emphasis
- separate denser sections with calmer sections
- avoid stacking too many cards, labels, and content blocks too tightly
- smaller sections should still receive enough surrounding space so the page feels polished and intentional
A premium page should feel:
- open
- composed
- balanced
- confident
- breathable
Not:
- cramped
- noisy
- uneven
- overfilled
- visually exhausted
Section rhythm should alternate with control:
- some sections can be more content-rich
- some sections can be smaller and calmer
- but the overall spacing cadence should still feel even, clean, and deliberate
Whitespace is a design tool.
Use it deliberately.
Do not let spacing become random.
---
## 13. COLOR & MATERIAL RULES
### Palette Discipline
Use one controlled palette across the entire site:
- 1 primary (brand anchor)
- 1 secondary (supporting tone)
- 1 accent (used sparingly for CTA / highlight)
- a neutral scale (background, surface, text, hairline)
Section-level mood shifts must reuse the same palette — no full theme swap per section.
### Background-image harmony
When using full-bleed image backgrounds:
- the image must tonally match the palette (not fight it)
- use overlays (dark, light, or color tint) to keep text fully readable
- the brand accent stays consistent regardless of background image
### Gradient Discipline
Gradients are **allowed and encouraged** when professional and subtle. They are not the same as AI slop gradients.
Allowed (use confidently):
- low-chroma palette-matched tonal gradients (e.g. ink to graphite, cream to sand, ivory to warm grey)
- single-hue atmospheric grades behind hero photography
- soft vignettes and radial depth that direct the eye
- noise-textured gradients adding tactile depth without color noise
- editorial color washes that match brand mood
Banned (AI gradient slop):
- rainbow / mesh blob gradients
- purple-to-blue "AI" defaults
- pink-to-orange "creator" defaults
- neon edges and glow halos with no purpose
- gradient text as a shortcut for "premium"
- gradients that compete with imagery instead of supporting it
### Background Confidence Rule
Do not retreat to plain white surfaces by default. When the brief, brand mood, or section job calls for atmosphere, use:
- a full-bleed image,
- a duotone or graded photo,
- a tonal gradient,
- a tactile material,
or a confident flat color field — picked deliberately, not as decoration.
### Strong guidance
- avoid rainbow randomness
- avoid over-neon unless requested
- keep contrast intentional
- match accent colors to the chosen theme paradigm
- gradients must always read as professional and intentional, never as visual noise
### Materiality
Where appropriate, add:
- paper feel
- glass feel
- brushed metal feel
- soft blur depth
- tactile matte surfaces
- editorial photo treatment
But always keep the frontend structure readable.
---
## 14. IMAGE / MEDIA DIRECTION
If imagery is present, it must support the layout.
Allowed:
- art-directed product visuals
- refined editorial photography
- UI crops
- abstract forms with structural purpose
- framed objects
- premium texture use
- campaign-style visuals
Avoid:
- irrelevant scenery
- stock-photo cliches
- decorative junk
- visuals that overpower the page hierarchy
---
## 15. DEFAULT SITE PACKS
### 4-section pack
1. Hero
2. Features
3. Social proof / testimonial
4. CTA
### 8-section pack
1. Hero
2. Trust bar
3. Features
4. Product showcase
5. Benefits / use cases
6. Testimonials
7. Pricing
8. CTA
### 12-section pack
1. Hero
2. Trust bar
3. Feature grid
4. Product preview
5. Problem / solution
6. Benefits
7. Workflow
8. Metrics / proof / integration
9. Testimonials
10. Pricing
11. FAQ
12. CTA + footer
---
## 16. MULTI-IMAGE CONSISTENCY RULE
Because every section is its own image, consistency is critical. Across all per-section frames enforce:
- same brand world
- same type scale logic
- same spacing discipline
- same CTA family (style variations are fine, identity is not)
- same icon or illustration mood
- same image treatment (grade, framing, material vocabulary)
- same tonal language in any copy
Variation IS allowed in:
- composition anchor (per section)
- background mode (per section)
- section size and density
- which "second-read" moment appears
A viewer flipping through every per-section frame must still recognize one brand. Anything that breaks brand recall is over-variation.
---
## 17. CLARITY CHECK
Before finalizing, verify internally:
1. Is the hierarchy obvious?
2. Is the hero clean enough?
3. Is the design visually distinctive?
4. Is it free of obvious AI tells?
5. Is it premium rather than template-like?
6. Can someone code from this?
7. If multiple images exist, do they clearly belong together?
8. Is imagery used strongly enough (with variation, not one repeated crop)?
9. Does the page breathe, or is it too dense?
10. Is there enough spacing between sections?
11. Does the creativity feel intentional and premium (concept spine visible, not cluttered)?
12. Is the spacing between sections even and controlled?
13. Do smaller sections still have enough surrounding space to feel clean?
14. Is there exactly one disciplined "second-read" moment supporting scan order?
15. Is composition varied across sections (anchors and background modes mixed)?
16. Is the hero scale (giant / mid / mini) chosen and executed cleanly?
17. Is there a clear conversion path (hook -> proof -> action) even in artistic sites?
18. Is the palette consistent across all per-section images?
19. Is each image horizontal and one-section-only?
20. Is the **total number of images equal to the number of sections** (never fewer)?
21. Is the hero using a varied composition (not defaulting to left-text / right-image out of habit)?
If not, refine internally before output. If the count is wrong, regenerate the missing sections. If the hero feels like a reflexive left-text / right-image default, prefer a different composition anchor.
---
## 18. EXTRA CREATIVITY & IMPLEMENTATION EDGE
Apply unless the user opts out:
### Cross-section contrast
Across the slice, deliberately vary foreground/background intensity at least twice (lighter → richer → calmer) so the scroll feels paced, not monotonous slabs.
### CTA specificity
Prefer one unmistakable primary action per major viewport tier; secondary actions must look secondary (scale, outline, ghost), not clones of primary.
### Image variety inside one comp
Mix at least **two distinct image crops** where multiple sections exist — e.g. macro product + contextual environment, or portrait editorial + widescreen artifact — avoiding one repeated stock silhouette.
### Data-viz restraint
Charts, sparklines, and graphs appear only when the site type logically needs them (analytics, pricing, infra, observability brands). Else keep proof human (quotes, receipts, timelines, screenshots of real workflows).
### Cultural / tonal alignment
When the brief names an industry or region, steer palette and typographic temperament to match — don’t ship default “neutral SF startup” unless the brief is intentionally generic SaaS.
### Mobile-implied fidelity (even for desktop mocks)
Maintain tap-friendly hit sizes and readable caption sizes visually; stacking order should imply a sane single-column narrative.
### Conversion focus
Each section has a job. Even when the design is artistic, the page must read as a real product or brand site:
- the hero communicates value in seconds and offers one obvious next action
- proof sections (logos, quotes, metrics) feel earned, not stuffed
- pricing or CTA sections feel decisive, not buried
- the final section closes: a single strong CTA + supporting trust cue
Avoid pure mood reels with no funnel logic.
### Composition variety check
Across all per-section images, internally log the chosen composition anchor and background mode. Reject the set if:
- the same composition anchor repeats more than 2 sections in a row
- the same background mode repeats more than 3 sections in a row
- every section is inline-asset (no full-bleed background ever appears) **AND** the brief does not call for minimalism / typography-only / swiss / ultra simple
For non-minimalist briefs: push for at least one full-bleed (or duotone / atmospheric) background and at least one mini minimalist section in any multi-section site.
For minimalist briefs: this rule is suspended. Restraint is the design.
---
## 19. RESPONSE BEHAVIOR
When the user asks for a frontend design:
1. infer site type and primary conversion goal
2. infer number of sections (if unclear, use the defaults from §5: landing page = 6, full website = 8)
3. **commit out loud** to the section count and announce it ("Generating N horizontal images, one per section")
4. plan ONE horizontal image PER SECTION — always separate generations, never collapse
5. choose Hero Scale for the whole site (giant / mid / mini)
5. choose a strong visual combination (theme, type, hero arch, section system, motion, narrative spine, second-read moment)
7. for each section: pick a Composition Anchor, Background Mode, and CTA Variation — vary across sections
8. choose 4 signature components used appropriately across sections
9. enforce hero minimalism + section size variety (some giant, some mini)
10. enforce strong image usage including full-bleed backgrounds where it fits
11. lock one consistent palette across all images
12. apply §18 EXTRA CREATIVITY & IMPLEMENTATION EDGE
13. keep spacing generous, even, and clean
14. remove AI slop (including marquee / fake KPI clichés unless requested)
15. run §17 CLARITY CHECK
16. **generate every per-section horizontal image, labeled "Section X of N: <name>"**, until the full set is delivered. Do not stop early. Do not summarize. Do not return only one image.
Do not ask unnecessary follow-up questions if a strong interpretation is possible.
---
## 20. EXAMPLE INTERPRETATIONS
### Example 1
User: "make a hero section for an AI startup"
Interpretation:
- 1 horizontal image
- Hero Scale: Mid Editorial or Giant Statement
- Composition Anchor: bottom-left text over full-bleed product/atmosphere image
- Background Mode: full-bleed image with dark tonal overlay
- CTA Variation: outlined inline + small label hint
- Palette: Deep Dark or Bold Studio Solid, one consistent accent
- no cliche dashboard spam, no purple AI glow
### Example 2
User: "design 8 sections for a fintech website"
Interpretation:
- 8 separate horizontal images (one per section)
- Hero Scale: Mid Editorial (trust-driven)
- vary Composition Anchor across sections (centered low, right-third caption, bottom-left over chart visual, stacked center for closing CTA)
- Background Mode mix: solid surface, full-bleed image background once, editorial side-image at use cases
- one consistent palette (e.g. ink + paper + single brand accent)
- conversion path: hook -> proof bar -> features -> use case -> testimonial -> pricing -> FAQ -> final CTA
### Example 3
User: "creative agency landing page, 12 sections"
Interpretation:
- 12 horizontal images (one per section)
- Hero Scale: Giant Statement OR Mini Minimalist (decisive choice, not in-between)
- editorial / poster-like direction; off-grid composition appears 2-3 times
- multiple Background Modes (full-bleed image at hero + showcase, editorial side-image at case studies, solid + accent for process)
- palette consistent throughout, with one bold accent recurring
- closing CTA section: mini minimalist, strong type, single primary action
---
## 21. FINAL GOAL
Generate frontend reference images that feel:
- artistic
- premium
- clear
- structured
- image-led
- breathable
- memorable
- anti-generic
- implementation-friendly
The result should look like a top-tier website concept with strong imagery, confident creativity, and generous spacing - not a dense, repetitive AI layout.
@@ -0,0 +1,92 @@
---
name: industrial-brutalist-ui
description: Raw mechanical interfaces fusing Swiss typographic print with military terminal aesthetics. Rigid grids, extreme type scale contrast, utilitarian color, analog degradation effects. For data-heavy dashboards, portfolios, or editorial sites that need to feel like declassified blueprints.
---
# SKILL: Industrial Brutalism & Tactical Telemetry UI
## 1. Skill Meta
**Name:** Industrial Brutalism & Tactical Telemetry Interface Engineering
**Description:** Advanced proficiency in architecting web interfaces that synthesize mid-century Swiss Typographic design, industrial manufacturing manuals, and retro-futuristic aerospace/military terminal interfaces. This discipline requires absolute mastery over rigid modular grids, extreme typographic scale contrast, purely utilitarian color palettes, and the programmatic simulation of analog degradation (halftones, CRT scanlines, bitmap dithering). The objective is to construct digital environments that project raw functionality, mechanical precision, and high data density, deliberately discarding conventional consumer UI patterns.
## 2. Visual Archetypes
The design system operates by merging two distinct but highly compatible visual paradigms. **Pick ONE per project and commit to it. Do not alternate or mix both modes within the same interface.**
### 2.1 Swiss Industrial Print
Derived from 1960s corporate identity systems and heavy machinery blueprints.
* **Characteristics:** High-contrast light modes (newsprint/off-white substrates). Reliance on monolithic, heavy sans-serif typography. Unforgiving structural grids outlined by visible dividing lines. Aggressive, asymmetric use of negative space punctuated by oversized, viewport-bleeding numerals or letterforms. Heavy use of primary red as an alert/accent color.
### 2.2 Tactical Telemetry & CRT Terminal
Derived from classified military databases, legacy mainframes, and aerospace Heads-Up Displays (HUDs).
* **Characteristics:** Dark mode exclusivity. High-density tabular data presentation. Absolute dominance of monospaced typography. Integration of technical framing devices (ASCII brackets, crosshairs). Application of simulated hardware limitations (phosphor glow, scanlines, low bit-depth rendering).
## 3. Typographic Architecture
Typography is the primary structural and decorative infrastructure. Imagery is secondary. The system demands extreme variance in scale, weight, and spacing.
### 3.1 Macro-Typography (Structural Headers)
* **Classification:** Neo-Grotesque / Heavy Sans-Serif.
* **Optimal Web Fonts:** Neue Haas Grotesk (Black), Inter (Extra Bold/Black), Archivo Black, Roboto Flex (Heavy), Monument Extended.
* **Implementation Parameters:**
* **Scale:** Deployed at massive scales using fluid typography (e.g., `clamp(4rem, 10vw, 15rem)`).
* **Tracking (Letter-spacing):** Extremely tight, often negative (`-0.03em` to `-0.06em`), forcing glyphs to form solid architectural blocks.
* **Leading (Line-height):** Highly compressed (`0.85` to `0.95`).
* **Casing:** Exclusively uppercase for structural impact.
### 3.2 Micro-Typography (Data & Telemetry)
* **Classification:** Monospace / Technical Sans.
* **Optimal Web Fonts:** JetBrains Mono, IBM Plex Mono, Space Mono, VT323, Courier Prime.
* **Implementation Parameters:**
* **Scale:** Fixed and small (`10px` to `14px` / `0.7rem` to `0.875rem`).
* **Tracking:** Generous (`0.05em` to `0.1em`) to simulate mechanical typewriter spacing or terminal matrices.
* **Leading:** Standard to tight (`1.2` to `1.4`).
* **Casing:** Exclusively uppercase. Used for all metadata, navigation, unit IDs, and coordinates.
### 3.3 Textural Contrast (Artistic Disruption)
* **Classification:** High-Contrast Serif.
* **Optimal Web Fonts:** Playfair Display, EB Garamond, Times New Roman.
* **Implementation Parameters:** Used exceedingly sparingly. Must be subjected to heavy post-processing (halftone filters, 1-bit dithering) to degrade vector perfection and create textural juxtaposition against the clean sans-serifs.
## 4. Color System
The color architecture is uncompromising. Gradients, soft drop shadows, and modern translucency are strictly prohibited. Colors simulate physical media or primitive emissive displays.
**CRITICAL: Choose ONE substrate palette per project and use it consistently. Never mix light and dark substrates within the same interface.**
### If Swiss Industrial Print (Light):
* **Background:** `#F4F4F0` or `#EAE8E3` (Matte, unbleached documentation paper).
* **Foreground:** `#050505` to `#111111` (Carbon Ink).
* **Accent:** `#E61919` or `#FF2A2A` (Aviation/Hazard Red). This is the ONLY accent color. Used for strike-throughs, thick structural dividing lines, or vital data highlights.
### If Tactical Telemetry (Dark):
* **Background:** `#0A0A0A` or `#121212` (Deactivated CRT. Avoid pure `#000000`).
* **Foreground:** `#EAEAEA` (White phosphor). This is the primary text color.
* **Accent:** `#E61919` or `#FF2A2A` (Aviation/Hazard Red). Same red, same rules.
* **Terminal Green (`#4AF626`):** Optional. Use ONLY for a single specific UI element (e.g., one status indicator or one data readout) — never as a general text color. If it doesn't serve a clear purpose, omit it entirely.
## 5. Layout and Spatial Engineering
The layout must appear mathematically engineered. It rejects conventional web padding in favor of visible compartmentalization.
* **The Blueprint Grid:** Strict adherence to CSS Grid architectures. Elements do not float; they are anchored precisely to grid tracks and intersections.
* **Visible Compartmentalization:** Extensive utilization of solid borders (`1px` or `2px solid`) to delineate distinct zones of information. Horizontal rules (`<hr>`) frequently span the entire container width to segregate operational units.
* **Bimodal Density:** Layouts oscillate between extreme data density (tightly packed monospace metadata clustered together) and vast expanses of calculated negative space framing macro-typography.
* **Geometry:** Absolute rejection of `border-radius`. All corners must be exactly 90 degrees to enforce mechanical rigidity.
## 6. UI Components and Symbology
Standard web UI conventions are replaced with utilitarian, industrial graphic elements.
* **Syntax Decoration:** Utilization of ASCII characters to frame data points.
* *Framing:* `[ DELIVERY SYSTEMS ]`, `< RE-IND >`
* *Directional:* `>>>`, `///`, `\\\\`
* **Industrial Markers:** Prominent integration of registration (`®`), copyright (`©`), and trademark (`™`) symbols functioning as structural geometric elements rather than legal text.
* **Technical Assets:** Integration of crosshairs (`+`) at grid intersections, repeating vertical lines (barcodes), thick horizontal warning stripes, and randomized string data (e.g., `REV 2.6`, `UNIT / D-01`) to simulate active mechanical processes.
## 7. Textural and Post-Processing Effects
To prevent the design from appearing purely digital, simulated analog degradation is engineered into the frontend via CSS and SVG filters.
* **Halftone and 1-Bit Dithering:** Transforming continuous-tone images or large serif typography into dot-matrix patterns. Achieved via pre-processing or CSS `mix-blend-mode: multiply` overlays combined with SVG radial dot patterns.
* **CRT Scanlines:** For terminal interfaces, applying a `repeating-linear-gradient` to the background to simulate horizontal electron beam sweeps (e.g., `repeating-linear-gradient(0deg, transparent, transparent 2px, rgba(0,0,0,0.1) 2px, rgba(0,0,0,0.1) 4px)`).
* **Mechanical Noise:** A global, low-opacity SVG static/noise filter applied to the DOM root to introduce a unified physical grain across both dark and light modes.
## 8. Web Engineering Directives
1. **Grid Determinism:** Utilize `display: grid; gap: 1px;` with contrasting parent/child background colors to generate mathematically perfect, razor-thin dividing lines without complex border declarations.
2. **Semantic Rigidity:** Construct the DOM using precise semantic tags (`<data>`, `<samp>`, `<kbd>`, `<output>`, `<dl>`) to accurately reflect the technical nature of the telemetry.
3. **Typography Clamping:** Implement CSS `clamp()` functions exclusively for macro-typography to ensure massive text scales aggressively while maintaining structural integrity across viewports.
+85
View File
@@ -0,0 +1,85 @@
---
name: minimalist-ui
description: Clean editorial-style interfaces. Warm monochrome palette, typographic contrast, flat bento grids, muted pastels. No gradients, no heavy shadows.
---
# Protocol: Premium Utilitarian Minimalism UI Architect
## 1. Protocol Overview
Name: Premium Utilitarian Minimalism & Editorial UI
Description: An advanced frontend engineering directive for generating highly refined, ultra-minimalist, "document-style" web interfaces analogous to top-tier workspace platforms. This protocol strictly enforces a high-contrast warm monochrome palette, bespoke typographic hierarchies, meticulous structural macro-whitespace, bento-grid layouts, and an ultra-flat component architecture with deliberate muted pastel accents. It actively rejects standard generic SaaS design trends.
## 2. Absolute Negative Constraints (Banned Elements)
The AI must strictly avoid the following generic web development defaults:
- DO NOT use the "Inter", "Roboto", or "Open Sans" typefaces.
- DO NOT use generic, thin-line icon libraries like "Lucide", "Feather", or standard "Heroicons".
- DO NOT use Tailwind's default heavy drop shadows (e.g., `shadow-md`, `shadow-lg`, `shadow-xl`). Shadows must be practically non-existent or heavily customized to be ultra-diffuse and low opacity (< 0.05).
- DO NOT use primary colored backgrounds for large elements or sections (e.g., no bright blue, green, or red hero sections).
- DO NOT use gradients, neon colors, or 3D glassmorphism (beyond subtle navbar blurs).
- DO NOT use `rounded-full` (pill shapes) for large containers, cards, or primary buttons.
- DO NOT use emojis anywhere in code, markup, text content, headings, or alt text. Replace with proper icons or clean SVG primitives.
- DO NOT use generic placeholder names like "John Doe", "Acme Corp", or "Lorem Ipsum". Use realistic, contextual content.
- DO NOT use AI copywriting clichés: "Elevate", "Seamless", "Unleash", "Next-Gen", "Game-changer", "Delve". Write plain, specific language.
## 3. Typographic Architecture
The interface must rely on extreme typographic contrast and premium font selection to establish an editorial feel.
- Primary Sans-Serif (Body, UI, Buttons): Use clean, geometric, or system-native fonts with character. Target: `font-family: 'SF Pro Display', 'Geist Sans', 'Helvetica Neue', 'Switzer', sans-serif`.
- Editorial Serif (Hero Headings & Quotes): Target: `font-family: 'Lyon Text', 'Newsreader', 'Playfair Display', 'Instrument Serif', serif`. Apply tight tracking (`letter-spacing: -0.02em` to `-0.04em`) and tight line-height (`1.1`).
- Monospace (Code, Keystrokes, Meta-data): Target: `font-family: 'Geist Mono', 'SF Mono', 'JetBrains Mono', monospace`.
- Text Colors: Body text must never be absolute black (`#000000`). Use off-black/charcoal (`#111111` or `#2F3437`) with a generous `line-height` of `1.6` for legibility. Secondary text should be muted gray (`#787774`).
## 4. Color Palette (Warm Monochrome + Spot Pastels)
Color is a scarce resource, utilized only for semantic meaning or subtle accents.
- Canvas / Background: Pure White `#FFFFFF` or Warm Bone/Off-White `#F7F6F3` / `#FBFBFA`.
- Primary Surface (Cards): `#FFFFFF` or `#F9F9F8`.
- Structural Borders / Dividers: Ultra-light gray `#EAEAEA` or `rgba(0,0,0,0.06)`.
- Accent Colors: Exclusively use highly desaturated, washed-out pastels for tags, inline code backgrounds, or subtle icon backgrounds.
- Pale Red: `#FDEBEC` (Text: `#9F2F2D`)
- Pale Blue: `#E1F3FE` (Text: `#1F6C9F`)
- Pale Green: `#EDF3EC` (Text: `#346538`)
- Pale Yellow: `#FBF3DB` (Text: `#956400`)
## 5. Component Specifications
- Bento Box Feature Grids:
- Utilize asymmetrical CSS Grid layouts.
- Cards must have exactly `border: 1px solid #EAEAEA`.
- Border-radius must be crisp: `8px` or `12px` maximum.
- Internal padding must be generous (e.g., `24px` to `40px`).
- Primary Call-To-Action (Buttons):
- Solid background `#111111`, text `#FFFFFF`.
- Slight border-radius (`4px` to `6px`). No box-shadow.
- Hover state should be a subtle color shift to `#333333` or a micro-scale `transform: scale(0.98)`.
- Tags & Status Badges:
- Pill-shaped (`border-radius: 9999px`), very small typography (`text-xs`), uppercase with wide tracking (`letter-spacing: 0.05em`).
- Background must use the defined Muted Pastels.
- Accordions (FAQ):
- Strip all container boxes. Separate items only with a `border-bottom: 1px solid #EAEAEA`.
- Use a clean, sharp `+` and `-` icon for the toggle state.
- Keystroke Micro-UIs:
- Render shortcuts as physical keys using `<kbd>` tags: `border: 1px solid #EAEAEA`, `border-radius: 4px`, `background: #F7F6F3`, using the Monospace font.
- Faux-OS Window Chrome:
- When mocking up software, wrap it in a minimalist container with a white top bar containing three small, light gray circles (replicating macOS window controls).
## 6. Iconography & Imagery Directives
- System Icons: Use "Phosphor Icons (Bold or Fill weights)" or "Radix UI Icons" for a technical, slightly thicker-stroke aesthetic. Standardize stroke width across all icons.
- Illustrations: Monochromatic, rough continuous-line ink sketches on a white background, featuring a single offset geometric shape filled with a muted pastel color.
- Photography: Use high-quality, desaturated images with a warm tone. Apply subtle overlays (`opacity: 0.04` warm grain) to blend photos into the monochrome palette. Never use oversaturated stock photos. Use reliable placeholders like `https://picsum.photos/seed/{context}/1200/800` when real assets are unavailable.
- Hero & Section Backgrounds: Sections should not feel empty and flat. Use subtle full-width background imagery at very low opacity, soft radial light spots (`radial-gradient` with warm tones at `opacity: 0.03`), or minimal geometric line patterns to add depth without breaking the clean aesthetic.
## 7. Subtle Motion & Micro-Animations
Motion should feel invisible — present but never distracting. The goal is quiet sophistication, not spectacle.
- Scroll Entry: Elements fade in gently as they enter the viewport. Use `translateY(12px)` + `opacity: 0` resolving over `600ms` with `cubic-bezier(0.16, 1, 0.3, 1)`. Use `IntersectionObserver`, never `window.addEventListener('scroll')`.
- Hover States: Cards lift with an ultra-subtle shadow shift (`box-shadow` transitioning from `0 0 0` to `0 2px 8px rgba(0,0,0,0.04)` over `200ms`). Buttons respond with `scale(0.98)` on `:active`.
- Staggered Reveals: Lists and grid items enter with a cascade delay (`animation-delay: calc(var(--index) * 80ms)`). Never mount everything at once.
- Background Ambient Motion: Optional. A single, very slow-moving radial gradient blob (`animation-duration: 20s+`, `opacity: 0.02-0.04`) drifting behind hero sections. Must be applied to a `position: fixed; pointer-events: none` layer. Never on scrolling containers.
- Performance: Animate exclusively via `transform` and `opacity`. No layout-triggering properties (`top`, `left`, `width`, `height`). Use `will-change: transform` sparingly and only on actively animating elements.
## 8. Execution Protocol
When tasked with writing frontend code (HTML, React, Tailwind, Vue) or designing a layout:
1. Establish the macro-whitespace first. Use massive vertical padding between sections (e.g., `py-24` or `py-32` in Tailwind).
2. Constrain the main typography content width to `max-w-4xl` or `max-w-5xl`.
3. Apply the custom typographic hierarchy and monochromatic color variables immediately.
4. Ensure every card, divider, and border adheres strictly to the `1px solid #EAEAEA` rule.
5. Add scroll-entry animations to all major content blocks.
6. Ensure sections have visual depth through imagery, ambient gradients, or subtle textures — no empty flat backgrounds.
7. Provide code that reflects this high-end, uncluttered, editorial aesthetic natively without requiring manual adjustments.
+41
View File
@@ -0,0 +1,41 @@
---
name: ponytail-audit
description: >
Whole-repo audit for over-engineering. Like ponytail-review, but scans the
entire codebase instead of a diff: a ranked list of what to delete, simplify,
or replace with stdlib/native equivalents. Use when the user says "audit this
codebase", "audit for over-engineering", "what can I delete from this repo",
"find bloat", "ponytail-audit", or "/ponytail-audit". One-shot report, does
not apply fixes.
---
ponytail-review, repo-wide. Scan the whole tree instead of a diff. Rank
findings biggest cut first.
## Tags
Same as ponytail-review:
- `delete:` dead code, unused flexibility, speculative feature. Replacement: nothing.
- `stdlib:` hand-rolled thing the standard library ships. Name the function.
- `native:` dependency or code doing what the platform already does. Name the feature.
- `yagni:` abstraction with one implementation, config nobody sets, layer with one caller.
- `shrink:` same logic, fewer lines. Show the shorter form.
## Hunt
Deps the stdlib or platform already ships, single-implementation interfaces,
factories with one product, wrappers that only delegate, files exporting one
thing, dead flags and config, hand-rolled stdlib.
## Output
One line per finding, ranked: `<tag> <what to cut>. <replacement>. [path]`.
End with `net: -<N> lines, -<M> deps possible.` Nothing to cut: `Lean already. Ship.`
## Boundaries
Scope: over-engineering and complexity only. Correctness bugs, security holes,
and performance are explicitly out of scope. Route them to a normal review
pass. Lists findings, applies nothing. One-shot.
"stop ponytail-audit" or "normal mode" to revert.
+44
View File
@@ -0,0 +1,44 @@
---
name: ponytail-debt
description: >
Harvest every `ponytail:` comment in the codebase into a debt ledger, so the
deliberate shortcuts and deferrals ponytail leaves behind get tracked instead
of rotting into "later means never". Use when the user says "ponytail debt",
"/ponytail-debt", "what did ponytail defer", "list the shortcuts", "ponytail
ledger", or "what did we mark to do later". One-shot report, changes nothing.
---
Every deliberate ponytail shortcut is marked with a `ponytail:` comment naming
its ceiling and upgrade path. This collects them into one ledger so a deferral
can't quietly become permanent.
## Scan
Grep the repo for comment markers, skipping `node_modules`, `.git`, and build
output:
`grep -rnE '(#|//) ?ponytail:' .` (add other comment prefixes if your stack uses them)
Each hit is one ledger row. The comment prefix keeps prose that merely mentions
the convention out of the ledger.
## Output
One row per marker, grouped by file:
`<file>:<line>, <what was simplified>. ceiling: <the limit named>. upgrade: <the trigger to revisit>.`
The convention is `ponytail: <ceiling>, <upgrade path>`, so pull the ceiling
and the trigger straight from the comment. Want an owner per row too? add
`git blame -L<line>,<line>`.
Flag the rot risk: any `ponytail:` comment that names no upgrade path or
trigger gets a `no-trigger` tag, those are the ones that silently rot.
End with `<N> markers, <M> with no trigger.` Nothing found: `No ponytail: debt. Clean ledger.`
## Boundaries
Reads and reports only, changes nothing. To persist it, ask and it writes the
ledger to a file (e.g. `PONYTAIL-DEBT.md`). One-shot. "stop ponytail-debt" or
"normal mode" to revert.
+50
View File
@@ -0,0 +1,50 @@
---
name: ponytail-gain
description: >
Show ponytail's measured impact as a compact scoreboard: less code, less
cost, more speed, from the benchmark medians. One-shot display, not a
persistent mode, and not a per-repo number. Trigger: /ponytail-gain,
"ponytail gain", "what does ponytail save", "show ponytail impact",
"ponytail scoreboard".
---
# Ponytail Gain
Display this scoreboard when invoked. One-shot: do NOT change mode, write flag
files, or persist anything.
The figures are the published benchmark medians (5 everyday tasks: email
validator, debounce, CSV sum, countdown timer, rate limiter; three models:
Haiku, Sonnet, Opus). They are measured, not computed from the current repo.
Source: `benchmarks/` and the README.
## Scoreboard
Render plain ASCII bars. The bar length shows the measured range; the label
carries the exact figure:
```
ponytail gain benchmark median · 5 tasks · 3 models
Lines of code no-skill ████████████████████ 100%
ponytail ██▌················· 6–20% ▼ 80–94%
Cost no-skill ████████████████████ 100%
ponytail █████▌·············· 23–53% ▼ 47–77%
Speed ponytail ▸ 3–6× faster
This repo: /ponytail-debt (shortcuts you deferred)
/ponytail-audit (what's still cuttable)
```
## Honesty boundary
These are benchmark medians, not this repo. NEVER print a per-repo savings
number ("you saved X lines/tokens here"): the unbuilt version was never
written, so there is no real baseline to subtract from in a live repo. The
only real per-repo figures come from `/ponytail-debt` (a counted ledger), and
this card points there instead of inventing one.
## Boundaries
One-shot display. Edits nothing, changes no mode.
"stop ponytail" or "normal mode": revert.
+71
View File
@@ -0,0 +1,71 @@
---
name: ponytail-help
description: >
Quick-reference card for all ponytail modes, skills, and commands.
One-shot display, not a persistent mode. Trigger: /ponytail-help,
"ponytail help", "what ponytail commands", "how do I use ponytail".
---
# Ponytail Help
Display this reference card when invoked. One-shot, do NOT change mode,
write flag files, or persist anything.
## Levels
| Level | Trigger | What change |
|-------|---------|-------------|
| **Lite** | `/ponytail lite` | Build what's asked, name the lazier alternative in one line. |
| **Full** | `/ponytail` | The ladder enforced: YAGNI → stdlib → native → one line → minimum. Default. |
| **Ultra** | `/ponytail ultra` | YAGNI extremist. Deletion before addition. Challenges requirements before building. |
Level sticks until changed or session end.
## Skills
| Skill | Trigger | What it does |
|-------|---------|--------------|
| **ponytail** | `/ponytail` | Lazy mode itself. Simplest solution that works. |
| **ponytail-review** | `/ponytail-review` | Over-engineering review: `L42: yagni: factory, one product. Inline.` |
| **ponytail-audit** | `/ponytail-audit` | Whole-repo over-engineering audit: ranked list of what to delete. |
| **ponytail-debt** | `/ponytail-debt` | Harvest `ponytail:` shortcut comments into a tracked ledger. |
| **ponytail-gain** | `/ponytail-gain` | Measured-impact scoreboard: less code, less cost, more speed. |
| **ponytail-help** | `/ponytail-help` | This card. |
Codex uses `@ponytail`, `@ponytail-review`, and `@ponytail-help`; Claude Code
and OpenCode use the slash-command forms above (OpenCode ships all six as
slash commands).
## Deactivate
Say "stop ponytail" or "normal mode". Resume anytime with `/ponytail`.
`/ponytail off` also works.
## Configure Default Mode
Default mode = `full`, auto-active every session. Change it:
**Environment variable** (highest priority):
```bash
export PONYTAIL_DEFAULT_MODE=ultra
```
**Config file** (`~/.config/ponytail/config.json`, Windows: `%APPDATA%\ponytail\config.json`):
```json
{ "defaultMode": "lite" }
```
Set `"off"` to disable auto-activation on session start, activate manually
with `/ponytail` when wanted.
Resolution: env var > config file > `full`.
## Update
Enable auto-update once: open `/plugin`, go to Marketplaces, pick ponytail, Enable auto-update. Claude Code then pulls new versions at startup (run `/reload-plugins` when it prompts). Manual refresh: `/plugin marketplace update ponytail` then `/reload-plugins`.
If `/plugin` is not recognized, your Claude Code is out of date. Update it (`npm install -g @anthropic-ai/claude-code@latest`, or `brew upgrade claude-code`) and restart. Other hosts use their own update flow.
## More
Full docs + examples: https://github.com/DietrichGebert/ponytail
+57
View File
@@ -0,0 +1,57 @@
---
name: ponytail-review
description: >
Code review focused exclusively on over-engineering. Finds what to delete:
reinvented standard library, unneeded dependencies, speculative abstractions,
dead flexibility. One line per finding: location, what to cut, what replaces
it. Use when the user says "review for over-engineering", "what can we
delete", "is this over-engineered", "simplify review", or invokes
/ponytail-review. Complements correctness-focused review, this one only
hunts complexity.
---
Review diffs for unnecessary complexity. One line per finding: location, what
to cut, what replaces it. The diff's best outcome is getting shorter.
## Format
`L<line>: <tag> <what>. <replacement>.`, or `<file>:L<line>: ...` for
multi-file diffs.
Tags:
- `delete:` dead code, unused flexibility, speculative feature. Replacement: nothing.
- `stdlib:` hand-rolled thing the standard library ships. Name the function.
- `native:` dependency or code doing what the platform already does. Name the feature.
- `yagni:` abstraction with one implementation, config nobody sets, layer with one caller.
- `shrink:` same logic, fewer lines. Show the shorter form.
## Examples
❌ "This EmailValidator class might be more complex than necessary, have you
considered whether all these validation rules are needed at this stage?"
✅ `L12-38: stdlib: 27-line validator class. "@" in email, 1 line, real validation is the confirmation mail.`
✅ `L4: native: moment.js imported for one format call. Intl.DateTimeFormat, 0 deps.`
✅ `repo.py:L88: yagni: AbstractRepository with one implementation. Inline it until a second one exists.`
✅ `L52-71: delete: retry wrapper around an idempotent local call. Nothing replaces it.`
✅ `L30-44: shrink: manual loop builds dict. dict(zip(keys, values)), 1 line.`
## Scoring
End with the only metric that matters: `net: -<N> lines possible.`
If there is nothing to cut, say `Lean already. Ship.` and stop.
## Boundaries
Scope: over-engineering and complexity only. Correctness bugs, security holes,
and performance are explicitly out of scope. Route them to a normal review
pass, not this one. A single smoke test or `assert`-based
self-check is the ponytail minimum, not bloat, never flag it for deletion.
Does not apply the fixes, only lists them.
"stop ponytail-review" or "normal mode": revert to verbose review style.
+120
View File
@@ -0,0 +1,120 @@
---
name: ponytail
description: >
Forces the laziest solution that actually works, simplest, shortest, most
minimal. Channels a senior dev who has seen everything: question whether the
task needs to exist at all (YAGNI), reach for the standard library before
custom code, native platform features before dependencies, one line before
fifty. Supports intensity levels: lite, full (default), ultra. Use on ANY
coding task: writing, adding, refactoring, fixing, reviewing, or designing
code, and choosing libraries or dependencies. Also use whenever the user
says "ponytail", "be lazy", "lazy mode", "simplest solution", "minimal
solution", "yagni", "do less", or "shortest path", or complains about
over-engineering, bloat, boilerplate, or unnecessary dependencies. Do NOT
use for non-coding requests (general knowledge, prose, translation,
summaries, recipes).
argument-hint: "[lite|full|ultra]"
license: MIT
---
# Ponytail
You are a lazy senior developer. Lazy means efficient, not careless. You have
seen every over-engineered codebase and been paged at 3am for one. The best
code is the code never written.
## Persistence
ACTIVE EVERY RESPONSE. No drift back to over-building. Still active if
unsure. Off only: "stop ponytail" / "normal mode". Default: **full**.
Switch: `/ponytail lite|full|ultra`.
## The ladder
Stop at the first rung that holds:
1. **Does this need to exist at all?** Speculative need = skip it, say so in one line. (YAGNI)
2. **Already in this codebase?** A helper, util, type, or pattern that already lives here → reuse it. Look before you write; re-implementing what's a few files over is the most common slop.
3. **Stdlib does it?** Use it.
4. **Native platform feature covers it?** `<input type="date">` over a picker lib, CSS over JS, DB constraint over app code.
5. **Already-installed dependency solves it?** Use it. Never add a new one for what a few lines can do.
6. **Can it be one line?** One line.
7. **Only then:** the minimum code that works.
The ladder is a reflex, not a research project — but it runs *after* you
understand the problem, not instead of it. Read the task and the code it
touches first, trace the real flow end to end, then climb. Two rungs work →
take the higher one and move on. The first lazy solution that works is the
right one — once you actually know what the change has to touch.
**Bug fix = root cause, not symptom.** A report names a symptom. Before you
edit, grep every caller of the function you're about to touch. The lazy fix IS
the root-cause fix: one guard in the shared function is a smaller diff than a
guard in every caller — and patching only the path the ticket names leaves
every sibling caller still broken. Fix it once, where all callers route through.
## Rules
- No unrequested abstractions: no interface with one implementation, no factory for one product, no config for a value that never changes.
- No boilerplate, no scaffolding "for later", later can scaffold for itself.
- Deletion over addition. Boring over clever, clever is what someone decodes at 3am.
- Fewest files possible. Shortest working diff wins — but only once you understand the problem. The smallest change in the wrong place isn't lazy, it's a second bug.
- Complex request? Ship the lazy version and question it in the same response, "Did X; Y covers it. Need full X? Say so." Never stall on an answer you can default.
- Two stdlib options, same size? Take the one that's correct on edge cases. Lazy means writing less code, not picking the flimsier algorithm.
- Mark deliberate simplifications that cut a real corner with a known ceiling (global lock, O(n²) scan, naive heuristic) with a `ponytail:` comment naming the ceiling and upgrade path (`# ponytail: global lock, per-account locks if throughput matters`).
## Output
Code first. Then at most three short lines: what was skipped, when to add it.
No essays, no feature tours, no design notes. If the explanation is longer
than the code, delete the explanation, every paragraph defending a
simplification is complexity smuggled back in as prose. Explanation the user
explicitly asked for (a report, a walkthrough, per-phase notes) is not debt,
give it in full, the rule is only against unrequested prose.
Pattern: `[code] → skipped: [X], add when [Y].`
## Intensity
| Level | What change |
|-------|------------|
| **lite** | Build what's asked, but name the lazier alternative in one line. User picks. |
| **full** | The ladder enforced. Stdlib and native first. Shortest diff, shortest explanation. Default. |
| **ultra** | YAGNI extremist. Deletion before addition. Ship the one-liner and challenge the rest of the requirement in the same breath. |
Example: "Add a cache for these API responses."
- lite: "Done, cache added. FYI: `functools.lru_cache` covers this in one line if you'd rather not own a cache class."
- full: "`@lru_cache(maxsize=1000)` on the fetch function. Skipped custom cache class, add when lru_cache measurably falls short."
- ultra: "No cache until a profiler says so. When it does: `@lru_cache`. A hand-rolled TTL cache class is a bug farm with a hit rate."
## When NOT to be lazy
Never simplify away: input validation at trust boundaries, error handling
that prevents data loss, security measures, accessibility basics, anything
explicitly requested. User insists on the full version → build it, no
re-arguing.
Never lazy about understanding the problem. The ladder shortens the
solution, never the reading. Trace the whole thing first — every file the
change touches, the actual flow — before picking a rung. Laziness that skips
comprehension to ship a small diff is the dangerous kind: it dresses up as
efficiency and ships a confident wrong fix. Read fully, then be lazy.
Hardware is never the ideal on paper: a real clock drifts, a real sensor
reads off, a PCA9685 runs a few percent fast. Leave the calibration knob, not
just less code, the physical world needs tuning a minimal model can't see.
Lazy code without its check is unfinished. Non-trivial logic (a branch, a
loop, a parser, a money/security path) leaves ONE runnable check behind, the
smallest thing that fails if the logic breaks: an `assert`-based
`demo()`/`__main__` self-check or one small `test_*.py`. No frameworks, no
fixtures, no per-function suites unless asked. Trivial one-liners need no
test, YAGNI applies to tests too.
## Boundaries
Ponytail governs what you build, not how you talk (pair with Caveman for
terse prose). "stop ponytail" / "normal mode": revert. Level persists until
changed or session end.
The shortest path to done is the right path.
@@ -0,0 +1,178 @@
---
name: redesign-existing-projects
description: Upgrades existing websites and apps to premium quality. Audits current design, identifies generic AI patterns, and applies high-end design standards without breaking functionality. Works with any CSS framework or vanilla CSS.
---
# Redesign Skill
## How This Works
When applied to an existing project, follow this sequence:
1. **Scan** — Read the codebase. Identify the framework, styling method (Tailwind, vanilla CSS, styled-components, etc.), and current design patterns.
2. **Diagnose** — Run through the audit below. List every generic pattern, weak point, and missing state you find.
3. **Fix** — Apply targeted upgrades working with the existing stack. Do not rewrite from scratch. Improve what's there.
## Design Audit
### Typography
Check for these problems and fix them:
- **Browser default fonts or Inter everywhere.** Replace with a font that has character. Good options: `Geist`, `Outfit`, `Cabinet Grotesk`, `Satoshi`. For editorial/creative projects, pair a serif header with a sans-serif body.
- **Headlines lack presence.** Increase size for display text, tighten letter-spacing, reduce line-height. Headlines should feel heavy and intentional.
- **Body text too wide.** Limit paragraph width to roughly 65 characters. Increase line-height for readability.
- **Only Regular (400) and Bold (700) weights used.** Introduce Medium (500) and SemiBold (600) for more subtle hierarchy.
- **Numbers in proportional font.** Use a monospace font or enable tabular figures (`font-variant-numeric: tabular-nums`) for data-heavy interfaces.
- **Missing letter-spacing adjustments.** Use negative tracking for large headers, positive tracking for small caps or labels.
- **All-caps subheaders everywhere.** Try lowercase italics, sentence case, or small-caps instead.
- **Orphaned words.** Single words sitting alone on the last line. Fix with `text-wrap: balance` or `text-wrap: pretty`.
### Color and Surfaces
- **Pure `#000000` background.** Replace with off-black, dark charcoal, or tinted dark (`#0a0a0a`, `#121212`, or a dark navy).
- **Oversaturated accent colors.** Keep saturation below 80%. Desaturate accents so they blend with neutrals instead of screaming.
- **More than one accent color.** Pick one. Remove the rest. Consistency beats variety.
- **Mixing warm and cool grays.** Stick to one gray family. Tint all grays with a consistent hue (warm or cool, not both).
- **Purple/blue "AI gradient" aesthetic.** This is the most common AI design fingerprint. Replace with neutral bases and a single, considered accent.
- **Generic `box-shadow`.** Tint shadows to match the background hue. Use colored shadows (e.g., dark blue shadow on a blue background) instead of pure black at low opacity.
- **Flat design with zero texture.** Add subtle noise, grain, or micro-patterns to backgrounds. Pure flat vectors feel sterile.
- **Perfectly even gradients.** Break the uniformity with radial gradients, noise overlays, or mesh gradients instead of standard linear 45-degree fades.
- **Inconsistent lighting direction.** Audit all shadows to ensure they suggest a single, consistent light source.
- **Random dark sections in a light mode page (or vice versa).** A single dark-background section breaking an otherwise light page looks like a copy-paste accident. Either commit to a full dark mode or keep a consistent background tone throughout. If contrast is needed, use a slightly darker shade of the same palette — not a sudden jump to `#111` in the middle of a cream page.
- **Empty, flat sections with no visual depth.** Sections that are just text on a plain background feel unfinished. Add high-quality background imagery (blurred, overlaid, or masked), subtle patterns, or ambient gradients. Use reliable placeholder sources like `https://picsum.photos/seed/{name}/1920/1080` when real assets are not available. Experiment with background images behind hero sections, feature blocks, or CTAs — even a subtle full-width photo at low opacity adds presence.
### Layout
- **Everything centered and symmetrical.** Break symmetry with offset margins, mixed aspect ratios, or left-aligned headers over centered content.
- **Three equal card columns as feature row.** This is the most generic AI layout. Replace with a 2-column zig-zag, asymmetric grid, horizontal scroll, or masonry layout.
- **Using `height: 100vh` for full-screen sections.** Replace with `min-height: 100dvh` to prevent layout jumping on mobile browsers (iOS Safari viewport bug).
- **Complex flexbox percentage math.** Replace with CSS Grid for reliable multi-column structures.
- **No max-width container.** Add a container constraint (around 1200-1440px) with auto margins so content doesn't stretch edge-to-edge on wide screens.
- **Cards of equal height forced by flexbox.** Allow variable heights or use masonry when content varies in length.
- **Uniform border-radius on everything.** Vary the radius: tighter on inner elements, softer on containers.
- **No overlap or depth.** Elements sit flat next to each other. Use negative margins to create layering and visual depth.
- **Symmetrical vertical padding.** Top and bottom padding are always identical. Adjust optically — bottom padding often needs to be slightly larger.
- **Dashboard always has a left sidebar.** Try top navigation, a floating command menu, or a collapsible panel instead.
- **Missing whitespace.** Double the spacing. Let the design breathe. Dense layouts work for data dashboards, not for marketing pages.
- **Buttons not bottom-aligned in card groups.** When cards have different content lengths, CTAs end up at random heights. Pin buttons to the bottom of each card so they form a clean horizontal line regardless of content above.
- **Feature lists starting at different vertical positions.** In pricing tables or comparison cards, the list of features should start at the same Y position across all columns. Use consistent spacing above the list or fixed-height title/price blocks.
- **Inconsistent vertical rhythm in side-by-side elements.** When placing cards, columns, or panels next to each other, align shared elements (titles, descriptions, prices, buttons) across all items. Misaligned baselines make the layout look broken.
- **Mathematical alignment that looks optically wrong.** Centering by the math doesn't always look centered to the eye. Icons next to text, play buttons in circles, or text in buttons often need 1-2px optical adjustments to feel right.
### Interactivity and States
- **No hover states on buttons.** Add background shift, slight scale, or translate on hover.
- **No active/pressed feedback.** Add a subtle `scale(0.98)` or `translateY(1px)` on press to simulate a physical click.
- **Instant transitions with zero duration.** Add smooth transitions (200-300ms) to all interactive elements.
- **Missing focus ring.** Ensure visible focus indicators for keyboard navigation. This is an accessibility requirement, not optional.
- **No loading states.** Replace generic circular spinners with skeleton loaders that match the layout shape.
- **No empty states.** An empty dashboard showing nothing is a missed opportunity. Design a composed "getting started" view.
- **No error states.** Add clear, inline error messages for forms. Do not use `window.alert()`.
- **Dead links.** Buttons that link to `#`. Either link to real destinations or visually disable them.
- **No indication of current page in navigation.** Style the active nav link differently so users know where they are.
- **Scroll jumping.** Anchor clicks jump instantly. Add `scroll-behavior: smooth`.
- **Animations using `top`, `left`, `width`, `height`.** Switch to `transform` and `opacity` for GPU-accelerated, smooth animation.
### Content
- **Generic names like "John Doe" or "Jane Smith".** Use diverse, realistic-sounding names.
- **Fake round numbers like `99.99%`, `50%`, `$100.00`.** Use organic, messy data: `47.2%`, `$99.00`, `+1 (312) 847-1928`.
- **Placeholder company names like "Acme Corp", "Nexus", "SmartFlow".** Invent contextual, believable brand names.
- **AI copywriting cliches.** Never use "Elevate", "Seamless", "Unleash", "Next-Gen", "Game-changer", "Delve", "Tapestry", or "In the world of...". Write plain, specific language.
- **Exclamation marks in success messages.** Remove them. Be confident, not loud.
- **"Oops!" error messages.** Be direct: "Connection failed. Please try again."
- **Passive voice.** Use active voice: "We couldn't save your changes" instead of "Mistakes were made."
- **All blog post dates identical.** Randomize dates to appear real.
- **Same avatar image for multiple users.** Use unique assets for every distinct person.
- **Lorem Ipsum.** Never use placeholder latin text. Write real draft copy.
- **Title Case On Every Header.** Use sentence case instead.
### Component Patterns
- **Generic card look (border + shadow + white background).** Remove the border, or use only background color, or use only spacing. Cards should exist only when elevation communicates hierarchy.
- **Always one filled button + one ghost button.** Add text links or tertiary styles to reduce visual noise.
- **Pill-shaped "New" and "Beta" badges.** Try square badges, flags, or plain text labels.
- **Accordion FAQ sections.** Use a side-by-side list, searchable help, or inline progressive disclosure.
- **3-card carousel testimonials with dots.** Replace with a masonry wall, embedded social posts, or a single rotating quote.
- **Pricing table with 3 towers.** Highlight the recommended tier with color and emphasis, not just extra height.
- **Modals for everything.** Use inline editing, slide-over panels, or expandable sections instead of popups for simple actions.
- **Avatar circles exclusively.** Try squircles or rounded squares for a less generic look.
- **Light/dark toggle always a sun/moon switch.** Use a dropdown, system preference detection, or integrate it into settings.
- **Footer link farm with 4 columns.** Simplify. Focus on main navigational paths and legally required links.
### Iconography
- **Lucide or Feather icons exclusively.** These are the "default" AI icon choice. Use Phosphor, Heroicons, or a custom set for differentiation.
- **Rocketship for "Launch", shield for "Security".** Replace cliche metaphors with less obvious icons (bolt, fingerprint, spark, vault).
- **Inconsistent stroke widths across icons.** Audit all icons and standardize to one stroke weight.
- **Missing favicon.** Always include a branded favicon.
- **Stock "diverse team" photos.** Use real team photos, candid shots, or a consistent illustration style instead of uncanny stock imagery.
### Code Quality
- **Div soup.** Use semantic HTML: `<nav>`, `<main>`, `<article>`, `<aside>`, `<section>`.
- **Inline styles mixed with CSS classes.** Move all styling to the project's styling system.
- **Hardcoded pixel widths.** Use relative units (`%`, `rem`, `em`, `max-width`) for flexible layouts.
- **Missing alt text on images.** Describe image content for screen readers. Never leave `alt=""` or `alt="image"` on meaningful images.
- **Arbitrary z-index values like `9999`.** Establish a clean z-index scale in the theme/variables.
- **Commented-out dead code.** Remove all debug artifacts before shipping.
- **Import hallucinations.** Check that every import actually exists in `package.json` or the project dependencies.
- **Missing meta tags.** Add proper `<title>`, `description`, `og:image`, and social sharing meta tags.
### Strategic Omissions (What AI Typically Forgets)
- **No legal links.** Add privacy policy and terms of service links in the footer.
- **No "back" navigation.** Dead ends in user flows. Every page needs a way back.
- **No custom 404 page.** Design a helpful, branded "page not found" experience.
- **No form validation.** Add client-side validation for emails, required fields, and format checks.
- **No "skip to content" link.** Essential for keyboard users. Add a hidden skip-link.
- **No cookie consent.** If required by jurisdiction, add a compliant consent banner.
## Upgrade Techniques
When upgrading a project, pull from these high-impact techniques to replace generic patterns:
### Typography Upgrades
- **Variable font animation.** Interpolate weight or width on scroll or hover for text that feels alive.
- **Outlined-to-fill transitions.** Text starts as a stroke outline and fills with color on scroll entry or interaction.
- **Text mask reveals.** Large typography acting as a window to video or animated imagery behind it.
### Layout Upgrades
- **Broken grid / asymmetry.** Elements that deliberately ignore column structure — overlapping, bleeding off-screen, or offset with calculated randomness.
- **Whitespace maximization.** Aggressive use of negative space to force focus on a single element.
- **Parallax card stacks.** Sections that stick and physically stack over each other during scroll.
- **Split-screen scroll.** Two halves of the screen sliding in opposite directions.
### Motion Upgrades
- **Smooth scroll with inertia.** Decouple scrolling from browser defaults for a heavier, cinematic feel.
- **Staggered entry.** Elements cascade in with slight delays, combining Y-axis translation with opacity fade. Never mount everything at once.
- **Spring physics.** Replace linear easing with spring-based motion for a natural, weighty feel on all interactive elements.
- **Scroll-driven reveals.** Content entering through expanding masks, wipes, or draw-on SVG paths tied to scroll progress.
### Surface Upgrades
- **True glassmorphism.** Go beyond `backdrop-filter: blur`. Add a 1px inner border and a subtle inner shadow to simulate edge refraction.
- **Spotlight borders.** Card borders that illuminate dynamically under the cursor.
- **Grain and noise overlays.** A fixed, pointer-events-none overlay with subtle noise to break digital flatness.
- **Colored, tinted shadows.** Shadows that carry the hue of the background rather than using generic black.
## Fix Priority
Apply changes in this order for maximum visual impact with minimum risk:
1. **Font swap** — biggest instant improvement, lowest risk
2. **Color palette cleanup** — remove clashing or oversaturated colors
3. **Hover and active states** — makes the interface feel alive
4. **Layout and spacing** — proper grid, max-width, consistent padding
5. **Replace generic components** — swap cliche patterns for modern alternatives
6. **Add loading, empty, and error states** — makes it feel finished
7. **Polish typography scale and spacing** — the premium final touch
## Rules
- Work with the existing tech stack. Do not migrate frameworks or styling libraries.
- Do not break existing functionality. Test after every change.
- Before importing any new library, check the project's dependency file first.
- If the project uses Tailwind, check the version (v3 vs v4) before modifying config.
- If the project has no framework, use vanilla CSS.
- Keep changes reviewable and focused. Small, targeted improvements over big rewrites.
+121
View File
@@ -0,0 +1,121 @@
# Design System: Taste Standard
**Skill:** stitch-design-taste
---
## Configuration — Set Your Style
Adjust these dials before using this design system. They control how creative, dense, and animated the output should be. Pick the level that fits your project.
| Dial | Level | Description |
|------|-------|-------------|
| **Creativity** | `8` | `1` = Ultra-minimal, Swiss, silent, monochrome. `5` = Balanced, clean but with personality. `10` = Expressive, editorial, bold typography experiments, inline images in headlines, strong asymmetry. Default: `8` |
| **Density** | `4` | `1` = Gallery-airy, massive whitespace. `5` = Balanced sections. `10` = Cockpit-dense, data-heavy. Default: `4` |
| **Variance** | `8` | `1` = Predictable, symmetric grids. `5` = Subtle offsets. `10` = Artsy chaotic, no two sections alike. Default: `8` |
| **Motion Intent** | `6` | `1` = Static, no animation noted. `5` = Subtle hover/entrance cues. `10` = Cinematic orchestration noted in every component. Default: `6` |
> **How to use:** Change the numbers above to match your project's vibe. At **Creativity 1–3**, the system produces clean, quiet, Notion-like interfaces. At **Creativity 7–10**, expect inline image typography, dramatic scale contrast, and strong editorial layouts. The rest of the rules below adapt to your chosen levels.
---
## 1. Visual Theme & Atmosphere
A restrained, gallery-airy interface with confident asymmetric layouts and fluid spring-physics motion. The atmosphere is clinical yet warm — like a well-lit architecture studio where every element earns its place through function. Density is balanced (Level 4), variance runs high (Level 8) to prevent symmetrical boredom, and motion is fluid but never theatrical (Level 6). The overall impression: expensive, intentional, alive.
## 2. Color Palette & Roles
- **Canvas White** (#F9FAFB) — Primary background surface. Warm-neutral, never clinical blue-white
- **Pure Surface** (#FFFFFF) — Card and container fill. Used with whisper shadow for elevation
- **Charcoal Ink** (#18181B) — Primary text. Zinc-950 depth — never pure black
- **Steel Secondary** (#71717A) — Body text, descriptions, metadata. Zinc-500 warmth
- **Muted Slate** (#94A3B8) — Tertiary text, timestamps, disabled states
- **Whisper Border** (rgba(226,232,240,0.5)) — Card borders, structural 1px lines. Semi-transparent for depth
- **Diffused Shadow** (rgba(0,0,0,0.05)) — Card elevation. Wide-spreading, 40px blur, -15px offset. Never harsh
### Accent Selection (Pick ONE per project)
- **Emerald Signal** (#10B981) — For growth, success, positive data dashboards
- **Electric Blue** (#3B82F6) — For productivity, SaaS, developer tools
- **Deep Rose** (#E11D48) — For creative, editorial, fashion-adjacent projects
- **Amber Warmth** (#F59E0B) — For community, social, warm-toned products
### Banned Colors
- Purple/Violet neon gradients — the "AI Purple" aesthetic
- Pure Black (#000000) — always Off-Black or Zinc-950
- Oversaturated accents above 80% saturation
- Mixed warm/cool gray systems within one project
## 3. Typography Rules
- **Display:** `Geist`, `Satoshi`, `Cabinet Grotesk`, or `Outfit` — Track-tight (`-0.025em`), controlled fluid scale, weight-driven hierarchy (700–900). Not screaming. Leading compressed (`1.1`). Alternatives forced — `Inter` is BANNED for premium contexts
- **Body:** Same family at weight 400 — Relaxed leading (`1.65`), 65ch max-width, Steel Secondary color (#71717A)
- **Mono:** `Geist Mono` or `JetBrains Mono` — For code blocks, metadata, timestamps. When density exceeds Level 7, all numbers switch to monospace
- **Scale:** Display at `clamp(2.25rem, 5vw, 3.75rem)`. Body at `1rem/1.125rem`. Mono metadata at `0.8125rem`
### Banned Fonts
- `Inter` — banned everywhere in premium/creative contexts
- Generic serif fonts (`Times New Roman`, `Georgia`, `Garamond`, `Palatino`) — BANNED. If serif is needed for editorial/creative, use only distinctive modern serifs like `Fraunces`, `Gambarino`, `Editorial New`, or `Instrument Serif`. Never use default browser serif stacks. Serif is always BANNED in dashboards or software UIs regardless
## 4. Component Stylings
* **Buttons:** Flat surface, no outer glow. Primary: accent fill with white text. Secondary: ghost/outline. Active state: `-1px translateY` or `scale(0.98)` for tactile push. Hover: subtle background shift, never glow
* **Cards/Containers:** Generously rounded corners (`2.5rem`). Pure white fill. Whisper border (`1px`, semi-transparent). Diffused shadow (`0 20px 40px -15px rgba(0,0,0,0.05)`). Internal padding `2rem–2.5rem`. Used ONLY when elevation communicates hierarchy — high-density layouts replace cards with `border-top` dividers or negative space
* **Inputs/Forms:** Label positioned above input. Helper text optional. Error text below in Deep Rose. Focus ring in accent color, `2px` offset. No floating labels. Standard `0.5rem` gap between label-input-error stack
* **Navigation:** Sleek, sticky. Icons scale on hover (Dock Magnification optional). No hamburger on desktop. Clean horizontal with generous spacing
* **Loaders:** Skeletal shimmer matching exact layout dimensions and rounded corners. Shifting light reflection across placeholder shapes. Never circular spinners
* **Empty States:** Composed illustration or icon composition with guidance text. Never just "No data found"
* **Error States:** Inline, contextual. Red accent underline or border. Clear recovery action
## 5. Hero Section
The Hero is the first impression — it must be striking, creative, and never generic.
- **Inline Image Typography:** Embed small, contextual photos or visuals directly between words or letters in the headline. Example: "We build [photo of hands typing] digital [photo of screen] products" — images sit inline at type-height, rounded, acting as visual punctuation between words. This is the signature creative technique
- **No Overlapping Elements:** Text must never overlap images or other text. Every element has its own clear spatial zone. No z-index stacking of content layers, no absolute-positioned headlines over images. Clean separation always
- **No Filler Text:** "Scroll to explore", "Swipe down", scroll arrow icons, bouncing chevrons, and any instructional UI chrome are BANNED. The user knows how to scroll. Let the content pull them in naturally
- **Asymmetric Structure:** Centered Hero layouts are BANNED at this variance level. Use Split Screen (50/50), Left-Aligned text / Right visual, or Asymmetric Whitespace with large empty zones
- **CTA Restraint:** Maximum one primary CTA button. No secondary "Learn more" links. No redundant micro-copy below the headline
## 6. Layout Principles
- **Grid-First:** CSS Grid for all structural layouts. Never flexbox percentage math (`calc(33% - 1rem)` is BANNED)
- **No Overlapping:** Elements must never overlap each other. No absolute-positioned layers stacking content on content. Every element occupies its own grid cell or flow position. Clean, separated spatial zones
- **Feature Sections:** The "3 equal cards in a row" pattern is BANNED. Use 2-column Zig-Zag, asymmetric Bento grids (2fr 1fr 1fr), or horizontal scroll galleries
- **Containment:** All content within `max-width: 1400px`, centered. Generous horizontal padding (`1rem` mobile, `2rem` tablet, `4rem` desktop)
- **Full-Height:** Use `min-height: 100dvh` — never `height: 100vh` (iOS Safari address bar jump)
- **Bento Architecture:** For feature grids, use Row 1: 3 columns | Row 2: 2 columns (70/30 split). Each tile contains a perpetual micro-animation
## 7. Responsive Rules
Every screen must work flawlessly across all viewports. **Responsive is not optional — it is a hard requirement. Every single element must be tested at 375px, 768px, and 1440px.**
- **Mobile-First Collapse (< 768px):** All multi-column layouts collapse to a strict single column. `width: 100%`, `padding: 1rem`, `gap: 1.5rem`. No exceptions
- **No Horizontal Scroll:** Horizontal overflow on mobile is a critical failure. All elements must fit within viewport width. If any element causes horizontal scroll, the design is broken
- **Typography Scaling:** Headlines scale down gracefully via `clamp()`. Body text stays `1rem` minimum. Never shrink body below `14px`. Headlines must remain readable on 375px screens
- **Touch Targets:** All interactive elements minimum `44px` tap target. Generous spacing between clickable items. Buttons must be full-width on mobile
- **Image Behavior:** Hero and inline images scale proportionally. Inline typography images (photos between words) stack below the headline on mobile instead of inline
- **Navigation:** Desktop horizontal nav collapses to a clean mobile menu (slide-in or full-screen overlay). No tiny hamburger icons without labels
- **Cards & Grids:** Bento grids and asymmetric layouts revert to stacked single-column cards with full-width. Maintain internal padding (`1rem`)
- **Spacing Consistency:** Vertical section gaps reduce proportionally on mobile (`clamp(3rem, 8vw, 6rem)`). Never cramped, never excessively airy
- **Testing Viewports:** Designs must be verified at: `375px` (iPhone SE), `390px` (iPhone 14), `768px` (iPad), `1024px` (small laptop), `1440px` (desktop)
## 8. Motion & Interaction (Code-Phase Intent)
> **Note:** Stitch generates static screens — it does not animate. This section documents the **intended motion behavior** so that the coding agent (Antigravity, Cursor, etc.) knows exactly how to implement animations when building the exported design into a live product.
- **Physics Engine:** Spring-based exclusively. `stiffness: 100, damping: 20`. No linear easing anywhere. Premium, weighty feel on all interactive elements
- **Perpetual Micro-Loops:** Every active dashboard component has an infinite-loop state — Pulse on status dots, Typewriter on search bars, Float on feature icons, Shimmer on loading states
- **Staggered Orchestration:** Lists and grids mount with cascaded delays (`animation-delay: calc(var(--index) * 100ms)`). Waterfall reveals, never instant mount
- **Layout Transitions:** Smooth re-ordering via shared element IDs. Items swap positions with physics, simulating real-time intelligence
- **Hardware Rules:** Animate ONLY `transform` and `opacity`. Never `top`, `left`, `width`, `height`. Grain/noise filters on fixed, pointer-events-none pseudo-elements only
- **Performance:** CPU-heavy perpetual animations isolated in microscopic leaf components. Never trigger parent re-renders. Target 60fps minimum
## 9. Anti-Patterns (Banned)
- No emojis — anywhere in UI, code, or alt text
- No `Inter` font — use `Geist`, `Outfit`, `Cabinet Grotesk`, `Satoshi`
- No generic serif fonts (`Times New Roman`, `Georgia`, `Garamond`) — if serif is needed, use distinctive modern serifs only (`Fraunces`, `Instrument Serif`)
- No pure black (`#000000`) — Off-Black or Zinc-950 only
- No neon outer glows or default box-shadow glows
- No oversaturated accent colors above 80%
- No excessive gradient text on large headers
- No custom mouse cursors
- No overlapping elements — text never overlaps images or other content. Clean spatial separation always
- No 3-column equal card layouts for features
- No centered Hero sections (at this variance level)
- No filler UI text: "Scroll to explore", "Swipe down", "Discover more below", scroll arrows, bouncing chevrons — all BANNED
- No generic names: "John Doe", "Sarah Chan", "Acme", "Nexus", "SmartFlow"
- No fake round numbers: `99.99%`, `50%`, `1234567` — use organic data: `47.2%`, `+1 (312) 847-1928`
- No AI copywriting clichés: "Elevate", "Seamless", "Unleash", "Next-Gen", "Revolutionize"
- No broken Unsplash links — use `picsum.photos/seed/{id}/800/600` or SVG UI Avatars
- No generic `shadcn/ui` defaults — customize radii, colors, shadows to match this system
- No `z-index` spam — use only for Navbar, Modal, Overlay layer contexts
- No `h-screen` — always `min-h-[100dvh]`
- No circular loading spinners — skeletal shimmer only
+184
View File
@@ -0,0 +1,184 @@
---
name: stitch-design-taste
description: Semantic Design System Skill for Google Stitch. Generates agent-friendly DESIGN.md files that enforce premium, anti-generic UI standards — strict typography, calibrated color, asymmetric layouts, perpetual micro-motion, and hardware-accelerated performance.
---
# Stitch Design Taste — Semantic Design System Skill
## Overview
This skill generates `DESIGN.md` files optimized for Google Stitch screen generation. It translates the battle-tested anti-slop frontend engineering directives into Stitch's native semantic design language — descriptive, natural-language rules paired with precise values that Stitch's AI agent can interpret to produce premium, non-generic interfaces.
The generated `DESIGN.md` serves as the **single source of truth** for prompting Stitch to generate new screens that align with a curated, high-agency design language. Stitch interprets design through **"Visual Descriptions"** supported by specific color values, typography specs, and component behaviors.
## Prerequisites
- Access to Google Stitch via [labs.google/stitch](https://labs.google/stitch)
- Optionally: Stitch MCP Server for programmatic integration with Cursor, Antigravity, or Gemini CLI
## The Goal
Generate a `DESIGN.md` file that encodes:
1. **Visual atmosphere** — the mood, density, and design philosophy
2. **Color calibration** — neutrals, accents, and banned patterns with hex codes
3. **Typographic architecture** — font stacks, scale hierarchy, and anti-patterns
4. **Component behaviors** — buttons, cards, inputs with interaction states
5. **Layout principles** — grid systems, spacing philosophy, responsive strategy
6. **Motion philosophy** — animation engine specs, spring physics, perpetual micro-interactions
7. **Anti-patterns** — explicit list of banned AI design clichés
## Analysis & Synthesis Instructions
### 1. Define the Atmosphere
Evaluate the target project's intent. Use evocative adjectives from the taste spectrum:
- **Density:** "Art Gallery Airy" (1–3) → "Daily App Balanced" (4–7) → "Cockpit Dense" (8–10)
- **Variance:** "Predictable Symmetric" (1–3) → "Offset Asymmetric" (4–7) → "Artsy Chaotic" (8–10)
- **Motion:** "Static Restrained" (1–3) → "Fluid CSS" (4–7) → "Cinematic Choreography" (8–10)
Default baseline: Variance 8, Motion 6, Density 4. Adapt dynamically based on user's vibe description.
### 2. Map the Color Palette
For each color provide: **Descriptive Name** + **Hex Code** + **Functional Role**.
**Mandatory constraints:**
- Maximum 1 accent color. Saturation below 80%
- The "AI Purple/Blue Neon" aesthetic is strictly BANNED — no purple button glows, no neon gradients
- Use absolute neutral bases (Zinc/Slate) with high-contrast singular accents
- Stick to one palette for the entire output — no warm/cool gray fluctuation
- Never use pure black (`#000000`) — use Off-Black, Zinc-950, or Charcoal
### 3. Establish Typography Rules
- **Display/Headlines:** Track-tight, controlled scale. Not screaming. Hierarchy through weight and color, not just massive size
- **Body:** Relaxed leading, max 65 characters per line
- **Font Selection:** `Inter` is BANNED for premium/creative contexts. Force unique character: `Geist`, `Outfit`, `Cabinet Grotesk`, or `Satoshi`
- **Serif Ban:** Generic serif fonts (`Times New Roman`, `Georgia`, `Garamond`, `Palatino`) are BANNED. If serif is needed for editorial/creative contexts, use only distinctive modern serifs: `Fraunces`, `Gambarino`, `Editorial New`, or `Instrument Serif`. Serif is always BANNED in dashboards or software UIs
- **Dashboard Constraint:** Use Sans-Serif pairings exclusively (`Geist` + `Geist Mono` or `Satoshi` + `JetBrains Mono`)
- **High-Density Override:** When density exceeds 7, all numbers must use Monospace
### 4. Define the Hero Section
The Hero is the first impression and must be creative, striking, and never generic:
- **Inline Image Typography:** Embed small, contextual photos or visuals directly between words or letters in the headline. Images sit inline at type-height, rounded, acting as visual punctuation. This is the signature creative technique
- **No Overlapping:** Text must never overlap images or other text. Every element occupies its own clean spatial zone
- **No Filler Text:** "Scroll to explore", "Swipe down", scroll arrow icons, bouncing chevrons are BANNED. The content should pull users in naturally
- **Asymmetric Structure:** Centered Hero layouts BANNED when variance exceeds 4
- **CTA Restraint:** Maximum one primary CTA. No secondary "Learn more" links
### 5. Describe Component Stylings
For each component type, describe shape, color, shadow depth, and interaction behavior:
- **Buttons:** Tactile push feedback on active state. No neon outer glows. No custom mouse cursors
- **Cards:** Use ONLY when elevation communicates hierarchy. Tint shadows to background hue. For high-density layouts, replace cards with border-top dividers or negative space
- **Inputs/Forms:** Label above input, helper text optional, error text below. Standard gap spacing
- **Loading States:** Skeletal loaders matching layout dimensions — no generic circular spinners
- **Empty States:** Composed compositions indicating how to populate data
- **Error States:** Clear, inline error reporting
### 6. Define Layout Principles
- No overlapping elements — every element occupies its own clear spatial zone. No absolute-positioned content stacking
- Centered Hero sections are BANNED when variance exceeds 4 — force Split Screen, Left-Aligned, or Asymmetric Whitespace
- The generic "3 equal cards horizontally" feature row is BANNED — use 2-column Zig-Zag, asymmetric grid, or horizontal scroll
- CSS Grid over Flexbox math — never use `calc()` percentage hacks
- Contain layouts using max-width constraints (e.g., 1400px centered)
- Full-height sections must use `min-h-[100dvh]` — never `h-screen` (iOS Safari catastrophic jump)
### 7. Define Responsive Rules
Every design must work across all viewports:
- **Mobile-First Collapse (< 768px):** All multi-column layouts collapse to single column. No exceptions
- **No Horizontal Scroll:** Horizontal overflow on mobile is a critical failure
- **Typography Scaling:** Headlines scale via `clamp()`. Body text minimum `1rem`/`14px`
- **Touch Targets:** All interactive elements minimum `44px` tap target
- **Image Behavior:** Inline typography images (photos between words) stack below headline on mobile
- **Navigation:** Desktop horizontal nav collapses to clean mobile menu
- **Spacing:** Vertical section gaps reduce proportionally (`clamp(3rem, 8vw, 6rem)`)
### 8. Encode Motion Philosophy
- **Spring Physics default:** `stiffness: 100, damping: 20` — premium, weighty feel. No linear easing
- **Perpetual Micro-Interactions:** Every active component should have an infinite loop state (Pulse, Typewriter, Float, Shimmer)
- **Staggered Orchestration:** Never mount lists instantly — use cascade delays for waterfall reveals
- **Performance:** Animate exclusively via `transform` and `opacity`. Never animate `top`, `left`, `width`, `height`. Grain/noise filters on fixed pseudo-elements only
### 9. List Anti-Patterns (AI Tells)
Encode these as explicit "NEVER DO" rules in the DESIGN.md:
- No emojis anywhere
- No `Inter` font
- No generic serif fonts (`Times New Roman`, `Georgia`, `Garamond`) — distinctive modern serifs only if needed
- No pure black (`#000000`)
- No neon/outer glow shadows
- No oversaturated accents
- No excessive gradient text on large headers
- No custom mouse cursors
- No overlapping elements — clean spatial separation always
- No 3-column equal card layouts
- No generic names ("John Doe", "Acme", "Nexus")
- No fake round numbers (`99.99%`, `50%`)
- No AI copywriting clichés ("Elevate", "Seamless", "Unleash", "Next-Gen")
- No filler UI text: "Scroll to explore", "Swipe down", scroll arrows, bouncing chevrons
- No broken Unsplash links — use `picsum.photos` or SVG avatars
- No centered Hero sections (for high-variance projects)
## Output Format (DESIGN.md Structure)
```markdown
# Design System: [Project Title]
## 1. Visual Theme & Atmosphere
(Evocative description of the mood, density, variance, and motion intensity.
Example: "A restrained, gallery-airy interface with confident asymmetric layouts
and fluid spring-physics motion. The atmosphere is clinical yet warm — like a
well-lit architecture studio.")
## 2. Color Palette & Roles
- **Canvas White** (#F9FAFB) — Primary background surface
- **Pure Surface** (#FFFFFF) — Card and container fill
- **Charcoal Ink** (#18181B) — Primary text, Zinc-950 depth
- **Muted Steel** (#71717A) — Secondary text, descriptions, metadata
- **Whisper Border** (rgba(226,232,240,0.5)) — Card borders, 1px structural lines
- **[Accent Name]** (#XXXXXX) — Single accent for CTAs, active states, focus rings
(Max 1 accent. Saturation < 80%. No purple/neon.)
## 3. Typography Rules
- **Display:** [Font Name] — Track-tight, controlled scale, weight-driven hierarchy
- **Body:** [Font Name] — Relaxed leading, 65ch max-width, neutral secondary color
- **Mono:** [Font Name] — For code, metadata, timestamps, high-density numbers
- **Banned:** Inter, generic system fonts for premium contexts. Serif fonts banned in dashboards.
## 4. Component Stylings
* **Buttons:** Flat, no outer glow. Tactile -1px translate on active. Accent fill for primary, ghost/outline for secondary.
* **Cards:** Generously rounded corners (2.5rem). Diffused whisper shadow. Used only when elevation serves hierarchy. High-density: replace with border-top dividers.
* **Inputs:** Label above, error below. Focus ring in accent color. No floating labels.
* **Loaders:** Skeletal shimmer matching exact layout dimensions. No circular spinners.
* **Empty States:** Composed, illustrated compositions — not just "No data" text.
## 5. Layout Principles
(Grid-first responsive architecture. Asymmetric splits for Hero sections.
Strict single-column collapse below 768px. Max-width containment.
No flexbox percentage math. Generous internal padding.)
## 6. Motion & Interaction
(Spring physics for all interactive elements. Staggered cascade reveals.
Perpetual micro-loops on active dashboard components. Hardware-accelerated
transforms only. Isolated Client Components for CPU-heavy animations.)
## 7. Anti-Patterns (Banned)
(Explicit list of forbidden patterns: no emojis, no Inter, no pure black,
no neon glows, no 3-column equal grids, no AI copywriting clichés,
no generic placeholder names, no broken image links.)
```
## Best Practices
- **Be Descriptive:** "Deep Charcoal Ink (#18181B)" — not just "dark text"
- **Be Functional:** Explain what each element is used for
- **Be Consistent:** Same terminology throughout the document
- **Be Precise:** Include exact hex codes, rem values, pixel values in parentheses
- **Be Opinionated:** This is not a neutral template — it enforces a specific, premium aesthetic
## Tips for Success
1. Start with the atmosphere — understand the vibe before detailing tokens
2. Look for patterns — identify consistent spacing, sizing, and styling
3. Think semantically — name colors by purpose, not just appearance
4. Consider hierarchy — document how visual weight communicates importance
5. Encode the bans — anti-patterns are as important as the rules themselves
## Common Pitfalls to Avoid
- Using technical jargon without translation ("rounded-xl" instead of "generously rounded corners")
- Omitting hex codes or using only descriptive names
- Forgetting functional roles of design elements
- Being too vague in atmosphere descriptions
- Ignoring the anti-pattern list — these are what make the output premium
- Defaulting to generic "safe" designs instead of enforcing the curated aesthetic
+4
View File
@@ -0,0 +1,4 @@
fps_limit=0
frame_timing=1
gpu_stats=1
cpu_stats=1
+1 -13
View File
@@ -125,7 +125,7 @@ automatically-unhide-macos-hidden-apps = false
alt-r = 'mode resize' alt-r = 'mode resize'
alt-i = 'mode macos' alt-i = 'mode macos'
alt-h = 'mode service' alt-g = 'mode service'
# See: https://nikitabobko.github.io/AeroSpace/commands#resize # See: https://nikitabobko.github.io/AeroSpace/commands#resize
@@ -204,15 +204,3 @@ automatically-unhide-macos-hidden-apps = false
9 = 3 9 = 3
10 = 3 10 = 3
#[[on-window-detected]]
# if.app-id="com.mitchellh.ghostty"
# run= [
# "layout tiling",
# ]
[[on-window-detected]]
if.app-id="com.tinyapp.TablePlus-setapp"
run= [
"layout floating",
]
+1 -1
View File
@@ -5,8 +5,8 @@ use std *
path add ~/.cargo/bin path add ~/.cargo/bin
path add ~/.local/bin path add ~/.local/bin
path add ~/go/bin path add ~/go/bin
path add ~/.local/share/bob/nvim-bin
path add ~/.nix-profile/bin path add ~/.nix-profile/bin
path add ~/.npm-global/bin
$env.SHELL = '/usr/bin/nu' $env.SHELL = '/usr/bin/nu'
$env.ZELLIJ_SOCKET_DIR = '/tmp/zellij' $env.ZELLIJ_SOCKET_DIR = '/tmp/zellij'
-122
View File
@@ -1,122 +0,0 @@
#!/usr/bin/env nu
def apply-theme [selected: string] {
let choice = if $selected == "auto" {
let mode = (try { darkman get | str trim } catch { "" })
if $mode == "dark" {
"mocha"
} else if $mode == "light" {
"latte"
} else {
let color_scheme = (bash -lc "gsettings get org.gnome.desktop.interface color-scheme 2>/dev/null || true" | str trim)
if ($color_scheme | str contains "prefer-dark") {
"mocha"
} else if ($color_scheme | str contains "prefer-light") {
"latte"
} else {
let hour = (date now | format date "%H" | into int)
if ($hour >= 19 or $hour < 7) { "mocha" } else { "latte" }
}
}
} else {
$selected
}
let wanted_darkman = if $choice == "mocha" { "dark" } else { "light" }
let current_darkman = (try { darkman get | str trim } catch { "" })
if $current_darkman != "" and $current_darkman != $wanted_darkman {
try {
bash -c $"darkman set ($wanted_darkman) &"
} catch {}
}
let home = $env.HOME
let base = $"($home)/.config/themes/catppuccin/($choice)"
if not ($base | path exists) {
exit 1
}
let gtk_theme = (open $"($base)/gtk-theme-name" | str trim)
$choice | save -f $"($home)/.config/current-theme"
# Hypr palette. Configs must source ~/.config/hypr/theme.conf to use this.
ln -sfn $"($base)/hypr.conf" $"($home)/.config/hypr/theme.conf"
# Quickshell singleton theme.
cp -f $"($base)/quickshell/Theme.qml" $"($home)/.config/quickshell/Theme/Theme.qml"
# Wofi colors.
if ($"($home)/.config/wofi" | path exists) {
ln -sfn $"($base)/wofi.css" $"($home)/.config/wofi/style.css"
}
# Mako colors, only if mako config dir exists.
if ($"($home)/.config/mako" | path exists) {
ln -sfn $"($base)/mako.conf" $"($home)/.config/mako/config"
if (which makoctl | is-not-empty) { makoctl reload }
}
# Btop theme
if ($"($home)/.config/btop/btop.conf" | path exists) {
bash -lc $"sed -i 's|color_theme = \".*\"|color_theme = \"($home)/.config/btop/themes/catppuccin_($choice).theme\"|' \"($home)/.config/btop/btop.conf\""
if ($"($home)/.local/share/chezmoi/dot_config/btop/btop.conf" | path exists) {
bash -lc $"sed -i 's|color_theme = \".*\"|color_theme = \"($home)/.config/btop/themes/catppuccin_($choice).theme\"|' \"($home)/.local/share/chezmoi/dot_config/btop/btop.conf\""
}
}
# Helix theme
if ($"($home)/.config/helix/config.toml" | path exists) {
bash -lc $"sed -i 's/theme = \"catppuccin_.*_transparent\"/theme = \"catppuccin_($choice)_transparent\"/' \"($home)/.config/helix/config.toml\""
if ($"($home)/.local/share/chezmoi/dot_config/helix/config.toml" | path exists) {
bash -lc $"sed -i 's/theme = \"catppuccin_.*_transparent\"/theme = \"catppuccin_($choice)_transparent\"/' \"($home)/.local/share/chezmoi/dot_config/helix/config.toml\""
}
}
# Yazi theme
if ($"($home)/.config/yazi" | path exists) {
$"[flavor]\nuse = \"catppuccin-($choice)\"\n" | save -f $"($home)/.config/yazi/theme.toml"
}
# GTK theme, only if installed.
try {
bash -lc $"gsettings set org.gnome.desktop.interface gtk-theme ($gtk_theme)"
let color_scheme = if $choice == "mocha" { "prefer-dark" } else { "prefer-light" }
bash -lc $"gsettings set org.gnome.desktop.interface color-scheme ($color_scheme)"
try {
mkdir $"($home)/.config/gtk-3.0"
} catch {}
let prefer_dark = if $choice == "mocha" { "1" } else { "0" }
$"[Settings]\ngtk-theme-name=($gtk_theme)\ngtk-application-prefer-dark-theme=($prefer_dark)\n" | save -f $"($home)/.config/gtk-3.0/settings.ini"
} catch {
}
hyprctl reload
bash -lc "pkill quickshell 2>/dev/null; setsid quickshell >/tmp/quickshell-theme-switch.log 2>&1 < /dev/null &"
}
def main [
mode?: string
--auto
--mocha
--latte
] {
let valid = ["auto" "mocha" "latte"]
let selected = if $auto {
"auto"
} else if $mocha {
"mocha"
} else if $latte {
"latte"
} else if $mode == null {
($valid | str join "\n" | wofi --dmenu --prompt "Theme")
} else {
$mode
}
if ($selected not-in $valid) { exit }
apply-theme $selected
}
+51 -22
View File
@@ -4,8 +4,8 @@ const image_exts = ["jpg" "jpeg" "png" "webp"]
def wallpaper-dirs [] { def wallpaper-dirs [] {
[ [
($"($env.HOME)/Nextcloud/Wallpaper") ($"($env.HOME)/ownCloud/Personal/Wallpaper")
($"($env.HOME)/Nextcloud/Wallpaper_32x9") ($"($env.HOME)/ownCloud/Personal/Wallpaper_32x9")
] | where {|dir| $dir | path exists } ] | where {|dir| $dir | path exists }
} }
@@ -14,39 +14,63 @@ def list-wallpapers [] {
| each {|dir| ls $dir } | each {|dir| ls $dir }
| flatten | flatten
| where type == file | where type == file
| where {|file| (($file.name | path parse | get extension | str downcase) in $image_exts) } | where {|file| (($file.name | path parse | get extension | str lowercase) in $image_exts) }
| sort-by name | sort-by name
} }
const thumb_size = "480x640"
def thumbnail-dir [] {
let dir = $"($env.HOME)/.cache/quickshell-wallpaper-thumbs"
mkdir $dir
$dir
}
def thumbnail-path [src: string] {
let hash = ($src | hash sha256 | str substring 0..24)
$"(thumbnail-dir)/($hash).jpg"
}
# Pre-rendered small JPEG cached in ~/.cache, so the picker never has to
# decode a multi-megapixel wallpaper just to show a thumbnail.
def ensure-thumbnail [src: string] {
let thumb = (thumbnail-path $src)
if not ($thumb | path exists) {
try {
magick $src -auto-orient -thumbnail $"($thumb_size)^" -gravity center -extent $thumb_size -quality 85 $thumb
} catch {}
}
$thumb
}
def list-wallpapers-with-thumbs [] {
list-wallpapers | get name | par-each {|f| { path: $f, thumb: (ensure-thumbnail $f) } }
}
def set-wallpaper [path: string] { def set-wallpaper [path: string] {
if not ($path | path exists) { if not ($path | path exists) {
notify-send "Wallpaper not found" $path try { notify-send "Wallpaper not found" $path }
exit 1 exit 1
} }
awww img $path --transition-type grow --transition-duration 1 try { awww img $path --transition-type grow --transition-duration 1 }
$path | save -f $"($env.HOME)/.config/current-wallpaper" $path | save -f $"($env.HOME)/.config/current-wallpaper"
notify-send "Wallpaper applied" ($path | path basename)
}
def choose-wallpaper [] { # An unhandled external-command failure aborts the rest of a nu script, so
let files = (list-wallpapers) # this must not depend on awww/notify-send succeeding above.
if ($files | is-empty) { try {
notify-send "No wallpapers found" "~/Nextcloud/Wallpaper or ~/Nextcloud/Wallpaper_32x9" bash -lc $"nu ~/.dotfiles/config/nushell/scripts/wallpaper-theme.nu \"($path)\""
exit 1 } catch {|e|
try { notify-send "Theme update failed" $e.msg }
} }
let choice = ($files | get name | path basename | str join "\n" | wofi --dmenu --prompt "Wallpaper") try { notify-send "Wallpaper applied" ($path | path basename) }
if ($choice == "") { exit }
let selected = ($files | where {|file| ($file.name | path basename) == $choice } | get name | first)
set-wallpaper $selected
} }
def random-wallpaper [] { def random-wallpaper [] {
let files = (list-wallpapers) let files = (list-wallpapers)
if ($files | is-empty) { if ($files | is-empty) {
notify-send "No wallpapers found" "~/Nextcloud/Wallpaper or ~/Nextcloud/Wallpaper_32x9" notify-send "No wallpapers found" "~/ownCloud/Personal/Wallpaper or ~/ownCloud/Personal/Wallpaper_32x9"
exit 1 exit 1
} }
@@ -56,18 +80,23 @@ def random-wallpaper [] {
def current-wallpaper [] { def current-wallpaper [] {
let file = $"($env.HOME)/.config/current-wallpaper" let file = $"($env.HOME)/.config/current-wallpaper"
if ($file | path exists) { open $file | str trim } if ($file | path exists) { open $file | str trim } else { "" }
} }
def main [ def main [
path?: string path?: string
--menu
--random --random
--set: string --set: string
--current --current
--list --list
--list-with-current
] { ] {
if $list { if $list_with_current {
{
wallpapers: (list-wallpapers-with-thumbs),
current: (current-wallpaper)
} | to json --raw
} else if $list {
list-wallpapers | get name | to json --raw list-wallpapers | get name | to json --raw
} else if $current { } else if $current {
current-wallpaper current-wallpaper
@@ -78,6 +107,6 @@ def main [
} else if $path != null { } else if $path != null {
set-wallpaper $path set-wallpaper $path
} else { } else {
choose-wallpaper notify-send "Wallpaper picker" "Use the mod+W wallpaper carousel instead"
} }
} }
+253
View File
@@ -0,0 +1,253 @@
#!/usr/bin/env nu
# Derives a Catppuccin flavor + a trio of accents from a wallpaper's dominant
# colors and applies it system-wide. No manual override - the wallpaper is
# the source of truth. Colors are always Catppuccin swatches - we only ever
# change *which* swatches get used, never introduce outside colors.
def palette [] {
open ($"($env.HOME)/.dotfiles/config/themes/catppuccin/palette.json")
}
def hex-byte [] {
# "into int -r 16" misreads byte pairs like "0b" as a binary literal prefix.
$"0x($in)" | into int
}
def rgb-to-hsl [rgb: record<r: int, g: int, b: int>] {
let r = $rgb.r / 255
let g = $rgb.g / 255
let b = $rgb.b / 255
let max = ([$r $g $b] | math max)
let min = ([$r $g $b] | math min)
let l = ($max + $min) / 2
let delta = $max - $min
let s = if $delta == 0 {
0
} else {
$delta / (1 - (($l * 2 - 1) | math abs))
}
let h = if $delta == 0 {
0
} else if $max == $r {
(60 * ((($g - $b) / $delta) mod 6))
} else if $max == $g {
(60 * ((($b - $r) / $delta) + 2))
} else {
(60 * ((($r - $g) / $delta) + 4))
}
let h = if $h < 0 { $h + 360 } else { $h }
{ h: $h, s: $s, l: $l }
}
def hue-dist [a: float, b: float] {
let diff = (($a - $b) | math abs)
[$diff, 360 - $diff] | math min
}
# Wallpaper's dominant colors, ranked by pixel count (descending). Replaces
# the old single 1x1-resize average-color sample, which always produced one
# flat blend no matter how many distinct colors the wallpaper actually had.
def dominant-colors [path: string, n: int] {
let out = (magick $path -resize 100x100 -colors $n +dither -format %c histogram:info:-)
$out
| lines
| parse --regex '(?P<count>\d+):.*#(?P<hex>[0-9A-Fa-f]{6})'
| insert count_n { |row| $row.count | into int }
| sort-by count_n --reverse
| each { |row|
let r = ($row.hex | str substring 0..1 | hex-byte)
let g = ($row.hex | str substring 2..3 | hex-byte)
let b = ($row.hex | str substring 4..5 | hex-byte)
{ r: $r, g: $g, b: $b, hsl: (rgb-to-hsl { r: $r, g: $g, b: $b }) }
}
}
def accent-list [flavor: string] {
let accents = (palette | get $flavor | get accents)
$accents
| columns
| each {|name|
let hex = ($accents | get $name)
let r = ($hex | str substring 1..2 | hex-byte)
let g = ($hex | str substring 3..4 | hex-byte)
let b = ($hex | str substring 5..6 | hex-byte)
{ name: $name, hsl: (rgb-to-hsl { r: $r, g: $g, b: $b }) }
}
}
def pick-flavor [rgb: record<r: int, g: int, b: int>] {
let luma = (0.299 * $rgb.r + 0.587 * $rgb.g + 0.114 * $rgb.b) / 255
if $luma < 0.5 { "mocha" } else { "latte" }
}
# Maps up to `want` of the wallpaper's dominant swatches onto distinct
# Catppuccin accent swatches (at least `min_sep` degrees of hue apart), so
# the shell gets a coherent multi-accent palette instead of one flat color.
# Near-gray swatches (no meaningful hue) are skipped. If the wallpaper
# doesn't carry enough distinct hues, remaining slots are filled from a
# fixed, pleasant fallback order so the palette never collapses to
# monochrome.
def pick-accents [flavor: string, swatches: list, want: int, min_sep: float] {
let accents = (accent-list $flavor)
mut chosen_names = []
mut chosen_hues = []
for sw in $swatches {
if ($chosen_names | length) >= $want { continue }
if $sw.hsl.s < 0.12 { continue }
let names_snapshot = $chosen_names
let hues_snapshot = $chosen_hues
let candidates = (
$accents
| where {|a| not ($names_snapshot | any {|c| $c == $a.name }) }
| each {|a|
let dists_to_chosen = ($hues_snapshot | each {|ch| hue-dist $a.hsl.h $ch })
let min_dist_to_chosen = if ($dists_to_chosen | is-empty) { 999.0 } else { $dists_to_chosen | math min }
{ name: $a.name, dist_to_swatch: (hue-dist $sw.hsl.h $a.hsl.h), min_dist_to_chosen: $min_dist_to_chosen }
}
| where min_dist_to_chosen >= $min_sep
| sort-by dist_to_swatch
)
if ($candidates | is-empty) { continue }
let pick = ($candidates | first)
$chosen_names = ($chosen_names | append $pick.name)
$chosen_hues = ($chosen_hues | append (($accents | where name == $pick.name | first).hsl.h))
}
let fallback_order = ["mauve" "sapphire" "peach" "green" "pink" "yellow" "teal" "blue" "flamingo"]
for fb in $fallback_order {
if ($chosen_names | length) >= $want { continue }
if ($chosen_names | any {|c| $c == $fb }) { continue }
$chosen_names = ($chosen_names | append $fb)
}
$chosen_names
}
def container-tint [hex: string] {
# accent-tinted, ~14% opacity - a soft fill for badges/containers
$"#24($hex | str substring 1..)"
}
def write-theme-colors [flavor: string, accent_names: list] {
let p = (palette | get $flavor)
let primary = ($p.accents | get $accent_names.0)
let secondary = ($p.accents | get $accent_names.1)
let tertiary = ($p.accents | get $accent_names.2)
let info = $p.accents.sapphire
let border = $"#1a($primary | str substring 1..)" # accent-tinted, ~10% opacity
let colors = [
$" property color background: \"#e6($p.crust | str substring 1..)\""
$" property color surface: \"#cc($p.mantle | str substring 1..)\""
$" property color surfaceHover: \"#f2($p.surface0 | str substring 1..)\""
$" property color overlay: \"#60($p.crust | str substring 1..)\""
""
$" property color primary: \"($primary)\""
$" property color secondary: \"($secondary)\""
$" property color tertiary: \"($tertiary)\""
$" property color accent: \"($primary)\""
""
$" property color primaryContainer: \"(container-tint $primary)\""
$" property color secondaryContainer: \"(container-tint $secondary)\""
$" property color tertiaryContainer: \"(container-tint $tertiary)\""
""
$" property color alert: \"($p.red)\""
$" property color alertContainer: \"(container-tint $p.red)\""
$" property color success: \"($p.green)\""
$" property color successContainer: \"(container-tint $p.green)\""
$" property color warning: \"($p.yellow)\""
$" property color warningContainer: \"(container-tint $p.yellow)\""
$" property color info: \"($info)\""
$" property color infoContainer: \"(container-tint $info)\""
""
$" property color text: \"($p.text)\""
$" property color textMuted: \"($p.subtext0)\""
$" property color textOnAccent: \"#e6($p.crust | str substring 1..)\""
""
$" property color border: \"($border)\""
]
let theme_path = $"($env.HOME)/.config/quickshell/components/Shared/Theme.qml"
let lines = (open --raw $theme_path | lines)
let begin = ($lines | enumerate | where item == " // GENERATED:COLORS:BEGIN" | get index.0)
let end = ($lines | enumerate | where item == " // GENERATED:COLORS:END" | get index.0)
let new_lines = (
($lines | take ($begin + 1))
++ [" property QtObject colors: QtObject {"]
++ $colors
++ [" }"]
++ ($lines | skip $end)
)
($new_lines | str join "\n") + "\n" | save -f $theme_path
}
def propagate [flavor: string] {
let home = $env.HOME
let base = $"($home)/.config/themes/catppuccin/($flavor)"
let gtk_theme = (open $"($base)/gtk-theme-name" | str trim)
$flavor | save -f $"($home)/.config/current-theme"
let wanted_darkman = if $flavor == "mocha" { "dark" } else { "light" }
let current_darkman = (try { darkman get | str trim } catch { "" })
if $current_darkman != "" and $current_darkman != $wanted_darkman {
try { bash -c $"darkman set ($wanted_darkman) &" } catch {}
}
# Hypr palette. Configs must source ~/.config/hypr/theme.conf to use this.
ln -sfn $"($base)/hypr.conf" $"($home)/.config/hypr/theme.conf"
# Mako colors, only if mako config dir exists.
if ($"($home)/.config/mako" | path exists) {
ln -sfn $"($base)/mako.conf" $"($home)/.config/mako/config"
if (which makoctl | is-not-empty) { makoctl reload }
}
# Btop theme
if ($"($home)/.config/btop/btop.conf" | path exists) {
bash -lc $"sed -i 's|color_theme = \".*\"|color_theme = \"($home)/.config/btop/themes/catppuccin_($flavor).theme\"|' \"($home)/.config/btop/btop.conf\""
}
# Helix theme
if ($"($home)/.config/helix/config.toml" | path exists) {
bash -lc $"sed -i 's/theme = \"catppuccin_.*_transparent\"/theme = \"catppuccin_($flavor)_transparent\"/' \"($home)/.config/helix/config.toml\""
}
# Yazi theme
if ($"($home)/.config/yazi" | path exists) {
$"[flavor]\nuse = \"catppuccin-($flavor)\"\n" | save -f $"($home)/.config/yazi/theme.toml"
}
# GTK theme, only if installed.
try {
bash -lc $"gsettings set org.gnome.desktop.interface gtk-theme ($gtk_theme)"
let color_scheme = if $flavor == "mocha" { "prefer-dark" } else { "prefer-light" }
bash -lc $"gsettings set org.gnome.desktop.interface color-scheme ($color_scheme)"
try { mkdir $"($home)/.config/gtk-3.0" } catch {}
let prefer_dark = if $flavor == "mocha" { "1" } else { "0" }
$"[Settings]\ngtk-theme-name=($gtk_theme)\ngtk-application-prefer-dark-theme=($prefer_dark)\n" | save -f $"($home)/.config/gtk-3.0/settings.ini"
} catch {}
hyprctl reload
bash -lc "pkill quickshell 2>/dev/null; setsid quickshell >/tmp/quickshell-theme.log 2>&1 < /dev/null &"
}
def main [wallpaper_path: string] {
let swatches = (dominant-colors $wallpaper_path 8)
let top = ($swatches | first)
let flavor = (pick-flavor { r: $top.r, g: $top.g, b: $top.b })
let accent_names = (pick-accents $flavor $swatches 3 40.0)
write-theme-colors $flavor $accent_names
propagate $flavor
}
@@ -1,36 +0,0 @@
pragma Singleton
import QtQuick
QtObject {
// Catppuccin Latte
property color base: "#eff1f5"
property color mantle: "#e6e9ef"
property color crust: "#dce0e8"
property color surface0: "#ccd0da"
property color surface1: "#bcc0cc"
property color surface2: "#acb0be"
property color overlay0: "#9ca0b0"
property color overlay1: "#8c8fa1"
property color overlay2: "#7c7f93"
property color text: "#4c4f69"
property color subtext0: "#6c6f85"
property color subtext1: "#5c5f77"
property color mauve: "#8839ef"
property color flamingo: "#dd7878"
property color peach: "#fe640b"
property color sky: "#04a5e5"
property color green: "#40a02b"
property color yellow: "#df8e1d"
property color red: "#d20f39"
property color rosewater: "#dc8a78"
property real barHeight: 36
property real padding: 10
property real spacing: 10
property real fontPixelSize: 14
property string fontFamily: "Fira Code Nerd Font"
property real sectionRadius: 14
property real sectionPadding: 12
property real barMargin: 16
property real widgetSpacing: 8
}
@@ -1,36 +0,0 @@
pragma Singleton
import QtQuick
QtObject {
// Catppuccin Mocha
property color base: "#1e1e2e"
property color mantle: "#181825"
property color crust: "#11111b"
property color surface0: "#313244"
property color surface1: "#45475a"
property color surface2: "#585b70"
property color overlay0: "#6c7086"
property color overlay1: "#7f849c"
property color overlay2: "#9399b2"
property color text: "#cdd6f4"
property color subtext0: "#a6adc8"
property color subtext1: "#bac2de"
property color mauve: "#cba6f7"
property color flamingo: "#f2cdcd"
property color peach: "#fab387"
property color sky: "#89dceb"
property color green: "#a6e3a1"
property color yellow: "#f9e2af"
property color red: "#f38ba8"
property color rosewater: "#f5e0dc"
property real barHeight: 36
property real padding: 10
property real spacing: 10
property real fontPixelSize: 14
property string fontFamily: "Fira Code Nerd Font"
property real sectionRadius: 14
property real sectionPadding: 12
property real barMargin: 16
property real widgetSpacing: 8
}
+58
View File
@@ -0,0 +1,58 @@
{
"mocha": {
"base": "#1e1e2e",
"mantle": "#181825",
"crust": "#11111b",
"surface0": "#313244",
"surface1": "#45475a",
"text": "#cdd6f4",
"subtext0": "#a6adc8",
"green": "#a6e3a1",
"yellow": "#f9e2af",
"red": "#f38ba8",
"accents": {
"rosewater": "#f5e0dc",
"flamingo": "#f2cdcd",
"pink": "#f5c2e7",
"mauve": "#cba6f7",
"red": "#f38ba8",
"maroon": "#eba0ac",
"peach": "#fab387",
"yellow": "#f9e2af",
"green": "#a6e3a1",
"teal": "#94e2d5",
"sky": "#89dceb",
"sapphire": "#74c7ec",
"blue": "#89b4fa",
"lavender": "#b4befe"
}
},
"latte": {
"base": "#eff1f5",
"mantle": "#e6e9ef",
"crust": "#dce0e8",
"surface0": "#ccd0da",
"surface1": "#bcc0cc",
"text": "#4c4f69",
"subtext0": "#6c6f85",
"green": "#40a02b",
"yellow": "#df8e1d",
"red": "#d20f39",
"accents": {
"rosewater": "#dc8a78",
"flamingo": "#dd7878",
"pink": "#ea76cb",
"mauve": "#8839ef",
"red": "#d20f39",
"maroon": "#e64553",
"peach": "#fe640b",
"yellow": "#df8e1d",
"green": "#40a02b",
"teal": "#179299",
"sky": "#04a5e5",
"sapphire": "#209fb5",
"blue": "#1e66f5",
"lavender": "#7287fd"
}
}
}
+14 -5
View File
@@ -57,15 +57,21 @@
unzip unzip
obsidian obsidian
htop htop
btop
mpv mpv
jellytui jellytui
tlrc
mago
] ++ lib.optionals pkgs.stdenv.hostPlatform.isLinux [ ] ++ lib.optionals pkgs.stdenv.hostPlatform.isLinux [
owncloud-client owncloud-client
wl-clipboard wl-clipboard
cliphist cliphist
hyprmod.packages.${pkgs.stdenv.hostPlatform.system}.default hyprmod.packages.${pkgs.stdenv.hostPlatform.system}.default
librepods librepods
easyeffects
lutris
claude-code
imagemagick
mangohud
]; ];
home.file = { home.file = {
@@ -87,10 +93,8 @@
source = ./local_bin; source = ./local_bin;
recursive = true; recursive = true;
}; };
".agents" = { ".agents".source = config.lib.file.mkOutOfStoreSymlink "${config.home.homeDirectory}/.dotfiles/agents";
source = ./agents; ".claude/skills".source = config.lib.file.mkOutOfStoreSymlink "${config.home.homeDirectory}/.dotfiles/agents/skills";
recursive = true;
};
".pi/agent/settings.json".source = config.lib.file.mkOutOfStoreSymlink "${config.home.homeDirectory}/.dotfiles/pi/agent/settings.json"; ".pi/agent/settings.json".source = config.lib.file.mkOutOfStoreSymlink "${config.home.homeDirectory}/.dotfiles/pi/agent/settings.json";
".pi/extensions".source = config.lib.file.mkOutOfStoreSymlink "${config.home.homeDirectory}/.dotfiles/pi/extensions"; ".pi/extensions".source = config.lib.file.mkOutOfStoreSymlink "${config.home.homeDirectory}/.dotfiles/pi/extensions";
}; };
@@ -190,5 +194,10 @@
colorScheme = "mocha"; colorScheme = "mocha";
}; };
programs.btop = {
enable = true;
package = pkgs.btop.override { cudaSupport = true; };
};
programs.home-manager.enable = true; programs.home-manager.enable = true;
} }
+1 -1
View File
@@ -1,6 +1,6 @@
#!/usr/bin/env bash #!/usr/bin/env bash
DIR="$HOME/Nextcloud/Wallpaper" DIR="$HOME/ownCloud/Personal/Wallpaper"
INTERVAL=300 # seconds between changes INTERVAL=300 # seconds between changes
awww init 2>/dev/null awww init 2>/dev/null
+4 -4
View File
@@ -68,7 +68,7 @@ update_ms = 1000
#* Processes sorting, "pid" "program" "arguments" "threads" "user" "memory" "cpu lazy" "cpu direct", #* Processes sorting, "pid" "program" "arguments" "threads" "user" "memory" "cpu lazy" "cpu direct",
#* "cpu lazy" sorts top process over time (easier to follow), "cpu direct" updates top process directly. #* "cpu lazy" sorts top process over time (easier to follow), "cpu direct" updates top process directly.
proc_sorting = "cpu lazy" proc_sorting = "memory"
#* Reverse sorting order, True or False. #* Reverse sorting order, True or False.
proc_reversed = false proc_reversed = false
@@ -111,11 +111,11 @@ keep_dead_proc_usage = false
#* Sets the CPU stat shown in upper half of the CPU graph, "total" is always available. #* Sets the CPU stat shown in upper half of the CPU graph, "total" is always available.
#* Select from a list of detected attributes from the options menu. #* Select from a list of detected attributes from the options menu.
cpu_graph_upper = "total" cpu_graph_upper = "Auto"
#* Sets the CPU stat shown in lower half of the CPU graph, "total" is always available. #* Sets the CPU stat shown in lower half of the CPU graph, "total" is always available.
#* Select from a list of detected attributes from the options menu. #* Select from a list of detected attributes from the options menu.
cpu_graph_lower = "total" cpu_graph_lower = "Auto"
#* If gpu info should be shown in the cpu box. Available values = "Auto", "On" and "Off". #* If gpu info should be shown in the cpu box. Available values = "Auto", "On" and "Off".
show_gpu_info = "Auto" show_gpu_info = "Auto"
@@ -192,7 +192,7 @@ show_swap = true
swap_disk = true swap_disk = true
#* If mem box should be split to also show disks info. #* If mem box should be split to also show disks info.
show_disks = true show_disks = false
#* Filter out non physical disks. Set this to False to include network disks, RAM disks and similar. #* Filter out non physical disks. Set this to False to include network disks, RAM disks and similar.
only_physical = true only_physical = true
+1 -1
View File
@@ -1,5 +1,5 @@
general { general {
lock_cmd = hyprlock lock_cmd = qs ipc call lockScreen lock
before_sleep_cmd = loginctl lock-session before_sleep_cmd = loginctl lock-session
after_sleep_cmd = hyprctl dispatch dpms on after_sleep_cmd = hyprctl dispatch dpms on
} }
-53
View File
@@ -1,53 +0,0 @@
-- Generated by HyprMod
-- Settings
hl.config({
ecosystem = {
enforce_permissions = true,
no_donation_nag = true,
no_update_news = true,
},
misc = {
animate_mouse_windowdragging = true,
disable_splash_rendering = true,
vrr = 1,
},
xwayland = {
force_zero_scaling = true,
},
})
-- Monitors
hl.monitor({
output = "desc:Samsung Electric Company Odyssey G85SB H1AK500000",
disabled = false,
mode = "3440x1440@174.96Hz",
position = "1920x180",
scale = 1,
bitdepth = 10,
vrr = 1,
cm = "hdr",
sdrbrightness = 0.5,
sdr_min_luminance = 0,
sdr_max_luminance = 400,
min_luminance = 0,
max_luminance = 400,
max_avg_luminance = 248,
})
hl.monitor({
output = "desc:Iiyama North America PL2730H 1153680901995",
disabled = false,
mode = "1920x1080@74.97Hz",
position = "0x360",
scale = 1,
cm = "srgb",
})
hl.monitor({
output = "HDMI-A-2",
disabled = true,
})
-- Autostart
hl.on("hyprland.start", function()
hl.exec_cmd("hyprpm reload -n")
end)
+44 -13
View File
@@ -3,8 +3,6 @@
require("hyprland-gui") require("hyprland-gui")
local hypr_dir = (os.getenv("XDG_CONFIG_HOME") or (os.getenv("HOME") .. "/.config")) .. "/hypr"
---------------- ----------------
--- MONITORS --- --- MONITORS ---
---------------- ----------------
@@ -24,10 +22,9 @@ hl.monitor({
local terminal = "ghostty" local terminal = "ghostty"
local fileManager = "nemo" local fileManager = "nemo"
local menu = "qs ipc call appLauncher open" local menu = "quickshell ipc call commandPalette toggle"
local clipboard = "qs ipc call clipboardPicker open" local clipboard = "qs ipc call clipboardPicker open"
local lock = "hyprlock" local lock = "qs ipc call lockScreen lock"
local powermenu = "qs ipc call powerMenu open"
----------------- -----------------
--- AUTOSTART --- --- AUTOSTART ---
@@ -176,10 +173,11 @@ local mainMod = "SUPER"
-- Apps -- Apps
hl.bind(mainMod .. " + Return", hl.dsp.exec_cmd(terminal)) hl.bind(mainMod .. " + Return", hl.dsp.exec_cmd(terminal))
hl.bind(mainMod .. " + Q", hl.dsp.window.close()) hl.bind(mainMod .. " + Q", hl.dsp.window.close())
hl.bind(mainMod .. " + M", hl.dsp.exec_cmd(powermenu)) hl.bind(mainMod .. " + M", hl.dsp.exec_cmd("quickshell ipc call logoutMenu toggle"))
hl.bind(mainMod .. " + E", hl.dsp.exec_cmd(fileManager)) hl.bind(mainMod .. " + E", hl.dsp.exec_cmd(fileManager))
hl.bind(mainMod .. " + H", hl.dsp.window.float({ action = "toggle" })) hl.bind(mainMod .. " + H", hl.dsp.window.float({ action = "toggle" }))
hl.bind(mainMod .. " + Space", hl.dsp.exec_cmd(menu)) hl.bind(mainMod .. " + Space", hl.dsp.exec_cmd(menu))
hl.bind(mainMod .. " + V", hl.dsp.exec_cmd("quickshell ipc call clipboardManager toggle"))
hl.bind(mainMod .. " + P", hl.dsp.window.pseudo()) hl.bind(mainMod .. " + P", hl.dsp.window.pseudo())
hl.bind(mainMod .. " + F", hl.dsp.window.fullscreen({ action = "toggle" })) hl.bind(mainMod .. " + F", hl.dsp.window.fullscreen({ action = "toggle" }))
hl.bind(mainMod .. " + L", hl.dsp.exec_cmd(lock)) hl.bind(mainMod .. " + L", hl.dsp.exec_cmd(lock))
@@ -191,19 +189,38 @@ hl.bind(mainMod .. " + comma", hl.dsp.layout("move -col"))
hl.bind(mainMod .. " + SHIFT + period", hl.dsp.layout("swapcol r")) hl.bind(mainMod .. " + SHIFT + period", hl.dsp.layout("swapcol r"))
hl.bind(mainMod .. " + SHIFT + comma", hl.dsp.layout("swapcol l")) hl.bind(mainMod .. " + SHIFT + comma", hl.dsp.layout("swapcol l"))
-- Theme / wallpaper switchers -- Wallpaper switcher (drives theme flavor + accent automatically)
hl.bind(mainMod .. " + T", hl.dsp.exec_cmd("qs ipc call themeSwitcher open"))
hl.bind(mainMod .. " + W", hl.dsp.exec_cmd("qs ipc call wallpaperSwitcher open")) hl.bind(mainMod .. " + W", hl.dsp.exec_cmd("qs ipc call wallpaperSwitcher open"))
hl.bind(mainMod .. " + SHIFT + W", hl.dsp.exec_cmd("qs ipc call wallpaperSwitcher random")) hl.bind(mainMod .. " + SHIFT + W", hl.dsp.exec_cmd("qs ipc call wallpaperSwitcher random"))
-- Brightness -- Brightness
hl.bind("XF86MonBrightnessUp", hl.dsp.exec_cmd("brightnessctl set 10%-"), { locked = true }) hl.bind(
hl.bind("XF86MonBrightnessDown", hl.dsp.exec_cmd("brightnessctl set 10%-"), { locked = true }) "XF86MonBrightnessUp",
hl.dsp.exec_cmd("brightnessctl set 10%+ && quickshell ipc call osd showBrightness"),
{ locked = true }
)
hl.bind(
"XF86MonBrightnessDown",
hl.dsp.exec_cmd("brightnessctl set 10%- && quickshell ipc call osd showBrightness"),
{ locked = true }
)
-- Media -- Media
hl.bind("XF86AudioRaiseVolume", hl.dsp.exec_cmd("wpctl set-volume -l 1 @DEFAULT_AUDIO_SINK@ 5%+"), { locked = true }) hl.bind(
hl.bind("XF86AudioLowerVolume", hl.dsp.exec_cmd("wpctl set-volume -l 1 @DEFAULT_AUDIO_SINK@ 5%-"), { locked = true }) "XF86AudioRaiseVolume",
hl.bind("XF86AudioMute", hl.dsp.exec_cmd("wpctl set-mute @DEFAULT_AUDIO_SINK@ toggle"), { locked = true }) hl.dsp.exec_cmd("wpctl set-volume -l 1 @DEFAULT_AUDIO_SINK@ 5%+ && quickshell ipc call osd showVolume"),
{ locked = true }
)
hl.bind(
"XF86AudioLowerVolume",
hl.dsp.exec_cmd("wpctl set-volume -l 1 @DEFAULT_AUDIO_SINK@ 5%- && quickshell ipc call osd showVolume"),
{ locked = true }
)
hl.bind(
"XF86AudioMute",
hl.dsp.exec_cmd("wpctl set-mute @DEFAULT_AUDIO_SINK@ toggle && quickshell ipc call osd showVolume"),
{ locked = true }
)
hl.bind("XF86AudioMicMute", hl.dsp.exec_cmd("wpctl set-mute @DEFAULT_AUDIO_SOURCE@ toggle"), { locked = true }) hl.bind("XF86AudioMicMute", hl.dsp.exec_cmd("wpctl set-mute @DEFAULT_AUDIO_SOURCE@ toggle"), { locked = true })
hl.bind("XF86AudioPlay", hl.dsp.exec_cmd("playerctl play-pause"), { locked = true }) hl.bind("XF86AudioPlay", hl.dsp.exec_cmd("playerctl play-pause"), { locked = true })
hl.bind("XF86AudioPause", hl.dsp.exec_cmd("playerctl play-pause"), { locked = true }) hl.bind("XF86AudioPause", hl.dsp.exec_cmd("playerctl play-pause"), { locked = true })
@@ -211,6 +228,12 @@ hl.bind("XF86AudioStop", hl.dsp.exec_cmd("playerctl stop"), { locked = true })
hl.bind("XF86AudioNext", hl.dsp.exec_cmd("playerctl next"), { locked = true }) hl.bind("XF86AudioNext", hl.dsp.exec_cmd("playerctl next"), { locked = true })
hl.bind("XF86AudioPrev", hl.dsp.exec_cmd("playerctl previous"), { locked = true }) hl.bind("XF86AudioPrev", hl.dsp.exec_cmd("playerctl previous"), { locked = true })
-- Screenshots
hl.bind("Print", hl.dsp.exec_cmd("hyprshot -m output"))
hl.bind("SHIFT + Print", hl.dsp.exec_cmd("hyprshot -m window"))
hl.bind("CTRL + Print", hl.dsp.exec_cmd("hyprshot -m region"))
hl.bind(mainMod .. " + Print", hl.dsp.exec_cmd("hyprshot -m region --raw | swappy -f -"))
-- Move focus with mainMod + arrow keys -- Move focus with mainMod + arrow keys
hl.bind(mainMod .. " + left", hl.dsp.focus({ direction = "left" })) hl.bind(mainMod .. " + left", hl.dsp.focus({ direction = "left" }))
hl.bind(mainMod .. " + right", hl.dsp.focus({ direction = "right" })) hl.bind(mainMod .. " + right", hl.dsp.focus({ direction = "right" }))
@@ -268,3 +291,11 @@ for _, title in ipairs(quickshell_popups) do
rounding = 20, rounding = 20,
}) })
end end
-- The bar's surface grows/shrinks to fit its hover tooltip (see Bar.qml);
-- Hyprland's default layer animation makes that resize visibly slide/fade,
-- which reads as broken rather than intentional. Disable it for the bar.
hl.layer_rule({
match = { namespace = "^(quickshell-bar)$" },
no_anim = true,
})
+1 -1
View File
@@ -1 +1 @@
../themes/catppuccin/mocha/hypr.conf /home/johannes/.config/themes/catppuccin/mocha/hypr.conf
@@ -1,191 +0,0 @@
import QtQuick
import QtQuick.Layouts
import Quickshell
import Quickshell.Io
import Quickshell.Widgets as QSW
import "../core"
FloatingWindow {
id: win
title: "App Launcher"
visible: false
implicitWidth: 760
implicitHeight: 560
color: "transparent"
property var apps: []
property string query: ""
property int selectedIndex: 0
property bool mouseWasInside: false
property var filteredApps: apps.filter(function(app) {
const q = query.toLowerCase()
return q.length === 0 || app.name.toLowerCase().indexOf(q) >= 0 || app.comment.toLowerCase().indexOf(q) >= 0 || app.id.toLowerCase().indexOf(q) >= 0
})
function shellQuote(s) { return "'" + String(s).replace(/'/g, "'\\''") + "'" }
function focusSearch() { Qt.callLater(function() { search.focus = true; search.forceActiveFocus(); search.cursorPosition = search.text.length }) }
function clampIndex(index) { if (filteredApps.length === 0) return 0; return Math.max(0, Math.min(filteredApps.length - 1, index)) }
function selectIndex(index) { selectedIndex = clampIndex(index) }
function open() { mouseWasInside = false; query = ""; visible = true; refresh(); focusSearch() }
function toggle() { visible = !visible; if (visible) { mouseWasInside = false; query = ""; refresh(); focusSearch() } }
function refresh() { appList.running = true }
function launchSelected() {
if (filteredApps.length === 0) return
const id = filteredApps[selectedIndex].id
const path = filteredApps[selectedIndex].path
const hist = Quickshell.env("HOME") + "/.cache/quickshell/app-launcher-history"
launchProcess.command = ["bash", "-c", "mkdir -p ~/.cache/quickshell; { printf '%s\\n' " + shellQuote(id) + "; grep -vxF " + shellQuote(id) + " " + shellQuote(hist) + " 2>/dev/null | head -n 29; } > " + shellQuote(hist + ".tmp") + " && mv " + shellQuote(hist + ".tmp") + " " + shellQuote(hist) + "; uwsm app " + shellQuote(path) + " > ~/.cache/quickshell/launch.log 2>&1 & disown"]
console.log("launching: " + launchProcess.command.join(" "))
launchProcess.running = true
visible = false
}
onQueryChanged: { selectedIndex = 0; focusSearch() }
onFilteredAppsChanged: selectedIndex = clampIndex(selectedIndex)
onSelectedIndexChanged: if (visible) Qt.callLater(function() { list.positionViewAtIndex(selectedIndex, ListView.Contain) })
IpcHandler {
target: "appLauncher"
function open() { win.open() }
function toggle() { win.toggle() }
function refresh() { win.refresh() }
}
FocusScope {
id: root
anchors.fill: parent
focus: win.visible
function handleKey(event) {
if (event.text && event.text.length > 0 && event.text >= " " && !(event.modifiers & (Qt.ControlModifier | Qt.AltModifier | Qt.MetaModifier))) {
if (!search.activeFocus) {
win.query += event.text
win.focusSearch()
event.accepted = true
}
return
}
if (event.key === Qt.Key_Backspace && !search.activeFocus && win.query.length > 0) { win.query = win.query.slice(0, -1); win.focusSearch(); event.accepted = true }
else if (event.key === Qt.Key_Down || event.key === Qt.Key_J) { win.selectIndex(win.selectedIndex + 1); event.accepted = true }
else if (event.key === Qt.Key_Up || event.key === Qt.Key_K) { win.selectIndex(win.selectedIndex - 1); event.accepted = true }
else if (event.key === Qt.Key_Return || event.key === Qt.Key_Enter) { win.launchSelected(); event.accepted = true }
else if (event.key === Qt.Key_Escape) { win.visible = false; event.accepted = true }
}
Keys.onPressed: function(event) { root.handleKey(event) }
MouseArea { anchors.fill: parent; hoverEnabled: true; acceptedButtons: Qt.NoButton; onEntered: win.mouseWasInside = true; onExited: if (win.mouseWasInside) win.visible = false }
Rectangle { anchors.fill: parent; radius: 34; color: Qt.rgba(Theme.base.r, Theme.base.g, Theme.base.b, 0.13); border.color: Qt.rgba(Theme.surface1.r, Theme.surface1.g, Theme.surface1.b, 0.38); border.width: 1 }
Rectangle {
anchors.left: parent.left; anchors.right: parent.right; anchors.top: parent.top
anchors.margins: 28; height: 52; radius: 21
color: Qt.rgba(Theme.crust.r, Theme.crust.g, Theme.crust.b, 0.50)
border.color: Qt.rgba(Theme.surface1.r, Theme.surface1.g, Theme.surface1.b, 0.45)
Text { anchors.left: parent.left; anchors.verticalCenter: parent.verticalCenter; anchors.leftMargin: 16; text: "󰍉"; font.family: Theme.fontFamily; font.pixelSize: Theme.fontPixelSize + 5; color: Theme.mauve }
TextInput {
id: search
focus: true
activeFocusOnTab: true
anchors.left: parent.left; anchors.right: parent.right; anchors.verticalCenter: parent.verticalCenter
anchors.leftMargin: 50; anchors.rightMargin: 16
text: win.query
onTextChanged: win.query = text
clip: true
font.family: Theme.fontFamily; font.pixelSize: Theme.fontPixelSize + 2
color: Theme.text
selectionColor: Theme.mauve
selectedTextColor: Theme.base
Text { visible: search.text.length === 0; text: "Launch app…"; font: search.font; color: Theme.overlay1 }
Keys.onPressed: function(event) { root.handleKey(event) }
}
}
Timer {
interval: 60
repeat: true
running: win.visible && !search.activeFocus
onTriggered: win.focusSearch()
}
ListView {
id: list
anchors.left: parent.left; anchors.right: parent.right; anchors.top: parent.top; anchors.bottom: footer.top
anchors.leftMargin: 28; anchors.rightMargin: 28; anchors.topMargin: 96; anchors.bottomMargin: 14
model: win.filteredApps
spacing: 10
clip: true
currentIndex: win.selectedIndex
delegate: Rectangle {
id: card
width: list.width
height: 68
radius: 20
color: index === win.selectedIndex ? Qt.rgba(Theme.mauve.r, Theme.mauve.g, Theme.mauve.b, 0.22) : Qt.rgba(Theme.crust.r, Theme.crust.g, Theme.crust.b, 0.45)
border.color: index === win.selectedIndex ? Theme.mauve : Qt.rgba(Theme.surface1.r, Theme.surface1.g, Theme.surface1.b, 0.45)
border.width: index === win.selectedIndex ? 2 : 1
antialiasing: true
Rectangle {
anchors.left: parent.left
anchors.verticalCenter: parent.verticalCenter
anchors.leftMargin: 12
width: 44
height: 44
radius: 14
color: Qt.rgba(Theme.surface0.r, Theme.surface0.g, Theme.surface0.b, 0.72)
QSW.IconImage {
id: appIcon
anchors.centerIn: parent
width: 32
height: 32
source: modelData.icon ? "image://icon/" + modelData.icon : ""
asynchronous: true
mipmap: true
}
Text {
visible: appIcon.status === Image.Error || appIcon.source === ""
anchors.centerIn: parent
text: modelData.name.length ? modelData.name[0].toUpperCase() : "?"
font.family: Theme.fontFamily
font.bold: true
font.pixelSize: Theme.fontPixelSize + 7
color: Theme.mauve
}
}
ColumnLayout {
anchors.left: parent.left; anchors.right: parent.right; anchors.verticalCenter: parent.verticalCenter
anchors.leftMargin: 70; anchors.rightMargin: 14
spacing: 2
Text { Layout.fillWidth: true; text: modelData.name; elide: Text.ElideRight; font.family: Theme.fontFamily; font.pixelSize: Theme.fontPixelSize + 1; font.bold: true; color: Theme.text }
Text { Layout.fillWidth: true; text: (modelData.used ? "Recent · " : "") + (modelData.comment || modelData.id); elide: Text.ElideRight; font.family: Theme.fontFamily; font.pixelSize: Theme.fontPixelSize - 2; color: modelData.used ? Theme.green : Theme.overlay2 }
}
MouseArea { anchors.fill: parent; onClicked: { if (index === win.selectedIndex) win.launchSelected(); else win.selectIndex(index); search.forceActiveFocus() } }
}
}
Rectangle {
id: footer
anchors.left: parent.left; anchors.right: parent.right; anchors.bottom: parent.bottom
anchors.leftMargin: 42; anchors.rightMargin: 42; anchors.bottomMargin: 22
height: 44; radius: 18
color: Qt.rgba(Theme.crust.r, Theme.crust.g, Theme.crust.b, 0.42)
border.color: Qt.rgba(Theme.surface1.r, Theme.surface1.g, Theme.surface1.b, 0.45)
Text { anchors.centerIn: parent; text: win.filteredApps.length + " apps · type search · ↑/↓ select · Enter launch · Esc"; font.family: Theme.fontFamily; font.pixelSize: Theme.fontPixelSize - 2; color: Theme.overlay2 }
}
}
Process {
id: appList
running: false
command: ["python3", "-c", "import configparser,glob,os,json;\nseen={};\nhist_path=os.path.expanduser('~/.cache/quickshell/app-launcher-history');\nhist=[]\ntry:\n hist=[x.strip() for x in open(hist_path, encoding='utf-8') if x.strip()]\nexcept Exception:\n pass\nrank={v:i for i,v in enumerate(hist)}\npaths=[f for d in os.environ.get('XDG_DATA_DIRS', '/usr/share').split(':') + ['~/.local/share'] for f in glob.glob(os.path.expanduser(d)+'/applications/*.desktop')];\nfor p in paths:\n cp=configparser.ConfigParser(interpolation=None); cp.optionxform=str\n try: cp.read(p, encoding='utf-8')\n except Exception: continue\n if not cp.has_section('Desktop Entry'): continue\n d=cp['Desktop Entry']\n if d.get('Type','Application')!='Application' or d.get('NoDisplay','false').lower()=='true' or d.get('Hidden','false').lower()=='true': continue\n name=d.get('Name','').strip()\n if not name: continue\n did=os.path.basename(p)\n appid=did[:-8] if did.endswith('.desktop') else did\n seen[appid]={'id':appid,'path':p,'name':name,'comment':d.get('Comment','').strip(),'icon':d.get('Icon','').strip(),'used': appid in rank}\nprint(json.dumps(sorted(seen.values(), key=lambda x:(rank.get(x['id'],999999), x['name'].lower()))))"]
stdout: StdioCollector { onStreamFinished: { try { win.apps = JSON.parse(text) } catch(e) { win.apps = [] }; win.selectedIndex = 0 } }
}
Process {
id: launchProcess
running: false
command: []
}
}
@@ -0,0 +1,502 @@
import QtQuick
import Quickshell
import Quickshell.Wayland
import Quickshell.Hyprland
import Quickshell.Io
import Quickshell.Services.UPower
import "../Shared"
PanelWindow {
id: barWindow
// Reference to global state
property QtObject rootState
anchors {
top: true
left: true
right: true
}
readonly property int hyprGapsOut: 20
margins {
top: hyprGapsOut
left: hyprGapsOut
right: hyprGapsOut
}
// Fixed pill-row height. The tray tooltip (below) needs extra surface
// space beneath this to render into, but that space is reserved
// up front at a constant size rather than grown/shrunk at runtime -
// resizing a wlr-layer-shell surface on every hover forces a full
// reconfigure that visibly flashes/redraws the whole bar. Instead the
// surface is always tall enough, and only the tooltip's own visibility
// toggles.
readonly property int barContentHeight: 40
readonly property int tooltipReserve: 40
// Just the pill row's own height - not barContentHeight + margins.top.
// The wlr-layer-shell protocol already adds this surface's margins on
// top of exclusiveZone when reserving screen space, so including
// margins.top here again double-counts it (verified via `hyprctl
// monitors`: reported reserved space was margins.top + exclusiveZone,
// not just exclusiveZone). That double-count was also why the gap below
// the bar measured out to margins.top + 22px instead of a fixed 22px
// (Hyprland's own gaps_out + border) - no value of margins.top could
// ever make the two gaps equal while the formula double-counted it.
exclusiveZone: barContentHeight
implicitHeight: barContentHeight + tooltipReserve
color: "transparent"
WlrLayershell.layer: WlrLayer.Top
WlrLayershell.namespace: "quickshell-bar"
// Only the pill row accepts input - the reserved tooltip space below it
// stays click-through so it doesn't block the desktop/windows under it
// when no tooltip is showing.
mask: Region {
x: 0
y: 0
width: barWindow.width
height: barWindow.barContentHeight
}
property string tooltipText: ""
property real tooltipAnchorX: 0
property real tooltipAnchorY: 0
function showTooltip(x, y, text) {
tooltipAnchorX = x;
tooltipAnchorY = y;
tooltipText = text;
}
function hideTooltip() {
tooltipText = "";
}
Tooltip {
id: tooltipItem
text: barWindow.tooltipText
visible: barWindow.tooltipText.length > 0
x: Math.max(
Theme.geometry.spacing,
Math.min(barWindow.tooltipAnchorX - width / 2, barWindow.width - width - Theme.geometry.spacing)
)
y: barWindow.tooltipAnchorY
}
// Left Pill (Workspaces) - tinted with the primary accent.
Pill {
id: leftPill
anchors.left: parent.left
anchors.top: parent.top
height: barWindow.barContentHeight
tint: Theme.colors.primary
glow: true
// Workspaces
Row {
spacing: Theme.geometry.spacing
Repeater {
model: Hyprland.workspaces.values.filter(ws => ws.monitor && ws.monitor.name === barWindow.screen.name)
delegate: Rectangle {
width: 24
height: 24
radius: Theme.geometry.radiusTiny
color: modelData.active ? Theme.colors.primary : Theme.colors.surfaceHover
Behavior on color { ColorAnimation { duration: Theme.animation.durationFast } }
Text {
anchors.centerIn: parent
text: modelData.id
color: modelData.active ? Theme.colors.textOnAccent : Theme.colors.text
font.family: Theme.font.family
font.pixelSize: Theme.type.caption
font.bold: modelData.active
}
MouseArea {
anchors.fill: parent
cursorShape: Qt.PointingHandCursor
onClicked: modelData.activate()
}
}
}
}
}
// Center Pill (Clock) - tinted with the secondary accent.
Pill {
id: centerPill
anchors.horizontalCenter: parent.horizontalCenter
anchors.top: parent.top
height: barWindow.barContentHeight
tint: Theme.colors.secondary
glow: true
SystemClock {
id: clock
precision: SystemClock.Minutes
}
Text {
id: clockText
text: Qt.formatDateTime(clock.date, "hh:mm")
color: Theme.colors.secondary
font.family: Theme.font.family
font.bold: true
}
}
// Right Pill (System tray: CPU/RAM/temp stats, WiFi, Bluetooth, Battery)
// Tinted with the tertiary accent; each stat/icon also carries its own
// color so the pill reads as a set of distinct signals, not one blob.
Pill {
id: rightPill
anchors.right: parent.right
anchors.top: parent.top
height: barWindow.barContentHeight
tint: Theme.colors.tertiary
StatIndicator {
glyph: "" // nf-fa-microchip
text: sysStats.cpuPercent + "%"
tint: Theme.colors.tertiary
tooltip: "CPU usage: " + sysStats.cpuPercent + "%"
}
Repeater {
model: dieTempsModel
StatIndicator {
required property string label
required property string temp
glyph: "" // nf-fa-thermometer_half
text: temp + "°"
tint: {
let t = Number(temp);
if (t >= 80) return Theme.colors.alert;
if (t >= 65) return Theme.colors.warning;
return Theme.colors.textMuted;
}
tooltip: (dieTempsModel.count > 1 ? label + " " : "CPU ") + "temp: " + temp + "°C"
}
}
StatIndicator {
glyph: "" // nf-fa-server
text: sysStats.ramUsedGB + "G"
tint: Theme.colors.secondary
tooltip: "RAM usage: " + sysStats.ramUsedGB + " GiB (" + sysStats.ramPercent + "%)"
}
TrayIcon {
glyph: "" // nf-fa-wifi
active: wifiPoll.connected
tint: Theme.colors.primary
tooltip: "WiFi: " + wifiPoll.ssid
visible: wifiPoll.connected
}
TrayIcon {
glyph: "" // nf-fa-bluetooth_b
active: true
tint: Theme.colors.secondary
tooltip: "Bluetooth: " + bluetoothPoll.connectedDevices
visible: bluetoothPoll.connectedDevices.length > 0
}
TrayIcon {
glyph: {
let p = battery.percentage;
if (!battery.isPresent) return ""; // nf-fa-plug (desktop/no battery)
if (p >= 0.9) return ""; // nf-fa-battery_full
if (p >= 0.65) return ""; // nf-fa-battery_three_quarters
if (p >= 0.4) return ""; // nf-fa-battery_half
if (p >= 0.15) return ""; // nf-fa-battery_quarter
return ""; // nf-fa-battery_empty
}
active: battery.state === UPowerDeviceState.Charging
tint: {
let p = battery.percentage;
if (p >= 0.5) return Theme.colors.success;
if (p >= 0.2) return Theme.colors.warning;
return Theme.colors.alert;
}
tooltip: battery.isPresent
? "Battery: " + Math.round(battery.percentage * 100) + "%"
+ (battery.state === UPowerDeviceState.Charging ? " (charging)" : "")
: "No battery"
visible: battery.isPresent
}
}
property QtObject battery: UPower.displayDevice
// --- System stats (CPU%, per-die CPU temps, RAM%) read straight from /proc and /sys ---
QtObject {
id: sysStats
property string cpuPercent: "0"
property string ramPercent: "0"
property string ramUsedGB: "0"
// Previous /proc/stat totals, for computing CPU% as a delta between polls.
property real prevTotal: -1
property real prevIdle: -1
}
FileView { id: statFile; path: "/proc/stat" }
FileView { id: memInfoFile; path: "/proc/meminfo" }
Timer {
interval: 1000
running: true
repeat: true
triggeredOnStart: true
onTriggered: {
statFile.reload();
memInfoFile.reload();
// First line: "cpu user nice system idle iowait irq softirq ..."
let fields = statFile.text().split("\n")[0].trim().split(/\s+/).slice(1).map(Number);
let idle = fields[3] + fields[4];
let total = fields.reduce((a, b) => a + b, 0);
if (sysStats.prevTotal >= 0) {
let totalDelta = total - sysStats.prevTotal;
let idleDelta = idle - sysStats.prevIdle;
sysStats.cpuPercent = totalDelta > 0
? Math.round(100 * (totalDelta - idleDelta) / totalDelta).toString()
: "0";
}
sysStats.prevTotal = total;
sysStats.prevIdle = idle;
let mem = {};
for (const line of memInfoFile.text().split("\n")) {
let match = line.match(/^(\w+):\s+(\d+)/);
if (match) mem[match[1]] = Number(match[2]);
}
sysStats.ramPercent = mem.MemTotal > 0
? Math.round(100 * (mem.MemTotal - mem.MemAvailable) / mem.MemTotal).toString()
: "0";
// MemTotal/MemAvailable are in KiB.
sysStats.ramUsedGB = mem.MemTotal > 0
? ((mem.MemTotal - mem.MemAvailable) / 1024 / 1024).toFixed(1)
: "0";
}
}
// One entry per CPU die: { label: "Tccd1", temp: "45" }. On chips with
// a single die (no Tccd sensors, e.g. most Intel coretemp setups) this
// falls back to a single "CPU" entry from Tctl/Package temp. Updated
// in place (set/append/remove) rather than replaced wholesale, so the
// Repeater bound to it doesn't destroy/recreate delegates - and lose
// their hover state - on every poll.
ListModel { id: dieTempsModel }
// Find the CPU sensor chip's hwmon dir and emit one "label millideg" line
// per die (Tccd1, Tccd2, ...), falling back to a single Tctl/Package
// reading on chips with no per-die sensors. Re-run in full every poll
// rather than caching the hwmon path, since hwmonN numbering isn't
// stable across boots and this walk is cheap.
Process {
id: dieTempProcess
command: ["bash", "-c", "h=\"\"; for d in /sys/class/hwmon/hwmon*; do n=$(cat \"$d/name\" 2>/dev/null); if [ \"$n\" = k10temp ] || [ \"$n\" = zenpower ] || [ \"$n\" = coretemp ]; then h=\"$d\"; break; fi; done; [ -z \"$h\" ] && exit 0; found=0; for lbl in \"$h\"/temp*_label; do [ -e \"$lbl\" ] || continue; name=$(cat \"$lbl\"); case \"$name\" in Tccd*) idx=\"${lbl%_label}\"; val=$(cat \"${idx}_input\" 2>/dev/null); if [ -n \"$val\" ]; then echo \"$name $val\"; found=1; fi ;; esac; done; if [ \"$found\" = 0 ]; then val=$(cat \"$h/temp1_input\" 2>/dev/null); [ -n \"$val\" ] && echo \"CPU $val\"; fi"]
running: false
stdout: StdioCollector {
onStreamFinished: {
let temps = [];
for (const line of this.text.trim().split("\n")) {
let parts = line.trim().split(/\s+/);
if (parts.length < 2) continue;
let millideg = Number(parts[1]);
if (millideg > 0) temps.push({ label: parts[0], temp: Math.round(millideg / 1000).toString() });
}
for (let i = 0; i < temps.length; i++) {
if (i < dieTempsModel.count) dieTempsModel.set(i, temps[i]);
else dieTempsModel.append(temps[i]);
}
while (dieTempsModel.count > temps.length) dieTempsModel.remove(dieTempsModel.count - 1);
}
}
}
Timer {
interval: 1000
running: true
repeat: true
triggeredOnStart: true
onTriggered: dieTempProcess.exec(dieTempProcess.command)
}
// --- WiFi status (polled via nmcli; requires NetworkManager) ---
QtObject {
id: wifiPoll
property bool connected: false
property string ssid: ""
}
Timer {
interval: 5000
running: true
repeat: true
triggeredOnStart: true
onTriggered: wifiProcess.restart()
}
Process {
id: wifiProcess
command: ["bash", "-c", "nmcli -t -f ACTIVE,SSID dev wifi 2>/dev/null | awk -F: '$1==\"yes\"{print $2; exit}'"]
running: false
function restart() { running = false; running = true; }
stdout: StdioCollector {
onStreamFinished: {
let ssid = this.text.trim();
wifiPoll.connected = ssid.length > 0;
wifiPoll.ssid = ssid;
}
}
}
// --- Bluetooth status (polled via bluetoothctl) ---
QtObject {
id: bluetoothPoll
property bool available: true
property bool powered: false
property string connectedDevices: ""
}
Timer {
interval: 5000
running: true
repeat: true
triggeredOnStart: true
onTriggered: bluetoothProcess.restart()
}
Process {
id: bluetoothProcess
command: ["bash", "-c", "powered=$(bluetoothctl show 2>/dev/null | awk -F': ' '/Powered/{print $2}'); devices=$(bluetoothctl devices Connected 2>/dev/null | sed -E 's/^Device [0-9A-F:]+ //' | paste -sd, -); echo \"$powered|$devices\""]
running: false
function restart() { running = false; running = true; }
stdout: StdioCollector {
onStreamFinished: {
let parts = this.text.trim().split("|");
if (parts[0] === undefined || parts[0] === "") {
bluetoothPoll.available = false;
return;
}
bluetoothPoll.available = true;
bluetoothPoll.powered = parts[0] === "yes";
bluetoothPoll.connectedDevices = parts[1] || "";
}
}
}
// Inline component for a compact icon+text stat readout (CPU, temp, RAM).
// `tint` colors both the glyph and text, so each stat reads as its own
// signal instead of everything sharing one flat color.
component StatIndicator: Item {
id: statIndicator
property string glyph: ""
property alias text: statText.text
property color tint: Theme.colors.text
property string tooltip: ""
width: statRow.width
height: 24
Row {
id: statRow
anchors.verticalCenter: parent.verticalCenter
spacing: 4
Text {
anchors.verticalCenter: parent.verticalCenter
text: statIndicator.glyph
font.family: Theme.font.family
font.pixelSize: Theme.type.body
color: statIndicator.tint
Behavior on color { ColorAnimation { duration: Theme.animation.durationFast } }
}
Text {
id: statText
anchors.verticalCenter: parent.verticalCenter
color: statIndicator.tint
font.family: Theme.font.family
font.pixelSize: Theme.type.caption
Behavior on color { ColorAnimation { duration: Theme.animation.durationFast } }
}
}
MouseArea {
anchors.fill: parent
hoverEnabled: true
onEntered: {
if (statIndicator.tooltip.length > 0) {
let pos = statIndicator.mapToItem(null, statIndicator.width / 2, statIndicator.height + 12);
barWindow.showTooltip(pos.x, pos.y, statIndicator.tooltip);
}
}
onExited: barWindow.hideTooltip()
}
}
// Inline component for a hoverable tray icon. `tint` is this icon's
// own identity color (wifi vs bluetooth vs battery-by-level, etc.).
component TrayIcon: Item {
id: trayIcon
property string glyph: ""
property string tooltip: ""
property bool active: false
property color tint: Theme.colors.primary
width: 24
height: 24
Rectangle {
anchors.fill: parent
radius: Theme.geometry.radiusTiny
color: hoverArea.containsMouse
? Theme.colors.surfaceHover
: (trayIcon.active ? Qt.alpha(trayIcon.tint, 0.15) : "transparent")
Behavior on color { ColorAnimation { duration: Theme.animation.durationFast } }
Text {
anchors.centerIn: parent
text: trayIcon.glyph
font.family: Theme.font.family
font.pixelSize: Theme.type.body
color: trayIcon.active ? trayIcon.tint : Theme.colors.text
Behavior on color { ColorAnimation { duration: Theme.animation.durationFast } }
}
}
MouseArea {
id: hoverArea
anchors.fill: parent
hoverEnabled: true
onEntered: {
if (trayIcon.tooltip.length > 0) {
// Anchor on the icon's horizontal center; the tooltip
// item centers its bubble under this point itself.
let pos = trayIcon.mapToItem(null, trayIcon.width / 2, trayIcon.height + 12);
barWindow.showTooltip(pos.x, pos.y, trayIcon.tooltip);
}
}
onExited: barWindow.hideTooltip()
}
}
}
@@ -0,0 +1,279 @@
import QtQuick
import Quickshell
import Quickshell.Wayland
import Quickshell.Io
import "../Shared"
PanelWindow {
id: clipboardWindow
property QtObject rootState
readonly property int headerHeight: 50
readonly property int footerHeight: 24
readonly property int emptyStateHeight: 40
visible: rootState.clipboardManagerOpen
anchors {
top: true
bottom: true
left: true
right: true
}
exclusiveZone: 0
color: "transparent"
WlrLayershell.layer: WlrLayer.Overlay
WlrLayershell.namespace: "quickshell-clipboard"
WlrLayershell.keyboardFocus: WlrKeyboardFocus.Exclusive
MouseArea {
id: backdrop
anchors.fill: parent
onClicked: rootState.clipboardManagerOpen = false
}
Surface {
id: container
width: 800
height: Math.min(600,
headerHeight + Theme.geometry.spacing
+ (clipModel.count > 0 ? clipList.contentHeight : emptyStateHeight) + Theme.geometry.spacing
+ footerHeight
+ Theme.geometry.padding * 2)
anchors.centerIn: parent
tint: Theme.colors.secondary
glow: true
Behavior on scale { SpringAnimation { spring: Theme.motion.springSoft.spring; damping: Theme.motion.springSoft.damping } }
Behavior on opacity { NumberAnimation { duration: Theme.animation.durationFast } }
Behavior on height { NumberAnimation { duration: Theme.animation.durationFast; easing.type: Easing.OutCubic } }
opacity: rootState.clipboardManagerOpen ? 1 : 0
MouseArea {
anchors.fill: parent
}
Column {
anchors.fill: parent
anchors.margins: Theme.geometry.padding
spacing: Theme.geometry.spacing
TextField {
id: searchInput
width: parent.width
height: clipboardWindow.headerHeight
placeholder: "Search clipboard..."
onVisibleChanged: {
if (visible) focusInput();
}
onTextChanged: {
loadProcess.restart();
}
onEscapePressed: {
rootState.clipboardManagerOpen = false;
}
onUpPressed: {
if (clipList.currentIndex > 0) {
clipList.currentIndex--;
clipList.positionViewAtIndex(clipList.currentIndex, ListView.Contain);
}
}
onDownPressed: {
if (clipList.currentIndex < clipList.count - 1) {
clipList.currentIndex++;
clipList.positionViewAtIndex(clipList.currentIndex, ListView.Contain);
}
}
onReturnPressed: {
if (clipList.currentIndex >= 0 && clipList.currentIndex < clipModel.count) {
let item = clipModel.get(clipList.currentIndex);
copyToClipboard(item.id);
}
}
onDeleteRequested: {
if (clipList.currentIndex >= 0 && clipList.currentIndex < clipModel.count) {
let item = clipModel.get(clipList.currentIndex);
deleteFromClipboard(item.id, item.rawLine, clipList.currentIndex);
}
}
}
Text {
width: parent.width
height: clipboardWindow.emptyStateHeight
visible: clipModel.count === 0
verticalAlignment: Text.AlignVCenter
horizontalAlignment: Text.AlignHCenter
text: searchInput.text.length > 0 ? "No clipboard entries match “" + searchInput.text + "”" : "Clipboard is empty"
color: Theme.colors.textMuted
font.family: Theme.font.family
font.pixelSize: Theme.type.body
}
ListView {
id: clipList
width: parent.width
height: parent.height - clipboardWindow.headerHeight - clipboardWindow.footerHeight - Theme.geometry.spacing * 2
visible: clipModel.count > 0
clip: true
spacing: Theme.geometry.spacing / 2
model: ListModel { id: clipModel }
delegate: ListRow {
id: clipRow
width: clipList.width
selected: ListView.isCurrentItem
accent: Theme.colors.secondary
onEntered: clipList.currentIndex = index
onClicked: (mouse) => {
clipList.currentIndex = index;
if (mouse.button === Qt.RightButton) {
let pos = mapToItem(backdrop, mouse.x, mouse.y);
let itemId = model.id;
let rawLine = model.rawLine;
let itemIndex = index;
contextMenu.model = [
{ label: "Copy", icon: "", action: function() { copyToClipboard(itemId); } },
{ separator: true },
{ label: "Delete", icon: "", destructive: true, action: function() { deleteFromClipboard(itemId, rawLine, itemIndex); } }
];
contextMenu.openAt(pos.x, pos.y);
} else {
copyToClipboard(model.id);
}
}
Text {
text: model.content
color: Theme.colors.text
font.family: Theme.font.family
font.pixelSize: Theme.type.label
anchors.left: parent.left
anchors.right: deleteButton.left
anchors.rightMargin: Theme.geometry.spacing
anchors.verticalCenter: parent.verticalCenter
verticalAlignment: Text.AlignVCenter
elide: Text.ElideRight
}
Text {
id: deleteButton
text: ""
anchors.right: parent.right
anchors.verticalCenter: parent.verticalCenter
font.family: Theme.font.family
font.pixelSize: Theme.type.body
color: deleteMouse.containsMouse ? Theme.colors.alert : Theme.colors.textMuted
opacity: clipRow.hovered ? 1 : 0
Behavior on opacity { NumberAnimation { duration: Theme.animation.durationFast } }
Behavior on color { ColorAnimation { duration: Theme.animation.durationFast } }
MouseArea {
id: deleteMouse
anchors.fill: parent
anchors.margins: -6
hoverEnabled: true
cursorShape: Qt.PointingHandCursor
onClicked: deleteFromClipboard(model.id, model.rawLine, index)
}
}
}
}
HintBar {
width: parent.width
height: clipboardWindow.footerHeight
hints: [
{ key: "↵", label: "Copy" },
{ key: "Del", label: "Delete" },
{ key: "Esc", label: "Close" }
]
}
}
}
MouseArea {
anchors.fill: parent
visible: contextMenu.visible
z: 999
onClicked: contextMenu.close()
}
ContextMenu {
id: contextMenu
}
Process {
id: loadProcess
command: [
"bash", "-c",
"cliphist list | ( [ -z \"$1\" ] && cat || rg -i \"$1\" ) | head -n 50",
"_", searchInput.text
]
running: false
function restart() { running = false; running = true; }
stdout: StdioCollector {
onStreamFinished: {
let lines = this.text.split('\n').filter(l => l.trim() !== "");
clipModel.clear();
for (let i = 0; i < lines.length; i++) {
let firstTab = lines[i].indexOf('\t');
if (firstTab !== -1) {
let id = lines[i].substring(0, firstTab);
// Clean up newlines for multiline strings natively copied
let content = lines[i].substring(firstTab + 1).replace(/\n/g, ' ').replace(/\\n/g, ' ');
clipModel.append({ "id": id, "content": content, "rawLine": lines[i] });
}
}
clipList.currentIndex = 0;
}
}
}
Process {
id: actionProcess
running: false
function execute(cmdArray) {
command = cmdArray;
running = false;
running = true;
}
}
function copyToClipboard(id) {
actionProcess.execute(["bash", "-c", "cliphist decode '" + id + "' | wl-copy"]);
rootState.clipboardManagerOpen = false;
}
function deleteFromClipboard(id, rawLine, index) {
actionProcess.execute(["bash", "-c", "printf '%s\\n' \"$1\" | cliphist delete", "_", rawLine]);
clipModel.remove(index);
if (clipList.currentIndex >= clipModel.count) {
clipList.currentIndex = Math.max(0, clipModel.count - 1);
}
}
onVisibleChanged: {
if (visible) {
container.scale = 1.0;
searchInput.text = "";
clipModel.clear();
loadProcess.restart();
} else {
container.scale = 0.95;
}
}
}
@@ -1,159 +0,0 @@
import QtQuick
import QtQuick.Layouts
import Quickshell
import Quickshell.Io
import "../core"
FloatingWindow {
id: win
title: "Clipboard Picker"
visible: false
implicitWidth: 760
implicitHeight: 520
color: "transparent"
property var items: []
property string query: ""
property int selectedIndex: 0
property bool mouseWasInside: false
property var filteredItems: items.filter(function(x) { return query.length === 0 || x.toLowerCase().indexOf(query.toLowerCase()) >= 0 })
function shellQuote(s) { return "'" + String(s).replace(/'/g, "'\\''") + "'" }
function focusSearch() { Qt.callLater(function() { search.focus = true; search.forceActiveFocus(); search.cursorPosition = search.text.length }) }
function clampIndex(index) { if (filteredItems.length === 0) return 0; return Math.max(0, Math.min(filteredItems.length - 1, index)) }
function selectIndex(index) { selectedIndex = clampIndex(index) }
function open() { mouseWasInside = false; query = ""; visible = true; refresh(); focusSearch() }
function toggle() { visible = !visible; if (visible) { mouseWasInside = false; query = ""; refresh(); focusSearch() } }
function refresh() { listProcess.running = true }
function choose() {
if (filteredItems.length === 0) return
copyProcess.command = ["bash", "-lc", "printf %s " + shellQuote(filteredItems[selectedIndex]) + " | cliphist decode | wl-copy"]
copyProcess.running = true
visible = false
}
function removeSelected() {
if (filteredItems.length === 0) return
deleteProcess.command = ["bash", "-lc", "printf %s " + shellQuote(filteredItems[selectedIndex]) + " | cliphist delete"]
deleteProcess.running = true
}
onQueryChanged: { selectedIndex = 0; focusSearch() }
onFilteredItemsChanged: selectedIndex = clampIndex(selectedIndex)
onSelectedIndexChanged: if (visible) Qt.callLater(function() { list.positionViewAtIndex(selectedIndex, ListView.Contain) })
IpcHandler {
target: "clipboardPicker"
function open() { win.open() }
function toggle() { win.toggle() }
function refresh() { win.refresh() }
}
FocusScope {
id: root
anchors.fill: parent
focus: win.visible
function handleKey(event) {
if (event.text && event.text.length > 0 && event.text >= " " && !(event.modifiers & (Qt.ControlModifier | Qt.AltModifier | Qt.MetaModifier))) {
if (!search.activeFocus) {
win.query += event.text
win.focusSearch()
event.accepted = true
}
return
}
if (event.key === Qt.Key_Down || event.key === Qt.Key_J) { win.selectIndex(win.selectedIndex + 1); event.accepted = true }
else if (event.key === Qt.Key_Up || event.key === Qt.Key_K) { win.selectIndex(win.selectedIndex - 1); event.accepted = true }
else if (event.key === Qt.Key_Return || event.key === Qt.Key_Enter) { win.choose(); event.accepted = true }
else if (event.key === Qt.Key_Delete || event.key === Qt.Key_Backspace) {
if (event.key === Qt.Key_Backspace && search.activeFocus && search.text.length > 0) return
win.removeSelected(); event.accepted = true
}
else if (event.key === Qt.Key_Escape) { win.visible = false; event.accepted = true }
}
Keys.onPressed: function(event) { root.handleKey(event) }
MouseArea { anchors.fill: parent; hoverEnabled: true; acceptedButtons: Qt.NoButton; onEntered: win.mouseWasInside = true; onExited: if (win.mouseWasInside) win.visible = false }
Rectangle { anchors.fill: parent; radius: 34; color: Qt.rgba(Theme.base.r, Theme.base.g, Theme.base.b, 0.13); border.color: Qt.rgba(Theme.surface1.r, Theme.surface1.g, Theme.surface1.b, 0.38); border.width: 1 }
Rectangle {
anchors.left: parent.left; anchors.right: parent.right; anchors.top: parent.top
anchors.margins: 28; height: 48; radius: 20
color: Qt.rgba(Theme.crust.r, Theme.crust.g, Theme.crust.b, 0.50)
border.color: Qt.rgba(Theme.surface1.r, Theme.surface1.g, Theme.surface1.b, 0.45)
Text { anchors.left: parent.left; anchors.verticalCenter: parent.verticalCenter; anchors.leftMargin: 16; text: "󰅌"; font.family: Theme.fontFamily; font.pixelSize: Theme.fontPixelSize + 3; color: Theme.mauve }
TextInput {
id: search
focus: true
activeFocusOnTab: true
anchors.left: parent.left; anchors.right: parent.right; anchors.verticalCenter: parent.verticalCenter
anchors.leftMargin: 48; anchors.rightMargin: 16
text: win.query
onTextChanged: win.query = text
clip: true
font.family: Theme.fontFamily; font.pixelSize: Theme.fontPixelSize + 1
color: Theme.text
selectionColor: Theme.mauve
selectedTextColor: Theme.base
Text { visible: search.text.length === 0; text: "Search clipboard…"; font: search.font; color: Theme.overlay1 }
Keys.onPressed: function(event) { root.handleKey(event) }
}
}
Timer {
interval: 60
repeat: true
running: win.visible && !search.activeFocus
onTriggered: win.focusSearch()
}
ListView {
id: list
anchors.left: parent.left; anchors.right: parent.right; anchors.top: parent.top; anchors.bottom: footer.top
anchors.leftMargin: 28; anchors.rightMargin: 28; anchors.topMargin: 90; anchors.bottomMargin: 14
model: win.filteredItems
spacing: 10
clip: true
currentIndex: win.selectedIndex
delegate: Rectangle {
id: card
width: list.width
height: 62
radius: 18
color: index === win.selectedIndex ? Qt.rgba(Theme.mauve.r, Theme.mauve.g, Theme.mauve.b, 0.22) : Qt.rgba(Theme.crust.r, Theme.crust.g, Theme.crust.b, 0.45)
border.color: index === win.selectedIndex ? Theme.mauve : Qt.rgba(Theme.surface1.r, Theme.surface1.g, Theme.surface1.b, 0.45)
border.width: index === win.selectedIndex ? 2 : 1
antialiasing: true
Text {
anchors.fill: parent; anchors.margins: 14
text: String(modelData).replace(/^\S+\s+/, "")
elide: Text.ElideRight
verticalAlignment: Text.AlignVCenter
font.family: Theme.fontFamily; font.pixelSize: Theme.fontPixelSize
color: Theme.text
}
MouseArea { anchors.fill: parent; onClicked: { if (index === win.selectedIndex) win.choose(); else win.selectIndex(index); search.forceActiveFocus() } }
}
}
Rectangle {
id: footer
anchors.left: parent.left; anchors.right: parent.right; anchors.bottom: parent.bottom
anchors.leftMargin: 42; anchors.rightMargin: 42; anchors.bottomMargin: 22
height: 44; radius: 18
color: Qt.rgba(Theme.crust.r, Theme.crust.g, Theme.crust.b, 0.42)
border.color: Qt.rgba(Theme.surface1.r, Theme.surface1.g, Theme.surface1.b, 0.45)
Text { anchors.centerIn: parent; text: win.filteredItems.length + " items · type search · ↑/↓ select · Enter copy · Backspace remove · Esc"; font.family: Theme.fontFamily; font.pixelSize: Theme.fontPixelSize - 2; color: Theme.overlay2 }
}
}
Process {
id: listProcess
command: ["bash", "-lc", "cliphist list 2>/dev/null || true"]
running: false
stdout: StdioCollector { onStreamFinished: { win.items = text.trim().length ? text.trim().split('\n') : []; win.selectedIndex = 0 } }
}
Process { id: copyProcess; running: false }
Process { id: deleteProcess; running: false; onExited: win.refresh() }
}
@@ -1,142 +0,0 @@
import QtQuick
import QtQuick.Layouts
import Quickshell
import Quickshell.Io
import Quickshell.Services.Mpris
import "../core"
ModuleContainer {
id: root
// Initial state
text: "00:00"
Timer {
interval: 1000
running: true
repeat: true
triggeredOnStart: true
onTriggered: {
var d = new Date();
var h = d.getHours().toString().padStart(2, '0');
var m = d.getMinutes().toString().padStart(2, '0');
root.text = h + ":" + m;
}
}
property MprisPlayer mprisPlayer: Mpris.players.values[0] || null
// Embed the MPRIS Popup natively into the pill's slot
popupItem: PopupWindow {
id: mprisPopup
implicitWidth: 320
implicitHeight: 90
anchor.item: root
anchor.edges: Edges.Bottom
anchor.gravity: Edges.Bottom
Rectangle {
anchors.fill: parent
color: Theme.bg
radius: Theme.radius
border.color: Theme.bgAlt
border.width: 1
RowLayout {
anchors.fill: parent
anchors.margins: Theme.padding
spacing: Theme.padding
TapHandler {
acceptedButtons: Qt.RightButton
onTapped: if (root.mprisPlayer) root.mprisPlayer.next()
}
TapHandler {
acceptedButtons: Qt.LeftButton
onTapped: if (root.mprisPlayer) root.mprisPlayer.previous()
}
Rectangle {
Layout.preferredWidth: 64
Layout.preferredHeight: 64
radius: Theme.radius
color: Theme.bgAlt
clip: true
Image {
anchors.fill: parent
source: root.mprisPlayer && root.mprisPlayer.trackArtUrl ? root.mprisPlayer.trackArtUrl : ""
fillMode: Image.PreserveAspectCrop
visible: root.mprisPlayer && root.mprisPlayer.trackArtUrl !== ""
}
// Fallback icon when no art
Text {
anchors.centerIn: parent
text: "♪"
font.pixelSize: 24
visible: !root.mprisPlayer || !root.mprisPlayer.trackArtUrl || root.mprisPlayer.trackArtUrl === ""
}
}
ColumnLayout {
Layout.fillWidth: true
Layout.fillHeight: true
spacing: 4
Text {
Layout.fillWidth: true
text: root.mprisPlayer && root.mprisPlayer.playbackState === MprisPlaybackState.Playing
? "Now Playing"
: (root.mprisPlayer ? "Paused" : "Nothing playing")
color: Theme.fgAlt
font: Theme.font
elide: Text.ElideRight
}
Text {
id: mprisText
Layout.fillWidth: true
text: root.mprisPlayer && root.mprisPlayer.trackTitle !== ""
? root.mprisPlayer.trackTitle
: "No Track"
color: Theme.fg
font: Theme.fontBold
elide: Text.ElideRight
}
Text {
Layout.fillWidth: true
text: root.mprisPlayer && root.mprisPlayer.trackArtist !== ""
? root.mprisPlayer.trackArtist
: "Unknown Artist"
color: Theme.fgAlt
font: Theme.font
elide: Text.ElideRight
}
Item { Layout.fillHeight: true } // spacer
Rectangle {
Layout.fillWidth: true
Layout.preferredHeight: 4
radius: 2
color: Theme.bgAlt
visible: root.mprisPlayer && root.mprisPlayer.length > 0
Rectangle {
height: parent.height
radius: 2
color: Theme.primary
width: root.mprisPlayer && root.mprisPlayer.length > 0
? parent.width * (root.mprisPlayer.position / root.mprisPlayer.length)
: 0
}
}
}
}
}
}
}
@@ -0,0 +1,351 @@
import QtQuick
import Quickshell
import Quickshell.Wayland
import Quickshell.Services.Pipewire
import Quickshell.Io
import "../Shared"
PanelWindow {
id: paletteWindow
property QtObject rootState
property bool enterQueued: false
property var usageCounts: ({})
property string lastUsedApp: ""
property var allApps: []
property bool appsLoaded: false
function scoreOf(desktopName) {
let count = paletteWindow.usageCounts[desktopName] || 0;
let isLast = (desktopName === paletteWindow.lastUsedApp);
return count * 10 + (isLast ? 10000 : 0);
}
function applyFilter() {
let query = searchInput.text.trim().toLowerCase();
let results = query.length === 0
? paletteWindow.allApps.slice()
: paletteWindow.allApps.filter(a => a.appName.toLowerCase().includes(query));
results.sort((a, b) => {
if (b.score !== a.score) return b.score - a.score;
return a.appName.localeCompare(b.appName);
});
results = results.slice(0, 50);
appModel.clear();
for (let i = 0; i < results.length; i++) {
appModel.append(results[i]);
}
appList.currentIndex = appModel.count > 0 ? 0 : -1;
if (paletteWindow.enterQueued && appModel.count > 0) {
paletteWindow.enterQueued = false;
paletteWindow.launchApp(0);
}
}
readonly property int headerHeight: 50
readonly property int footerHeight: 24
readonly property int emptyStateHeight: 40
function launchApp(index) {
if (index < 0 || index >= appModel.count) return;
let item = appModel.get(index);
let desktopName = item.desktopName;
let appPath = item.appPath;
logHistoryProcess.command = ["bash", "-c", "echo '" + desktopName + "' >> ~/.cache/quickshell-app-history.txt"];
logHistoryProcess.restart();
launchProcess.command = [
"bash", "-c",
"EXEC=$(awk -F= '/^Exec=/ {print $2; exit}' \"$1\" | sed 's/ %[a-zA-Z]//g'); if command -v uwsm &>/dev/null; then eval \"uwsm app -- $EXEC\"; elif command -v niri &>/dev/null; then eval \"niri msg action spawn -- $EXEC\"; else nohup eval \"$EXEC\" </dev/null >/dev/null 2>&1 & fi",
"_", appPath
];
launchProcess.restart();
rootState.commandPaletteOpen = false;
}
visible: rootState.commandPaletteOpen
anchors {
top: true
bottom: true
left: true
right: true
}
exclusiveZone: 0
color: "transparent"
WlrLayershell.layer: WlrLayer.Overlay
WlrLayershell.namespace: "quickshell-palette"
WlrLayershell.keyboardFocus: WlrKeyboardFocus.Exclusive
MouseArea {
anchors.fill: parent
onClicked: rootState.commandPaletteOpen = false
}
Surface {
id: container
// Sized appropriately for a 2560x1440 screen
width: 800
height: Math.min(600,
headerHeight + Theme.geometry.spacing
+ (appModel.count > 0 ? appList.contentHeight : emptyStateHeight) + Theme.geometry.spacing
+ footerHeight
+ Theme.geometry.padding * 2)
anchors.centerIn: parent
tint: Theme.colors.primary
glow: true
Behavior on scale { SpringAnimation { spring: Theme.motion.springSoft.spring; damping: Theme.motion.springSoft.damping } }
Behavior on opacity { NumberAnimation { duration: Theme.animation.durationFast } }
Behavior on height { NumberAnimation { duration: Theme.animation.durationFast; easing.type: Easing.OutCubic } }
opacity: rootState.commandPaletteOpen ? 1 : 0
MouseArea {
anchors.fill: parent
}
// --- App Launcher ---
Column {
anchors.fill: parent
anchors.margins: Theme.geometry.padding
spacing: Theme.geometry.spacing
TextField {
id: searchInput
width: parent.width
height: paletteWindow.headerHeight
placeholder: "Search apps..."
onVisibleChanged: {
if (visible) focusInput();
}
onTextChanged: {
if (paletteWindow.appsLoaded) {
paletteWindow.applyFilter();
}
}
onEscapePressed: {
rootState.commandPaletteOpen = false;
}
onUpPressed: {
if (appList.currentIndex > 0) {
appList.currentIndex--;
appList.positionViewAtIndex(appList.currentIndex, ListView.Contain);
}
}
onDownPressed: {
if (appList.currentIndex < appList.count - 1) {
appList.currentIndex++;
appList.positionViewAtIndex(appList.currentIndex, ListView.Contain);
}
}
onReturnPressed: {
if (appList.count > 0 && appList.currentIndex >= 0 && appList.currentIndex < appModel.count) {
paletteWindow.launchApp(appList.currentIndex);
} else {
paletteWindow.enterQueued = true;
}
}
}
Process {
id: historyProcess
command: ["bash", "-c", "cat ~/.cache/quickshell-app-history.txt 2>/dev/null || true"]
running: false
function restart() {
running = false;
running = true;
}
stdout: StdioCollector {
onStreamFinished: {
let lines = this.text.split('\n').filter(l => l.trim() !== "");
let counts = {};
let lastUsed = "";
for (let i = 0; i < lines.length; i++) {
let app = lines[i];
counts[app] = (counts[app] || 0) + 1;
lastUsed = app;
}
paletteWindow.usageCounts = counts;
paletteWindow.lastUsedApp = lastUsed;
// Now that history is loaded, list every desktop entry once.
// Filtering as the user types happens entirely in JS below
// (applyFilter), so the expensive disk/symlink walk here
// only ever runs a single time per palette open.
listProcess.restart();
}
}
}
Process {
id: listProcess
command: [
"bash",
"-c",
"fd -L -t f -e desktop -0 . /usr/share/applications ~/.local/share/applications /var/lib/flatpak/exports/share/applications /run/current-system/sw/share/applications ~/.nix-profile/share/applications 2>/dev/null | xargs -0 -r awk -F= 'BEGIN { OFS=\"|\" } FNR==1 { if(file!=\"\" && name!=\"\") print icon, name, file; name=\"\"; icon=\"\"; file=FILENAME } /^Name=/ && name==\"\" { name=substr($0, 6) } /^Icon=/ && icon==\"\" { icon=substr($0, 6) } END { if(file!=\"\" && name!=\"\") print icon, name, file }'"
]
running: false
function restart() {
running = false;
running = true;
}
stdout: StdioCollector {
onStreamFinished: {
let lines = this.text.split('\n').filter(l => l.trim() !== "");
let apps = [];
for (let i = 0; i < lines.length; i++) {
let parts = lines[i].split('|');
if (parts.length >= 3) {
let desktopName = parts[2].split('/').pop();
let isLast = (desktopName === paletteWindow.lastUsedApp);
apps.push({
"iconName": parts[0],
"appName": parts[1],
"appPath": parts[2],
"desktopName": desktopName,
"isLastUsed": isLast,
"score": paletteWindow.scoreOf(desktopName)
});
}
}
paletteWindow.allApps = apps;
paletteWindow.appsLoaded = true;
paletteWindow.applyFilter();
}
}
}
Text {
width: parent.width
height: paletteWindow.emptyStateHeight
visible: appModel.count === 0
verticalAlignment: Text.AlignVCenter
horizontalAlignment: Text.AlignHCenter
text: searchInput.text.length > 0 ? "No apps found for “" + searchInput.text + "”" : "No apps found"
color: Theme.colors.textMuted
font.family: Theme.font.family
font.pixelSize: Theme.type.body
}
ListView {
id: appList
width: parent.width
height: parent.height - paletteWindow.headerHeight - paletteWindow.footerHeight - Theme.geometry.spacing * 2
visible: appModel.count > 0
clip: true
spacing: Theme.geometry.spacing / 2
model: ListModel { id: appModel }
delegate: ListRow {
width: appList.width
selected: ListView.isCurrentItem
accent: model.isLastUsed ? Theme.colors.secondary : Theme.colors.primary
onEntered: appList.currentIndex = index
onClicked: {
appList.currentIndex = index;
paletteWindow.launchApp(index);
}
Image {
id: appIcon
width: 24
height: 24
source: model.iconName ? Quickshell.iconPath(model.iconName) : ""
anchors.left: parent.left
anchors.verticalCenter: parent.verticalCenter
fillMode: Image.PreserveAspectFit
Rectangle {
anchors.fill: parent
color: Theme.colors.primary
radius: 12
visible: parent.status === Image.Error || parent.status === Image.Null || model.iconName === ""
Text {
anchors.centerIn: parent
text: model.appName.charAt(0).toUpperCase()
color: Theme.colors.textOnAccent
font.bold: true
font.pixelSize: 12
}
}
}
Text {
text: model.appName
color: Theme.colors.text
font.family: Theme.font.family
font.pixelSize: Theme.type.label
anchors.left: appIcon.right
anchors.leftMargin: Theme.geometry.spacing
anchors.right: parent.right
anchors.verticalCenter: parent.verticalCenter
elide: Text.ElideRight
}
}
}
HintBar {
width: parent.width
height: paletteWindow.footerHeight
hints: [
{ key: "↑↓", label: "Navigate" },
{ key: "↵", label: "Launch" },
{ key: "Esc", label: "Close" }
]
}
}
Process {
id: launchProcess
running: false
function restart() {
running = false;
running = true;
}
}
Process {
id: logHistoryProcess
running: false
function restart() {
running = false;
running = true;
}
}
}
onVisibleChanged: {
if (visible) {
container.scale = 1.0;
searchInput.text = "";
paletteWindow.enterQueued = false;
paletteWindow.appsLoaded = false;
appModel.clear(); // Clear so it re-populates clean
// Read history first, then list every desktop entry once
historyProcess.restart();
} else {
container.scale = 0.95;
}
}
}
@@ -0,0 +1,218 @@
import QtQuick
import Quickshell
import Quickshell.Wayland
import Quickshell.Services.Pam
import Quickshell.Services.UPower
import "../Shared"
// The one surface in this shell that owns a real wlr-session-lock-v1 object
// instead of being a PanelWindow toggled by IpcHandler: `locked` is the
// actual lock state (the compositor keeps the session locked even if this
// process dies), and unlocking only ever happens via a successful PamContext
// result - there is no external "unlock" IPC call by design.
//
// PamContext lives INSIDE the `surface` content tree (see below), not as a
// direct child of this WlSessionLock. A PamContext declared directly under
// WlSessionLock never worked reliably in testing: not just sibling-id
// references from outside it, but even PamContext's OWN Component.onCompleted
// never fired. WlSessionLock is a `Reloadable` or Quickshell C++ type with
// unusual object-graph handling for reload support; a plain QObject child
// declared directly under it doesn't get normal QML construction/binding
// behavior. The surface's content tree, in contrast, is a perfectly ordinary
// Item tree (proven extensively: every `sessionLock.xxx` reference from
// deep inside it - the password field, hint bar, shake animation - has
// always worked reliably), so PamContext lives there instead, created fresh
// each time the surface itself is created (i.e. each time the screen locks).
WlSessionLock {
id: sessionLock
property string password: ""
property string errorText: ""
property bool awaitingResponse: false
property bool responseVisible: false
function lock() {
reset();
locked = true;
}
function reset() {
sessionLock.password = "";
sessionLock.errorText = "";
sessionLock.awaitingResponse = false;
}
surface: Component {
WlSessionLockSurface {
id: lockSurface
color: Theme.colors.background
property QtObject battery: UPower.displayDevice
PamContext {
id: authCtx
config: "hyprlock" // reuse the PAM service that already exists for hyprlock
Component.onCompleted: authCtx.start()
// NOTE: PamContext's "onMessage" that shows up in tooling is
// a private C++ slot wired internally to the pam
// conversation object - declaring `function onMessage(...)`
// here does NOT override it and is silently never called.
// The real public signal is `pamMessage()` (no args); read
// the message/response properties off this object after it
// fires.
onPamMessage: {
sessionLock.errorText = authCtx.messageIsError ? authCtx.message : "";
sessionLock.awaitingResponse = authCtx.responseRequired;
sessionLock.responseVisible = authCtx.responseVisible;
}
onCompleted: (result) => {
if (result === PamResult.Success) {
sessionLock.locked = false;
} else {
sessionLock.errorText = "Incorrect password";
sessionLock.password = "";
sessionLock.awaitingResponse = false;
authCtx.start();
}
}
onError: (error) => {
sessionLock.errorText = "Authentication error";
sessionLock.password = "";
sessionLock.awaitingResponse = false;
authCtx.start();
}
}
SystemClock {
id: clock
precision: SystemClock.Seconds
}
Column {
anchors.centerIn: parent
spacing: Theme.geometry.spacing * 3
Column {
anchors.horizontalCenter: parent.horizontalCenter
spacing: Theme.geometry.spacing
Text {
anchors.horizontalCenter: parent.horizontalCenter
text: Qt.formatDateTime(clock.date, "hh:mm")
color: Theme.colors.text
font.family: Theme.font.family
font.bold: true
font.pixelSize: 96
}
Text {
anchors.horizontalCenter: parent.horizontalCenter
text: Qt.formatDateTime(clock.date, "dddd, d MMMM")
color: Theme.colors.textMuted
font.family: Theme.font.family
font.pixelSize: Theme.type.title
}
}
Row {
anchors.horizontalCenter: parent.horizontalCenter
spacing: Theme.geometry.spacing / 2
visible: lockSurface.battery.isPresent
Text {
text: {
let p = lockSurface.battery.percentage;
if (p >= 0.9) return ""; // nf-fa-battery_full
if (p >= 0.65) return ""; // nf-fa-battery_three_quarters
if (p >= 0.4) return ""; // nf-fa-battery_half
if (p >= 0.15) return ""; // nf-fa-battery_quarter
return ""; // nf-fa-battery_empty
}
font.family: Theme.font.family
font.pixelSize: Theme.type.body
color: {
let p = lockSurface.battery.percentage;
if (p >= 0.5) return Theme.colors.success;
if (p >= 0.2) return Theme.colors.warning;
return Theme.colors.alert;
}
}
Text {
text: Math.round(lockSurface.battery.percentage * 100) + "%"
font.family: Theme.font.family
font.pixelSize: Theme.type.body
color: Theme.colors.textMuted
}
}
Column {
anchors.horizontalCenter: parent.horizontalCenter
spacing: Theme.geometry.spacing
Item {
id: passwordShake
width: 320
height: passwordField.height
anchors.horizontalCenter: parent.horizontalCenter
SequentialAnimation {
id: shakeAnim
NumberAnimation { target: passwordShake; property: "x"; to: -8; duration: 40 }
NumberAnimation { target: passwordShake; property: "x"; to: 8; duration: 40 }
NumberAnimation { target: passwordShake; property: "x"; to: -6; duration: 40 }
NumberAnimation { target: passwordShake; property: "x"; to: 0; duration: 40 }
}
Connections {
target: sessionLock
function onErrorTextChanged() {
if (sessionLock.errorText.length > 0) shakeAnim.start();
}
function onPasswordChanged() {
if (sessionLock.password.length === 0) passwordField.text = "";
}
}
TextField {
id: passwordField
width: parent.width
placeholder: "Password"
echoMode: sessionLock.responseVisible ? TextInput.Normal : TextInput.Password
onVisibleChanged: { if (visible) focusInput(); }
onTextChanged: sessionLock.password = text
onReturnPressed: {
if (!sessionLock.awaitingResponse) return;
authCtx.respond(sessionLock.password);
sessionLock.awaitingResponse = false;
}
}
}
Text {
anchors.horizontalCenter: parent.horizontalCenter
text: sessionLock.errorText
visible: sessionLock.errorText.length > 0
color: Theme.colors.alert
font.family: Theme.font.family
font.pixelSize: Theme.type.caption
}
HintBar {
anchors.horizontalCenter: parent.horizontalCenter
hints: [ { key: "↵", label: "Unlock" } ]
}
}
}
onVisibleChanged: {
if (visible) passwordField.focusInput();
}
}
}
}
@@ -0,0 +1,213 @@
import QtQuick
import Quickshell
import Quickshell.Wayland
import Quickshell.Io
import "../Shared"
PanelWindow {
id: logoutWindow
property QtObject rootState
property int currentIndex: 2 // Default to Logout in the middle
property var actions: [
{ cmd: "loginctl lock-session" },
{ cmd: "systemctl suspend" },
{ cmd: "loginctl terminate-user $USER" },
{ cmd: "systemctl reboot" },
{ cmd: "systemctl poweroff" }
]
visible: rootState.logoutMenuOpen
anchors {
top: true
bottom: true
left: true
right: true
}
exclusiveZone: 0
color: "transparent"
WlrLayershell.layer: WlrLayer.Overlay
WlrLayershell.namespace: "quickshell-logout"
WlrLayershell.keyboardFocus: WlrKeyboardFocus.Exclusive
MouseArea {
anchors.fill: parent
onClicked: rootState.logoutMenuOpen = false
}
Rectangle {
anchors.fill: parent
color: Theme.colors.overlay // Full screen dim/blur
Behavior on opacity { NumberAnimation { duration: Theme.animation.durationNormal } }
opacity: rootState.logoutMenuOpen ? 1 : 0
MouseArea {
anchors.fill: parent
onClicked: rootState.logoutMenuOpen = false
}
Item {
id: container
width: buttonRow.width
height: buttonRow.height
anchors.centerIn: parent
Behavior on scale { SpringAnimation { spring: Theme.motion.springSoft.spring; damping: Theme.motion.springSoft.damping } }
Row {
id: buttonRow
spacing: Theme.geometry.spacing * 3
// Lock
LogoutButton {
icon: ""
label: "Lock"
isSelected: logoutWindow.currentIndex === 0
onClicked: executeAction(logoutWindow.actions[0].cmd)
onHovered: logoutWindow.currentIndex = 0
}
// Suspend
LogoutButton {
icon: ""
label: "Suspend"
isSelected: logoutWindow.currentIndex === 1
onClicked: executeAction(logoutWindow.actions[1].cmd)
onHovered: logoutWindow.currentIndex = 1
}
// Logout
LogoutButton {
icon: ""
label: "Logout"
isSelected: logoutWindow.currentIndex === 2
onClicked: executeAction(logoutWindow.actions[2].cmd)
onHovered: logoutWindow.currentIndex = 2
}
// Reboot
LogoutButton {
icon: ""
label: "Reboot"
isSelected: logoutWindow.currentIndex === 3
onClicked: executeAction(logoutWindow.actions[3].cmd)
onHovered: logoutWindow.currentIndex = 3
}
// Poweroff
LogoutButton {
icon: ""
label: "Shutdown"
isDestructive: true
isSelected: logoutWindow.currentIndex === 4
onClicked: executeAction(logoutWindow.actions[4].cmd)
onHovered: logoutWindow.currentIndex = 4
}
}
}
}
// Key handling
Item {
anchors.fill: parent
focus: true
Keys.onEscapePressed: (event) => {
rootState.logoutMenuOpen = false;
event.accepted = true;
}
Keys.onLeftPressed: (event) => {
if (logoutWindow.currentIndex > 0) {
logoutWindow.currentIndex--;
}
event.accepted = true;
}
Keys.onRightPressed: (event) => {
if (logoutWindow.currentIndex < 4) {
logoutWindow.currentIndex++;
}
event.accepted = true;
}
Keys.onReturnPressed: (event) => {
executeAction(logoutWindow.actions[logoutWindow.currentIndex].cmd);
event.accepted = true;
}
}
Process {
id: actionProcess
running: false
}
function executeAction(cmd) {
actionProcess.command = ["bash", "-c", cmd];
actionProcess.running = true;
rootState.logoutMenuOpen = false;
}
onVisibleChanged: {
if (visible) {
container.scale = 1.0;
logoutWindow.currentIndex = 2; // Reset to center
} else {
container.scale = 0.95;
}
}
// Inline component for the big buttons
component LogoutButton: Surface {
property string icon: ""
property string label: ""
property bool isDestructive: false
property bool isSelected: false
signal clicked()
signal hovered()
width: 120
height: 120
color: Theme.colors.surface
tint: isSelected ? (isDestructive ? Theme.colors.alert : Theme.colors.primary) : Theme.colors.border
border.width: isSelected ? 2 : 1
glow: isSelected
Behavior on scale { SpringAnimation { spring: Theme.motion.springSnappy.spring; damping: Theme.motion.springSnappy.damping } }
scale: isSelected ? 1.05 : 1.0
Column {
anchors.centerIn: parent
spacing: Theme.geometry.spacing
Text {
text: parent.parent.icon
font.family: Theme.font.family
font.pixelSize: 36
anchors.horizontalCenter: parent.horizontalCenter
color: parent.parent.isSelected ? parent.parent.tint : Theme.colors.text
}
Text {
text: parent.parent.label
font.family: Theme.font.family
font.pixelSize: 16
font.bold: true
color: Theme.colors.text
anchors.horizontalCenter: parent.horizontalCenter
}
}
MouseArea {
id: hoverArea
anchors.fill: parent
hoverEnabled: true
cursorShape: Qt.PointingHandCursor
onEntered: parent.hovered()
onClicked: parent.clicked()
}
}
}
@@ -1,107 +0,0 @@
import QtQuick
import QtQuick.Layouts
import QtQuick.Effects
import Quickshell
import "../core"
Item {
id: root
property bool active: true
property bool clickable: false
// Inner content configuration
property string icon: ""
property string text: ""
property Component customContent: null
// Popup configuration
property var popupItem: null
// Styling
property color pillColor: Theme.bgAlt
// Standard pill dimensions
implicitHeight: 28
// Monitor tracking for exclusive visibility
property var monitor: null
property bool exclusiveToScreen: false
property bool isFocusedMonitor: monitor ? monitor.focused : true
property bool effectivelyActive: active && (!exclusiveToScreen || isFocusedMonitor)
// Fluid auto-hide transitions
visible: opacity > 0
opacity: effectivelyActive ? 1 : 0
implicitWidth: effectivelyActive ? contentRow.implicitWidth + (Theme.padding * 2) : 0
clip: false // Turn off clip so shadow isn't cut off
Behavior on opacity {
NumberAnimation { duration: 250; easing.type: Easing.InOutQuad }
}
Behavior on implicitWidth {
NumberAnimation { duration: 250; easing.type: Easing.OutBack }
}
// Shadow Effect
MultiEffect {
anchors.fill: bgRect
source: bgRect
shadowEnabled: true
shadowColor: "#000000"
shadowOpacity: 0.4
shadowBlur: 0.8
shadowVerticalOffset: 2
shadowHorizontalOffset: 0
}
Rectangle {
id: bgRect
anchors.fill: parent
radius: Theme.radius / 2
color: (clickable || popupItem !== null) && mouseArea.containsMouse ? Qt.darker(root.pillColor, 1.2) : root.pillColor
RowLayout {
id: contentRow
anchors.centerIn: parent
spacing: 6
Loader {
active: root.customContent !== null
sourceComponent: root.customContent
Layout.alignment: Qt.AlignVCenter
}
Text {
visible: root.icon !== "" && root.customContent === null
text: root.icon
color: Theme.fg
font: Theme.font
Layout.alignment: Qt.AlignVCenter
}
Text {
visible: root.text !== "" && root.customContent === null
text: root.text
color: Theme.fg
font: Theme.fontBold
Layout.alignment: Qt.AlignVCenter
}
}
}
MouseArea {
id: mouseArea
anchors.fill: parent
hoverEnabled: root.clickable || root.popupItem !== null
cursorShape: (root.clickable || root.popupItem !== null) ? Qt.PointingHandCursor : Qt.ArrowCursor
onClicked: {
if (root.popupItem !== null) {
root.popupItem.visible = !root.popupItem.visible;
}
root.clicked();
}
}
signal clicked()
}
@@ -1,127 +0,0 @@
import Quickshell
import Quickshell.Services.Notifications
import QtQuick
import QtQuick.Layouts
import "../core"
PanelWindow {
id: notifWindow
// Anchor to top right, just below the bar
anchors {
top: true
right: true
}
// Offset slightly from the screen edges
margins {
top: 40 // height of top bar (32) + 8 padding
right: 8
}
// Dynamic height based on notifications
implicitWidth: 320
implicitHeight: notifList.contentHeight
color: "transparent"
// Make invisible if no notifications
visible: notificationServer.trackedNotifications.values.length > 0
NotificationServer {
id: notificationServer
bodySupported: true
actionsSupported: false
inlineReplySupported: false
imageSupported: true
actionIconsSupported: false
persistenceSupported: false
onNotification: function(notification) {
notification.tracked = true;
}
}
ListView {
id: notifList
anchors.fill: parent
spacing: 8
model: notificationServer.trackedNotifications.values
clip: false // Allow shadows or animations outside
delegate: Rectangle {
id: delegateRect
width: notifWindow.width
height: layout.height + Theme.padding * 2
color: Theme.bg
radius: Theme.radius
border.color: Theme.bgAlt
border.width: 1
property var notif: modelData
ColumnLayout {
id: layout
anchors.top: parent.top
anchors.left: parent.left
anchors.right: parent.right
anchors.margins: Theme.padding
spacing: 4
RowLayout {
Layout.fillWidth: true
Text {
text: notif.appName || "Notification"
color: Theme.primary
font: Theme.fontBold
Layout.fillWidth: true
}
Text {
text: "✕"
color: Theme.fgAlt
font: Theme.fontBold
MouseArea {
anchors.fill: parent
cursorShape: Qt.PointingHandCursor
onClicked: notif.dismiss()
}
}
}
Text {
text: notif.summary || ""
color: Theme.fg
font: Theme.fontBold
Layout.fillWidth: true
wrapMode: Text.Wrap
}
Text {
text: notif.body || ""
color: Theme.fgAlt
font: Theme.font
Layout.fillWidth: true
wrapMode: Text.Wrap
maximumLineCount: 4
elide: Text.ElideRight
visible: text.length > 0
}
}
Timer {
id: expireTimer
interval: notif.expireTimeout > 0 ? (notif.expireTimeout) : 5000
running: true
onTriggered: notif.expire()
}
MouseArea {
anchors.fill: parent
// Don't swallow clicks for the close button
z: -1
onClicked: notif.dismiss()
}
}
}
}
@@ -0,0 +1,181 @@
import QtQuick
import Quickshell
import Quickshell.Wayland
import Quickshell.Services.Notifications
import "../Shared"
PanelWindow {
id: notifWindow
anchors {
top: true
right: true
}
margins {
top: Theme.geometry.padding
right: Theme.geometry.padding
}
exclusiveZone: 0
color: "transparent"
implicitWidth: 320
implicitHeight: list.height
WlrLayershell.layer: WlrLayer.Overlay
WlrLayershell.namespace: "quickshell-notifications"
NotificationServer {
id: server
keepOnReload: true
bodySupported: true
bodyMarkupSupported: true
actionsSupported: true
imageSupported: true
onNotification: notification => {
notification.tracked = true;
toastModel.insert(0, {
notifObj: notification,
appName: notification.appName,
summary: notification.summary,
body: notification.body,
urgency: notification.urgency
});
function removeFromModel() {
for (let i = 0; i < toastModel.count; i++) {
if (toastModel.get(i).notifObj === notification) {
toastModel.remove(i);
break;
}
}
}
notification.closed.connect(removeFromModel);
let timeout = notification.expireTimeout > 0 ? notification.expireTimeout : 5000;
dismissTimer.createObject(notifWindow, { targetNotification: notification, interval: timeout });
}
}
Component {
id: dismissTimer
Timer {
property var targetNotification
running: true
repeat: false
onTriggered: {
for (let i = 0; i < toastModel.count; i++) {
if (toastModel.get(i).notifObj === targetNotification) {
toastModel.remove(i);
break;
}
}
destroy();
}
}
}
ListModel {
id: toastModel
}
function colorFor(urgency) {
if (urgency === NotificationUrgency.Critical) return Theme.colors.alert;
if (urgency === NotificationUrgency.Low) return Theme.colors.success;
return Theme.colors.info;
}
function labelFor(urgency) {
if (urgency === NotificationUrgency.Critical) return "Warning";
if (urgency === NotificationUrgency.Low) return "Notice";
return "Info";
}
Column {
id: list
width: parent.width
spacing: Theme.geometry.spacing
Repeater {
model: toastModel
delegate: Rectangle {
id: toast
width: list.width
height: content.implicitHeight + Theme.geometry.padding * 2
radius: Theme.geometry.radiusMedium
color: Qt.alpha(notifWindow.colorFor(model.urgency), 0.15)
border.color: Qt.alpha(notifWindow.colorFor(model.urgency), 0.3)
border.width: 1
Behavior on opacity { NumberAnimation { duration: Theme.animation.durationNormal } }
Row {
id: content
anchors.left: parent.left
anchors.right: parent.right
anchors.verticalCenter: parent.verticalCenter
anchors.margins: Theme.geometry.padding
spacing: Theme.geometry.spacing
Rectangle {
width: 16
height: 16
radius: 8
color: notifWindow.colorFor(model.urgency)
anchors.top: parent.top
anchors.topMargin: 2
}
Column {
width: content.width - 16 - Theme.geometry.spacing - closeIcon.width - Theme.geometry.spacing
spacing: 2
Text {
text: model.summary && model.summary.length > 0 ? model.summary : model.appName
font.family: Theme.font.family
font.pixelSize: 12
font.bold: true
color: notifWindow.colorFor(model.urgency)
width: parent.width
elide: Text.ElideRight
}
Text {
visible: model.body && model.body.length > 0
text: model.body
font.family: Theme.font.family
font.pixelSize: 12
color: Theme.colors.text
width: parent.width
wrapMode: Text.WordWrap
maximumLineCount: 3
elide: Text.ElideRight
}
}
Text {
id: closeIcon
text: ""
color: Theme.colors.textMuted
font.family: Theme.font.family
font.pixelSize: 12
anchors.top: parent.top
MouseArea {
anchors.fill: parent
anchors.margins: -6
cursorShape: Qt.PointingHandCursor
onClicked: {
model.notifObj.dismiss();
toastModel.remove(index);
}
}
}
}
}
}
}
}
@@ -0,0 +1,125 @@
import QtQuick
import Quickshell
import Quickshell.Wayland
import Quickshell.Services.Pipewire
import Quickshell.Io
import "../Shared"
PanelWindow {
id: osdWindow
// API
function show(newMode) {
mode = newMode;
if (mode === "brightness") {
brightnessProcess.restart();
}
visibleTimer.restart();
}
property string mode: "volume" // "volume" or "brightness"
property real brightnessLevel: 0.5
// Pipewire Audio Binding
property QtObject sink: Pipewire.defaultAudioSink
// Ensure sink and audio are valid before trying to read volume
property bool sinkReady: sink !== null && sink.ready && sink.audio !== null
property real volumeLevel: sinkReady ? sink.audio.volume : 0.0
property bool isMuted: sinkReady ? sink.audio.muted : false
PwObjectTracker {
objects: sink !== null ? [sink] : []
}
anchors {
bottom: true
left: true
right: true
}
margins {
bottom: visibleTimer.running ? Theme.geometry.padding * 4 : -implicitHeight - 50
}
Behavior on margins.bottom {
NumberAnimation {
duration: Theme.animation.durationNormal
easing.type: Easing.OutBack
}
}
exclusiveZone: 0
color: "transparent"
implicitHeight: 60
WlrLayershell.layer: WlrLayer.Overlay
WlrLayershell.namespace: "quickshell-osd"
Timer {
id: visibleTimer
interval: 2000
}
Process {
id: brightnessProcess
// brightnessctl -m outputs: intel_backlight,backlight,12000,100%,12000
command: ["bash", "-c", "brightnessctl -m 2>/dev/null | awk -F, '{print $4}' | tr -d '%'"]
running: false
function restart() { running = false; running = true; }
stdout: StdioCollector {
onStreamFinished: {
let val = parseInt(this.text);
if (!isNaN(val)) {
brightnessLevel = val / 100.0;
}
}
}
}
Surface {
width: 300
height: 60
anchors.centerIn: parent
radius: Theme.geometry.pillRadius
tint: osdWindow.levelColor
glow: true
Item {
anchors.fill: parent
anchors.margins: Theme.geometry.padding
Text {
id: iconText
anchors.left: parent.left
anchors.verticalCenter: parent.verticalCenter
text: {
if (mode === "volume") {
if (isMuted) return ""; // nf-fa-volume_off
if (volumeLevel < 0.5) return ""; // nf-fa-volume_down
return ""; // nf-fa-volume_up
} else {
return ""; // nf-fa-sun_o
}
}
color: osdWindow.levelColor
font.family: Theme.font.family
font.pixelSize: 18
}
ProgressBar {
anchors.left: iconText.right
anchors.leftMargin: Theme.geometry.spacing
anchors.right: parent.right
anchors.verticalCenter: parent.verticalCenter
value: mode === "volume" ? volumeLevel : brightnessLevel
fillColor: osdWindow.levelColor
}
}
}
// Volume gets the primary accent, brightness gets a warm warning-ish
// tint (sun-colored), muted volume falls back to a neutral color.
readonly property color levelColor: (mode === "volume" && isMuted)
? Theme.colors.textMuted
: (mode === "volume" ? Theme.colors.primary : Theme.colors.warning)
}
@@ -1,115 +0,0 @@
import QtQuick
import QtQuick.Layouts
import Quickshell
import Quickshell.Io
import "../core"
FloatingWindow {
id: win
title: "Power Menu"
visible: false
implicitWidth: 820
implicitHeight: 340
color: "transparent"
property int selectedIndex: 0
property int armedIndex: -1
property bool mouseWasInside: false
readonly property var actions: [
{ name: "Lock", icon: "", hint: "hyprlock", cmd: "hyprlock", danger: false },
{ name: "Logout", icon: "󰗼", hint: "hyprctl dispatch exit", cmd: "hyprctl dispatch exit", danger: true },
{ name: "Suspend", icon: "󰤄", hint: "systemctl suspend", cmd: "systemctl suspend", danger: false },
{ name: "Reboot", icon: "󰜉", hint: "systemctl reboot", cmd: "systemctl reboot", danger: true },
{ name: "Shutdown", icon: "󰐥", hint: "systemctl poweroff", cmd: "systemctl poweroff", danger: true }
]
function clampIndex(index) { return ((index % actions.length) + actions.length) % actions.length }
function selectIndex(index) { selectedIndex = clampIndex(index); armedIndex = -1 }
function open() { mouseWasInside = false; armedIndex = -1; visible = true; keyScope.forceActiveFocus() }
function toggle() { visible = !visible; if (visible) { mouseWasInside = false; armedIndex = -1; keyScope.forceActiveFocus() } }
function runAction(index) {
const action = actions[index]
if (action.danger && armedIndex !== index) { armedIndex = index; return }
actionProcess.command = ["bash", "-lc", action.cmd]
actionProcess.running = true
visible = false
armedIndex = -1
}
IpcHandler {
target: "powerMenu"
function open() { win.open() }
function toggle() { win.toggle() }
function lock() { win.runAction(0) }
function logout() { win.runAction(1) }
function suspend() { win.runAction(2) }
function reboot() { win.runAction(3) }
function shutdown() { win.runAction(4) }
}
Item {
id: keyScope
anchors.fill: parent
focus: win.visible
Keys.onPressed: function(event) {
if (event.key === Qt.Key_Left || event.key === Qt.Key_H) { win.selectIndex(win.selectedIndex - 1); event.accepted = true }
else if (event.key === Qt.Key_Right || event.key === Qt.Key_L) { win.selectIndex(win.selectedIndex + 1); event.accepted = true }
else if (event.key === Qt.Key_Return || event.key === Qt.Key_Enter || event.key === Qt.Key_Space) { win.runAction(win.selectedIndex); event.accepted = true }
else if (event.key === Qt.Key_Escape) { win.visible = false; event.accepted = true }
}
MouseArea { anchors.fill: parent; hoverEnabled: true; acceptedButtons: Qt.NoButton; onEntered: win.mouseWasInside = true; onExited: if (win.mouseWasInside) win.visible = false }
Rectangle { anchors.fill: parent; radius: 34; color: Qt.rgba(Theme.base.r, Theme.base.g, Theme.base.b, 0.13); border.color: Qt.rgba(Theme.surface1.r, Theme.surface1.g, Theme.surface1.b, 0.38); border.width: 1 }
Row {
id: row
anchors.centerIn: parent
spacing: 16
Repeater {
model: win.actions.length
Rectangle {
id: card
property var action: win.actions[index]
property bool selected: index === win.selectedIndex
property bool armed: index === win.armedIndex
width: selected ? 150 : 126
height: selected ? 190 : 162
radius: selected ? 28 : 24
y: selected ? -10 : 4
color: armed ? Qt.rgba(Theme.red.r, Theme.red.g, Theme.red.b, 0.28) : Qt.rgba(Theme.crust.r, Theme.crust.g, Theme.crust.b, 0.70)
border.color: armed ? Theme.red : selected ? Theme.mauve : Qt.rgba(Theme.surface1.r, Theme.surface1.g, Theme.surface1.b, 0.60)
border.width: selected ? 3 : 1
antialiasing: true
Behavior on width { NumberAnimation { duration: 130; easing.type: Easing.OutCubic } }
Behavior on height { NumberAnimation { duration: 130; easing.type: Easing.OutCubic } }
Behavior on y { NumberAnimation { duration: 130; easing.type: Easing.OutCubic } }
Behavior on border.color { ColorAnimation { duration: 100 } }
ColumnLayout {
anchors.fill: parent
anchors.margins: 14
spacing: 8
Text { Layout.alignment: Qt.AlignHCenter; text: card.action.icon; font.family: Theme.fontFamily; font.pixelSize: card.selected ? 46 : 36; color: card.armed ? Theme.red : Theme.text }
Text { Layout.alignment: Qt.AlignHCenter; text: card.action.name; font.family: Theme.fontFamily; font.pixelSize: Theme.fontPixelSize + 2; font.bold: true; color: Theme.text }
Text { Layout.fillWidth: true; text: card.armed ? "Press Enter again" : card.action.hint; horizontalAlignment: Text.AlignHCenter; wrapMode: Text.WordWrap; font.family: Theme.fontFamily; font.pixelSize: Theme.fontPixelSize - 3; color: card.armed ? Theme.red : Theme.overlay2 }
}
MouseArea { anchors.fill: parent; onClicked: { if (card.selected) win.runAction(index); else win.selectIndex(index); keyScope.forceActiveFocus() } }
}
}
}
Rectangle {
anchors.left: parent.left; anchors.right: parent.right; anchors.bottom: parent.bottom
anchors.leftMargin: 42; anchors.rightMargin: 42; anchors.bottomMargin: 22
height: 44; radius: 18
color: Qt.rgba(Theme.crust.r, Theme.crust.g, Theme.crust.b, 0.42)
border.color: Qt.rgba(Theme.surface1.r, Theme.surface1.g, Theme.surface1.b, 0.45)
Text { anchors.centerIn: parent; text: "←/→ select · Enter apply" + (win.armedIndex >= 0 ? " again · Esc cancel" : " · Esc close"); font.family: Theme.fontFamily; font.pixelSize: Theme.fontPixelSize - 1; color: Theme.text }
}
}
Process { id: actionProcess; running: false }
}
@@ -0,0 +1,63 @@
import QtQuick
import QtQuick.Effects
import "."
Rectangle {
id: button
// "primary" | "secondary" | "accent" | "destructive" | "success" | "warning" | "info"
property string variant: "primary"
property string text: ""
signal clicked()
// primary and accent are the same color (Theme.colors.primary === .accent);
// kept as separate variant names for call-site clarity.
readonly property bool filled: variant === "primary" || variant === "accent"
readonly property color tint: variant === "accent" ? Theme.colors.accent
: variant === "destructive" ? Theme.colors.alert
: variant === "success" ? Theme.colors.success
: variant === "warning" ? Theme.colors.warning
: variant === "info" ? Theme.colors.info
: Theme.colors.primary
implicitWidth: label.implicitWidth + Theme.geometry.padding * 2
implicitHeight: label.implicitHeight + Theme.geometry.padding
radius: Theme.geometry.radiusSmall
color: filled
? (mouseArea.pressed ? Qt.darker(tint, 1.1) : tint)
: (mouseArea.containsMouse ? Qt.alpha(tint, 0.22) : Qt.alpha(tint, 0.15))
border.width: filled ? 0 : 1
border.color: Qt.alpha(tint, 0.3)
layer.enabled: filled
layer.effect: MultiEffect {
shadowEnabled: true
shadowColor: button.tint
shadowOpacity: Theme.elevation.medium.opacity
shadowBlur: Theme.elevation.medium.blur
shadowVerticalOffset: 2
}
Behavior on color { ColorAnimation { duration: Theme.animation.durationFast } }
Behavior on scale { SpringAnimation { spring: Theme.motion.springSnappy.spring; damping: Theme.motion.springSnappy.damping } }
scale: mouseArea.pressed ? 0.97 : 1.0
Text {
id: label
anchors.centerIn: parent
text: button.text
font.family: Theme.font.family
font.pixelSize: 13
font.bold: true
color: button.filled ? Theme.colors.background : button.tint
}
MouseArea {
id: mouseArea
anchors.fill: parent
hoverEnabled: true
cursorShape: Qt.PointingHandCursor
onClicked: button.clicked()
}
}
@@ -0,0 +1,88 @@
import QtQuick
import "."
// Reusable right-click menu. `model` is a plain JS array of
// { label, icon, destructive, separator, action } entries.
Rectangle {
id: menu
property var model: []
visible: false
z: 1000
width: 180
radius: Theme.geometry.radiusMedium
color: Theme.colors.background
border.color: Theme.colors.border
border.width: 1
height: column.implicitHeight + Theme.geometry.spacing
function openAt(px, py) {
x = px;
y = py;
visible = true;
}
function close() {
visible = false;
}
// Absorb clicks inside the menu so they don't fall through to the backdrop.
MouseArea {
anchors.fill: parent
}
Column {
id: column
anchors.fill: parent
anchors.margins: Theme.geometry.spacing / 2
Repeater {
model: menu.model
delegate: Rectangle {
width: column.width
height: modelData.separator ? 1 : 28
radius: modelData.separator ? 0 : Theme.geometry.radiusTiny
color: modelData.separator
? Theme.colors.border
: (itemMouse.containsMouse ? Theme.colors.surfaceHover : "transparent")
Row {
visible: !modelData.separator
anchors.left: parent.left
anchors.leftMargin: Theme.geometry.spacing
anchors.verticalCenter: parent.verticalCenter
spacing: Theme.geometry.spacing
Text {
text: modelData.icon || ""
width: Theme.iconSize.small
font.family: Theme.font.family
font.pixelSize: Theme.type.caption
color: modelData.destructive ? Theme.colors.alert : Theme.colors.text
}
Text {
text: modelData.label || ""
font.family: Theme.font.family
font.pixelSize: Theme.type.caption
color: modelData.destructive ? Theme.colors.alert : Theme.colors.text
}
}
MouseArea {
id: itemMouse
anchors.fill: parent
enabled: !modelData.separator
hoverEnabled: true
cursorShape: Qt.PointingHandCursor
onClicked: {
menu.close();
if (modelData.action) modelData.action();
}
}
}
}
}
}
@@ -0,0 +1,35 @@
import QtQuick
import "."
// Row of "key label" keyboard hints shown under launcher-style overlays,
// e.g. [ [↑↓, "Navigate"], ["↵", "Launch"], ["Esc", "Close"] ].
Row {
id: hintBar
property var hints: []
spacing: Theme.geometry.spacing * 2
Repeater {
model: hintBar.hints
delegate: Row {
spacing: Theme.geometry.spacing / 2
Text {
text: modelData.key
color: Theme.colors.textMuted
font.family: Theme.font.family
font.bold: true
font.pixelSize: Theme.type.caption
}
Text {
text: modelData.label
color: Theme.colors.textMuted
font.family: Theme.font.family
font.pixelSize: Theme.type.caption
}
}
}
}
@@ -0,0 +1,53 @@
import QtQuick
import "."
// Selectable list row: a colored left accent bar plus a tinted background
// when current, shared by CommandPalette and ClipboardManager so both
// launchers read as the same design language.
Rectangle {
id: row
property bool selected: false
property color accent: Theme.colors.primary
readonly property alias hovered: rowMouse.containsMouse
default property alias content: contentItem.data
signal clicked(var mouse)
signal entered()
height: 40
radius: Theme.geometry.radiusTiny
color: selected ? Qt.alpha(accent, 0.16) : "transparent"
Behavior on color { ColorAnimation { duration: Theme.animation.durationFast } }
Rectangle {
width: 3
height: parent.height - 10
anchors.verticalCenter: parent.verticalCenter
anchors.left: parent.left
radius: 2
color: row.accent
opacity: row.selected ? 1 : 0
Behavior on opacity { NumberAnimation { duration: Theme.animation.durationFast } }
}
// Declared before contentItem so any interactive child placed in
// `content` (e.g. a hover delete button) stacks on top and can
// intercept clicks before they fall through to this row-wide handler.
MouseArea {
id: rowMouse
anchors.fill: parent
hoverEnabled: true
acceptedButtons: Qt.LeftButton | Qt.RightButton
onEntered: row.entered()
onClicked: (mouse) => row.clicked(mouse)
}
Item {
id: contentItem
anchors.fill: parent
anchors.leftMargin: Theme.geometry.padding + 4
anchors.rightMargin: Theme.geometry.padding
}
}
@@ -0,0 +1,54 @@
import QtQuick
import QtQuick.Effects
import "."
// Bar-style pill chrome: rounded surface, border, optional colored glow.
// Children are centered in an internal Row - place them directly as this
// component's children, same as putting them in a Row.
Rectangle {
id: pill
property color tint: Theme.colors.border
property bool glow: false
// How strongly `tint` is mixed into the base surface color, so each
// pill reads as its own tinted background instead of one flat surface
// color with only the border/glow varying.
property real tintStrength: 0.35
default property alias content: contentRow.data
function blend(base, mix, amount) {
return Qt.rgba(
base.r + (mix.r - base.r) * amount,
base.g + (mix.g - base.g) * amount,
base.b + (mix.b - base.b) * amount,
base.a
);
}
implicitWidth: contentRow.implicitWidth + Theme.geometry.padding * 2
implicitHeight: contentRow.implicitHeight + Theme.geometry.padding
height: implicitHeight
radius: Theme.geometry.pillRadius
color: blend(Theme.colors.surface, tint, tintStrength)
border.color: tint
border.width: 1
Behavior on color { ColorAnimation { duration: Theme.animation.durationNormal } }
Behavior on border.color { ColorAnimation { duration: Theme.animation.durationFast } }
layer.enabled: glow
layer.effect: MultiEffect {
shadowEnabled: true
shadowColor: pill.tint
shadowOpacity: Theme.elevation.low.opacity
shadowBlur: Theme.elevation.low.blur
shadowVerticalOffset: 1
}
Row {
id: contentRow
anchors.centerIn: parent
spacing: Theme.geometry.spacing
}
}
@@ -0,0 +1,29 @@
import QtQuick
import "."
// Colored fill bar for OSD volume/brightness and similar level readouts.
Item {
id: bar
property real value: 0 // 0..1
property color fillColor: Theme.colors.primary
height: 8
Rectangle {
anchors.fill: parent
color: Theme.colors.surfaceHover
radius: height / 2
clip: true
Rectangle {
width: parent.width * Math.max(0, Math.min(1, bar.value))
height: parent.height
radius: parent.radius
color: bar.fillColor
Behavior on width { NumberAnimation { duration: Theme.animation.durationFast } }
Behavior on color { ColorAnimation { duration: Theme.animation.durationFast } }
}
}
}
@@ -0,0 +1,95 @@
import QtQuick
import Quickshell
import Quickshell.Wayland
import "."
// Live reference for the shared design-language kit: every Shared/
// component in one place, so future surfaces (notification center, lock
// screen, dashboard) have something concrete to copy from instead of
// reverse-engineering an existing feature component.
PanelWindow {
id: showcaseWindow
property bool open: false
visible: open
anchors {
top: true
bottom: true
left: true
right: true
}
exclusiveZone: 0
color: "transparent"
WlrLayershell.layer: WlrLayer.Overlay
WlrLayershell.namespace: "quickshell-showcase"
WlrLayershell.keyboardFocus: WlrKeyboardFocus.Exclusive
MouseArea {
anchors.fill: parent
onClicked: showcaseWindow.open = false
}
Rectangle {
anchors.fill: parent
color: Theme.colors.overlay
}
Surface {
anchors.centerIn: parent
width: 640
height: content.implicitHeight + Theme.geometry.padding * 2
glow: true
MouseArea { anchors.fill: parent }
Column {
id: content
anchors.fill: parent
anchors.margins: Theme.geometry.padding
spacing: Theme.geometry.spacing * 2
Text {
text: "Design language showcase"
color: Theme.colors.text
font.family: Theme.font.family
font.pixelSize: Theme.type.title
font.bold: true
}
Row {
spacing: Theme.geometry.spacing
Pill { tint: Theme.colors.primary; glow: true; Text { text: "primary"; color: Theme.colors.text; font.family: Theme.font.family } }
Pill { tint: Theme.colors.secondary; glow: true; Text { text: "secondary"; color: Theme.colors.text; font.family: Theme.font.family } }
Pill { tint: Theme.colors.tertiary; glow: true; Text { text: "tertiary"; color: Theme.colors.text; font.family: Theme.font.family } }
}
Row {
spacing: Theme.geometry.spacing
Button { variant: "primary"; text: "Primary" }
Button { variant: "secondary"; text: "Secondary" }
Button { variant: "success"; text: "Success" }
Button { variant: "warning"; text: "Warning" }
Button { variant: "info"; text: "Info" }
Button { variant: "destructive"; text: "Destructive" }
}
TextField {
width: parent.width
placeholder: "TextField..."
}
Column {
width: parent.width
spacing: Theme.geometry.spacing
ProgressBar { width: parent.width; value: 0.7; fillColor: Theme.colors.primary }
ProgressBar { width: parent.width; value: 0.4; fillColor: Theme.colors.warning }
ProgressBar { width: parent.width; value: 0.9; fillColor: Theme.colors.success }
}
Tooltip { text: "Tooltip bubble" }
}
}
}
@@ -0,0 +1,26 @@
import QtQuick
import QtQuick.Effects
import "."
// Base panel/card chrome shared by menus, pickers, and dialogs: rounded
// background, border, optional colored glow.
Rectangle {
id: surface
property color tint: Theme.colors.border
property bool glow: false
radius: Theme.geometry.radiusMedium
color: Theme.colors.background
border.color: tint
border.width: 1
layer.enabled: glow
layer.effect: MultiEffect {
shadowEnabled: true
shadowColor: surface.tint
shadowOpacity: Theme.elevation.medium.opacity
shadowBlur: Theme.elevation.medium.blur
shadowVerticalOffset: 2
}
}
@@ -0,0 +1,85 @@
import QtQuick
import QtQuick.Effects
import "."
// Search/filter input with an animated focus border + glow, shared by
// CommandPalette and ClipboardManager. Navigation is exposed as signals
// (rather than exposing the inner TextInput's Keys handlers directly) so
// each caller can wire up its own list navigation.
Rectangle {
id: field
property alias text: input.text
property alias echoMode: input.echoMode
property string placeholder: ""
signal escapePressed()
signal upPressed()
signal downPressed()
signal returnPressed()
signal deleteRequested()
function focusInput() { input.forceActiveFocus(); }
// The layer-shell surface only gets real keyboard focus from the
// compositor asynchronously after it's first mapped, so a single
// forceActiveFocus() call right on visible-toggle can silently lose
// input the first time a panel is shown in a session. There's no
// reliable signal for "the compositor granted focus now" on a
// wlr-layer-shell surface, so just retry until it actually sticks.
Timer {
interval: 30
repeat: true
running: field.visible && !input.activeFocus
onTriggered: input.forceActiveFocus()
}
height: 50
color: Theme.colors.surface
radius: Theme.geometry.radiusSmall
border.width: 1
border.color: input.activeFocus ? Theme.colors.primary : Theme.colors.border
Behavior on border.color { ColorAnimation { duration: Theme.animation.durationFast } }
layer.enabled: input.activeFocus
layer.effect: MultiEffect {
shadowEnabled: true
shadowColor: Theme.colors.primary
shadowOpacity: Theme.elevation.low.opacity
shadowBlur: Theme.elevation.low.blur
shadowHorizontalOffset: 0
shadowVerticalOffset: 0
}
TextInput {
id: input
anchors.fill: parent
anchors.margins: Theme.geometry.padding
verticalAlignment: TextInput.AlignVCenter
font.family: Theme.font.family
font.pixelSize: 18
color: Theme.colors.text
clip: true
Text {
text: field.placeholder
color: Theme.colors.textMuted
font.family: Theme.font.family
font.pixelSize: 18
anchors.verticalCenter: parent.verticalCenter
visible: input.text.length === 0
}
Keys.onEscapePressed: (event) => { field.escapePressed(); event.accepted = true; }
Keys.onUpPressed: (event) => { field.upPressed(); event.accepted = true; }
Keys.onDownPressed: (event) => { field.downPressed(); event.accepted = true; }
Keys.onReturnPressed: (event) => { field.returnPressed(); event.accepted = true; }
Keys.onPressed: (event) => {
if (event.key === Qt.Key_Delete || (event.key === Qt.Key_Backspace && input.text.length === 0)) {
field.deleteRequested();
event.accepted = true;
}
}
}
}
@@ -0,0 +1,91 @@
pragma Singleton
import QtQuick
QtObject {
id: theme
// Regenerated by wallpaper-theme.nu on every wallpaper change - don't
// hand-edit between these markers, it gets overwritten.
// GENERATED:COLORS:BEGIN
property QtObject colors: QtObject {
property color background: "#e611111b"
property color surface: "#cc181825"
property color surfaceHover: "#f2313244"
property color overlay: "#6011111b"
property color primary: "#74c7ec"
property color secondary: "#cba6f7"
property color tertiary: "#a6e3a1"
property color accent: "#74c7ec"
property color primaryContainer: "#2474c7ec"
property color secondaryContainer: "#24cba6f7"
property color tertiaryContainer: "#24a6e3a1"
property color alert: "#f38ba8"
property color alertContainer: "#24f38ba8"
property color success: "#a6e3a1"
property color successContainer: "#24a6e3a1"
property color warning: "#f9e2af"
property color warningContainer: "#24f9e2af"
property color info: "#74c7ec"
property color infoContainer: "#2474c7ec"
property color text: "#cdd6f4"
property color textMuted: "#a6adc8"
property color textOnAccent: "#e611111b"
property color border: "#1a74c7ec"
}
// GENERATED:COLORS:END
property QtObject geometry: QtObject {
property int radiusTiny: 6
property int radiusSmall: 8
property int radiusMedium: 10
property int pillRadius: 100
property int padding: 12
property int spacing: 8
}
property QtObject animation: QtObject {
property int durationFast: 150
property int durationNormal: 250
property int durationSlow: 400
}
// Named spring presets, so call sites stop hand-rolling
// `SpringAnimation { spring: 4; damping: 0.3 }` with slightly different
// numbers each time.
property QtObject motion: QtObject {
property QtObject springSnappy: QtObject { property real spring: 4; property real damping: 0.3 }
property QtObject springSoft: QtObject { property real spring: 3; property real damping: 0.2 }
}
// Type scale. Family stays fixed - this is only about size/weight steps.
property QtObject type: QtObject {
property int caption: 11
property int body: 13
property int label: 14
property int title: 18
property int display: 24
}
property QtObject iconSize: QtObject {
property int small: 14
property int medium: 18
property int large: 24
}
// Named shadow presets for MultiEffect glows, keyed by how prominent the
// glow should read (e.g. hover vs. focus vs. an always-on active state).
property QtObject elevation: QtObject {
property QtObject low: QtObject { property real blur: 0.4; property real opacity: 0.35 }
property QtObject medium: QtObject { property real blur: 0.6; property real opacity: 0.5 }
property QtObject high: QtObject { property real blur: 0.8; property real opacity: 0.65 }
}
property QtObject font: QtObject {
property string family: "JetBrainsMono Nerd Font"
}
}
@@ -0,0 +1,26 @@
import QtQuick
import "."
// Shared tooltip bubble visual. Host inside a click-through overlay
// PanelWindow (see Bar/TrayTooltip.qml) - this only draws the label chrome.
Rectangle {
id: bubble
property string text: ""
radius: Theme.geometry.radiusMedium
color: Theme.colors.background
border.color: Theme.colors.border
border.width: 1
width: label.implicitWidth + Theme.geometry.padding * 2
height: label.implicitHeight + Theme.geometry.padding
Text {
id: label
anchors.centerIn: parent
text: bubble.text
color: Theme.colors.text
font.family: Theme.font.family
font.pixelSize: Theme.type.caption
}
}
@@ -0,0 +1,11 @@
singleton Theme 1.0 Theme.qml
Button 1.0 Button.qml
ContextMenu 1.0 ContextMenu.qml
Surface 1.0 Surface.qml
Pill 1.0 Pill.qml
TextField 1.0 TextField.qml
ProgressBar 1.0 ProgressBar.qml
Tooltip 1.0 Tooltip.qml
Showcase 1.0 Showcase.qml
ListRow 1.0 ListRow.qml
HintBar 1.0 HintBar.qml
@@ -1,105 +0,0 @@
import QtQuick
import QtQuick.Layouts
import Quickshell
import Quickshell.Io
import "../core"
RowLayout {
spacing: 8
// State properties
property string wifiSsid: ""
property bool btConnected: false
property string batteryPct: ""
property bool isCharging: false
// Visibility
property var monitor: null
property bool exclusiveToScreen: false
// Poller
Timer {
interval: 3000
running: true
repeat: true
triggeredOnStart: true
onTriggered: {
wifiProcess.running = true
btProcess.running = true
batProcess.running = true
}
}
// Wifi
Process {
id: wifiProcess
command: ["sh", "-c", "nmcli -t -f active,ssid dev wifi | grep '^yes' | cut -d: -f2"]
stdout: StdioCollector {
onStreamFinished: {
wifiSsid = text.trim();
}
}
onExited: function(code, status) {
if (code !== 0) wifiSsid = "";
}
}
// Bluetooth
Process {
id: btProcess
command: ["sh", "-c", "bluetoothctl info | grep 'Connected: yes'"]
stdout: StdioCollector {
onStreamFinished: {
btConnected = text.trim().length > 0;
}
}
onExited: function(code, status) {
if (code !== 0) btConnected = false;
}
}
// Battery
Process {
id: batProcess
command: ["sh", "-c", "if ls /sys/class/power_supply/BAT* >/dev/null 2>&1; then cat /sys/class/power_supply/BAT*/capacity | head -n1; cat /sys/class/power_supply/BAT*/status | head -n1; fi"]
stdout: StdioCollector {
onStreamFinished: {
var lines = text.trim().split("\n");
if (lines.length >= 2) {
batteryPct = lines[0];
isCharging = (lines[1] === "Charging");
} else {
batteryPct = "";
}
}
}
}
// UI Elements
ModuleContainer {
monitor: parent.monitor
exclusiveToScreen: parent.exclusiveToScreen
active: wifiSsid !== ""
pillColor: Theme.primary
icon: "󰖩"
text: wifiSsid
}
ModuleContainer {
monitor: parent.monitor
exclusiveToScreen: parent.exclusiveToScreen
active: btConnected
pillColor: Theme.primary
icon: "󰂱"
text: "Connected"
}
ModuleContainer {
monitor: parent.monitor
exclusiveToScreen: parent.exclusiveToScreen
active: batteryPct !== ""
pillColor: Theme.accent
icon: isCharging ? "󰂄" : "󰁹"
text: batteryPct + "%"
}
}
@@ -0,0 +1,204 @@
import QtQuick
import Quickshell
import Quickshell.Wayland
import Quickshell.Io
import "../Shared"
PanelWindow {
id: pickerWindow
property QtObject rootState
property var wallpapers: []
property int currentIndex: 0
property string currentWallpaperPath: ""
readonly property string scriptPath: Quickshell.env("HOME") + "/.dotfiles/config/nushell/scripts/wallpaper-switch.nu"
visible: rootState.wallpaperPickerOpen
anchors {
top: true
bottom: true
left: true
right: true
}
exclusiveZone: 0
color: "transparent"
WlrLayershell.layer: WlrLayer.Overlay
WlrLayershell.namespace: "quickshell-wallpaper-picker"
WlrLayershell.keyboardFocus: WlrKeyboardFocus.Exclusive
Process {
id: listProcess
command: ["nu", pickerWindow.scriptPath, "--list-with-current"]
running: false
stdout: StdioCollector {
onStreamFinished: {
try {
let data = JSON.parse(this.text);
pickerWindow.wallpapers = data.wallpapers ?? [];
pickerWindow.currentWallpaperPath = data.current ?? "";
} catch (e) {
pickerWindow.wallpapers = [];
pickerWindow.currentWallpaperPath = "";
}
pickerWindow.selectInitialIndex();
}
}
}
Process {
id: applyProcess
running: false
}
function wrappedIndex(i) {
let len = wallpapers.length;
return len > 0 ? ((i % len) + len) % len : 0;
}
function selectInitialIndex() {
if (wallpapers.length === 0) return;
let idx = currentWallpaperPath.length > 0
? wallpapers.findIndex(w => w.path === currentWallpaperPath)
: -1;
currentIndex = idx >= 0 ? idx : 0;
}
function applySelection() {
if (wallpapers.length === 0) return;
applyProcess.command = ["nu", pickerWindow.scriptPath, "--set", wallpapers[currentIndex].path];
applyProcess.running = true;
rootState.wallpaperPickerOpen = false;
}
onVisibleChanged: {
if (visible) {
listProcess.running = true;
}
}
MouseArea {
anchors.fill: parent
onClicked: rootState.wallpaperPickerOpen = false
}
Rectangle {
anchors.fill: parent
color: Theme.colors.overlay
Behavior on opacity { NumberAnimation { duration: Theme.animation.durationNormal } }
opacity: pickerWindow.visible ? 1 : 0
MouseArea {
anchors.fill: parent
onClicked: rootState.wallpaperPickerOpen = false
}
// Fixed slots, no sliding: only which wallpaper each slot shows changes.
Row {
id: carousel
anchors.centerIn: parent
spacing: Theme.geometry.spacing * 3
Repeater {
model: 5
delegate: Item {
id: delegateRoot
readonly property int offset: index - 2
readonly property bool isCurrent: offset === 0
readonly property int wpIndex: pickerWindow.wrappedIndex(pickerWindow.currentIndex + offset)
readonly property var wp: pickerWindow.wallpapers.length > 0 ? pickerWindow.wallpapers[wpIndex] : null
width: isCurrent ? 260 : 170
height: 340
Surface {
anchors.centerIn: parent
width: isCurrent ? 240 : 150
height: isCurrent ? 320 : 200
color: Theme.colors.surface
tint: delegateRoot.isCurrent ? Theme.colors.primary : Theme.colors.border
border.width: delegateRoot.isCurrent ? 2 : 1
opacity: delegateRoot.isCurrent ? 1.0 : 0.5
glow: delegateRoot.isCurrent
clip: true
Image {
anchors.fill: parent
anchors.margins: 4
source: delegateRoot.wp ? "file://" + delegateRoot.wp.thumb : ""
fillMode: Image.PreserveAspectCrop
asynchronous: true
cache: true
}
}
MouseArea {
anchors.fill: parent
cursorShape: Qt.PointingHandCursor
onClicked: {
if (delegateRoot.isCurrent) {
pickerWindow.applySelection();
} else {
pickerWindow.currentIndex = delegateRoot.wpIndex;
}
}
}
}
}
}
Text {
anchors.top: carousel.bottom
anchors.topMargin: Theme.geometry.spacing * 2
anchors.horizontalCenter: parent.horizontalCenter
text: pickerWindow.wallpapers.length > 0
? (pickerWindow.wallpapers[pickerWindow.currentIndex]?.path ?? "").split("/").pop()
: "No wallpapers found"
color: Theme.colors.text
font.family: Theme.font.family
}
}
Item {
id: keyHandler
anchors.fill: parent
focus: true
// The layer-shell surface only gets real keyboard focus from the
// compositor asynchronously after it's first mapped, so a single
// forceActiveFocus() call right on visible-toggle can silently lose
// input the first time this panel is shown in a session. There's no
// reliable signal for "the compositor granted focus now" on a
// wlr-layer-shell surface, so just retry until it actually sticks.
Timer {
interval: 30
repeat: true
running: pickerWindow.visible && !keyHandler.activeFocus
onTriggered: keyHandler.forceActiveFocus()
}
Keys.onEscapePressed: (event) => {
rootState.wallpaperPickerOpen = false;
event.accepted = true;
}
Keys.onLeftPressed: (event) => {
pickerWindow.currentIndex = pickerWindow.wrappedIndex(pickerWindow.currentIndex - 1);
event.accepted = true;
}
Keys.onRightPressed: (event) => {
pickerWindow.currentIndex = pickerWindow.wrappedIndex(pickerWindow.currentIndex + 1);
event.accepted = true;
}
Keys.onReturnPressed: (event) => {
pickerWindow.applySelection();
event.accepted = true;
}
}
}
@@ -1,43 +0,0 @@
import QtQuick
import QtQuick.Layouts
import Quickshell
import Quickshell.Hyprland
import "../core"
RowLayout {
id: root
spacing: 4
property var monitor: null
Repeater {
model: Hyprland.workspaces
delegate: Rectangle {
property var ws: modelData
// Only show workspaces belonging to the specific monitor
visible: root.monitor === null || (ws.monitor && ws.monitor.name === root.monitor.name)
width: visible ? 28 : 0
height: visible ? 28 : 0
radius: Theme.radius / 2
// Highlight if active
color: ws.isActive ? Theme.primary : Theme.bgAlt
Text {
anchors.centerIn: parent
text: ws.id
color: ws.isActive ? Theme.bg : Theme.fg
font: Theme.fontBold
}
MouseArea {
anchors.fill: parent
onClicked: Hyprland.dispatch("workspace", ws.id)
cursorShape: Qt.PointingHandCursor
}
}
}
}
@@ -1,8 +0,0 @@
Workspaces Workspaces.qml
Clock Clock.qml
StatusIndicators StatusIndicators.qml
NotificationDaemon NotificationDaemon.qml
ModuleContainer ModuleContainer.qml
AppLauncherWindow AppLauncherWindow.qml
ClipboardPickerWindow ClipboardPickerWindow.qml
PowerMenuWindow PowerMenuWindow.qml
-36
View File
@@ -1,36 +0,0 @@
pragma Singleton
import QtQuick
QtObject {
// Mocha-like palette
property color bg: "#1e1e2e"
property color bgAlt: "#313244"
property color fg: "#cdd6f4"
property color fgAlt: "#a6adc8"
property color primary: "#89b4fa"
property color accent: "#f38ba8"
property color transparent: "transparent"
property int radius: 8
property int padding: 8
// Legacy / Catppuccin Aliases for imported Widgets
property string fontFamily: "sans-serif"
property int fontPixelSize: 14
property color base: "#1e1e2e"
property color crust: "#11111b"
property color text: "#cdd6f4"
property color subtext0: "#a6adc8"
property color surface0: "#313244"
property color surface1: "#45475a"
property color overlay1: "#7f849c"
property color overlay2: "#9399b2"
property color green: "#a6e3a1"
property color mauve: "#cba6f7"
property color lavender: "#b4befe"
property color red: "#f38ba8"
property font font: Qt.font({ family: fontFamily, pixelSize: fontPixelSize })
property font fontBold: Qt.font({ family: fontFamily, pixelSize: fontPixelSize, bold: true })
}
-1
View File
@@ -1 +0,0 @@
singleton Theme Theme.qml
+138 -73
View File
@@ -1,85 +1,150 @@
import QtQuick
import Quickshell import Quickshell
import Quickshell.Io import Quickshell.Io
import Quickshell.Hyprland
import QtQuick
import QtQuick.Layouts
import "components"
import "core"
Scope { import "components/Bar"
Variants { import "components/CommandPalette"
model: Quickshell.screens import "components/OSD"
delegate: Component { import "components/Shared"
PanelWindow { import "components/LogoutMenu"
id: topBar import "components/ClipboardManager"
import "components/Notifications"
import "components/WallpaperPicker"
import "components/LockScreen"
required property var modelData ShellRoot {
property var hyprMonitor: Hyprland.monitorFor(modelData) id: root
screen: modelData // --- Global State ---
property bool commandPaletteOpen: false
property bool logoutMenuOpen: false
property bool clipboardManagerOpen: false
property bool wallpaperPickerOpen: false
anchors { IpcHandler {
top: true target: "commandPalette"
left: true function toggle() {
right: true commandPaletteOpen = !commandPaletteOpen;
} if (commandPaletteOpen) {
implicitHeight: 32 + 8 // Changed to implicitHeight per warnings logoutMenuOpen = false;
color: "transparent" clipboardManagerOpen = false;
exclusiveZone: implicitHeight
Item {
anchors.fill: parent
anchors.topMargin: 8
anchors.leftMargin: Theme.padding
anchors.rightMargin: Theme.padding
// Left: Workspaces
RowLayout {
anchors.left: parent.left
anchors.verticalCenter: parent.verticalCenter
// Wrap workspaces in a solid pill
ModuleContainer {
pillColor: Theme.bgAlt
customContent: Component {
Workspaces {
monitor: hyprMonitor
}
}
}
}
// Center: Clock
RowLayout {
anchors.centerIn: parent
Clock {
pillColor: Theme.primary
monitor: hyprMonitor
exclusiveToScreen: true
}
}
// Right: Status Indicators
RowLayout {
anchors.right: parent.right
anchors.verticalCenter: parent.verticalCenter
StatusIndicators {
monitor: hyprMonitor
exclusiveToScreen: true
}
}
}
} }
} }
} }
// Notification Daemon (Global, usually tied to primary monitor or floating) IpcHandler {
NotificationDaemon {} target: "logoutMenu"
function toggle() {
logoutMenuOpen = !logoutMenuOpen;
if (logoutMenuOpen) {
commandPaletteOpen = false;
clipboardManagerOpen = false;
}
}
}
// Global floating widget windows IpcHandler {
AppLauncherWindow {} target: "clipboardManager"
ClipboardPickerWindow {} function toggle() {
PowerMenuWindow {} clipboardManagerOpen = !clipboardManagerOpen;
if (clipboardManagerOpen) {
commandPaletteOpen = false;
logoutMenuOpen = false;
}
}
}
IpcHandler {
target: "osd"
function showVolume() {
osd.show("volume");
}
function showBrightness() {
osd.show("brightness");
}
}
IpcHandler {
target: "wallpaperSwitcher"
function open() {
wallpaperPickerOpen = !wallpaperPickerOpen;
if (wallpaperPickerOpen) {
commandPaletteOpen = false;
logoutMenuOpen = false;
clipboardManagerOpen = false;
}
}
function random() {
randomWallpaperProcess.running = false;
randomWallpaperProcess.running = true;
}
}
Process {
id: randomWallpaperProcess
command: ["nu", Quickshell.env("HOME") + "/.dotfiles/config/nushell/scripts/wallpaper-switch.nu", "--random"]
running: false
}
Variants {
model: Quickshell.screens
Bar {
required property var modelData
screen: modelData
rootState: root
}
}
CommandPalette {
id: commandPalette
rootState: root
}
LogoutMenu {
id: logoutMenu
rootState: root
}
ClipboardManager {
id: clipboardManager
rootState: root
}
OSD {
id: osd
}
Notifications {
id: notifications
}
WallpaperPicker {
id: wallpaperPicker
rootState: root
}
IpcHandler {
target: "showcase"
function toggle() {
showcase.open = !showcase.open;
}
}
Showcase {
id: showcase
}
// No unlock/toggle exposed here on purpose: unlocking only ever happens
// through a successful PamContext result inside LockScreen.qml.
IpcHandler {
target: "lockScreen"
function lock() {
lockScreen.locked = true;
}
}
LockScreen {
id: lockScreen
}
} }
+149
View File
@@ -0,0 +1,149 @@
import QtQuick
import SddmComponents 2.0
import "components"
Rectangle {
id: root
width: Screen.width
height: Screen.height
color: Theme.colors.background
// Background Image
Image {
id: bgImage
anchors.fill: parent
// SDDM loads the theme.conf, but since we want the dynamic user wallpaper,
// we can try reading it if SDDM has permissions, or fallback to theme.conf.
// Usually, SDDM runs as user 'sddm' and might not have access to ~/.config/current-wallpaper.
// We will default to theme.conf's background.
source: config.background
fillMode: Image.PreserveAspectCrop
}
Rectangle {
anchors.fill: parent
color: Theme.colors.background
}
Item {
id: lockSurface
anchors.fill: parent
property QtObject battery: QtObject {
property bool isPresent: false
property real percentage: 0
}
Column {
anchors.centerIn: parent
spacing: Theme.geometry.spacing * 3
Column {
anchors.horizontalCenter: parent.horizontalCenter
spacing: Theme.geometry.spacing
property date currentTime: new Date()
Timer {
interval: 1000; running: true; repeat: true
onTriggered: parent.currentTime = new Date()
}
Text {
anchors.horizontalCenter: parent.horizontalCenter
text: Qt.formatDateTime(parent.currentTime, "hh:mm")
color: Theme.colors.text
font.family: Theme.font.family
font.bold: true
font.pixelSize: 96
}
Text {
anchors.horizontalCenter: parent.horizontalCenter
text: Qt.formatDateTime(parent.currentTime, "dddd, d MMMM")
color: Theme.colors.textMuted
font.family: Theme.font.family
font.pixelSize: Theme.type.title
}
}
// Battery section kept just in case you find a way to populate it,
// but hidden by default via isPresent: false
Row {
anchors.horizontalCenter: parent.horizontalCenter
spacing: Theme.geometry.spacing / 2
visible: lockSurface.battery.isPresent
Text {
text: Math.round(lockSurface.battery.percentage * 100) + "%"
font.family: Theme.font.family
font.pixelSize: Theme.type.body
color: Theme.colors.textMuted
}
}
Column {
anchors.horizontalCenter: parent.horizontalCenter
spacing: Theme.geometry.spacing
Item {
id: passwordShake
width: 320
height: passwordField.height
anchors.horizontalCenter: parent.horizontalCenter
SequentialAnimation {
id: shakeAnim
NumberAnimation { target: passwordShake; property: "x"; to: -8; duration: 40 }
NumberAnimation { target: passwordShake; property: "x"; to: 8; duration: 40 }
NumberAnimation { target: passwordShake; property: "x"; to: -6; duration: 40 }
NumberAnimation { target: passwordShake; property: "x"; to: 0; duration: 40 }
}
Connections {
target: sddm
function onLoginFailed() {
passwordField.text = ""
errorText.text = "Incorrect password"
shakeAnim.start()
}
function onLoginSucceeded() {
errorText.text = ""
}
}
TextField {
id: passwordField
width: parent.width
placeholder: "Password for " + userModel.lastUser
echoMode: TextInput.Password
onReturnPressed: {
if (text.length > 0) {
sddm.login(userModel.lastUser, text, sessionModel.lastIndex)
}
}
}
}
Text {
id: errorText
anchors.horizontalCenter: parent.horizontalCenter
text: ""
visible: text.length > 0
color: Theme.colors.alert
font.family: Theme.font.family
font.pixelSize: Theme.type.caption
}
HintBar {
anchors.horizontalCenter: parent.horizontalCenter
hints: [ { key: "↵", label: "Unlock" } ]
}
}
}
Component.onCompleted: {
passwordField.focusInput();
}
}
}
@@ -0,0 +1,35 @@
import QtQuick
// Row of "key label" keyboard hints shown under launcher-style overlays,
// e.g. [ [↑↓, "Navigate"], ["↵", "Launch"], ["Esc", "Close"] ].
Row {
id: hintBar
property var hints: []
spacing: Theme.geometry.spacing * 2
Repeater {
model: hintBar.hints
delegate: Row {
spacing: Theme.geometry.spacing / 2
Text {
text: modelData.key
color: Theme.colors.textMuted
font.family: Theme.font.family
font.bold: true
font.pixelSize: Theme.type.caption
}
Text {
text: modelData.label
color: Theme.colors.textMuted
font.family: Theme.font.family
font.pixelSize: Theme.type.caption
}
}
}
}
@@ -0,0 +1,72 @@
import QtQuick
import QtQuick.Effects
// Search/filter input with an animated focus border + glow, shared by
// CommandPalette and ClipboardManager. Navigation is exposed as signals
// (rather than exposing the inner TextInput's Keys handlers directly) so
// each caller can wire up its own list navigation.
Rectangle {
id: field
property alias text: input.text
property alias echoMode: input.echoMode
property string placeholder: ""
signal escapePressed()
signal upPressed()
signal downPressed()
signal returnPressed()
signal deleteRequested()
function focusInput() { input.forceActiveFocus(); }
height: 50
color: Theme.colors.surface
radius: Theme.geometry.radiusSmall
border.width: 1
border.color: input.activeFocus ? Theme.colors.primary : Theme.colors.border
Behavior on border.color { ColorAnimation { duration: Theme.animation.durationFast } }
layer.enabled: input.activeFocus
layer.effect: MultiEffect {
shadowEnabled: true
shadowColor: Theme.colors.primary
shadowOpacity: Theme.elevation.low.opacity
shadowBlur: Theme.elevation.low.blur
shadowHorizontalOffset: 0
shadowVerticalOffset: 0
}
TextInput {
id: input
anchors.fill: parent
anchors.margins: Theme.geometry.padding
verticalAlignment: TextInput.AlignVCenter
font.family: Theme.font.family
font.pixelSize: 18
color: Theme.colors.text
clip: true
Text {
text: field.placeholder
color: Theme.colors.textMuted
font.family: Theme.font.family
font.pixelSize: 18
anchors.verticalCenter: parent.verticalCenter
visible: input.text.length === 0
}
Keys.onEscapePressed: (event) => { field.escapePressed(); event.accepted = true; }
Keys.onUpPressed: (event) => { field.upPressed(); event.accepted = true; }
Keys.onDownPressed: (event) => { field.downPressed(); event.accepted = true; }
Keys.onReturnPressed: (event) => { field.returnPressed(); event.accepted = true; }
Keys.onPressed: (event) => {
if (event.key === Qt.Key_Delete || (event.key === Qt.Key_Backspace && input.text.length === 0)) {
field.deleteRequested();
event.accepted = true;
}
}
}
}
@@ -0,0 +1,91 @@
pragma Singleton
import QtQuick
QtObject {
id: theme
// Regenerated by wallpaper-theme.nu on every wallpaper change - don't
// hand-edit between these markers, it gets overwritten.
// GENERATED:COLORS:BEGIN
property QtObject colors: QtObject {
property color background: "#e611111b"
property color surface: "#cc181825"
property color surfaceHover: "#f2313244"
property color overlay: "#6011111b"
property color primary: "#74c7ec"
property color secondary: "#cba6f7"
property color tertiary: "#a6e3a1"
property color accent: "#74c7ec"
property color primaryContainer: "#2474c7ec"
property color secondaryContainer: "#24cba6f7"
property color tertiaryContainer: "#24a6e3a1"
property color alert: "#f38ba8"
property color alertContainer: "#24f38ba8"
property color success: "#a6e3a1"
property color successContainer: "#24a6e3a1"
property color warning: "#f9e2af"
property color warningContainer: "#24f9e2af"
property color info: "#74c7ec"
property color infoContainer: "#2474c7ec"
property color text: "#cdd6f4"
property color textMuted: "#a6adc8"
property color textOnAccent: "#e611111b"
property color border: "#1a74c7ec"
}
// GENERATED:COLORS:END
property QtObject geometry: QtObject {
property int radiusTiny: 6
property int radiusSmall: 8
property int radiusMedium: 10
property int pillRadius: 100
property int padding: 12
property int spacing: 8
}
property QtObject animation: QtObject {
property int durationFast: 150
property int durationNormal: 250
property int durationSlow: 400
}
// Named spring presets, so call sites stop hand-rolling
// `SpringAnimation { spring: 4; damping: 0.3 }` with slightly different
// numbers each time.
property QtObject motion: QtObject {
property QtObject springSnappy: QtObject { property real spring: 4; property real damping: 0.3 }
property QtObject springSoft: QtObject { property real spring: 3; property real damping: 0.2 }
}
// Type scale. Family stays fixed - this is only about size/weight steps.
property QtObject type: QtObject {
property int caption: 11
property int body: 13
property int label: 14
property int title: 18
property int display: 24
}
property QtObject iconSize: QtObject {
property int small: 14
property int medium: 18
property int large: 24
}
// Named shadow presets for MultiEffect glows, keyed by how prominent the
// glow should read (e.g. hover vs. focus vs. an always-on active state).
property QtObject elevation: QtObject {
property QtObject low: QtObject { property real blur: 0.4; property real opacity: 0.35 }
property QtObject medium: QtObject { property real blur: 0.6; property real opacity: 0.5 }
property QtObject high: QtObject { property real blur: 0.8; property real opacity: 0.65 }
}
property QtObject font: QtObject {
property string family: "JetBrainsMono Nerd Font"
}
}
@@ -0,0 +1,3 @@
singleton Theme 1.0 Theme.qml
TextField 1.0 TextField.qml
HintBar 1.0 HintBar.qml
@@ -0,0 +1,8 @@
[SddmGreeterTheme]
Name=Quickshell Login
Description=A theme ported from my Quickshell lockscreen
Author=Johannes
Version=1.0
Type=sddm-theme
MainScript=Main.qml
ConfigFile=theme.conf
+2
View File
@@ -0,0 +1,2 @@
[General]
background=