v0 of the first tvos

This commit is contained in:
ari committed 2026-09-12 19:02:24 -04:00
1 parent 33597a432c
commit ce2e4a4558
5 files changed
+21 -22

No files matched your search

+1 -1
View File
@@ -23,7 +23,7 @@ end
---@param url string ---@param url string
---@return fun(w: HL.Window): boolean ---@return fun(w: HL.Window): boolean
local function make_target_validation_for_chromium_apps(url) local function make_target_validation_for_chromium_apps(url)
local host = url:match("^https?://([^/]+)") local host = url:match("^https?://([^/:]+)")
local host_pattern = escape_pattern(host) local host_pattern = escape_pattern(host)
---@param w HL.Window ---@param w HL.Window
---@return boolean ---@return boolean
+1
View File
@@ -10,3 +10,4 @@ require("conf/inputs")
require("conf/window-rules") require("conf/window-rules")
require("conf/keybindings") require("conf/keybindings")
require("conf/autostart") require("conf/autostart")
require("/home/ari/nixos-setup/configs/hl-fws1/hypr/conf/apps.lua")
+9 -11
View File
@@ -7,7 +7,7 @@ end
---@param url string ---@param url string
---@return fun(w: HL.Window): boolean ---@return fun(w: HL.Window): boolean
local function make_target_validation_for_chromium_apps(url) local function make_target_validation_for_chromium_apps(url)
local host = url:match("^https?://([^/]+)") local host = url:match("^https?://([^/:]+)")
local host_pattern = escape_pattern(host) local host_pattern = escape_pattern(host)
---@param w HL.Window ---@param w HL.Window
---@return boolean ---@return boolean
@@ -21,25 +21,24 @@ end
---Focus an already-tagged window if one exists. ---Focus an already-tagged window if one exists.
---@param tag string ---@param tag string
---@return boolean ---@return HL.Window | nil
local function attempt_to_switch_to_existing(tag) local function attempt_to_switch_to_existing(tag)
local existing = hl.get_windows({ tag = tag }) local existing = hl.get_windows({ tag = tag })
if existing and #existing > 0 then if existing and #existing > 0 then
hl.dispatch(hl.dsp.focus({ window = existing[1] })) return existing[1]
return true
end end
return false return nil
end end
---@param tag string ---@param tag string
---@param cmd string ---@param cmd string
---@param is_target_window fun(w: HL.Window): boolean ---@param is_target_window fun(w: HL.Window): boolean
---@return fun() ---@return fun(): hl.DispatcherValue
local function make_commandable(tag, cmd, is_target_window) local function make_commandable(tag, cmd, is_target_window)
return function() return function()
if attempt_to_switch_to_existing(tag) then local existing = attempt_to_switch_to_existing(tag)
return if existing ~= nil then
return hl.dsp.focus({ window = existing })
end end
---@type HL.EventSubscription ---@type HL.EventSubscription
@@ -52,7 +51,6 @@ local function make_commandable(tag, cmd, is_target_window)
if not is_target_window(w) then if not is_target_window(w) then
return -- not our window, keep listening return -- not our window, keep listening
end end
hl.notification.create({ title = cmd, text = "Window opened", color = 1 })
sub:remove() sub:remove()
timeout:set_enabled(false) timeout:set_enabled(false)
hl.dispatch(hl.dsp.window.tag({ tag = "+" .. tag, window = w })) hl.dispatch(hl.dsp.window.tag({ tag = "+" .. tag, window = w }))
@@ -62,7 +60,7 @@ local function make_commandable(tag, cmd, is_target_window)
sub:remove() sub:remove()
end, { timeout = 5000, type = "oneshot" }) end, { timeout = 5000, type = "oneshot" })
hl.dispatch(hl.dsp.exec_cmd(cmd)) return hl.dsp.exec_cmd(cmd)
end end
end end
+6 -6
View File
@@ -5,32 +5,32 @@
{ {
"name": "Sosnovsky Video", "name": "Sosnovsky Video",
"image": "/home/ari/.config/hypr/images/jellyfin.png", "image": "/home/ari/.config/hypr/images/jellyfin.png",
"exec": ["hyprctl", "eval", "'CarouselApps.jellyfin()'"] "hyprlandDispatch": "CarouselApps.jellyfin()"
}, },
{ {
"name": "Netflix", "name": "Netflix",
"image": "/home/ari/.config/hypr/images/Netflix.svg", "image": "/home/ari/.config/hypr/images/Netflix.svg",
"exec": ["hyprctl", "eval", "'CarouselApps.netflix()'"] "hyprlandDispatch": "CarouselApps.netflix()"
}, },
{ {
"name": "Paramount+", "name": "Paramount+",
"image": "https://www.paramountplus.com/assets/pplus/PPlus_Logo_1200x630_BLUE.png", "image": "https://www.paramountplus.com/assets/pplus/PPlus_Logo_1200x630_BLUE.png",
"exec": ["hyprctl", "eval", "'CarouselApps.paramountplus()'"] "hyprlandDispatch": "CarouselApps.paramountplus()"
}, },
{ {
"name": "Prime Video", "name": "Prime Video",
"image": "https://m.media-amazon.com/images/G/01/digital/video/DVUI/favicons/mstile-310x150.png", "image": "https://m.media-amazon.com/images/G/01/digital/video/DVUI/favicons/mstile-310x150.png",
"exec": ["hyprctl", "eval", "'CarouselApps.primevideo()'"] "hyprlandDispatch": "CarouselApps.primevideo()"
}, },
{ {
"name": "YouTube", "name": "YouTube",
"image": "/home/ari/.config/hypr/images/youtube.webp", "image": "/home/ari/.config/hypr/images/youtube.webp",
"exec": ["hyprctl", "eval", "'CarouselApps.youtube()'"] "hyprlandDispatch": "CarouselApps.youtube()"
}, },
{ {
"name": "Chromium", "name": "Chromium",
"image": "/home/ari/.config/hypr/images/Chromium.svg", "image": "/home/ari/.config/hypr/images/Chromium.svg",
"exec": ["hyprctl", "eval", "'CarouselApps.chromium()'"] "hyprlandDispatch": "CarouselApps.chromium()"
}, },
{ {
"name": "Spotify", "name": "Spotify",
Generated
+4 -4
View File
@@ -1824,11 +1824,11 @@
] ]
}, },
"locked": { "locked": {
"lastModified": 1789155631, "lastModified": 1789253894,
"narHash": "sha256-a41FlYSbWsIv2qXO6NOmPPNpxwUpCTuDk/r/Gr9wrYs=", "narHash": "sha256-BeVVFNhJWN4TIci9Y+aC36ir8OlPzcMjerO7M4Bx2C4=",
"ref": "refs/heads/main", "ref": "refs/heads/main",
"rev": "ca9047901ad587772daa64fc6b0403e8607e6f2a", "rev": "70a6437c7f2e6914d956e07df33fb73d1f7cf251",
"revCount": 9, "revCount": 11,
"type": "git", "type": "git",
"url": "ssh://gitea@minipc1.lab.internal:22/ari/skygqts.git" "url": "ssh://gitea@minipc1.lab.internal:22/ari/skygqts.git"
}, },