added a custom function to toggle the power of the oddesy monitor
This commit is contained in:
@@ -17,6 +17,37 @@ local function phoneSocket()
|
||||
-- If not on network notify
|
||||
end
|
||||
|
||||
|
||||
function C.RemoteToPhone()
|
||||
phoneSocket()
|
||||
end
|
||||
|
||||
local function OddesyConnectionStatus() -- returns connections status of oddesy monitor
|
||||
local monitors = hl.get_monitors()
|
||||
for _,m in ipairs(monitors) do
|
||||
if m.description == "Samsung Electric Company Odyssey G95C HNTL300212" then
|
||||
return true
|
||||
end
|
||||
end
|
||||
return false
|
||||
end
|
||||
|
||||
function C.ToggleOddessyConnection() -- Enables or disables oddessy monitor
|
||||
local s = OddesyConnectionStatus()
|
||||
if s then
|
||||
hl.exec_cmd('notify-send "Disabled Oddesy"')
|
||||
hl.monitor({ output = "DP-2", disabled = true })
|
||||
else
|
||||
hl.exec_cmd('notify-send "Enabled Oddesy"')
|
||||
hl.monitor({ output = "DP-2", disabled = false })
|
||||
hl.monitor({
|
||||
-- Use 'desc:' followed by your monitor's exact string from hyprctl
|
||||
output="desc:Samsung Electric Company Odyssey G95C HNTL300212",
|
||||
mode = "5120x1440@240", -- Explicitly lock the ultrawide canvas & high refresh rate
|
||||
scale = 1,
|
||||
vrr = true
|
||||
})
|
||||
end
|
||||
end
|
||||
|
||||
return C
|
||||
|
||||
Reference in New Issue
Block a user