From bff9e48dfe89e67dc4a2d281dba18d82815f0b35 Mon Sep 17 00:00:00 2001 From: venus Date: Mon, 8 Jun 2026 23:56:53 -0500 Subject: [PATCH] added some keybinds for screen tools and updated calculator plugin --- basic/keybinds.lua | 28 ++++++++++++++++++++++++---- basic/vars.lua | 4 ++++ custom-functions.lua | 16 ++++++++++++++++ hyprland.lua | 6 +++--- 4 files changed, 47 insertions(+), 7 deletions(-) diff --git a/basic/keybinds.lua b/basic/keybinds.lua index 2ff6c6c..088bcb9 100644 --- a/basic/keybinds.lua +++ b/basic/keybinds.lua @@ -5,6 +5,7 @@ local mainMod = "SUPER" -- Sets "Windows" key as main modifier local ipc = "qs -c noctalia-shell ipc call " +local custom = require("custom-functions") -- 1. Basic Binds hl.bind(mainMod .. " + Q ", hl.dsp.exec_cmd(terminal)) @@ -129,7 +130,8 @@ hl.bind(mainMod .. " + SPACE " ,hl.dsp.exec_cmd("playerctl play-pause")) hl.bind(mainMod .. " + SUPER_L", hl.dsp.exec_cmd(launcher .. " toggle"), { release = true }) hl.bind(mainMod .. " + F " ,hl.dsp.exec_cmd(browser)) hl.bind("ALT + C" ,hl.dsp.exec_cmd(ipc .. "plugin:clipper openPanel")) -hl.bind("code:148" ,hl.dsp.exec_cmd("kitty --class calc-term -o 'confirm_os_window_close 0' /home/venus/.cargo/bin/mathypad ")) +-- hl.bind("code:148" ,hl.dsp.exec_cmd("kitty --class calc-term -o 'confirm_os_window_close 0' /home/venus/.cargo/bin/mathypad ")) +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)"}})) @@ -147,7 +149,9 @@ hl.bind(mainMod .. " + SHIFT + I" ,hl.dsp.exec_cmd("scrcpy --no-audio --keyboar ---- 10.1 Shortcuts -hl.bind(mainMod .. " + CTRL + L ", hl.dsp.exec_cmd(ipc .. "lockScreen lock")) +hl.bind(mainMod .. " + CTRL + L " , hl.dsp.exec_cmd(ipc .. "lockScreen lock")) +-- Move window to monitor darkspot +hl.bind(mainMod .. " + ALT + H" , custom.MoveToDarkSpot) -- TODO Implement these @@ -170,9 +174,24 @@ end) -- hl.bind(mainMod .. " + O ", hl.dsp.submap("open-apps")) ----- 13. Mouse binds ---- 14. submaps! +hl.bind(mainMod .. "+ PRINT" ,function() + hl.exec_cmd(ipc .. "plugin:screen-toolkit toggle") + hl.dispatch(hl.dsp.submap("screen-toolkit")) +end) + +hl.define_submap("screen-toolkit", "reset", function() + hl.bind("S" ,hl.dsp.exec_cmd(ipc .. " plugin:screen-toolkit toggle")) + hl.bind("C" ,hl.dsp.exec_cmd(ipc .. " plugin:screen-toolkit color")) + hl.bind("P" ,hl.dsp.exec_cmd(ipc .. " plugin:screen-toolkit pallete")) + hl.bind("O" ,hl.dsp.exec_cmd(ipc .. " plugin:screen-toolkit ocr")) + hl.bind("L" ,hl.dsp.exec_cmd(ipc .. " plugin:screen-toolkit lens")) + hl.bind("A" ,hl.dsp.exec_cmd(ipc .. " plugin:screen-toolkit annotate")) + hl.bind("SHIFT + A" ,hl.dsp.exec_cmd(ipc .. " plugin:screen-toolkit annotateWindow")) + hl.bind("R" ,hl.dsp.exec_cmd(ipc .. " plugin:screen-toolkit recordMp4")) + hl.bind("SHIFT + R" ,hl.dsp.exec_cmd(ipc .. " plugin:screen-toolkit recordFullscreenMp4")) +end) -- TODO write a timer submap that starts a timer of custom length when a key is pressed hl.bind(mainMod .. " + T" ,function() hl.dispatch(hl.dsp.submap("timer")) @@ -196,7 +215,8 @@ hl.define_submap("quick-settings", function () hl.bind("S" ,hl.dsp.exec_cmd(ipc .. "settings toggle")) hl.bind("C" ,hl.dsp.exec_cmd(ipc .. "plugin:clipper togglePanel ")) hl.bind("P" ,hl.dsp.exec_cmd(ipc .. "sessionMenu toggle")) - hl.bind("T" ,hl.dsp.exec_cmd(ipc .. "systemMonitor toggle")) + hl.bind("R" ,hl.dsp.exec_cmd(ipc .. "systemMonitor toggle")) + hl.bind("T" ,hl.dsp.exec_cmd(ipc .. "plugin:timer toggle")) hl.bind("M" ,hl.dsp.exec_cmd(ipc .. "controlCenter toggle")) hl.bind("D" ,hl.dsp.exec_cmd(ipc .. "notifications toggleDND")) hl.bind("A" ,hl.dsp.exec_cmd(ipc .. "notifications dismissAll")) diff --git a/basic/vars.lua b/basic/vars.lua index ce38c21..c4ad063 100644 --- a/basic/vars.lua +++ b/basic/vars.lua @@ -33,6 +33,10 @@ hl.config = { }, } +hl.env("XCURSOR_SIZE", "24") +hl.env("HYPRCURSOR_SIZE", "24") +hl.env("ELECTRON_OZONE_PLATFORM_HINT", "auto") +hl.env("QT_QPA_PLATFORMTHEME", "qt6ct") ------------------- --- PERMISSIONS --- ------------------- diff --git a/custom-functions.lua b/custom-functions.lua index 326d28a..72fe24b 100644 --- a/custom-functions.lua +++ b/custom-functions.lua @@ -3,4 +3,20 @@ local C = {} function C.startTimer() -- TODO implement custom timer logic here end +function C.MoveToDarkSpot() + local targetMonitor = "DP-9" + hl.dispatch(hl.dsp.window.move({monitor = targetMonitor, x = 0, y = 0})) + hl.exec_cmd("notify-send 'moved to " .. targetMonitor .. "'") +end + +local function phoneSocket() + -- Determine phone socket connection + -- Determine wired or wireless state + -- If wired connect over cable and set phone socket + -- If wireless connect over socker + -- If not on network notify +end + +function C.RemoteToPhone() +end return C diff --git a/hyprland.lua b/hyprland.lua index 0aaa2ae..e086995 100644 --- a/hyprland.lua +++ b/hyprland.lua @@ -22,9 +22,9 @@ hl.on("hyprland.start", function() hl.exec_cmd("kdeconnectd") -- hl.exec_cmd("hyprshell run &") hl.exec_cmd("vesktop -m", {workspace ="special:vesktop silent"}) - hl.exec_cmd(email, {workspace ="special:vesktop silent"}) - hl.exec_cmd(notes, {workspace ="special:vesktop silent"}) - hl.exec_cmd("steam --forcedesktopscaling 0.5", {workspace ="special:vesktop silent"}) + hl.exec_cmd(email, {workspace ="special:email silent"}) + hl.exec_cmd(notes, {workspace ="special:notes silent"}) + hl.exec_cmd("steam --forcedesktopscaling 0.5", {workspace ="special:gaming silent"}) hl.exec_cmd("protonmail-bridge") --no-window) TODO set up sddm to unlock keychain end)