Skip to content
Open
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
3 changes: 3 additions & 0 deletions bin/omacast
Original file line number Diff line number Diff line change
Expand Up @@ -260,6 +260,9 @@ cmd_setup_hyprland() {
-- Alt+Space reaches the plugin's global shortcut directly, so no process
-- starts per keypress. Omarchy's own menu stays on Super+Space.
o.bind("ALT + SPACE", "omacast launcher", hl.dsp.global("omacast:toggle"))
-- Blur behind the launcher; it only shows under Omarchy's Glassy windows,
-- where the card is see-through.
hl.layer_rule({ match = { namespace = "^omacast$" }, blur = true, ignore_alpha = 0.3 })
LUA
echo "wrote $file"
fi
Expand Down
22 changes: 21 additions & 1 deletion ui/LauncherWindow.qml
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import QtQuick
import Quickshell
import Quickshell.Io
import Quickshell.Wayland
import qs.Commons
import qs.Commons as Commons
Expand Down Expand Up @@ -58,6 +59,24 @@ PanelWindow {
})
readonly property var borderSpec: Border.surfaceSpec("menu", "border", Commons.Color.menu.border, Math.max(1, Style.space(2)))

// Omarchy's Glassy windows (`omarchy hyprland window transparency glassy`):
// the card turns see-through and Hyprland blurs what is behind it, through
// the blur rule on the omacast layer in omacast.lua. Panels drawn over the
// card stay solid. Checked on every show, so switching modes needs no restart.
property bool glassy: false
readonly property color cardBackground: window.glassy
? Qt.rgba(window.look.background.r, window.look.background.g, window.look.background.b, Math.min(window.look.background.a, 0.65))
: window.look.background
FileView {
id: glassToggle
path: (Quickshell.env("XDG_STATE_HOME") || Quickshell.env("HOME") + "/.local/state") + "/omarchy/toggles/hypr/window-glassy.lua"
// A few bytes on local disk: read in place so the first frame already has the right card.
blockLoading: true
printErrors: false
onLoaded: window.glassy = true
onLoadFailed: window.glassy = false
}

property var stack: [{ kind: "root", title: "omacast", query: "" }]
readonly property var view: window.stack[window.stack.length - 1]
property string query: ""
Expand Down Expand Up @@ -131,6 +150,7 @@ PanelWindow {
}

onShownChanged: {
if (window.shown) glassToggle.reload()
if (window.shown) return
window.searchSerial++
window.backend.cancelSearch()
Expand Down Expand Up @@ -667,7 +687,7 @@ PanelWindow {
radius: Math.max(Style.cornerRadius, window.px(8))
anchors.horizontalCenter: parent.horizontalCenter
y: Math.max(Style.gapsOut, Math.min(Math.round(window.height / 4), window.height - window.fullHeight - Style.gapsOut))
color: window.look.background
color: window.cardBackground
borderSpec: window.borderSpec
clip: true

Expand Down