Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
75 changes: 75 additions & 0 deletions hyprland-visual-editor/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,75 @@
# Hyprland Visual Editor

Visually edit Hyprland animations, borders and shaders from a Noctalia
panel, without ever touching your `hyprland.lua`. A Luau port of XimoCP's v4
plugin for Noctalia v5.

> **⚠️ Lua config required.** This plugin targets Hyprland's **Lua** configuration
> (`hyprland.lua`). It does **not** work with the legacy hyprlang `.conf` format —
> HVE generates Lua (`hl.animation`, `hl.config`) and loads it via `dofile`.

## Plugin

| Field | Value |
| --- | --- |
| ID | `linux-fertxo/hyprland-visual-editor` |
| Entries | Bar widget: `hve-trigger` · panel: `hve-panel` · service: `hve-scanner` |

## Requirements

- `hyprland` running a **Lua** config (`hyprland.lua`) — not the legacy hyprlang
`.conf` format (HVE emits `hl.animation` / `hl.config` and loads via `dofile`).
- `bash` and `python` on `PATH` (the preset converter and assembler are shell
scripts that call `python3`).

## Usage

1. Add the **Hyprland Visual Editor** widget to your bar.
2. Click the bar widget to open the panel. Pick a preset (Animations, Borders or
Effects) and press **Apply** — HVE applies it and reloads Hyprland instantly.

On first enable, HVE appends the overlay loader to the end of your
`~/.config/hypr/hyprland.lua` (idempotent, marked with a
`HYPRLAND VISUAL EDITOR` comment). If you prefer to do it manually, the line is:

```lua
pcall(function() dofile(os.getenv("HOME") .. "/.cache/noctalia/HVE/overlay.lua") end)
```

The panel can also be toggled directly:

```sh
noctalia msg panel-toggle linux-fertxo/hyprland-visual-editor:hve-panel
```

## Settings

| Setting | Type | Default | Description |
| --- | --- | --- | --- |
| `is_system_active` | `bool` | `false` | Master switch that enables effects. |
| `active_anim_file` | `string` | `""` | Currently active animation preset. |
| `active_border_file` | `string` | `""` | Currently active border preset. |
| `active_shader_file` | `string` | `""` | Currently active shader preset. |

## IPC

```sh
noctalia msg panel-toggle linux-fertxo/hyprland-visual-editor:hve-panel
```

## Notes

- HVE writes its generated overlay to `~/.cache/noctalia/HVE/overlay.lua` and
reloads Hyprland with `hyprctl reload` after every apply. Your `hyprland.lua`
is never modified except for the one-time loader line above.
- Ships 18 animation presets, 13 border presets and 9 GLSL shaders. Add your own
by dropping a `.conf`/`.frag` into the matching `assets/` folder with the
`@Title` / `@Desc` / `@Icon` / `@Color` / `@Tag` metadata header.
- Shaders are applied as absolute-path `screen_shader` entries; re-apply the
shader after moving the plugin directory.
- UI is localized: English (`en`), Spanish (`es`) and Catalan (`ca`).

## Credits

- **Architecture & core:** XimoCP (Noctalia v4, QML)
- **Luau port (v5):** Hermy & [linux-fertxo](https://github.com/linux-fertxo)
42 changes: 42 additions & 0 deletions hyprland-visual-editor/assets/animations/01_relampago.conf
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
# @Title: Lightning
# @Icon: bolt
# @Color: #f87171
# @Tag: FAST
# @Desc: Maximum visual response.

# -----------------------------------------------------
# ▄▀█ █▄░█ █ █▀▄▀█ ▄▀█ ▀█▀ █ █▀█ █▄░█
# █▀█ █░▀█ █ █░▀░█ █▀█ ░█░ █ █▄█ █░▀█
#
animations {
enabled = true

# --- BEZIERS (SPEED CURVES) ---
# "Lightning": Starts ultra-fast and brakes sharply at the end.
bezier = lightning, 0.05, 0.9, 0.1, 1.05
# "Smooth": Linear yet soft for fades.
bezier = smooth, 0.25, 1, 0.5, 1
# "Instant": Almost instantaneous for movement.
bezier = instant, 0, 1, 0, 1

# --- WINDOWS (Core changes) ---
# In: Very fast (Speed 2), appears at 80% (less visual travel).
animation = windowsIn, 1, 2, lightning, popin 80%

# Out: Fleeting (Speed 1.5). Disappears faster than it arrived.
animation = windowsOut, 1, 1.5, lightning, popin 80%

# Movement: Snapped to mouse. Speed 1.5 makes it feel electric.
animation = windowsMove, 1, 1.5, instant, slide

# --- LAYERS AND FADES ---
animation = fade, 1, 2, smooth
animation = layers, 1, 2, lightning, fade
animation = layersIn, 1, 2, lightning, fade
animation = layersOut, 1, 1.5, lightning, fade

# ---WORK SPACES ---
# Slidefade: Slides but fades 20%. It gives a sensation of warp speed.
animation = workspaces, 1, 2.5, lightning, slidefade 20%
animation = specialWorkspace, 1, 2.5, lightning, slide
}
52 changes: 52 additions & 0 deletions hyprland-visual-editor/assets/animations/02_inercia_elastica.conf
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
# @Title: Elastic Inertia
# @Icon: adjustments
# @Color: #60a5fa
# @Tag: PHYSICS
# @Desc: Organic movement. The windows gain momentum when leaving and bounce when entering.

# -----------------------------------------------------
# ▄▀█ █▄░█ █ █▀▄▀█ ▄▀█ ▀█▀ █ █▀█ █▄░█
# █▀█ █░▀█ █ █░▀░█ █▀█ ░█░ █ █▄█ █░▀█
#

animations {
enabled = true

# --- BEZIERS DE FÍSICA ---

# 1. ANTICIPATION (To close):
# The curve drops to -0.1 (gains momentum behind) and then shoots to 1.
bezier = anticipate, 0.1, -0.1, 0.1, 1.0

# 2. INERTIA (To open):
# It arrives quickly and goes a little overboard (1.05) to settle smoothly.
bezier = inertia, 0.05, 0.9, 0.1, 1.05

# 3. FRICTION (To move):
# Starts fast, finishes very smooth.
bezier = friction, 0.05, 0.9, 0.1, 1.0

# ---ANIMATIONS ---

# INPUT: Pure inertia.
# We use 'slide' so that it enters from the bottom/side like a physical card.
animation = windowsIn, 1, 5, inertia, slide

# OUTPUT: Anticipation.
# Look at the effect: the window moves back a millimeter before flying away.
# We lower the speed to 6 so that there is time to see that "impulse".
animation = windowsOut, 1, 6, anticipate, slide

# MOVEMENT: Friction.
# No weird bounces, just smooth dragging.
animation = windowsMove, 1, 5, friction, slide

# LAYERS AND FADES: Synchronized.
# We go down from 10 to 5. Now the opacity goes hand in hand with the movement.
animation = fade, 1, 5, friction
animation = layers, 1, 5, friction, fade

# WORKSPACES:
# 'slidefade 20%' gives a very modern 3D depth sensation.
animation = workspaces, 1, 6, inertia, slidefade 20%
}
42 changes: 42 additions & 0 deletions hyprland-visual-editor/assets/animations/03_seda_minimalista.conf
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
# @Title: Minimalist Silk
# @Icon: circle-dot
# @Color: #818cf8
# @Tag: SOFT
# @Desc: Absolute smoothness. No bouncing, just perfect macOS-style landings.

# -----------------------------------------------------
# ▄▀█ █▄░█ █ █▀▄▀█ ▄▀█ ▀█▀ █ █▀█ █▄░█
# █▀█ █░▀█ █ █░▀░█ █▀█ ░█░ █ █▄█ █░▀█
#

animations {
enabled = true

# ---BEZIERS (PURE MATHEMATICS) ---
# Quartic Out: The curve of elegance. Brakes very smoothly.
bezier = quart, 0.25, 1, 0.5, 1

# Expo Out: For the desktops, we want the finish to be even smoother.
bezier = expo, 0.16, 1, 0.3, 1

# ---WINDOWS (The change to Popin) ---
# INPUT: 'popin 80%'. The window starts from the center (at 80% size) and grows.
# It's much more elegant than watching it fly from the side of the screen.
animation = windowsIn, 1, 6, quart, popin 80%

# OUTPUT: A little faster (Speed 5) so that it doesn't get in the way.
animation = windowsOut, 1, 5, quart, popin 80%

# MOVEMENT: We use 'quart' so that the window has weight when dragging it.
animation = windowsMove, 1, 6, quart, slide

# ---LAYERS ---
# Menus fade out smoothly.
animation = fade, 1, 6, quart

# ---WORK SPACES ---
# HERE IS THE TRICK: 'slidefade 20%'
# Instead of just swiping, the old desktop gets a little darker and zooms out.
# Gives a very subtle 3D depth sensation.
animation = workspaces, 1, 6, expo, slidefade 20%
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
# @Title: Snappy Minimalism
# @Icon:bolt
# @Color: #94a3b8
# @Tag: SNAPPY
# @Desc: Optimized for maximum speed. Only window and workspace management.


# -----------------------------------------------------
# ▄▀█ █▄░█ █ █▀▄▀█ ▄▀█ ▀█▀ █ █▀█ █▄░█
# █▀█ █░▀█ █ █░▀░█ █▀█ ░█░ █ █▄█ █░▀█
#

animations {
enabled = true

# Beziers específicos de movimiento
bezier = winIn, 0.07, 0.88, 0.04, 0.99
bezier = menu_decel, 0.05, 0.82, 0, 1
bezier = menu_accel, 0.38, 0, 1, 1 # <---ADDED! The missing piece
bezier = md3_decel, 0.05, 0.8, 0.1, 0.97
bezier = easeOutCirc, 0, 0.48, 0.38, 1

# Window Animations
animation = windowsIn, 1, 3.2, winIn, slide
animation = windowsOut, 1, 2.8, easeOutCirc, slide # Added 'slide' to prevent jumps
animation = windowsMove, 1, 3.0, md3_decel, slide

# Fades and Layers
animation = fade, 1, 1.8, md3_decel
animation = layersIn, 1, 1.8, menu_decel, slide
animation = layersOut, 1, 1.5, menu_accel, slide # Ahora 'menu_accel' ya existe

# Espacios de trabajo
animation = workspaces, 1, 4.0, menu_decel, slidefade 20%
animation = specialWorkspace, 1, 2.3, md3_decel, slidefade 15%
}
52 changes: 52 additions & 0 deletions hyprland-visual-editor/assets/animations/05_material_moderno.conf
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
# @Title: Modern Material
# @Icon: layers-intersect
# @Color: #c084fc
# @Tag: MODERN
# @Desc: Google Pixel aesthetic. Organic animations, subtle scales and haptic feedback.

# ------------------------------------------------------
# ▄▀█ █▄░█ █ █▀▄▀█ ▄▀█ ▀█▀ █ █▀█ █▄░█
# █▀█ █░▀█ █ █░▀░█ █▀█ ░█░ █ █▄█ █░▀█
#

animations {
enabled = true

# ---BEZIERS (Android Officials) ---
# Decel: For things that enter (stop when they arrive)
bezier = md3_decel, 0.05, 0.7, 0.1, 1
# Accel: For things that come out (accelerate as they leave)
bezier = md3_accel, 0.3, 0, 0.8, 0.15
# Standard: For movements within the screen
bezier = md3_standard, 0.2, 0, 0, 1

# ---WINDOWS (Subtle Scale) ---
# Entry: 'popin 80%'. Less travel, more elegance.
# Speed ​​4: A little softer than standard to appreciate the curve.
animation = windowsIn, 1, 4, md3_decel, popin 80%

# Output: 'popin 80%'. Shrinks slightly as it disappears.
# Speed ​​3: Fast, we don't want to wait for it to close.
animation = windowsOut, 1, 3, md3_accel, popin 80%

# Movement: [CRITICAL] Explicitly defined as 'slide'.
# We use 'md3_standard' to make it feel attached to the mouse but with weight.
animation = windowsMove, 1, 3, md3_standard, slide

# ---LAYERS AND MENUS (Consistency) ---
animation = fade, 1, 3, md3_decel

# Layers: If you enter by sliding, you exit by sliding.
animation = layersIn, 1, 3, md3_decel, slide
animation = layersOut, 1, 3, md3_accel, slide
animation = fadeLayersIn, 1, 2, md3_decel
animation = fadeLayersOut, 1, 2, md3_accel

# ---WORK SPACES (Depth) ---
# We use 'slidefade 20%' to simulate Android gesture navigation.
# The previous desktop darkens slightly when leaving.
animation = workspaces, 1, 5, md3_decel, slidefade 20%

# Special: Vertical slide (like app drawer).
animation = specialWorkspace, 1, 3, md3_decel, slide
}
48 changes: 48 additions & 0 deletions hyprland-visual-editor/assets/animations/06_impacto_clasico.conf
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
# @Title: Classic Impact
# @Icon: flame
# @Color: #fb7185
# @Tag: FX
# @Desc: Jelly effect. Elastic bounce on entry and anticipation on exit.

# ------------------------------------------------------
# ▄▀█ █▄░█ █ █▀▄▀█ ▄▀█ ▀█▀ █ █▀█ █▄░█
# █▀█ █░▀█ █ █░▀░█ █▀█ ░█░ █ █▄█ █░▀█
#

animations {
enabled = true

# ---CHARACTER BEZIERS ---

#1. ELASTIC (Entry): Go up fast and bounce at the end (Overshoot).
bezier = elastic, 0.05, 0.9, 0.1, 1.05
# 2. RETRO (Exit): Take momentum backwards (BackIn) and accelerate.
# This makes the window appear to "shrink" before disappearing.
bezier = retro, 0.6, -0.28, 0.735, 0.045

# 3. SMOOTH (Movement): To drag windows without looking like jelly.
bezier = smooth, 0.1, 1, 0.1, 1

# ---WINDOWS ---

# INPUT: Speed 6. The 'popin 80%' combined with 'elastic' creates the rebound effect.
animation = windowsIn, 1, 6, elastic, popin 80%
# OUTPUT: Speed ​​5 (A little faster).
# The 'retro' curve makes it suck in before leaving.
animation = windowsOut, 1, 5, retro, popin 80%

# MOVEMENT: We use 'slide' and a smooth curve.
# If we used 'elastic' here, the window would vibrate when released, which is dizzy.
animation = windowsMove, 1, 5, smooth, slide

# ---REST OF THE SYSTEM ---

# Standard fades
animation = fade, 1, 5, smooth
# Workspaces: We give them the same 'elastic' bounce so that the entire system
# feels playful and coherent.
animation = workspaces, 1, 6, elastic, slide

# Special: Vertical slide with rebound.
animation = specialWorkspace, 1, 6, elastic, slide
}
Loading