From 6ef80df50d68950468a9baac9cc5ea0f7a28105e Mon Sep 17 00:00:00 2001 From: voidarc Date: Sun, 8 Nov 2026 13:52:40 +0000 Subject: [PATCH] initial --- .gitignore | 1 + autoload.lua | 26 ++++++++++++++++++++++++++ events.lua | 3 +++ hyprland.lua | 12 ++++++++++++ modules/binds.lua | 1 + 5 files changed, 43 insertions(+) create mode 100644 .gitignore create mode 100644 autoload.lua create mode 100644 events.lua create mode 100644 hyprland.lua create mode 100644 modules/binds.lua diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..0b9f7f2 --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +/.session diff --git a/autoload.lua b/autoload.lua new file mode 100644 index 0000000..e95da2b --- /dev/null +++ b/autoload.lua @@ -0,0 +1,26 @@ +local hyprRoot +local modules + +if os.getenv("HYPRLAND_ROOT") then + hyprRoot = os.getenv("HYPRLAND_ROOT") +else + hyprRoot = os.getenv("Home") .. "/.config/hypr" +end + +modules = hyprRoot .. "/modules" + +local p = io.popen('find -L "' .. modules .. '" -name "*.lua" -type f | sort') +if not p then + return +end + +for path in p:lines() do + local ok, error = pcall(dofile, path) + if not ok then + hl.notification.create({ + text = "autoload: " .. path .. "\n" .. tostring(error), + timeout = 8000, + icon = "warning", + }) + end +end diff --git a/events.lua b/events.lua new file mode 100644 index 0000000..1b2dfa9 --- /dev/null +++ b/events.lua @@ -0,0 +1,3 @@ +hl.on("hyprland.start", function() + hl.exec_cmd("waybar") +end) diff --git a/hyprland.lua b/hyprland.lua new file mode 100644 index 0000000..3ddf77e --- /dev/null +++ b/hyprland.lua @@ -0,0 +1,12 @@ +local handle = io.popen("hostname") +Hostname = "default" + +if handle then + local result = handle:read("*l") + handle:close() + if result then + Hostname = result:gsub("%s+", "") -- "HACKSTATION" + end +end + +pcall(dofile, os.getenv("HYPRLAND_ROOT") .. "/autoload.lua") diff --git a/modules/binds.lua b/modules/binds.lua new file mode 100644 index 0000000..95219b3 --- /dev/null +++ b/modules/binds.lua @@ -0,0 +1 @@ +hl.bind("SUPER + v", hl.dsp.exec_cmd("foot"))