Skip to content
CyrenArkadePublic

About

KDE's edge effects for Hyprland

Resources

Stars

0 stars

Watchers

1 watching

Forks

Latest commit

 

History

27 Commits

Folders and files

Repository files navigation

hypredge

KDE's edge effects for Hyprland.

Functions

hl.plugin.hypredge.edge_effect(edge, dispatcher):
Triggers a dispatcher when the cursor enters a region of a monitor. Valid edges are top, bottom, left, right, topleft, topright, bottomleft, bottomright.
Valid dispatchers include hl.dsp... as well as lua functions.

hl.plugin.hypredge.move_cursor_to_edge(edge):
Moves the cursor to that edge of the screen, not affecting the other axis.
Valid edges are top, bottom, left, right.
This will be made into a dispatcher once this issue is fixed.

Window Rule

Adds the effect hypredge_ignore_constraints [on|off].
By default, hypredge will not trigger edge effects if the mouse is constrained. This overrides that, allowing edge effects to always trigger.

Example config

if hl.plugin.hypredge ~= nil then
  hl.config({
    plugin = {
      hypredge = {
        corner_barrier = 100 -- default
      }
    }
  })

  -- This emulates workspace switching by screen edge, like in KDE.
  hl.plugin.hypredge.edge_effect("left", function()
    hl.dispatch(hl.dsp.focus({ workspace = "e-1" }))
    hl.plugin.hypredge.move_cursor_to_edge("right")
  end)
  hl.plugin.hypredge.edge_effect("right", function()
    hl.dispatch(hl.dsp.focus({ workspace = "e+1" }))
    hl.plugin.hypredge.move_cursor_to_edge("left")
  end)

  -- You can use any dispatchers you want!
  hl.plugin.hypredge.edge_effect("bottom", hl.dsp.exec_cmd("kitty"))

  -- Corners are also trigger areas!
  hl.plugin.hypredge.edge_effect("topright", hl.dsp.exec_cmd("firefox"))

  -- This lets dispatchers trigger when FFXIV is focused.
  -- Normally, it constrains the mouse meaning edge effects do not fire.
  hl.window_rule({
    match = { title = "FINAL FANTASY XIV" },
    hypredge_ignore_constraints = "on",
  })
end

About

KDE's edge effects for Hyprland

Resources

Stars

0 stars

Watchers

1 watching

Forks

Releases

Packages

Contributors

Languages