eww-expressions

Document eww expression syntax, operators, functions, and data access patterns.

Updated Aug 27, 2026
One-click install
npx skills add https://github.com/milojarow/dotfiles --skill eww-expressions
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: eww-expressions
Source: https://github.com/milojarow/dotfiles/tree/main/.claude/skills/eww-expressions
Command: npx skills add https://github.com/milojarow/dotfiles --skill eww-expressions

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

This Skill helps users write and debug expressions for the eww widget system, enabling dynamic and interactive user interfaces.

Core Features & Use Cases

  • Expression Syntax: Understand and utilize ${} for string interpolation and {} for attribute expressions.
  • Operators & Functions: Master arithmetic, boolean, ternary, elvis, and safe access operators, along with essential functions like round(), formattime(), and jq().
  • Data Access: Learn to access variables, object fields, array elements, and special EWW_* magic variables.
  • Use Case: Create a custom status bar widget that displays the current time, CPU usage, and battery level, with dynamic styling based on system conditions.

Quick Start

Use the eww-expressions skill to understand how to display the current time formatted as HH:MM in a label.

Frequently Asked Questions about eww-expressions

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I write eww expressions for dynamic widgets?

Eww expressions use `${}` for string interpolation and `{}` for attribute expressions to create dynamic widget interfaces. You can combine these syntaxes with operators and functions to build custom status bars and interactive elements.

What operators and functions are available in eww scripting?

Eww scripting supports arithmetic, boolean, ternary, elvis, and safe access operators, alongside essential functions like `round()`, `formattime()`, and `jq()` for data manipulation. These tools allow you to apply logic and format data directly within your widget definitions.

How do I access variables and system data in eww?

You can access variables, object fields, array elements, and special `EWW_*` magic variables to retrieve system data in eww. This data access pattern allows your widgets to display real-time information like CPU usage or battery levels.

Why are my eww expressions not working?

Eww expressions often fail due to syntax mistakes like confusing `${}` string interpolation with `{}` attribute expressions, or improper use of safe access operators. Reviewing common mistakes and operator logic helps debug and resolve these widget rendering issues.

Can I create a custom status bar displaying time and system metrics with eww?

Yes, you can create a custom status bar widget in eww to display the current time, CPU usage, and battery level. By using functions like `formattime()` and accessing magic variables, you can apply dynamic styling based on live system conditions.