Compare commits

...

27 Commits

Author SHA1 Message Date
22a5e42c7c removed wl-clipboard because it broke something idk 2026-09-24 16:42:25 +01:00
93dc67718a fixed exclusive mouse nonsense 2026-09-19 14:16:57 +01:00
1da2567cf3 new dragging behavior 2026-09-19 14:01:21 +01:00
362c7e1579 updated flake 2026-09-19 13:37:52 +01:00
5190ec5bad removed kando and added wl-clipboard for management 2026-09-19 13:35:11 +01:00
fa68cf2317 wshowkeys works again, but instead of characters it is now pixels 2026-09-18 16:54:51 +01:00
eb069da21c cant read lol 2026-09-17 17:26:01 +01:00
76e969ef64 changed monitor positions to fix davinci resolve 2026-09-17 17:04:23 +01:00
755cf67f7a added binds for scrolling layout and closing windows 2026-09-02 19:24:06 +01:00
e93b76bef1 added keyboard gestures and styling 2026-08-31 20:23:16 +01:00
5b008b1022 made import module and added runtime.lua 2026-08-27 14:22:44 +01:00
309c07ef94 tablet mode working and file cleaned up 2026-08-26 19:36:11 +01:00
a85e6b79b8 removed unused dunst and added kando for future stuff 2026-08-26 14:17:12 +01:00
7e0dca86e6 moved all the input stuff to a seperate file and added switch detection for tablet mode 2026-08-26 14:16:11 +01:00
b6c0dbf3a7 kando window rule 2026-08-26 14:15:45 +01:00
76ce70df12 actually read the wiki 2026-08-25 20:38:04 +01:00
180a132e17 trying stuff out 2026-08-25 20:32:30 +01:00
0c27e34df4 spelling mistake lol 2026-08-25 20:17:28 +01:00
b2869e9af1 just gave up and used an envvar instead 2026-08-25 19:57:18 +01:00
f6ba90efde finally realised what I was doing wrong, dofile is NOT the same thing as require 2026-08-25 19:48:45 +01:00
1b6b03b1c1 testing 2026-08-25 19:42:38 +01:00
8d0ae689ea plugin path importing 2026-08-25 19:37:27 +01:00
e83ab7a6f8 added check for hyprgrass 2026-08-24 15:30:43 +01:00
66c8951402 interim hyprgrass config (will edit on mobile03) 2026-08-24 13:26:56 +01:00
f1dde35e3d cleaned up for using multiple laptops and fixed music workspace bindings 2026-08-24 12:55:16 +01:00
e9907d15e9 more mobile03 setup 2026-08-23 10:13:08 +01:00
a6fc3cb2ac fixed the scaling issue with the music workspace 2026-08-23 10:12:51 +01:00
8 changed files with 214 additions and 75 deletions

View File

@@ -1,14 +1,35 @@
-- ~/.config/hypr/autoload.lua
-- Path to search
local hyprRoot
local modules
if os.getenv("HYPRLAND_ROOT") then
hyprRoot = os.getenv("HYPRLAND_ROOT")
else
hyprRoot = os.getenv("HOME") .. "/.config/hypr"
end
if os.getenv("MODULES_ROOT") then
modules = os.getenv("MODULES_ROOT")
else
modules = os.getenv("HOME") .. "/.config/hypr/modules"
end
local function importRelativeModule(module)
local ok, err = pcall(dofile, hyprRoot .. "/" .. module)
if not ok then
hl.notification.create({
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')
if not p then

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";};
@@ -83,6 +82,7 @@
runtimePackages = defaultRuntimePkgs;
exePath = pkgs.lib.getExe hypr;
env."MODULES_ROOT" = ./modules;
env."HYPRLAND_ROOT" = ./.;
flags."--config" = ./hyprland.lua;
};
repo-files = pkgs.stdenvNoCC.mkDerivation {

View File

@@ -46,8 +46,8 @@ local keyboardString = corneKeyboardString
local keybindIndex = 1
local recordingMode = 0
-- Set different modifiers on laptop
if Hostname == "mobile02" or Hostname == "mobile03" then
-- Set different modifiers on laptops
if string.find(Hostname, "mobile") ~= nil then
mainMod = "ALT + "
subMod = "SUPER + "
keyboardString = "1234567890"
@@ -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 } },
}
@@ -201,12 +206,17 @@ for _, bind in ipairs(globalAppBinds) do
else
hl.bind(modBind .. bind.key[1], command)
end
-- If corne keys not being bound by default, then bind them just in case
if keybindIndex ~= 1 then
local deviceSpecifier = { device = { inclusive = true, list = { "zmk-project-corne-keyboard" } } }
-- Apply options so that dragging windows and stuff works
local corneOptions = merge_into(opts, deviceSpecifier)
hl.bind("SUPER + " .. bind.key[1], command, corneOptions)
-- Prevent binding keys multiple times if its already bound
if subMod ~= "SUPER + " then
hl.bind("SUPER + " .. bind.key[1], command, corneOptions)
end
end
end

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",
})
@@ -24,6 +24,8 @@ if Hostname == "HACKSTATION" then
hl.workspace_rule({ workspace = "4", monitor = "DP-1" })
hl.workspace_rule({ workspace = "2", monitor = "HDMI-A-1" })
hl.workspace_rule({ workspace = "3", monitor = "DP-2" })
elseif Hostname == "mobile03" then
hl.monitor({ output = "", mode = "preferred", position = "auto", scale = "1.33" })
else
hl.monitor({ output = "", mode = "preferred", position = "auto", scale = "1.2" })
end

View File

@@ -73,13 +73,24 @@ hl.window_rule({
no_anim = true,
})
local musicSides = 400
local musicBottom = 400
if Hostname == "mobile02" then
musicSides = 300
musicBottom = 300
elseif Hostname == "mobile03" then
musicSides = 200
musicBottom = 250
end
-- Define gaps for music workspace
hl.workspace_rule({
workspace = "special:music",
gaps_out = {
left = 400,
right = 400,
bottom = 400,
left = musicSides,
right = musicSides,
bottom = musicBottom,
},
animation = "slidefadevert",
})
@@ -154,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,9 +22,12 @@ hl.config({
warp_on_toggle_special = 1, -- Go to special workspaces too
persistent_warps = true, -- Go back to where it was when I warp
},
binds = {
drag_threshold = 10,
},
})
if Hostname == "mobile02" then
if Hostname == "mobile02" or Hostname == "mobile03" then
hl.config({
input = { -- If on laptop make caps the escape key but make it be capslock when shift caps is pressed
kb_options = "caps:escape_shifted_capslock",
@@ -34,10 +37,10 @@ elseif Hostname == "HACKSTATION" then
hl.device({
name = "weylus-stylus",
left_handed = false,
output = "DP-1"
output = "DP-1",
})
hl.device({
name = "weylus-touch",
output = "DP-1"
output = "DP-1",
})
end

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