This commit is contained in:
2024-11-14 00:01:56 +01:00
parent ec6813dfb6
commit 004d646182
4 changed files with 235 additions and 187 deletions
Generated
+101 -109
View File
@@ -181,40 +181,17 @@
"type": "github" "type": "github"
} }
}, },
"hypridle": {
"inputs": {
"hyprlang": "hyprlang",
"hyprutils": "hyprutils",
"nixpkgs": [
"nixpkgs"
],
"systems": "systems_3"
},
"locked": {
"lastModified": 1729679960,
"narHash": "sha256-RoFKwZsx4RHKUwO8LhEZtmI08VBVrWt3TdzoJgx1HJ0=",
"owner": "hyprwm",
"repo": "hypridle",
"rev": "4d2fb9e73eb6b75336ed3eb198e900f94ada24f4",
"type": "github"
},
"original": {
"owner": "hyprwm",
"repo": "hypridle",
"type": "github"
}
},
"hyprland": { "hyprland": {
"inputs": { "inputs": {
"aquamarine": "aquamarine", "aquamarine": "aquamarine",
"hyprcursor": "hyprcursor", "hyprcursor": "hyprcursor",
"hyprland-protocols": "hyprland-protocols", "hyprland-protocols": "hyprland-protocols",
"hyprlang": "hyprlang_2", "hyprlang": "hyprlang",
"hyprutils": "hyprutils_2", "hyprutils": "hyprutils",
"hyprwayland-scanner": "hyprwayland-scanner", "hyprwayland-scanner": "hyprwayland-scanner",
"nixpkgs": "nixpkgs_2", "nixpkgs": "nixpkgs_2",
"pre-commit-hooks": "pre-commit-hooks", "pre-commit-hooks": "pre-commit-hooks",
"systems": "systems_4", "systems": "systems_3",
"xdph": "xdph" "xdph": "xdph"
}, },
"locked": { "locked": {
@@ -286,36 +263,32 @@
"type": "github" "type": "github"
} }
}, },
"hyprland-protocols_2": {
"inputs": {
"nixpkgs": [
"hyprsunset",
"nixpkgs"
],
"systems": [
"hyprsunset",
"systems"
]
},
"locked": {
"lastModified": 1728345020,
"narHash": "sha256-xGbkc7U/Roe0/Cv3iKlzijIaFBNguasI31ynL2IlEoM=",
"owner": "hyprwm",
"repo": "hyprland-protocols",
"rev": "a7c183800e74f337753de186522b9017a07a8cee",
"type": "github"
},
"original": {
"owner": "hyprwm",
"repo": "hyprland-protocols",
"type": "github"
}
},
"hyprlang": { "hyprlang": {
"inputs": {
"hyprutils": [
"hypridle",
"hyprutils"
],
"nixpkgs": [
"hypridle",
"nixpkgs"
],
"systems": [
"hypridle",
"systems"
]
},
"locked": {
"lastModified": 1721324361,
"narHash": "sha256-BiJKO0IIdnSwHQBSrEJlKlFr753urkLE48wtt0UhNG4=",
"owner": "hyprwm",
"repo": "hyprlang",
"rev": "adbefbf49664a6c2c8bf36b6487fd31e3eb68086",
"type": "github"
},
"original": {
"owner": "hyprwm",
"repo": "hyprlang",
"type": "github"
}
},
"hyprlang_2": {
"inputs": { "inputs": {
"hyprutils": [ "hyprutils": [
"hyprland", "hyprland",
@@ -344,84 +317,53 @@
"type": "github" "type": "github"
} }
}, },
"hyprlang_3": { "hyprsunset": {
"inputs": { "inputs": {
"hyprutils": [ "hyprland-protocols": "hyprland-protocols_2",
"hyprlock", "hyprutils": "hyprutils_2",
"hyprutils" "hyprwayland-scanner": "hyprwayland-scanner_2",
],
"nixpkgs": [ "nixpkgs": [
"hyprlock", "hyprland"
"nixpkgs"
], ],
"systems": [ "systems": "systems_4"
"hyprlock",
"systems"
]
}, },
"locked": { "locked": {
"lastModified": 1728168612, "lastModified": 1731163989,
"narHash": "sha256-AnB1KfiXINmuiW7BALYrKqcjCnsLZPifhb/7BsfPbns=", "narHash": "sha256-+M6/ZLT2g6l2JCBBQSNMp8oqXPMMUckWTNhHSXzvlXE=",
"owner": "hyprwm", "owner": "hyprwm",
"repo": "hyprlang", "repo": "hyprsunset",
"rev": "f054f2e44d6a0b74607a6bc0f52dba337a3db38e", "rev": "adaae9d2adac611151224b054f59db8cb0976779",
"type": "github" "type": "github"
}, },
"original": { "original": {
"owner": "hyprwm", "owner": "hyprwm",
"repo": "hyprlang", "repo": "hyprsunset",
"type": "github" "type": "github"
} }
}, },
"hyprlock": { "hyprsysteminfo": {
"inputs": { "inputs": {
"hyprlang": "hyprlang_3",
"hyprutils": "hyprutils_3", "hyprutils": "hyprutils_3",
"nixpkgs": [ "nixpkgs": [
"nixpkgs" "hyprland"
], ],
"systems": "systems_5" "systems": "systems_5"
}, },
"locked": { "locked": {
"lastModified": 1729555766, "lastModified": 1729184813,
"narHash": "sha256-sUIsjWpZLplSJXWyJcDZdvDweksXLH5r9GSkwg0kgBw=", "narHash": "sha256-ARrsIQPFCHWjVl9Sxh8tedIoEsvnV4nORaDmYCyK+kk=",
"owner": "hyprwm", "owner": "hyprwm",
"repo": "hyprlock", "repo": "hyprsysteminfo",
"rev": "a093a9eefda2db2430dd1612b2858a55daf14738", "rev": "8b271e2ba39a5a9299e4e7bb60245a71704f5a89",
"type": "github" "type": "github"
}, },
"original": { "original": {
"owner": "hyprwm", "owner": "hyprwm",
"repo": "hyprlock", "repo": "hyprsysteminfo",
"type": "github" "type": "github"
} }
}, },
"hyprutils": { "hyprutils": {
"inputs": {
"nixpkgs": [
"hypridle",
"nixpkgs"
],
"systems": [
"hypridle",
"systems"
]
},
"locked": {
"lastModified": 1721324102,
"narHash": "sha256-WAZ0X6yJW1hFG6otkHBfyJDKRpNP5stsRqdEuHrFRpk=",
"owner": "hyprwm",
"repo": "hyprutils",
"rev": "962582a090bc233c4de9d9897f46794280288989",
"type": "github"
},
"original": {
"owner": "hyprwm",
"repo": "hyprutils",
"type": "github"
}
},
"hyprutils_2": {
"inputs": { "inputs": {
"nixpkgs": [ "nixpkgs": [
"hyprland", "hyprland",
@@ -446,14 +388,39 @@
"type": "github" "type": "github"
} }
}, },
"hyprutils_3": { "hyprutils_2": {
"inputs": { "inputs": {
"nixpkgs": [ "nixpkgs": [
"hyprlock", "hyprsunset",
"nixpkgs" "nixpkgs"
], ],
"systems": [ "systems": [
"hyprlock", "hyprsunset",
"systems"
]
},
"locked": {
"lastModified": 1727300645,
"narHash": "sha256-OvAtVLaSRPnbXzOwlR1fVqCXR7i+ICRX3aPMCdIiv+c=",
"owner": "hyprwm",
"repo": "hyprutils",
"rev": "3f5293432b6dc6a99f26aca2eba3876d2660665c",
"type": "github"
},
"original": {
"owner": "hyprwm",
"repo": "hyprutils",
"type": "github"
}
},
"hyprutils_3": {
"inputs": {
"nixpkgs": [
"hyprsysteminfo",
"nixpkgs"
],
"systems": [
"hyprsysteminfo",
"systems" "systems"
] ]
}, },
@@ -496,6 +463,31 @@
"type": "github" "type": "github"
} }
}, },
"hyprwayland-scanner_2": {
"inputs": {
"nixpkgs": [
"hyprsunset",
"nixpkgs"
],
"systems": [
"hyprsunset",
"systems"
]
},
"locked": {
"lastModified": 1726874836,
"narHash": "sha256-VKR0sf0PSNCB0wPHVKSAn41mCNVCnegWmgkrneKDhHM=",
"owner": "hyprwm",
"repo": "hyprwayland-scanner",
"rev": "500c81a9e1a76760371049a8d99e008ea77aa59e",
"type": "github"
},
"original": {
"owner": "hyprwm",
"repo": "hyprwayland-scanner",
"type": "github"
}
},
"nixpkgs": { "nixpkgs": {
"locked": { "locked": {
"lastModified": 1725634671, "lastModified": 1725634671,
@@ -589,10 +581,10 @@
"ags": "ags", "ags": "ags",
"ghostty": "ghostty", "ghostty": "ghostty",
"home-manager": "home-manager", "home-manager": "home-manager",
"hypridle": "hypridle",
"hyprland": "hyprland", "hyprland": "hyprland",
"hyprland-plugins": "hyprland-plugins", "hyprland-plugins": "hyprland-plugins",
"hyprlock": "hyprlock", "hyprsunset": "hyprsunset",
"hyprsysteminfo": "hyprsysteminfo",
"nixpkgs": "nixpkgs_3" "nixpkgs": "nixpkgs_3"
} }
}, },
+6 -6
View File
@@ -15,13 +15,13 @@
url = "github:hyprwm/hyprland-plugins"; url = "github:hyprwm/hyprland-plugins";
inputs.hyprland.follows = "hyprland"; inputs.hyprland.follows = "hyprland";
}; };
hyprlock = { hyprsunset = {
url = "github:hyprwm/hyprlock"; url = "github:hyprwm/hyprsunset";
inputs.nixpkgs.follows = "nixpkgs"; inputs.nixpkgs.follows = "hyprland";
}; };
hypridle = { hyprsysteminfo = {
url = "github:hyprwm/hypridle"; url = "github:hyprwm/hyprsysteminfo";
inputs.nixpkgs.follows = "nixpkgs"; inputs.nixpkgs.follows = "hyprland";
}; };
ghostty = { ghostty = {
inputs = { inputs = {
+6 -1
View File
@@ -14,6 +14,8 @@
hypridle hypridle
hyprpaper hyprpaper
hyprland-protocols hyprland-protocols
inputs.hyprsunset
# inputs.hyprsysteminfo
# hyprpolkit -- not in nixpkgs yet # hyprpolkit -- not in nixpkgs yet
]; ];
@@ -350,7 +352,9 @@
}; };
lib.inputMethod.fcitx5.waylandFrontend = true; lib.inputMethod.fcitx5.waylandFrontend = true;
programs.hyprlock = {
programs = {
hyprlock = {
enable = true; enable = true;
settings = { settings = {
general = { general = {
@@ -424,6 +428,7 @@
]; ];
}; };
}; };
};
services = { services = {
hyprpaper = { hyprpaper = {
+52 -1
View File
@@ -25,6 +25,58 @@ vim.keymap.set("n", "<leader>x", "<cmd>!chmod +x %<CR>", {silent = true})
vim.keymap.set("n", "<leader>bg", "<C-z>") vim.keymap.set("n", "<leader>bg", "<C-z>")
-- BUILD SCRIPT INVOKATIONS -- BUILD SCRIPT INVOKATIONS
-- generic build function
local function set(list)
local _set = {}
for _, l in ipairs(list) do
_set[l] = true
end
return _set
end
-- TODO: add support for passing flags
function Build()
local out_buf = vim.api.nvim_create_buf(false, true)
local build_scripts = set(vim.fs.find({ "build.sh", "build.zig", "build.bat" }, { upward = true, type = "file", path = "." }))
local output = "[No Build Output]"
if build_scripts['build.zig'] then
vim.cmd('echo "Running build.zig"')
output = vim.fn.system({ 'zig', 'build' })
else
if jit.os == 'Windows' and build_scripts['build.bat'] then
output = vim.fn.system({ 'build', '' })
elseif build_scripts['build.sh'] then
output = vim.fn.system({ './build.sh', '' })
else
end
end
vim.api.nvim_buf_set_lines(out_buf, -1, -1, true, {"[ Build Output ]"})
vim.api.nvim_buf_set_lines(out_buf, -1, -1, true, vim.split(output, '\n'))
local window = vim.api.nvim_open_win(out_buf, false, {
split = 'right',
win = 0,
width = math.floor(vim.o.columns * 0.35),
style = 'minimal',
})
vim.api.nvim_set_current_win(window)
-- Keybind to close the window on pressing Enter
vim.api.nvim_buf_set_keymap(out_buf, 'n', '<CR>', '', {
noremap = true,
silent = true,
callback = function()
vim.api.nvim_win_close(window, true)
end
})
end
-- TODO: add support for passing flags
vim.keymap.set("n", "<leader>bs", ":lua Build()<CR>")
-- specific build scipt options
-- `build.sh` script binds -- `build.sh` script binds
-- non-interactive binds -- non-interactive binds
@@ -63,7 +115,6 @@ vim.keymap.set("n", "<leader>zboRr" , ":!zig build run -Doptimize=ReleaseSafe ")
vim.keymap.set("n", "<leader>zboRsr", ":!zig build run -Doptimize=ReleaseSmall ") vim.keymap.set("n", "<leader>zboRsr", ":!zig build run -Doptimize=ReleaseSmall ")
vim.keymap.set("n", "<leader>zboRfr", ":!zig build run -Doptimize=ReleaseFast ") vim.keymap.set("n", "<leader>zboRfr", ":!zig build run -Doptimize=ReleaseFast ")
-- emacs-inspired binds -- emacs-inspired binds
-- all <C-w> can be done w spacebar-w -- all <C-w> can be done w spacebar-w
vim.keymap.set("n", "<leader>w", "<C-w>") vim.keymap.set("n", "<leader>w", "<C-w>")