added a custom function to toggle the power of the oddesy monitor
This commit is contained in:
@@ -1,5 +1,10 @@
|
||||
{
|
||||
"diagnostics": {
|
||||
"globals": ["hl", "ipc", "mainMod"]
|
||||
},
|
||||
"workspace": {
|
||||
"library": [
|
||||
"/usr/share/hypr/stubs"
|
||||
]
|
||||
}
|
||||
}
|
||||
|
||||
@@ -136,9 +136,6 @@ hl.bind("code:148" ,hl.dsp.exec_cmd(ipc .. "plugin:noctalia-calulator toggle")
|
||||
hl.bind(" ALT + Q " , hl.dsp.exec_cmd(terminal, {float = true, border_size = 2, size = {"(monitor_w * 0.8)", "(monitor_h * 0.7)"}}))
|
||||
hl.bind(mainMod .. " + W ", hl.dsp.exec_cmd(terminal, {float = true, border_size = 2, size = {"(monitor_w * 0.8)", "(monitor_h * 0.7)"}}))
|
||||
|
||||
-- TODO rework with LUA
|
||||
-- hl.bind(mainMod .. " + escape" ,hl.dsp.exec_cmd("kitty --class btop -o "confirm_os_window_close 0" /usr/bin/btop"))
|
||||
-- hl.bind(mainMod .. " + SHIFT + escape" ,hl.dsp.exec_cmd("kitty --class btop -o "confirm_os_window_close 0" /usr/bin/nvtop"))
|
||||
hl.bind(mainMod .. " + escape" ,hl.dsp.exec_cmd("kitty btop" ,{float = true, border_size = 2, size = {"(monitor_w * 0.9)", "(monitor_h * 0.9)"}}))
|
||||
hl.bind("CTRL + SHIFT + ESCAPE" ,hl.dsp.exec_cmd("kitty btop" ,{float = true, border_size = 2, size = {"(monitor_w * 0.9)", "(monitor_h * 0.9)"}}))
|
||||
hl.bind(mainMod .. " + SHIFT + escape" ,hl.dsp.exec_cmd("kitty nvtop",{float = true, border_size = 2, size = {"(monitor_w * 0.9)", "(monitor_h * 0.9)"}}))
|
||||
@@ -152,6 +149,8 @@ hl.bind(mainMod .. " + SHIFT + I" ,hl.dsp.exec_cmd("scrcpy --no-audio --keyboar
|
||||
hl.bind(mainMod .. " + CTRL + L " , hl.dsp.exec_cmd(ipc .. "lockScreen lock"))
|
||||
-- Move window to monitor darkspot
|
||||
hl.bind(mainMod .. " + ALT + H" , custom.MoveToDarkSpot)
|
||||
-- hl.monitor({ output = "DP-2", disabled = false })
|
||||
hl.bind(mainMod .. "+ grave" ,custom.ToggleOddessyConnection)
|
||||
|
||||
|
||||
-- TODO Implement these
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -5,13 +5,14 @@
|
||||
_G.terminal = "kitty"
|
||||
_G.fileManager = "dolphin"
|
||||
_G.menu = "qs -c noctalia-shell ipc call launcher toggle"
|
||||
_G.launcher = "hyprlauncher"
|
||||
_G.launcher = "vicinae"
|
||||
_G.browser = "firefox"
|
||||
_G.menuBar = "qs -c noctalia-shell"
|
||||
_G.shellWrapper = "qs -c noctalia-shell"
|
||||
_G.blkmanager = "udiskie"
|
||||
_G.email = "thunderbird"
|
||||
_G.notes = "obsidian"
|
||||
_G.functions = require("custom-functions")
|
||||
|
||||
hl.on("hyprland.start", function()
|
||||
-- Force D-Bus and Systemd to catch the Wayland display variables instantly
|
||||
|
||||
36
monitors.lua
36
monitors.lua
@@ -1,29 +1,7 @@
|
||||
-- -- Define the workspace rules table
|
||||
-- local workspace_rules = {}
|
||||
|
||||
-- -- Forcing workspaces 1 through 5 to use the master layout on the ultrawide
|
||||
-- for w = 1, 5 do
|
||||
-- table.insert(workspace_rules, string.format("%d, monitor:DP-1, layout:master", w))
|
||||
-- end
|
||||
|
||||
-- -- Keeping the global default layout for these workspaces on the secondary screen
|
||||
-- for w = 6, 10 do
|
||||
-- table.insert(workspace_rules, string.format("%d, monitor:HDMI-A-1", w))
|
||||
-- end
|
||||
|
||||
-- -- Inject them into your config wrapper
|
||||
-- hl.config({
|
||||
-- workspace = workspace_rules
|
||||
-- })
|
||||
-- Initialize the workspace array inside the config table if it doesn't exist
|
||||
hl.config.workspace = hl.config.workspace or {}
|
||||
|
||||
-- Forcing workspaces 1 through 5 to use the master layout on the ultrawide
|
||||
for w = 1, 5 do
|
||||
table.insert(hl.config.workspace, string.format("%d, monitor:DP-1, layout:master", w))
|
||||
end
|
||||
|
||||
-- Keeping the global default layout for these workspaces on the secondary screen
|
||||
for w = 6, 10 do
|
||||
table.insert(hl.config.workspace, string.format("%d, monitor:HDMI-A-1", w))
|
||||
end
|
||||
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
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user