Compare commits

...

15 Commits

8 changed files with 177 additions and 106 deletions

View File

@@ -16,14 +16,19 @@ else
modules = os.getenv("HOME") .. "/.config/hypr/modules"
end
local pluginsOk, pluginsErr = pcall(dofile, hyprRoot .. "/plugins.lua")
if not pluginsOk then
local function importRelativeModule(module)
local ok, err = pcall(dofile, hyprRoot .. "/" .. module)
if not ok then
hl.notification.create({
text = "autoload: " .. hyprRoot .. "plugins.lua" .. "\n" .. tostring(pluginsErr),
text = "autoload: " .. hyprRoot .. module .. "\n" .. tostring(err),
timeout = 8000,
icon = "warning",
})
end
end
importRelativeModule("plugins.lua")
importRelativeModule("runtime.lua")
-- Get all files in modules dir
local p = io.popen('find -L "' .. modules .. '" -name "*.lua" -type f | sort')

108
flake.lock generated
View File

@@ -20,11 +20,11 @@
]
},
"locked": {
"lastModified": 1784368054,
"narHash": "sha256-zF1iJkBQSDWmRO4/LEeHR1SpKY0lqZaxkoQJpPS9K9U=",
"lastModified": 1789630322,
"narHash": "sha256-jiUl3+k9K+BASO4hvKFhlCMUpHPPoy2q5uZMl3pzOF0=",
"owner": "hyprwm",
"repo": "aquamarine",
"rev": "9b5f14d9483445e766294eb8fbe0b8f370269ed0",
"rev": "f31c47a1b9d300847d8fc3108ad959448103dfc1",
"type": "github"
},
"original": {
@@ -137,11 +137,11 @@
]
},
"locked": {
"lastModified": 1776511930,
"narHash": "sha256-fCpwFiTW0rT7oKJqr3cqHMnkwypSwQKpbtUEtxdkgrM=",
"lastModified": 1786464181,
"narHash": "sha256-2alOMkLjXANh7unkZnYnCF2K2rApZaOLMoQ3o+VX2CY=",
"owner": "hyprwm",
"repo": "hyprcursor",
"rev": "39435900785d0c560c6ae8777d29f28617d031ef",
"rev": "e4ed7c08123df5af460a0a70961380cbfb872f76",
"type": "github"
},
"original": {
@@ -166,11 +166,11 @@
]
},
"locked": {
"lastModified": 1782566056,
"narHash": "sha256-haEZcHzYrePnjFOYSWTbxm/Nrla0aPslJfmvdCvqtVc=",
"lastModified": 1786464367,
"narHash": "sha256-k58p4wbzIXWyRWrW84pP8tD+iaZSSYiiM+fr0Auk4oU=",
"owner": "hyprwm",
"repo": "hyprgraphics",
"rev": "c6e7b9f673f4360bc813d3dc75028f75ee88d3f8",
"rev": "7c895c44e3ca6d28ed68ddd80ec02b02b925e7fc",
"type": "github"
},
"original": {
@@ -196,11 +196,11 @@
"xdph": "xdph"
},
"locked": {
"lastModified": 1785237127,
"narHash": "sha256-sMSWRj9zZ3O4Q1Bk8mKkdXsTb3zpXRESlrzWmQXmW54=",
"lastModified": 1789814244,
"narHash": "sha256-X8GK0kUU8WAPD4072wafvbcRRtYWiFCSA5Iyz9mr6KU=",
"owner": "hyprwm",
"repo": "Hyprland",
"rev": "ff24e1755fd308ee70367d63168a12feb05d1fc2",
"rev": "5fbb2a7acce2d6f155d18cf5b590fc553a8e7abc",
"type": "github"
},
"original": {
@@ -242,11 +242,11 @@
]
},
"locked": {
"lastModified": 1784196523,
"narHash": "sha256-ahtKMGXFJdlQNhatQm1+BBU/pGfGYnAqQt3vWvq4p8s=",
"lastModified": 1786464504,
"narHash": "sha256-7sHwM86KILQyHDHDuE2SDBlQ2jvZ0EW3hY7sW009/cg=",
"owner": "hyprwm",
"repo": "hyprland-guiutils",
"rev": "a6ccb6cb112ed5a244c0191fb972347ecfa893e0",
"rev": "4c30cf3097ea963c0e250749ee0c59f8b08816d6",
"type": "github"
},
"original": {
@@ -267,11 +267,11 @@
]
},
"locked": {
"lastModified": 1772460177,
"narHash": "sha256-/6G/MsPvtn7bc4Y32pserBT/Z4SUUdBd4XYJpOEKVR4=",
"lastModified": 1789475883,
"narHash": "sha256-YRFLrPESYitsDYqQKquOFg8OWNI7tHKwPnTrTZWXxWY=",
"owner": "hyprwm",
"repo": "hyprland-protocols",
"rev": "1cb6db5fd6bb8aee419f4457402fa18293ace917",
"rev": "cc9a8fd253bdc00f48a967ecf4828211ef08751f",
"type": "github"
},
"original": {
@@ -296,11 +296,11 @@
]
},
"locked": {
"lastModified": 1777320127,
"narHash": "sha256-Qu+Wf2Bp5qUjyn2YpZNq8a7JyzTGowhT1knrwE38a9U=",
"lastModified": 1786464129,
"narHash": "sha256-339AkTlpMYSIvFuG0rnR+8Yg4/AZKeJalshJavlnKfg=",
"owner": "hyprwm",
"repo": "hyprlang",
"rev": "090117506ddc3d7f26e650ff344d378c2ec329cc",
"rev": "9508458be316a0d70d37ebed1ab725ccd10411ff",
"type": "github"
},
"original": {
@@ -348,11 +348,11 @@
]
},
"locked": {
"lastModified": 1782554491,
"narHash": "sha256-+p3MlyN/nqRefcf2IckPlGRUn9+hielqpS9XClbLleM=",
"lastModified": 1785930473,
"narHash": "sha256-DitTu625BhEYpZjtjxtGpjrEJwPwW+X/+jJvhSZNSJM=",
"owner": "hyprwm",
"repo": "hyprtoolkit",
"rev": "bdba25ced39ea39ab004a8f31593ba0b0ff1ca35",
"rev": "af515b69dfbe366dc7873aa1475cb2f4db3ebad7",
"type": "github"
},
"original": {
@@ -373,11 +373,11 @@
]
},
"locked": {
"lastModified": 1784323413,
"narHash": "sha256-XnAVV+H4f8Xdv0yZcSwJ5kCjLyE8fHxPeLX6a3HSrAU=",
"lastModified": 1788619883,
"narHash": "sha256-dpmeFq5vPvSOsi30ZchOLjltAZEuVBucDvGKs3IZYf4=",
"owner": "hyprwm",
"repo": "hyprutils",
"rev": "5f03477ab3a005ff27c527486f551883535aea2f",
"rev": "a21e87b878e72ee5dfd375899e8b2ad0d0c4c0e1",
"type": "github"
},
"original": {
@@ -398,11 +398,11 @@
]
},
"locked": {
"lastModified": 1777159683,
"narHash": "sha256-Jxixw6wZphUp+nHYxOKUYSckL17QMBx2d5Zp0rJHr1g=",
"lastModified": 1786464033,
"narHash": "sha256-QM8Qe4/L8lpdVN4bgwahmi+jyyc4fisseDMe4afcDxA=",
"owner": "hyprwm",
"repo": "hyprwayland-scanner",
"rev": "b8632713a6beaf28b56f2a7b0ab2fb7088dbb404",
"rev": "62e62c1ca23da17612c6890d4ad2064f575643db",
"type": "github"
},
"original": {
@@ -427,11 +427,11 @@
]
},
"locked": {
"lastModified": 1778410714,
"narHash": "sha256-o6RzFj4nJXaPRY7EM01siuCQeT41RfwwmcmFQqwFJJg=",
"lastModified": 1786464294,
"narHash": "sha256-ZQsZ2WvBdkboCIyh8LStDPdAIARmxzn0XMNxxoOhjPE=",
"owner": "hyprwm",
"repo": "hyprwire",
"rev": "85148a8e612808cf5ddb25d0b3c5840f3498a7dc",
"rev": "4ce7cd6b6128c1ac41caf23c58a30a26b327f9dd",
"type": "github"
},
"original": {
@@ -442,11 +442,11 @@
},
"nixpkgs": {
"locked": {
"lastModified": 1784356753,
"narHash": "sha256-12KrbMiWLcf8m7pCvAtZh1ZrgF85ZXDXvfR/fWTKy84=",
"lastModified": 1789684949,
"narHash": "sha256-ZKhUe/2IJUq1JhKxKMu8rbkgSGmPP2ZCqlIPn40aGCM=",
"owner": "NixOS",
"repo": "nixpkgs",
"rev": "61b7c44c4073f0b827768aff0049561b5110ea5a",
"rev": "e554fab72f81915600f3f449b786fd9af40439a5",
"type": "github"
},
"original": {
@@ -473,11 +473,11 @@
},
"nixpkgs_2": {
"locked": {
"lastModified": 1785090369,
"narHash": "sha256-m0pDuRJG7EDo9ri+4Ksu83VsI+PlxNC9lNBfydejce4=",
"lastModified": 1789684949,
"narHash": "sha256-ZKhUe/2IJUq1JhKxKMu8rbkgSGmPP2ZCqlIPn40aGCM=",
"owner": "nixos",
"repo": "nixpkgs",
"rev": "624af665418d3c65d544145b4d34ad696439570e",
"rev": "e554fab72f81915600f3f449b786fd9af40439a5",
"type": "github"
},
"original": {
@@ -505,11 +505,11 @@
},
"nixpkgs_4": {
"locked": {
"lastModified": 1773734432,
"narHash": "sha256-IF5ppUWh6gHGHYDbtVUyhwy/i7D261P7fWD1bPefOsw=",
"lastModified": 1787498568,
"narHash": "sha256-9i/VTdusq/+NM/tz+J1Re+ojkMB8MBf0QshnYfzHz30=",
"owner": "NixOS",
"repo": "nixpkgs",
"rev": "cda48547b432e8d3b18b4180ba07473762ec8558",
"rev": "56c02bc00adcf003215cc4bd996d6efaf4cff188",
"type": "github"
},
"original": {
@@ -529,11 +529,11 @@
"systems": "systems_2"
},
"locked": {
"lastModified": 1783875707,
"narHash": "sha256-Ryg3PqFcGydelQpgPF0j8GMaXaGDrNTSesEy6fDw/eg=",
"lastModified": 1789817313,
"narHash": "sha256-ylVsprB4GxLJMvYQUFtMOz8x8D1Mp7FPudbn89wCasU=",
"owner": "kuokuo123",
"repo": "otter-launcher",
"rev": "242e5da4f0acc0b4301be7b4546f5afb3e4b23d6",
"rev": "d764523df810d2b601222009393e886495100fb8",
"type": "github"
},
"original": {
@@ -551,11 +551,11 @@
]
},
"locked": {
"lastModified": 1784288435,
"narHash": "sha256-ReRHaLgr/uVqdD8afFSn+myXIfpHeOhP0yYe0TJqAA8=",
"lastModified": 1789514889,
"narHash": "sha256-PFD1nxptCXJyJoiYO1gf/5Vv43yqGpHtMC6LUhl9/pQ=",
"owner": "cachix",
"repo": "git-hooks.nix",
"rev": "43b3c1ab9d40fb1dbb008f451988a91e375825e9",
"rev": "59f4ca0d063a1a3ec722c88b51a33004862e5379",
"type": "github"
},
"original": {
@@ -659,11 +659,11 @@
"nixpkgs": "nixpkgs_4"
},
"locked": {
"lastModified": 1785177581,
"narHash": "sha256-9Z4l080DSrHMxoQTZTpVsML2h6JDuB9lDwHPsLd9BrQ=",
"lastModified": 1789546006,
"narHash": "sha256-hv8Y2AcOGuCoI/5fVjPZzCAOygTbL9wvvY9HKXvvLEk=",
"owner": "lassulus",
"repo": "wrappers",
"rev": "f57bc81aa9669871343341b13aa175c8927b6a74",
"rev": "e6676c0f59edd80dc1afb6a00047f5578095e4cb",
"type": "github"
},
"original": {
@@ -721,11 +721,11 @@
]
},
"locked": {
"lastModified": 1784371182,
"narHash": "sha256-S8A1lezEalltWcCp3gAic5lssS0xTSISK6fKODefhOk=",
"lastModified": 1788025068,
"narHash": "sha256-TBqronrrc/F2Ry/E37d/1TLldDLJDFNSwvJjgk+cXzU=",
"owner": "hyprwm",
"repo": "xdg-desktop-portal-hyprland",
"rev": "08d99f727944dd15e4740090305e31c5fb92a50a",
"rev": "ba31964ee42b56bcb0d3b78a64ead5d8a1c3c6f6",
"type": "github"
},
"original": {

View File

@@ -46,7 +46,6 @@
quickshell
way-edges
waybar
dunst
;
otter-launcher = input {package = "otter-launcher";};
wshowkeys = input {package = "wshowkeys";};

View File

@@ -135,7 +135,7 @@ local globalAppBinds = {
if recordingMode == 0 then
recordingMode = 1
hl.exec_cmd(
"wshowkeys -a right -F 'FiraMono Nerd Font 35' -s '#cba6f7ff' -f '#cdd6f4ff' -b '#45475a99' -m 70 -l 60 -t 1000 -a top"
"wshowkeys -a right -F 'FiraMono Nerd Font 35' -s '#cba6f7ff' -f '#cdd6f4ff' -b '#45475a99' -m 70 -l 500 -t 1000 -a top"
)
notif("Recording Mode Enabled")
else
@@ -163,12 +163,17 @@ local globalAppBinds = {
-- Mouse for moving windows
{ mod = subMod, key = { "mouse:272" }, dispatch = hl.dsp.window.drag(), opts = { mouse = true } },
{ mod = subMod, key = { "mouse:272" }, dispatch = hl.dsp.window.float(), opts = { mouse = true, click = true } },
{
mod = subMod,
key = { "mouse:272" },
dispatch = hl.dsp.window.float(),
opts = { transparent = true, click = true },
},
{
mod = subMod,
key = { "mouse:272" },
dispatch = hl.dsp.layout("promote"),
opts = { mouse = true, release = true },
opts = { transparent = true, release = true },
},
{ mod = subMod, key = { "SHIFT + mouse:272" }, dispatch = hl.dsp.window.resize(), opts = { mouse = true } },
}

View File

@@ -1,21 +1,21 @@
if Hostname == "HACKSTATION" then
hl.monitor({
output = "DP-1",
position = "0x0",
mode = "1920x1080@60",
scale = "1",
})
hl.monitor({
output = "DP-2",
position = "1920x0",
mode = "1920x1080@60",
scale = "1",
})
hl.monitor({
output = "DP-2",
position = "3840x0",
mode = "1920x1080@60",
scale = "1",
})
hl.monitor({
output = "HDMI-A-1",
position = "-1920x0",
position = "0x0",
mode = "1920x1080@60",
scale = "1",
})

View File

@@ -165,3 +165,20 @@ hl.layer_rule({
blur = false,
no_anim = true,
})
hl.window_rule({
name = "kando",
match = {
class = "menu.kando.Kando",
title = "Kando Menu",
},
no_blur = true,
opaque = true,
move = { 0, 0 },
rounding = 0,
size = { "100%", "100%" },
border_size = 0,
no_anim = true,
float = true,
pin = true,
})

View File

@@ -22,40 +22,10 @@ hl.config({
warp_on_toggle_special = 1, -- Go to special workspaces too
persistent_warps = true, -- Go back to where it was when I warp
},
})
-- Config for hyprgrass
if hl.plugin.hyprgrass ~= nil then
hl.config({
plugin = {
hyprgrass = {
-- The default sensitivity is probably too low on tablet screens,
-- I recommend turning it up to 4.0
sensitivity = 4.0,
-- in milliseconds
long_press_delay = 400,
-- resize windows by long-pressing on window borders and gaps.
-- If general:resize_on_border is enabled, general:extend_border_grab_area is
-- used for floating windows
resize_on_border_long_press = false,
-- in pixels, the distance from the edge that is considered an edge
edge_margin = 10,
},
},
gestures = {
workspace_swipe_touch = true,
workspace_swipe_cancel_ratio = 0.15,
binds = {
drag_threshold = 10,
},
})
hl.gesture({
fingers = 3,
direction = "horizontal",
action = "workspace",
})
end
if Hostname == "mobile02" or Hostname == "mobile03" then
hl.config({

75
modules/tablet.lua Normal file
View File

@@ -0,0 +1,75 @@
-- If hyprgrass is present
if hl.plugin.hyprgrass ~= nil then
hl.config({
plugin = {
hyprgrass = {
sensitivity = 4.0,
long_press_delay = 400,
resize_on_border_long_press = true,
edge_margin = 30,
},
},
gestures = {
-- Disable buggy hyprland gestures
workspace_swipe_touch = false,
workspace_swipe_cancel_ratio = 0.15,
},
})
-- Float and drag windows using 3 fingers
hl.plugin.hyprgrass.bind({
pattern = { kind = "tap", fingers = 3 },
action = hl.dsp.window.float(),
})
hl.plugin.hyprgrass.bind({
pattern = { kind = "longpress", fingers = 2 },
action = hl.dsp.window.drag(),
mouse = true,
})
-- Swipe top edge to change workspace
hl.plugin.hyprgrass.bind({
pattern = { kind = "edge", origin = "t", direction = "l" },
action = hl.dsp.focus({ workspace = "+1" }),
})
hl.plugin.hyprgrass.bind({
pattern = { kind = "edge", origin = "t", direction = "r" },
action = hl.dsp.focus({ workspace = "-1" }),
})
-- Binds to control keyboard
hl.plugin.hyprgrass.bind({
pattern = { kind = "edge", origin = "b", direction = "u" },
action = hl.dsp.exec_cmd(
'wvkbd-mobintl -L 370 --fn "FiraMono Nerd Font 15" --bg 1e1e2e --fg 313244 --fg-sp 585b70 --text cdd6f4 --text-sp cdd6f4 --press cba6f7 --press-sp b4befe'
),
})
hl.plugin.hyprgrass.bind({
pattern = { kind = "edge", origin = "l", direction = "d" },
action = hl.dsp.exec_cmd("pkill wvkbd"),
})
-- Binds for moving and closing windows
hl.plugin.hyprgrass.bind({
pattern = { kind = "edge", origin = "b", direction = "r" },
action = hl.dsp.layout("move -col"),
})
hl.plugin.hyprgrass.bind({
pattern = { kind = "edge", origin = "b", direction = "l" },
action = hl.dsp.layout("move +col"),
})
hl.plugin.hyprgrass.bind({
pattern = { kind = "edge", origin = "r", direction = "d" },
action = hl.dsp.window.close(),
})
-- Tablet mode toggle
hl.bind("switch:on:Intel HID switches", function()
hl.exec_cmd("pkill way-edges")
hl.exec_cmd("quickshell ipc call root enableTabletMode")
end, { locked = true })
hl.bind("switch:off:Intel HID switches", function()
hl.exec_cmd("way-edges")
hl.exec_cmd("quickshell ipc call root disableTabletMode")
end, { locked = true })
end