Merge pull request 'Unstable' (#1) from Unstable into master

Reviewed-on: #1
This commit is contained in:
2025-08-30 13:41:13 -04:00
25 changed files with 288 additions and 1441 deletions

33
flake.lock generated
View File

@@ -166,20 +166,36 @@
] ]
}, },
"locked": { "locked": {
"lastModified": 1753592768, "lastModified": 1756022458,
"narHash": "sha256-oV695RvbAE4+R9pcsT9shmp6zE/+IZe6evHWX63f2Qg=", "narHash": "sha256-J1i35r4HfNDdPpwL0vOBaZopQudAUVtartEerc1Jryc=",
"owner": "nix-community", "owner": "nix-community",
"repo": "home-manager", "repo": "home-manager",
"rev": "fc3add429f21450359369af74c2375cb34a2d204", "rev": "9e3a33c0bcbc25619e540b9dfea372282f8a9740",
"type": "github" "type": "github"
}, },
"original": { "original": {
"owner": "nix-community", "owner": "nix-community",
"ref": "release-25.05",
"repo": "home-manager", "repo": "home-manager",
"type": "github" "type": "github"
} }
}, },
"neovim-config": {
"flake": false,
"locked": {
"lastModified": 1756442459,
"narHash": "sha256-YfZ9KdGGnhG1t+7TKw3kbH6oUhvbchhpUxACasP87f8=",
"ref": "master",
"rev": "ee941c351daa870d4a40b933fe93ffb8459884f7",
"revCount": 2,
"type": "git",
"url": "https://git.th3r00t.net/th3r00t/nvim-config.git"
},
"original": {
"ref": "master",
"type": "git",
"url": "https://git.th3r00t.net/th3r00t/nvim-config.git"
}
},
"neovim-nightly-overlay": { "neovim-nightly-overlay": {
"inputs": { "inputs": {
"flake-compat": "flake-compat", "flake-compat": "flake-compat",
@@ -290,16 +306,16 @@
}, },
"nixpkgs_3": { "nixpkgs_3": {
"locked": { "locked": {
"lastModified": 1755078291, "lastModified": 1756125398,
"narHash": "sha256-Hu/gTDoi4uy6TAKISPHQusSMy8U6xUbLSDjKBYdhDIY=", "narHash": "sha256-XexyKZpf46cMiO5Vbj+dWSAXOnr285GHsMch8FBoHbc=",
"owner": "NixOs", "owner": "NixOs",
"repo": "nixpkgs", "repo": "nixpkgs",
"rev": "3385ca0cd7e14c1a1eb80401fe011705ff012323", "rev": "3b9f00d7a7bf68acd4c4abb9d43695afb04e03a5",
"type": "github" "type": "github"
}, },
"original": { "original": {
"owner": "NixOs", "owner": "NixOs",
"ref": "nixos-25.05", "ref": "nixos-unstable",
"repo": "nixpkgs", "repo": "nixpkgs",
"type": "github" "type": "github"
} }
@@ -308,6 +324,7 @@
"inputs": { "inputs": {
"disko": "disko", "disko": "disko",
"home-manager": "home-manager", "home-manager": "home-manager",
"neovim-config": "neovim-config",
"neovim-nightly-overlay": "neovim-nightly-overlay", "neovim-nightly-overlay": "neovim-nightly-overlay",
"nix-index-database": "nix-index-database", "nix-index-database": "nix-index-database",
"nixos-hardware": "nixos-hardware", "nixos-hardware": "nixos-hardware",

View File

@@ -2,9 +2,9 @@
description = "System Flake"; description = "System Flake";
inputs = { inputs = {
nixpkgs.url = "github:NixOs/nixpkgs/nixos-25.05"; nixpkgs.url = "github:NixOs/nixpkgs/nixos-unstable";
home-manager = { home-manager = {
url = "github:nix-community/home-manager/release-25.05"; url = "github:nix-community/home-manager";
inputs.nixpkgs.follows = "nixpkgs"; inputs.nixpkgs.follows = "nixpkgs";
}; };
nix-index-database.url = "github:nix-community/nix-index-database"; nix-index-database.url = "github:nix-community/nix-index-database";
@@ -14,6 +14,17 @@
sops-nix.url = "github:Mic92/sops-nix"; sops-nix.url = "github:Mic92/sops-nix";
sops-nix.inputs.nixpkgs.follows = "nixpkgs"; sops-nix.inputs.nixpkgs.follows = "nixpkgs";
nixos-hardware.url = "github:NixOS/nixos-hardware/master"; nixos-hardware.url = "github:NixOS/nixos-hardware/master";
neovim-config = {
# pick ONE of these URLs:
# Public over HTTPS:
url = "git+https://git.th3r00t.net/th3r00t/nvim-config.git?ref=master";
# OR private over SSH (recommended if the repo is private):
# url = "git+ssh://git@git.th3r00t.net/th3r00t/nvim-config.git?ref=main";
flake = false;
};
}; };
outputs = { outputs = {
@@ -52,6 +63,11 @@
./home-xps13.nix ./home-xps13.nix
nix-index-database.homeModules.nix-index nix-index-database.homeModules.nix-index
]; ];
home.file.".config/nvim" = {
source = inputs.neovim-config;
recursive = true;
executable = true;
};
}; };
# Optionally, use home-manager.extraSpecialArgs to pass arguments to home.nix # Optionally, use home-manager.extraSpecialArgs to pass arguments to home.nix
} }
@@ -75,6 +91,11 @@
./home-server.nix ./home-server.nix
nix-index-database.homeModules.nix-index nix-index-database.homeModules.nix-index
]; ];
home.file.".config/nvim" = {
source = inputs.neovim-config;
recursive = true;
executable = true;
};
}; };
# home-manager.users.th3r00t = import ./home.nix; # home-manager.users.th3r00t = import ./home.nix;
# Optionally, use home-manager.extraSpecialArgs to pass arguments to home.nix # Optionally, use home-manager.extraSpecialArgs to pass arguments to home.nix

View File

@@ -12,11 +12,11 @@
recursive = true; recursive = true;
executable = true; executable = true;
}; };
home.file.".config/nvim" = { # home.file.".config/nvim" = {
source = ./home/.config/nvim; # source = ./home/.config/nvim;
recursive = true; # recursive = true;
executable = true; # executable = true;
}; # };
home.file.".irssi" = { home.file.".irssi" = {
source = ./home/.irssi; source = ./home/.irssi;
recursive = true; recursive = true;
@@ -44,7 +44,28 @@
modules/hyprland.nix modules/hyprland.nix
modules/home-manager-common.nix modules/home-manager-common.nix
]; ];
xdg.enable = true; xdg = {
enable = true;
mime = {
enable = true;
};
mimeApps = {
defaultApplications = {
"text/html" = [ "qutebrowser.desktop" ];
"application/xhtml+xml" = [ "qutebrowser.desktop" ];
"application/xml" = [ "qutebrowser.desktop" ];
"image/svg+xml" = [ "qutebrowser.desktop" ];
"application/pdf" = [ "qutebrowser.desktop" ];
"video/mp4" = [ "qutebrowser.desktop" ];
"video/webm" = [ "qutebrowser.desktop" ];
"video/x-matroska" = [ "qutebrowser.desktop" ];
"audio/mpeg" = [ "qutebrowser.desktop" ];
"audio/ogg" = [ "qutebrowser.desktop" ];
"audio/wav" = [ "qutebrowser.desktop" ];
"application/zip" = [ "nemo.desktop" ];
};
};
};
programs.nix-index.enable = true; programs.nix-index.enable = true;
fonts.fontconfig.enable = true; fonts.fontconfig.enable = true;
home.sessionVariables = { home.sessionVariables = {
@@ -52,6 +73,7 @@
BROWSER = "qutebrowser"; BROWSER = "qutebrowser";
PLATFORMTHEME = "kde"; PLATFORMTHEME = "kde";
}; };
nixpkgs.config.allowUnfree = true;
home.packages = with pkgs; [ home.packages = with pkgs; [
mesa-demos mesa-demos
bluez bluez
@@ -76,6 +98,13 @@
xdg-desktop-portal-wlr xdg-desktop-portal-wlr
exfatprogs exfatprogs
neovide neovide
ghostty
# wineWowPackages.staging
wineWowPackages.waylandFull
winetricks
logmein-hamachi
openmw
virt-viewer
]; ];
services.udiskie = { services.udiskie = {
enable = false; enable = false;
@@ -85,6 +114,46 @@
}; };
}; };
}; };
programs.ghostty = {
enable = true;
settings = {
theme = "tokyonight";
font-family = "FiraCode Nerd Font Mono";
font-size = 10;
keybind = [
];
};
installVimSyntax = true;
enableZshIntegration = true;
installBatSyntax = true;
themes = {
catppuccin-mocha = {
background = "1e1e2e";
cursor-color = "f5e0dc";
foreground = "cdd6f4";
palette = [
"0=#45475a"
"1=#f38ba8"
"2=#a6e3a1"
"3=#f9e2af"
"4=#89b4fa"
"5=#f5c2e7"
"6=#94e2d5"
"7=#bac2de"
"8=#585b70"
"9=#f38ba8"
"10=#a6e3a1"
"11=#f9e2af"
"12=#89b4fa"
"13=#f5c2e7"
"14=#94e2d5"
"15=#a6adc8"
];
selection-background = "353749";
selection-foreground = "cdd6f4";
};
};
};
programs.neovide = { programs.neovide = {
enable = true; enable = true;
settings = { settings = {
@@ -102,7 +171,7 @@
font = { font = {
normal = "SauceCodePro Nerd Font Mono"; normal = "SauceCodePro Nerd Font Mono";
size = 8; size = 11;
}; };
}; };
}; };
@@ -170,7 +239,7 @@
settings = { settings = {
main = { main = {
term = "foot"; term = "foot";
font = "SauceCodePro Nerd Font Mono:size=6"; font = "FiraCode Nerd Font Mono:size=6";
dpi-aware = "yes"; dpi-aware = "yes";
shell = "${pkgs.zsh}/bin/zsh"; shell = "${pkgs.zsh}/bin/zsh";
}; };
@@ -224,59 +293,5 @@
}; };
}; };
}; };
programs.hyprlock = {
enable = true;
settings = {
general = {
disable_loading_bar = true;
grace = 300;
hide_cursor = true;
no_fade_in = false;
};
background = [
{
path = "screenshot";
blur_passes = 3;
blur_size = 8;
}
];
input-field = [
{
size = "400, 100";
position = "0, -80";
monitor = "";
dots_center = true;
fade_on_empty = false;
font_color = "rgb(202, 211, 245)";
inner_color = "rgb(91, 96, 120)";
outer_color = "rgb(24, 25, 38)";
outline_thickness = 5;
placeholder_text = "Password";
shadow_passes = 2;
}
];
};
};
services.hypridle = {
enable = true;
settings = {
general = {
after_sleep_cmd = "hyprctl dispatch dpms on";
ignore_dbus_inhibit = false;
lock_cmd = "hyprlock";
};
listener = [
{
timeout = 300;
on-timeout = "hyprlock";
}
{
timeout = 600;
on-timeout = "hyprctl dispatch dpms off";
on-resume = "hyprctl dispatch dpms on";
}
];
};
};
home.stateVersion = "25.05"; home.stateVersion = "25.05";
} }

View File

@@ -1,156 +0,0 @@
local vim = vim
local host = vim.loop.os_gethostname()
require("options") -- /etc/nixos/home/.config/nvim/lua/options.lua
require("plugins") -- /etc/nixos/home/.config/nvim/lua/plugins.lua
require("utils.t3_functions") -- /etc/nixos/home/.config/nvim/lua/utils/t3_functions.lua
require("utils.t3_overrides") -- /etc/nixos/home/.config/nvim/lua/utils/t3_overrides.lua
require("utils.reload") -- /etc/nixos/home/.config/nvim/lua/utils/reload.lua
require("vimwiki") -- /etc/nixos/home/.config/nvim/lua/vimwiki.lua
require("keymaps") -- /etc/nixos/home/.config/nvim/lua/keymaps.lua
require("lsp") -- /etc/nixos/home/.config/nvim/lua/lsp.lua
require("completion") -- /etc/nixos/home/.config/nvim/lua/completion.lua
require("treesitter") -- /etc/nixos/home/.config/nvim/lua/treesitter.lua
require("autocmds") -- /etc/nixos/home/.config/nvim/lua/autocmds.lua
require("diagnostics") -- /etc/nixos/home/.config/nvim/lua/diagnostics.lua
require('telescope_configuration') -- /etc/nixos/home/.config/nvim/lua/telescope_configuration.lua
if host == "xps13" then
require('tokyonight').setup({
style = "moon", -- "storm", "moon", "day", "night"
transparent = true, -- Enable transparent background
terminal_colors = true, -- Enable terminal colors
styles = {
comments = { italic = true }, -- Italic comments
keywords = { italic = true }, -- Italic keywords
functions = { bold = true }, -- Bold functions
variables = {}, -- No special style for variables
sidebars = "dark", -- Dark sidebars
floats = "dark", -- Dark floating windows
},
})
elseif host == "Titan" then
require('tokyonight').setup({
style = "storm", -- "storm", "moon", "day", "night"
transparent = false, -- Enable transparent background
terminal_colors = true, -- Enable terminal colors
styles = {
comments = { italic = true }, -- Italic comments
keywords = { italic = true }, -- Italic keywords
functions = { bold = true }, -- Bold functions
variables = {}, -- No special style for variables
sidebars = "dark", -- Dark sidebars
floats = "dark", -- Dark floating windows
},
})
end
local function is_linux_console()
return vim.env.TERM == "linux"
end
local function want_truecolor()
if is_linux_console() then return false end
return vim.fn.has("termguicolors") == 1
or ((vim.env.COLORTERM or ""):lower():find("truecolor") ~= nil)
end
local function set_colorscheme()
if want_truecolor() then
vim.o.termguicolors = true
if not pcall(vim.cmd.colorscheme, "tokyonight") then
pcall(vim.cmd.colorscheme, "habamax")
end
else
vim.o.termguicolors = false
if not pcall(vim.cmd.colorscheme, "industry") then
pcall(vim.cmd.colorscheme, "default")
end
end
end
vim.api.nvim_create_autocmd("VimEnter", {
callback = function()
set_colorscheme()
local tty = is_linux_console()
-- LUALINE: no icons, simple separators, TTY theme
pcall(function()
local ok, lualine = pcall(require, "lualine")
if not ok then return end
if tty then
lualine.setup({
options = {
theme = "16color", -- built-in, safe for TTY
icons_enabled = false,
component_separators = "",
section_separators = "",
globalstatus = true,
},
sections = {
lualine_a = { "mode" },
lualine_b = { "branch" },
lualine_c = { { "filename", file_status = true, path = 1 } },
lualine_x = { "encoding", "fileformat", "filetype" },
lualine_y = { "progress" },
lualine_z = { "location" },
},
})
else
lualine.setup({
options = {
theme = "tokyonight",
icons_enabled = true,
globalstatus = true,
},
})
end
end)
-- BARBAR: kill icons in TTY, simplify separators
pcall(function()
vim.g.barbar_auto_setup = false
local ok, barbar = pcall(require, "barbar")
if not ok then return end
if tty then
barbar.setup({
animation = false,
auto_hide = false,
sidebar_filetypes = { NvimTree = true, undotree = { text = "Undotree" } },
icons = {
-- aggressively disable anything icon-like
buffer_index = false,
buffer_number = false,
button = "", -- close button
diagnostics = {
[vim.diagnostic.severity.ERROR] = { enabled = false },
[vim.diagnostic.severity.WARN] = { enabled = false },
[vim.diagnostic.severity.INFO] = { enabled = false },
[vim.diagnostic.severity.HINT] = { enabled = false },
},
gitsigns = { added = {enabled=false}, changed = {enabled=false}, deleted = {enabled=false} },
filetype = { enabled = false },
pinned = { button = "", filename = true },
modified = { button = "*" }, -- simple ASCII marker
separator = { left = "|", right = "|" },
inactive = { separator = { left = "", right = "" } },
},
})
else
barbar.setup({}) -- your normal config, or keep defaults
end
end)
-- If you use web-devicons, disable it in TTY to avoid glyphs
if is_linux_console() then
-- If using lazy.nvim, better to conditionally load the plugin (see spec below).
if package.loaded["nvim-web-devicons"] then
local ok, devicons = pcall(require, "nvim-web-devicons")
if ok and devicons.has_loaded() then
-- there's no runtime "disable", but not using it in barbar/lualine is enough.
end
end
end
end,
})

View File

@@ -1,3 +0,0 @@
{
}

View File

@@ -1,9 +0,0 @@
local vim = vim
vim.api.nvim_create_autocmd({ "BufEnter", "BufWritePost" }, {
group = vim.api.nvim_create_augroup("TWTask", { clear = true }),
pattern = "*.wiki", -- Pattern to match Markdown files
callback = function()
vim.cmd('TWSyncTasks')
end,
})

View File

@@ -1,112 +0,0 @@
local cmp = require("cmp")
cmp.setup({
snippet = {
expand = function(args)
require('luasnip').lsp_expand(args.body) -- For `luasnip` users.
end,
},
window = {
completion = cmp.config.window.bordered(),
documentation = cmp.config.window.bordered(),
},
mapping = cmp.mapping.preset.insert({
["<C-b>"] = cmp.mapping.scroll_docs(-4),
["<C-f>"] = cmp.mapping.scroll_docs(4),
["<C-Space>"] = cmp.mapping.complete(),
["<C-e>"] = cmp.mapping.abort(),
["<CR>"] = cmp.mapping.confirm({ select = false }), -- Accept currently selected item. Set `select` to `false` to only confirm explicitly selected items.
["<C-Tab>"] = cmp.mapping(function(fallback)
if cmp.visible() then
cmp.select_next_item()
else
fallback()
end
end, { "i", "s" }),
["<S-Tab>"] = cmp.mapping(function(fallback)
if cmp.visible() then
cmp.select_prev_item()
else
fallback()
end
end, { "i", "s" }),
}),
sources = cmp.config.sources({
{ name = "nvim_lua" },
{ name = "copilot", group_index = 3 },
{ name = "nvim_lsp", group_index = 1 },
{ name = "path", group_index = 3 },
{ name = "luasnip", group_index = 2 },
{ name = "buffer" },
{ name = "calc" },
{ name = 'orgmode' },
-- { name = 'vsnip' }, -- For vsnip users.
-- { name = 'luasnip' }, -- For luasnip users.
-- { name = 'ultisnips' }, -- For ultisnips users.
-- { name = 'snippy' }, -- For snippy users.
{ name = "crates" },
-- { name = 'cmdline' },
-- { name = 'neorg' },
}),
})
-- Set configuration for specific filetype.
cmp.setup.filetype("gitcommit", {
sources = cmp.config.sources({
{ name = "cmp_git" }, -- You can specify the `cmp_git` source if you were installed it.
}, {
{ name = "buffer" },
}),
})
-- Use buffer source for `/` and `?` (if you enabled `native_menu`, this won't work anymore).
cmp.setup.cmdline({ "/", "?" }, {
mapping = cmp.mapping.preset.cmdline(),
sources = {
{ name = "buffer" },
{ name = "cmdline" },
},
})
-- Use cmdline & path source for ':' (if you enabled `native_menu`, this won't work anymore).
cmp.setup.cmdline(":", {
mapping = cmp.mapping.preset.cmdline(),
sources = cmp.config.sources({
{ name = "path" },
}, {
{ name = "cmdline" },
}),
})
-- Set up lspconfig.
-- require("cmp_nvim_lsp").default_capabilities()
local capabilities = require("cmp_nvim_lsp").default_capabilities()
-- Replace <YOUR_LSP_SERVER> with each lsp server you've enabled.
-- require('lspconfig')['<YOUR_LSP_SERVER>'].setup {
-- capabilities = capabilities
-- }
require("lspconfig").clangd.setup({
capabilities = capabilities,
})
require("lspconfig").taplo.setup({
capabilities = capabilities,
})
require("lspconfig").marksman.setup({
capabilities = capabilities,
})
require("lspconfig").lua_ls.setup({
capabilities = capabilities,
})
require("lspconfig").rust_analyzer.setup({
capabilities = capabilities,
})
require("lspconfig").zls.setup({
capabilities = capabilities,
})
require("lspconfig").pyright.setup({
capabilities = capabilities,
})
-- require'lspconfig'.jedi_language_server.setup {
-- capabilities = capabilities,
-- }

View File

@@ -1,60 +0,0 @@
require("tiny-inline-diagnostic").setup({
-- Style preset for diagnostic messages
-- Available options:
-- "modern", "classic", "minimal", "powerline",
-- "ghost", "simple", "nonerdfont", "amongus"
preset = "modern",
transparent_bg = false, -- Set the background of the diagnostic to transparent
transparent_cursorline = false, -- Set the background of the cursorline to transparent (only one the first diagnostic)
hi = {
error = "DiagnosticError", -- Highlight group for error messages
warn = "DiagnosticWarn", -- Highlight group for warning messages
info = "DiagnosticInfo", -- Highlight group for informational messages
hint = "DiagnosticHint", -- Highlight group for hint or suggestion messages
arrow = "NonText", -- Highlight group for diagnostic arrows
background = "CursorLine",
mixing_color = "None",
},
options = {
show_source = {
enabled = false,
if_many = false,
},
use_icons_from_diagnostic = false,
set_arrow_to_diag_color = false,
add_messages = true,
throttle = 20,
softwrap = 30,
multilines = {
enabled = false,
always_show = false,
trim_whitespaces = false,
tabstop = 4,
},
show_all_diags_on_cursorline = false,
enable_on_insert = false,
enable_on_select = false,
overflow = {
mode = "wrap",
padding = 0,
},
break_line = {
enabled = false,
after = 30,
},
format = nil,
virt_texts = {
priority = 2048,
},
severity = {
vim.diagnostic.severity.ERROR,
vim.diagnostic.severity.WARN,
vim.diagnostic.severity.INFO,
vim.diagnostic.severity.HINT,
},
overwrite_events = nil,
},
disabled_ft = {} -- List of filetypes to disable the plugin
})

View File

@@ -1,166 +0,0 @@
local vim = vim
local fzflua = require("fzf-lua")
local Job = require'plenary.job'
function t3_find_file()
-- local file_name = vim.fn.input("Find File: ", "", "file")
fzflua.files()
end
function t3_recent_files()
fzflua.oldfiles()
end
function t3_org_files()
fzflua.files({ cwd = '~/org/'})
end
function t3_project_files()
fzflua.files({ cwd = '~/Projects/'})
end
function t3_dot_files()
fzflua.files({ cwd = '~/.dotfiles/'})
end
function t3_config_files()
fzflua.files({ cwd = '~/.dotfiles/'})
end
function t3_snip_capture(name)
if type(name) ~= "string" or name == "" then
print("Error: Invalid snippet name")
return
end
-- local timestamp = os.date("%Y%m%d%H%M%S")
local snippet_path = "~/.config/nvim/snippets/"
local filename = snippet_path .. name:gsub("%s+", "_") .. ".lua"
local file = io.open(vim.fn.expand(filename), "w")
if file == nil then
print("Error: Could not open file for editing.")
return
end
local previous_buffer = vim.api.nvim_get_current_buf()
file:write("local ls = require('luasnip')\n\nls.add_snippets(\"{}\", {\n\tls.parser.parse_snippet(\n\t\t'{}',\n\t\t'{}'),\n})")
file:close()
vim.cmd("e " .. filename)
vim.bo.filetype = 'lua'
-- vim.cmd("Neorg inject-metadata")
-- Set an autocmd to return to the previous buffer when the note buffer is closed
vim.api.nvim_create_autocmd("BufLeave", {
buffer = 0, -- Current buffer (the note buffer)
callback = function()
load_snippets_from_directory(snippet_path)
vim.cmd("buffer " .. previous_buffer)
end,
})
print("Captured snippet: " .. filename)
end
function t3_org_capture(name)
if type(name) ~= "string" or name == "" then
print("Error: Invalid note name")
return
end
local timestamp = os.date("%Y%m%d%H%M%S")
local org_path = "~/org/.org-roam/"
local filename = org_path .. timestamp .. "-" .. name:gsub("%s+", "_") .. ".norg"
local file = io.open(vim.fn.expand(filename), "w")
if file == nil then
print("Error: Could not open file for editing.")
return
end
local previous_buffer = vim.api.nvim_get_current_buf()
file:write("* " .. name .. "\n\n")
file:close()
vim.cmd("e " .. filename)
vim.bo.filetype = 'norg'
vim.cmd("Neorg inject-metadata")
-- Set an autocmd to return to the previous buffer when the note buffer is closed
vim.api.nvim_create_autocmd("BufLeave", {
buffer = 0, -- Current buffer (the note buffer)
callback = function()
vim.cmd("buffer " .. previous_buffer)
end,
})
print("Captured note: " .. filename)
end
vim.api.nvim_create_user_command(
'NeorgCapture',
function()
-- local title = vim.fn.input("Title: ")
local current_workspace = vim.g.neorg_workspace_name
if not current_workspace then
vim.cmd("Neorg workspace default")
end
vim.ui.input({ prompt = "Enter note name: "}, function(note_name)
if not note_name or note_name == "" then
print("Error: Note name required!")
return
end
t3_org_capture(note_name)
end
)
end,
{ nargs = 0, desc = "Capture a Neorg note" }
)
vim.api.nvim_create_user_command(
'CaptureSnip',
function()
-- local title = vim.fn.input("Title: ")
-- local current_workspace = vim.g.neorg_workspace_name
-- if not current_workspace then
-- vim.cmd("Neorg workspace default")
-- end
vim.ui.input({ prompt = "Enter snippet name: "}, function(snip_name)
if not snip_name or snip_name == "" then
print("Error: Snippet name required!")
return
end
t3_snip_capture(snip_name)
end
)
end,
{ nargs = 0, desc = "Capture a Neorg note" }
)
function t3_buffers()
fzflua.buffers()
end
function t3_tabs()
fzflua.tabs()
end
function t3_live_grep(state)
state = state or 0
if state == 0 then
fzflua.live_grep()
else
fzflua.live_grep_resume()
end
end
function t3_grep(state)
state = state or 0
if state == 0 then
fzflua.grep_project()
else
fzflua.grep()
end
end
function t3_make_ctags()
Job:new({
command = 'ctags',
args = { '-R .' },
})
end
vim.api.nvim_create_autocmd("FileType", {
pattern = { "markdown", "norg", "md", "wiki" }, -- Set for markdown file type
callback = function()
vim.api.nvim_buf_set_keymap(0, "n", "<C-i>", "o* [ ] ", { noremap = true, silent = true })
vim.api.nvim_buf_set_keymap(0, "i", "<C-i>", "<Esc>0wi* [ ] ", { noremap = true, silent = true })
end,
})

View File

@@ -1,112 +0,0 @@
local vim = vim
vim.keymap.set("n", "<C-w>s", function()
vim.cmd("split")
vim.cmd("wincmd j")
end, { noremap = true })
vim.keymap.set("n", "<C-w>v", function()
vim.cmd("vsplit")
vim.cmd("wincmd l")
end, { noremap = true })
-- Leader Maps
vim.keymap.set("n", "<leader>f", "", { desc = "Files"})
vim.keymap.set("n", "<leader>ff", ":FzfLua files<CR>", { desc = "File Finder"})
-- vim.keymap.set("n", "<leader>fe", ":Pick files<CR>", { desc = "File Picker"})
vim.keymap.set("n", "<leader>ft", t3_toggle_netrw, { desc = "File Tree"})
vim.keymap.set("n", "<leader>b", "", { desc = "Buffers"})
vim.keymap.set("n", "<leader>bb", ":Pick buffers<CR>", { desc = "Buffer Picker"})
vim.keymap.set("n", "<leader>bp", ":bp<CR>", { desc = "Previous"})
vim.keymap.set("n", "<leader>bn", ":bn<CR>", { desc = "Next"})
vim.keymap.set("n", "<leader>bd", ":bd<CR>", { desc = "Delete"})
vim.keymap.set("n", "<leader>g", "", { desc = "Grep"})
vim.keymap.set("n", "<leader>gg", ":FzfLua grep<CR>", { desc = "Grep"})
vim.keymap.set("n", "<leader>gr", ":FzfLua grep resume=true<CR>", { desc = "Resume Grep"})
vim.keymap.set("n", "<leader>G", "", { desc = "Git"})
vim.keymap.set("n", "<leader>Gg", ":LazyGit<CR>", { desc = "LazyGit"})
vim.keymap.set("n", "<leader>GC", ":LazyGitConfig<CR>", { desc = "LazyGit Config"})
vim.keymap.set("n", "<leader>Gc", ":LazyGitFilter<CR>", { desc = "Commits"})
vim.keymap.set("n", "<leader>Gl", ":LazyGitLog<CR>", { desc = "Log"})
vim.keymap.set("n", "<leader><Tab>", "", { desc = "Tabs"})
vim.keymap.set("n", "<leader><Tab><Tab>", ":tabnew<CR>", { desc = "New Tab"})
vim.keymap.set("n", "<leader><Tab>p", ":tabprevious<CR>", { desc = "Previous Tab"})
vim.keymap.set("n", "<leader><Tab>n", ":tabnext<CR>", { desc = "Next Tab"})
vim.keymap.set("n", "<leader><Tab>d", ":tabclose<CR>", { desc = "Delete Tab"})
vim.keymap.set("n", "<leader><Tab>l", ":tablast<CR>", { desc = "Last Tab"})
vim.keymap.set("n", "<leader><Tab>f", ":tabfirst<CR>", { desc = "First Tab"})
vim.keymap.set("n", "<leader><Tab>m", ":tabmove<CR>", { desc = "Move Tab"})
vim.keymap.set("n", "<leader><Tab>r", ":tabrenumber<CR>", { desc = "Renumber Tabs"})
vim.keymap.set("n", "<leader><Tab>c", ":tabclose!<CR>", { desc = "Force Close Tab"})
vim.keymap.set("n", "gR", "<CMD>Glance references<CR>", { desc = "Glance References" })
vim.keymap.set("n", "gD", "<CMD>Glance definitions<CR>", { desc = "Glance Definitions" })
vim.keymap.set("n", "gY", "<CMD>Glance type_definitions<CR>", { desc = "Glance Type Definitions" })
vim.keymap.set("n", "gM", "<CMD>Glance implementations<CR>", { desc = "Glance Implementations" })
vim.keymap.set("n", "<A-Tab>", ":b#<CR>", { desc = "Switch to Last Buffer" })
vim.keymap.set("n", "<A-Left>", ":bprevious<CR>", { desc = "Previous Buffer" })
vim.keymap.set("n", "<A-Right>", ":bnext<CR>", { desc = "Next Buffer" })
vim.keymap.set("n", "<A-Up>", ":tabprevious<CR>", { desc = "Previous Tab" })
vim.keymap.set("n", "<A-Down>", ":tabnext<CR>", { desc = "Next Tab" })
vim.keymap.set("n", "<A-1>", "<Cmd>BufferGoto 1<CR>", { desc = "Go to Buffer 1" })
vim.keymap.set("n", "<A-2>", "<Cmd>BufferGoto 2<CR>", { desc = "Go to Buffer 2" })
vim.keymap.set("n", "<A-3>", "<Cmd>BufferGoto 3<CR>", { desc = "Go to Buffer 3" })
vim.keymap.set("n", "<A-4>", "<Cmd>BufferGoto 4<CR>", { desc = "Go to Buffer 4" })
vim.keymap.set("n", "<A-5>", "<Cmd>BufferGoto 5<CR>", { desc = "Go to Buffer 5" })
vim.keymap.set("n", "<A-6>", "<Cmd>BufferGoto 6<CR>", { desc = "Go to Buffer 6" })
vim.keymap.set("n", "<A-7>", "<Cmd>BufferGoto 7<CR>", { desc = "Go to Buffer 7" })
vim.keymap.set("n", "<A-8>", "<Cmd>BufferGoto 8<CR>", { desc = "Go to Buffer 8" })
vim.keymap.set("n", "<A-9>", "<Cmd>BufferGoto 9<CR>", { desc = "Go to Buffer 9" })
vim.keymap.set("n", "<A-0>", "<Cmd>BufferLast<CR>", { desc = "Go to Last Buffer" })
-- Meta X Maps
vim.keymap.set("n", "<M-x><M-x>", ":Telescope commands<CR>", { desc = "Commands"})
vim.keymap.set("n", "<M-x>b", ":Telescope buffers<CR>", { desc = "Buffers"})
vim.keymap.set("n", "<M-x>f", ":Telescope find_files<CR>", { desc = "Find Files"})
vim.keymap.set("n", "<M-x>g", ":Telescope live_grep<CR>", { desc = "Live Grep"})
vim.keymap.set("n", "<M-x>h", ":Telescope help_tags<CR>", { desc = "Help Tags"})
vim.keymap.set("n", "<M-x>p", ":Telescope project<CR>", { desc = "Projects"})
vim.keymap.set("n", "<M-x>l", ":Telescope resume<CR>", { desc = "Resume Last Search"})
vim.keymap.set("n", "<M-x>c", ":Telescope colorscheme<CR>", { desc = "Colorschemes"})
vim.keymap.set("n", "<M-x>n", ":enew<CR>", { desc = "New File"})
vim.keymap.set("n", "<M-x>s", ":w<CR>", { desc = "Save File"})
vim.keymap.set("n", "<M-x>q", ":q<CR>", { desc = "Quit"})
vim.keymap.set("n", "<M-x>w", ":bd<CR>", { desc = "Close Buffer"})
vim.keymap.set("n", "<M-x>a", "ggVG", { desc = "Select All"})
vim.keymap.set("n", "<M-x>z", "u", { desc = "Undo"})
vim.keymap.set("n", "<M-x>y", "<C-r>", { desc = "Redo"})
vim.keymap.set("n", "<M-x>/", ":nohlsearch<CR>", { desc = "Clear Search Highlight"})
vim.keymap.set("n", "<M-x>=", ":vertical resize +5<CR>", { desc = "Increase Window Width"})
vim.keymap.set("n", "<M-x>-"," :vertical resize -5<CR>", { desc = "Decrease Window Width"})
vim.keymap.set("n", "<M-x>+", ":resize +5<CR>", { desc = "Increase Window Height"})
vim.keymap.set("n", "<M-x>_", ":resize -5<CR>", { desc = "Decrease Window Height"})
vim.keymap.set("n", "<M-x>Left", ":vertical resize -5<CR>", { desc = "Decrease Window Width"})
vim.keymap.set("n", "<M-x>Right"," :vertical resize +5<CR>", { desc = "Increase Window Width"})
vim.keymap.set("n", "<M-x>Up", ":resize +5<CR>", { desc = "Increase Window Height"})
vim.keymap.set("n", "<M-x>Down", ":resize -5<CR>", { desc = "Decrease Window Height"})
vim.keymap.set("n", "<M-x>Enter", ":ToggleTerm<CR>", { desc = "Toggle Terminal"})
-- CTRL X Maps
vim.keymap.set("n", "<C-x><C-b>", ":Pick buffers<CR>", { desc = "Buffer Picker"})
vim.keymap.set("n", "<C-x><C-f>", ":Pick files<CR>", { desc = "File Picker"})
vim.keymap.set("n", "<C-x><C-h>", ":Pick help<CR>", { desc = "Help Picker"})
vim.keymap.set("n", "<C-x><C-g>", "", { desc = "Grep"})
vim.keymap.set("n", "<C-x><C-g>g", ":Pick grep<CR>", { desc = "Grep"})
vim.keymap.set("n", "<C-x><C-g>l", ":Pick grep_live<CR>", { desc = "Live Grep"})
vim.keymap.set("n", "<C-x><C-n>", "", { desc = "Notes"})
vim.keymap.set("n", "<C-x><C-n>e", "<cmd>TWEditTask<cr>", { desc = "TaskWarrior Edit", noremap = true, silent = true })
vim.keymap.set("n", "<C-x><C-n>v", "<cmd>TWView<cr>", { desc = "View Tasks", noremap = true, silent = true })
vim.keymap.set("n", "<C-x><C-n>u", "<cmd>TWUpdateCurrent<cr>", { desc="Update Tasks", noremap = true, silent = true })
vim.keymap.set("n", "<C-x><C-n>s", "<cmd>TWSyncTasks<cr>", { desc = "Sync Tasks", noremap = true, silent = true })
vim.keymap.set("n", "<C-x><C-n><c-space>", "<cmd>TWToggle<cr>", { desc = "Toggle Taskwarrior", silent = true })
vim.keymap.set("v", "<C-;><C-c>", ":'<,'>SnipRun<CR>", { silent = true, desc = "Run Selection" })
vim.keymap.set("n", "<C-;><C-c>", ":<Plug>SnipRun<CR>", { desc = "Run Current Line" })
vim.keymap.set("n", "<C-;><C-b>", ":%SnipRun<CR>", { desc = "Run Buffer" })
vim.keymap.set("n", "<C-;><C-k>", "<Plug>SnipReset<CR>", { desc = "Run Buffer" })

View File

@@ -1,57 +0,0 @@
local vim = vim
-- vim.cmd [[
-- augroup LspCompletion
-- autocmd!
-- autocmd InsertEnter * setlocal omnifunc=v:lua.vim.lsp.omnifunc
-- autocmd TextChangedI * if pumvisible() == 0 | silent! lua vim.fn.complete(vim.fn.col('.'), vim.fn["vim.lsp.omnifunc"]()) | endif
-- augroup END
-- ]]
vim.lsp.enable('lua_ls')
vim.lsp.enable('gopls', {
settings = {
gopls = {
analyses = {
unusedparams = true,
unusedwrite = true,
shadow = true,
},
staticcheck = true,
usePlaceholders = true,
hints = {
assignVariableTypes = true,
compositeLiteralFields = true,
compositeLiteralTypes = true,
functionTypeParameters = true,
parameterNames = true,
rangeVariableTypes = true,
},
},
},
})
require("lsp_signature").setup({
debug = false,
bind = true, -- registers signature handler
doc_lines = 10,
max_height = 12,
max_width = function() return math.floor(vim.api.nvim_win_get_width(0) * 0.8) end,
wrap = true,
floating_window = true, -- show the popup
floating_window_above_cur_line = true,
floating_window_off_x = 1,
floating_window_off_y = 0,
-- IMPORTANT: dont inline (you can change later if you want)
hint_enable = true,
hint_inline = function() return false end,
hint_prefix = "🐼 ",
hint_scheme = "String",
hi_parameter = "LspSignatureActiveParameter",
handler_opts = { border = "rounded" },
always_trigger = false,
extra_trigger_chars = { "(", "," }, -- good default
zindex = 200,
padding = "",
timer_interval = 200,
})

View File

@@ -1,55 +0,0 @@
local vim = vim
vim.o.number = true
vim.o.relativenumber = true
vim.o.tabstop = 2
vim.o.shiftwidth = 2
vim.o.wrap = false
vim.o.scrolloff = 5
vim.o.colorcolumn = "80"
vim.o.wildmenu = true
vim.o.wildmode = "longest:full,full"
vim.o.wildoptions = "pum"
vim.g.mapleader = " "
vim.o.termguicolors = true
vim.o.winborder = "shadow"
vim.o.clipboard = "unnamedplus"
vim.o.completeopt = "menuone"
-- vim.o.completeopt = "menuone,noinsert,noselect"
vim.o.cursorline = true
vim.o.sessionoptions="blank,buffers,curdir,folds,help,tabpages,winsize,winpos,terminal,localoptions"
vim.g.netrw_keepdir = 1
vim.g.netrw_winsize = 20
vim.g.netrw_banner = 0
vim.g.netrw_localcopydircmd = 'cp -avr'
vim.g.netrw_liststyle = 3
vim.g.netrw_browse_split = 4
vim.o.foldmethod = "expr"
vim.o.foldexpr = "nvim_treesitter#foldexpr()"
vim.o.foldlevel = 1
vim.o.foldenable = true
vim.o.undofile = true
vim.o.undodir = vim.fn.stdpath("data") .. "/undo"
vim.api.nvim_create_autocmd("FileType", {
pattern = "help",
callback = function()
vim.opt_local.wrap = true
end,
})
vim.api.nvim_create_autocmd("FileType", {
pattern = "markdown",
callback = function()
vim.opt_local.wrap = true
end,
})
vim.api.nvim_create_autocmd("BufWritePost", {
pattern = ".wiki",
callback = function()
vim.cmd("VimwikiGenerateLinks")
end,
})

View File

@@ -1,138 +0,0 @@
local vim = vim
local host = vim.loop.os_gethostname()
vim.pack.add({
{ src = "https://github.com/folke/tokyonight.nvim" },
{ src = "https://github.com/nvim-tree/nvim-web-devicons" },
{ src = "https://github.com/ibhagwan/fzf-lua" },
{ src = "https://github.com/echasnovski/mini.pick" },
{ src = "https://github.com/echasnovski/mini.icons" },
{ src = "https://github.com/echasnovski/mini.files" },
{ src = "https://github.com/echasnovski/mini.pairs" },
{ src = "https://github.com/echasnovski/mini.notify" },
{ src = "https://github.com/echasnovski/mini.surround" },
{ src = "https://github.com/echasnovski/mini.indentscope" },
{ src = "https://github.com/echasnovski/mini.fuzzy" },
{ src = "https://github.com/echasnovski/mini.tabline" },
{ src = "https://github.com/nvim-lualine/lualine.nvim" },
{ src = "https://github.com/folke/which-key.nvim" },
{ src = "https://github.com/L3MON4D3/LuaSnip" },
{ src = "https://github.com/neovim/nvim-lspconfig" },
{ src = "https://github.com/hrsh7th/nvim-cmp" },
{ src = "https://github.com/hrsh7th/cmp-nvim-lsp" },
{ src = "https://github.com/hrsh7th/cmp-buffer" },
{ src = "https://github.com/hrsh7th/cmp-path" },
{ src = "https://github.com/hrsh7th/cmp-cmdline" },
{ src = "https://github.com/hrsh7th/cmp-nvim-lua" },
{ src = "https://github.com/saadparwaiz1/cmp_luasnip" },
{ src = "https://github.com/github/copilot.vim" },
{ src = "https://github.com/pysan3/pathlib.nvim" },
{ src = "https://github.com/nvim-orgmode/org-bullets.nvim" },
{ src = "https://github.com/lukas-reineke/headlines.nvim" },
{ src = "https://github.com/michaelb/sniprun", run = "bash install.sh 1" },
{ src = "https://github.com/akinsho/toggleterm.nvim" },
{ src = "https://github.com/kdheepak/lazygit.nvim" },
{ src = "https://github.com/saecki/crates.nvim" },
{ src = "https://github.com/nvim-treesitter/nvim-treesitter" },
{ src = "https://github.com/folke/trouble.nvim" },
{ src = "https://github.com/folke/todo-comments.nvim" },
{ src = "https://github.com/MunifTanjim/nui.nvim" },
{ src = "https://github.com/huantrinh1802/m_taskwarrior_d.nvim" },
{ src = "https://github.com/rmagatti/auto-session" },
{ src = "https://github.com/romgrk/barbar.nvim" },
{ src = "https://github.com/christoomey/vim-tmux-navigator" },
{ src = "https://github.com/rachartier/tiny-inline-diagnostic.nvim" },
{ src = "https://github.com/zeioth/garbage-day.nvim" },
{ src = "https://github.com/ray-x/lsp_signature.nvim" },
{ src = "https://github.com/DNLHC/glance.nvim" },
{ src = "https://github.com/rmagatti/logger.nvim" },
{ src = "https://github.com/rmagatti/goto-preview" },
{ src = "https://github.com/norcalli/nvim-colorizer.lua" },
{ src = "https://github.com/nvim-lua/plenary.nvim" },
{ src = "https://github.com/nvim-telescope/telescope.nvim" },
{ src = "https://github.com/nvim-telescope/telescope-project.nvim"},
{ src = "https://github.com/nvim-telescope/telescope-ui-select.nvim" },
{ src = "https://github.com/luckasRanarison/nvim-devdocs" },
{ src = "https://github.com/folke/noice.nvim" },
{ src = "https://github.com/mbbill/undotree.git" },
})
if host == "xps13" then
end
require('mini.icons').setup({})
require('mini.pick').setup({})
require('mini.pairs').setup({})
require('mini.notify').setup({})
require('mini.surround').setup({})
require('mini.indentscope').setup({})
require('mini.tabline').setup({})
require('mini.fuzzy').setup({})
require('lualine').setup({ options = { theme = 'tokyonight' } })
require('which-key').setup({})
require('fzf-lua').setup({})
require('crates').setup({})
require('todo-comments').setup({
options = {
keywords = {
FIX = {
icon = "", -- icon used for the sign, and in search results
color = "error", -- can be a hex color, or a named color (see below)
alt = { "FIXME", "BUG", "FIXIT", "ISSUE" }, -- a set of other keywords that all map to this FIX keywords
-- signs = false, -- configure signs for some keywords individually
},
TODO = { icon = "", color = "info" },
HACK = { icon = "", color = "warning" },
WARN = { icon = "", color = "warning", alt = { "WARNING", "XXX" } },
PERF = { icon = "", alt = { "OPTIM", "PERFORMANCE", "OPTIMIZE" } },
NOTE = { icon = "", color = "hint", alt = { "INFO" } },
TEST = { icon = "", color = "test", alt = { "TESTING", "PASSED", "FAILED" } },
},
}
})
require('trouble').setup({})
require('org-bullets').setup({})
require('headlines').setup({})
require('sniprun').setup({
binary_path = '/home/th3r00t/.local/share/nvim/site/pack/core/opt/sniprun/\
target/release/sniprun'
})
require('toggleterm').setup({
size = 20,
open_mapping = [[<c- >]],
hide_numbers = true,
shade_filetypes = {},
shading_factor = 2,
start_in_insert = true,
insert_mappings = true,
persist_size = true,
direction = 'horizontal',
close_on_exit = true,
shell = vim.o.shell,
})
require('m_taskwarrior_d').setup({})
require("auto-session").setup({
suppressed_dirs = { "~/Downloads", "~/Documents", "~/Projects", "~/" },
})
require('barbar').setup({})
require('goto-preview').setup({ default_mappings = true })
require('colorizer').setup({})
require('telescope').setup({})
require('nvim-devdocs').setup({})
require('noice').setup({
lsp = {
override = {
["vim.lsp.util.convert_input_to_markdown_lines"] = true,
["vim.lsp.util.stylize_markdown"] = true,
["cmp.entry.get_documentation"] = true, -- requires hrsh7th/nvim-cmp
},
},
presets = {
bottom_search = true, -- use a classic bottom cmdline for search
command_palette = true, -- position the cmdline and popupmenu together
long_message_to_split = true, -- long messages will be sent to a split
inc_rename = false, -- enables an input dialog for inc-rename.nvim
lsp_doc_border = false, -- add a border to hover docs and signature help
},
})

View File

@@ -1,32 +0,0 @@
local vim = vim
local host = vim.loop.os_gethostname()
require('telescope').load_extension('project')
require('telescope').load_extension('ui-select')
require('telescope').setup{
defaults = {
mappings = {
i = {
["<C-u>"] = false,
["<C-d>"] = false,
},
},
},
pickers = {
-- Default configuration for builtin pickers goes here:
-- picker_name = {
-- picker_config_key = value,
-- ...
-- }
-- Now the picker_config_key will be applied every time you call this
-- builtin picker
},
extensions = {
["ui-select"] = {
require("telescope.themes").get_dropdown {
-- even more opts
}
},
}
}

View File

@@ -1,11 +0,0 @@
function _G.set_terminal_keymaps()
local opts = { buffer = 0 }
vim.keymap.set('t', '<esc>', [[<C-\><C-n>]], opts)
vim.keymap.set('t', 'jk', [[<C-\><C-n>]], opts)
vim.keymap.set('t', '<C-h>', [[<Cmd>wincmd h<CR>]], opts)
vim.keymap.set('t', '<C-j>', [[<Cmd>wincmd j<CR>]], opts)
vim.keymap.set('t', '<C-k>', [[<Cmd>wincmd k<CR>]], opts)
vim.keymap.set('t', '<C-l>', [[<Cmd>wincmd l<CR>]], opts)
end
vim.cmd('autocmd! TermOpen term://* lua set_terminal_keymaps()')

View File

@@ -1,11 +0,0 @@
local configs = require('nvim-treesitter.configs')
configs.setup({
-- ensure_installed = {
-- "ini", "bash", "c", "lua", "vim", "vimdoc", "query", "python",
-- "rust", "zig", "typescript", "svelte", "css", "html", "nix"
-- },
sync_install = false,
highlight = { enable = true },
indent = { enable = true, disable = { "norg" }, },
incremental_selection = { enable = true },
})

View File

@@ -1,11 +0,0 @@
for name,_ in pairs(package.loaded) do
if name:match("^t3")
or name:match("^options")
or name:match("^overrides")
or name:match("^plugins")
or name:match("keymaps")
or name:match("^reload")
then
package.loaded[name] = nil
end
end

View File

@@ -1,187 +0,0 @@
local vim = vim
local fzflua = require("fzf-lua")
function t3_find_file()
-- local file_name = vim.fn.input("Find File: ", "", "file")
fzflua.files()
end
function t3_recent_files()
fzflua.oldfiles()
end
function t3_org_files()
fzflua.files({ cwd = '~/org/'})
end
function t3_project_files()
fzflua.files({ cwd = '~/Projects/'})
end
function t3_dot_files()
fzflua.files({ cwd = '~/.dotfiles/'})
end
function t3_config_files()
fzflua.files({ cwd = '~/.dotfiles/'})
end
function t3_snip_capture(name)
if type(name) ~= "string" or name == "" then
print("Error: Invalid snippet name")
return
end
-- local timestamp = os.date("%Y%m%d%H%M%S")
local snippet_path = "~/.config/nvim/snippets/"
local filename = snippet_path .. name:gsub("%s+", "_") .. ".lua"
local file = io.open(vim.fn.expand(filename), "w")
if file == nil then
print("Error: Could not open file for editing.")
return
end
local previous_buffer = vim.api.nvim_get_current_buf()
file:write("local ls = require('luasnip')\n\nls.add_snippets(\"{}\", {\n\tls.parser.parse_snippet(\n\t\t'{}',\n\t\t'{}'),\n})")
file:close()
vim.cmd("e " .. filename)
vim.bo.filetype = 'lua'
-- vim.cmd("Neorg inject-metadata")
-- Set an autocmd to return to the previous buffer when the note buffer is closed
vim.api.nvim_create_autocmd("BufLeave", {
buffer = 0, -- Current buffer (the note buffer)
callback = function()
load_snippets_from_directory(snippet_path)
vim.cmd("buffer " .. previous_buffer)
end,
})
print("Captured snippet: " .. filename)
end
function t3_org_capture(name)
if type(name) ~= "string" or name == "" then
print("Error: Invalid note name")
return
end
local timestamp = os.date("%Y%m%d%H%M%S")
local org_path = "~/org/.org-roam/"
local filename = org_path .. timestamp .. "-" .. name:gsub("%s+", "_") .. ".norg"
local file = io.open(vim.fn.expand(filename), "w")
if file == nil then
print("Error: Could not open file for editing.")
return
end
local previous_buffer = vim.api.nvim_get_current_buf()
file:write("* " .. name .. "\n\n")
file:close()
vim.cmd("e " .. filename)
vim.bo.filetype = 'norg'
vim.cmd("Neorg inject-metadata")
-- Set an autocmd to return to the previous buffer when the note buffer is closed
vim.api.nvim_create_autocmd("BufLeave", {
buffer = 0, -- Current buffer (the note buffer)
callback = function()
vim.cmd("buffer " .. previous_buffer)
end,
})
print("Captured note: " .. filename)
end
vim.api.nvim_create_user_command(
'NeorgCapture',
function()
-- local title = vim.fn.input("Title: ")
local current_workspace = vim.g.neorg_workspace_name
if not current_workspace then
vim.cmd("Neorg workspace default")
end
vim.ui.input({ prompt = "Enter note name: "}, function(note_name)
if not note_name or note_name == "" then
print("Error: Note name required!")
return
end
t3_org_capture(note_name)
end
)
end,
{ nargs = 0, desc = "Capture a Neorg note" }
)
vim.api.nvim_create_user_command(
'CaptureSnip',
function()
-- local title = vim.fn.input("Title: ")
-- local current_workspace = vim.g.neorg_workspace_name
-- if not current_workspace then
-- vim.cmd("Neorg workspace default")
-- end
vim.ui.input({ prompt = "Enter snippet name: "}, function(snip_name)
if not snip_name or snip_name == "" then
print("Error: Snippet name required!")
return
end
t3_snip_capture(snip_name)
end
)
end,
{ nargs = 0, desc = "Capture a Neorg note" }
)
function t3_buffers()
fzflua.buffers()
end
function t3_tabs()
fzflua.tabs()
end
function t3_live_grep(state)
state = state or 0
if state == 0 then
fzflua.live_grep()
else
fzflua.live_grep_resume()
end
end
function t3_grep(state)
state = state or 0
if state == 0 then
fzflua.grep_project()
else
fzflua.grep()
end
end
local function is_netrw_open()
for _, win in ipairs(vim.api.nvim_tabpage_list_wins(0)) do
local buf = vim.api.nvim_win_get_buf(win)
if vim.bo[buf].filetype == "netrw" then
return true, win
end
end
return false, nil
end
function t3_toggle_netrw()
local is_open, win = is_netrw_open()
if is_open then
vim.api.nvim_win_close(win, true)
else
vim.cmd("Lexplore")
end
end
vim.api.nvim_create_autocmd("FileType", {
pattern = { "markdown", "norg", "md", "wiki" }, -- Set for markdown file type
callback = function()
vim.api.nvim_buf_set_keymap(0, "n", "<C-i>", "o* [ ] ", { noremap = true, silent = true })
vim.api.nvim_buf_set_keymap(0, "i", "<C-i>", "<Esc>0wi* [ ] ", { noremap = true, silent = true })
end,
})
vim.api.nvim_create_user_command("Split", function()
vim.cmd("split")
vim.cmd("wincmd j")
end, {})
vim.api.nvim_create_user_command("Vsplit", function()
vim.cmd("vsplit")
vim.cmd("wincmd l")
end, {})

View File

@@ -1,5 +0,0 @@
-- vim.api.nvim_create_autocmd("winNew", {
-- callback = function()
-- vim.cmd("wincmd w")
-- end,
-- })

View File

@@ -1,109 +0,0 @@
local vim = vim
local opt = vim.opt
-- opt.wildmenu = true
-- vim.g.netrw_keepdir = 0
-- vim.treesitter.language.register("markdown", "vimwiki")
-- vim.g.vimwiki_folding = 'expr'
-- vim.g.vimwiki_header_type = "="
-- vim.api.nvim_create_autocmd({ "BufWritePost" }, {
-- pattern = "*.wiki", -- Adjust this pattern if your Vimwiki files have a different extension
-- callback = function()
-- vim.cmd("TWSyncTasks")
-- end,
-- })
-- Autocommand to trigger LuaSnip snippet expansion for new diary files
vim.api.nvim_create_autocmd("BufNewFile", {
pattern = "diary/*.wiki", -- Adjust this path to match your diary directory
callback = function()
-- Expand the 'diary_template' snippet automatically
ls.snip_expand(ls.snippets.diary_template[1])
end,
})
vim.g.vimwiki_automatic_nested_syntaxes = 1
vim.g.vimwiki_list = {
{
name = "Personal Wiki",
path = '/home/th3r00t/wiki/',
path_html = '/home/th3r00t/wiki/html/',
syntax = 'default',
ext = '.wiki',
diary_rel_path = 'diary/',
diary_index = "diary_index",
auto_tags = 1,
auto_toc = 1,
auto_export = 1,
template_path = "/home/th3r00t/wiki/templates/",
template_default = "def_template",
template_ext = "html",
css_name = "main.css",
maxhi = 1, -- BUG: Can be a source of lag.
diary_caption_level = 1,
bullet_types = { "-", "*", "#", "" },
cycle_bullets = 1,
generated_links_caption = 1,
listsyms = '✗○◐●✓',
-- listsym_rejected = '✗',
auto_diary_index = 1,
auto_generate_links = 1,
auto_generate_tags = 1,
exclude_files = { "**/README.md" },
rss_name = "feed.rss",
base_url = "https://th3r00t.net",
}
}
vim.g.vimwiki_syntax_plugins = {
codeblock = {
["```lua"] = { parser = "lua" },
["```python"] = { parser = "python" },
["```javascript"] = { parser = "javascript" },
["```bash"] = { parser = "bash" },
["```html"] = { parser = "html" },
["```css"] = { parser = "css" },
["```c"] = { parser = "c" },
["```zig"] = { parser = "zig" },
},
}
vim.g.vimwiki_toc_header = "Navigation"
vim.g.vimwiki_toc_header_level = 2
vim.g.vimwiki_hl_cb_checked = 1
vim.g.vimwiki_global_ext = 1
vim.g.vimwiki_auto_chdir = 1
vim.g.wimwiki_markdown_link_ext = 1
-- vim.g.vimwiki_folding = 'list'
vim.g.vimwiki_folding = 'expr'
vim.g.vimwiki_use_calendar = 1
vim.api.nvim_set_keymap('n', '<Leader>ww', '<Cmd>VimwikiIndex<CR>', { noremap = true, silent = true })
vim.api.nvim_set_keymap('n', '<Leader>wt', '<Cmd>VimwikiTabIndex<CR>', { noremap = true, silent = true })
vim.api.nvim_set_keymap('n', '<Leader>ws', '<Cmd>VimwikiUISelect<CR>', { noremap = true, silent = true })
local function setup_vimwiki_highlights()
-- Define color scheme mappings
local colors = {
header1 = "#81a1c1", -- Tokyo Night blue
header2 = "#88c0d0", -- Tokyo Night light blue
header3 = "#8fbcbb", -- Tokyo Night greenish blue
bold = "#eceff4", -- Tokyo Night bright white
italic = "#5e81ac", -- Tokyo Night dark blue
link = "#b48ead", -- Tokyo Night purple
list = "#d08770", -- Tokyo Night orange
}
-- Apply highlights for vimwiki syntax elements
vim.api.nvim_set_hl(0, "VimwikiHeader1", { fg = colors.header1, bold = true })
vim.api.nvim_set_hl(0, "VimwikiHeader2", { fg = colors.header2, bold = true })
vim.api.nvim_set_hl(0, "VimwikiHeader3", { fg = colors.header3, bold = true })
vim.api.nvim_set_hl(0, "VimwikiBold", { fg = colors.bold, bold = true })
vim.api.nvim_set_hl(0, "VimwikiItalic", { fg = colors.italic, italic = true })
vim.api.nvim_set_hl(0, "VimwikiLink", { fg = colors.link, underline = true })
vim.api.nvim_set_hl(0, "VimwikiList", { fg = colors.list })
end
setup_vimwiki_highlights()
-- Define the Lua function for generating the diary template
--
vim.pack.add({
{ src = "https://github.com/vimwiki/vimwiki", opt = true },
})
vim.cmd.packadd("vimwiki")

View File

@@ -8,6 +8,11 @@
]; ];
nix.settings.experimental-features = [ "nix-command" "flakes" ]; nix.settings.experimental-features = [ "nix-command" "flakes" ];
nix.settings.trusted-users = [ "root" "th3r00t" ];
nix.extraOptions = ''
extra-substituters = https://devenv.cachix.org
extra-trusted-public-keys = devenv.cachix.org-1:w1cLUi8dv3hnoSPGAuibQv+f9TZLr6cv/Hm9XgU50cw=
'';
time.timeZone = "America/New_York"; time.timeZone = "America/New_York";
i18n.defaultLocale = "en_US.UTF-8"; i18n.defaultLocale = "en_US.UTF-8";
i18n.extraLocaleSettings = { i18n.extraLocaleSettings = {

View File

@@ -5,16 +5,18 @@
{ config, pkgs, ... }: { config, pkgs, ... }:
{ {
imports = imports = [
[ ./hardware-configuration.nix
./hardware-configuration.nix ./server-partitioning.nix
./server-partitioning.nix ./configuration-common.nix
./configuration-common.nix ];
]; nixpkgs.config.allowUnfree = true;
nix.settings.experimental-features = [ "nix-command" "flakes" ]; nix = {
nix.settings.trusted-users = [ "root" "th3r00t" ]; settings = {
networking.hostName = "Titan"; # Define your hostname. experimental-features = [ "nix-command" "flakes" ];
# Bootloader. trusted-users = [ "root" "th3r00t" ];
};
};
boot = { boot = {
kernelPackages = pkgs.linuxPackages_latest; kernelPackages = pkgs.linuxPackages_latest;
initrd.availableKernelModules = [ initrd.availableKernelModules = [
@@ -29,46 +31,28 @@
extraModprobeConfig = '' extraModprobeConfig = ''
''; '';
}; };
# Set your time zone. networking = {
hostName = "Titan"; # Define your hostname.
firewall.enable = true;
firewall.allowedTCPPorts = [ 21 22 80 443 5900 8080 8384];
firewall.allowedUDPPorts = [ 21 22 80 443 5900 8080 8384];
};
time.timeZone = "America/New_York"; time.timeZone = "America/New_York";
i18 = {
# Select internationalisation properties. defaultLocale = "en_US.UTF-8";
i18n.defaultLocale = "en_US.UTF-8"; extraLocaleSettings = {
LC_ADDRESS = "en_US.UTF-8";
i18n.extraLocaleSettings = { LC_IDENTIFICATION = "en_US.UTF-8";
LC_ADDRESS = "en_US.UTF-8"; LC_MEASUREMENT = "en_US.UTF-8";
LC_IDENTIFICATION = "en_US.UTF-8"; LC_MONETARY = "en_US.UTF-8";
LC_MEASUREMENT = "en_US.UTF-8"; LC_NAME = "en_US.UTF-8";
LC_MONETARY = "en_US.UTF-8"; LC_NUMERIC = "en_US.UTF-8";
LC_NAME = "en_US.UTF-8"; LC_PAPER = "en_US.UTF-8";
LC_NUMERIC = "en_US.UTF-8"; LC_TELEPHONE = "en_US.UTF-8";
LC_PAPER = "en_US.UTF-8"; LC_TIME = "en_US.UTF-8";
LC_TELEPHONE = "en_US.UTF-8"; };
LC_TIME = "en_US.UTF-8";
}; };
# Enable the X11 windowing system.
# You can disable this if you're only using the Wayland session.
# services.xserver.enable = true;
# Enable the KDE Plasma Desktop Environment.
# services.displayManager.sddm.enable = true;
# services.desktopManager.plasma6.enable = true;
# Configure keymap in X11
# services.xserver.xkb = {
# layout = "us";
# variant = "";
# };
# Enable CUPS to print documents.
services.printing.enable = true;
# Enable sound with pipewire.
services.pulseaudio.enable = false;
security.rtkit.enable = true;
# Enable touchpad support (enabled default in most desktopManager).
fonts = { fonts = {
enableDefaultPackages = true; enableDefaultPackages = true;
fontDir.enable = true; fontDir.enable = true;
@@ -76,62 +60,45 @@
]; ];
}; };
# Define a user account. Don't forget to set a password with passwd.
users.users.th3r00t = { users.users.th3r00t = {
isNormalUser = true; isNormalUser = true;
description = "Mike 'th3r00t' Young"; description = "Mike 'th3r00t' Young";
extraGroups = [ "networkmanager" "wheel" "input" ]; extraGroups = [ "networkmanager" "wheel" "input" ];
packages = with pkgs; [ packages = with pkgs; [
# kdePackages.kate ];
# thunderbird openssh.authorizedKeys.keys = [
"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIH8P/3yzsruekSaZ9b+yk429VTcfCtI1j8jnkNbPAgnr th3r00t@nixos"
]; ];
}; };
# Enable automatic login for the user. environment = {
variables.EDITOR = "nvim";
nixpkgs.config.allowUnfree = true; systemPackages = with pkgs; [
git
# List packages installed in system profile. To search, run: vim
# $ nix search wget curl
environment.variables.EDITOR = "nvim"; age
environment.systemPackages = with pkgs; [ ];
# vim # Do not forget to add an editor to edit configuration.nix! The Nano editor is also installed by default.
# wget
git
vim
curl
age
];
# Some programs need SUID wrappers, can be configured further or are
# started in user sessions.
programs.mtr.enable = true;
programs.gnupg.agent = {
enable = true;
enableSSHSupport = true;
}; };
# List services that you want to enable: programs = {
mtr.enable = true;
gnupg.agent = {
enable = true;
enableSSHSupport = true;
};
};
services = {
pulseaudio.enable = false;
rtkit.enable = true;
printing.enable = false;
openssh.enable = true;
};
# Enable the OpenSSH daemon.
services.openssh.enable = true;
users.users.root.openssh.authorizedKeys.keys = users.users.root.openssh.authorizedKeys.keys =
[ [
"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIH8P/3yzsruekSaZ9b+yk429VTcfCtI1j8jnkNbPAgnr th3r00t@nixos" "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIH8P/3yzsruekSaZ9b+yk429VTcfCtI1j8jnkNbPAgnr th3r00t@nixos"
]; ];
# Open ports in the firewall.
networking.firewall.allowedTCPPorts = [ 21 22 80 443 5900 8080 8384];
networking.firewall.allowedUDPPorts = [ 21 22 80 443 5900 8080 8384];
# Or disable the firewall altogether.
# networking.firewall.enable = false;
# This value determines the NixOS release from which the default
# settings for stateful data, like file locations and database versions
# on your system were taken. Its perfectly fine and recommended to leave
# this value at the release version of the first install of this system.
# Before changing this value read the documentation for this option
# (e.g. man configuration.nix or on https://nixos.org/nixos/options.html).
system.stateVersion = "25.05"; # Did you read the comment? system.stateVersion = "25.05"; # Did you read the comment?
} }

View File

@@ -11,11 +11,6 @@
./laptop.nix ./laptop.nix
]; ];
# Bootloader. # Bootloader.
nix.settings.trusted-users = [ "root" "th3r00t" ];
nix.extraOptions = ''
extra-substituters = https://devenv.cachix.org
extra-trusted-public-keys = devenv.cachix.org-1:w1cLUi8dv3hnoSPGAuibQv+f9TZLr6cv/Hm9XgU50cw=
'';
boot = { boot = {
kernelPackages = pkgs.linuxPackages_latest; kernelPackages = pkgs.linuxPackages_latest;
initrd.availableKernelModules = [ initrd.availableKernelModules = [
@@ -32,24 +27,8 @@
options ath10k_core rawmode=1 options ath10k_core rawmode=1
''; '';
}; };
services.udisks2.enable = false;
# Enable CUPS to print documents.
services.printing.enable = true;
programs.uwsm.enable = true;
programs.hyprland.withUWSM = true;
# Enable sound with pipewire.
services.pulseaudio.enable = false;
security.rtkit.enable = true; security.rtkit.enable = true;
services.pipewire = {
enable = true;
alsa.enable = true;
alsa.support32Bit = true;
pulse.enable = true;
jack.enable = true;
#media-session.enable = true;
};
# Enable touchpad support (enabled default in most desktopManager). # Enable touchpad support (enabled default in most desktopManager).
services.libinput.enable = true;
fonts = { fonts = {
enableDefaultPackages = true; enableDefaultPackages = true;
fontDir.enable = true; fontDir.enable = true;
@@ -63,6 +42,7 @@
]++ builtins.filter lib.attrsets.isDerivation (builtins.attrValues pkgs.nerd-fonts); ]++ builtins.filter lib.attrsets.isDerivation (builtins.attrValues pkgs.nerd-fonts);
}; };
# Define a user account. Don't forget to set a password with passwd. # Define a user account. Don't forget to set a password with passwd.
users.users.th3r00t = { users.users.th3r00t = {
isNormalUser = true; isNormalUser = true;
@@ -74,38 +54,53 @@
]; ];
}; };
# Enable automatic login for the user.
services.displayManager.autoLogin.enable = true;
services.displayManager.autoLogin.user = "th3r00t";
programs.firefox.enable = true;
programs.hyprland.enable = true;
# List packages installed in system profile. To search, run: # List packages installed in system profile. To search, run:
# $ nix search wget # $ nix search wget
environment.systemPackages = with pkgs; [ environment.systemPackages = with pkgs; [
# vim # Do not forget to add an editor to edit configuration.nix! The Nano editor is also installed by default.
# wget
git git
vim vim
curl curl
age age
]; ];
#media-session.enable = true;
# Some programs need SUID wrappers, can be configured further or are programs = {
# started in user sessions. mtr.enable = true;
programs.mtr.enable = true; firefox.enable = true;
hyprland = {
enable = true;
withUWSM = true;
};
steam = {
enable = true;
remotePlay.openFirewall = true;
dedicatedServer.openFirewall = true;
localNetworkGameTransfers.openFirewall = true;
};
# uwsm.enable = true;
};
# List services that you want to enable: services = {
openssh.enable = true;
# Enable the OpenSSH daemon. displayManager.autoLogin.enable = true;
services.openssh.enable = true; displayManager.autoLogin.user = "th3r00t";
pipewire = {
enable = true;
alsa.enable = true;
alsa.support32Bit = true;
pulse.enable = true;
jack.enable = true;
};
udisks2.enable = false;
printing.enable = true;
pulseaudio.enable = false;
libinput.enable = true;
logmein-hamachi.enable = true;
};
# Open ports in the firewall. # Open ports in the firewall.
networking.firewall.allowedTCPPorts = [ 21 22 80 443 5900 8080 ]; networking.firewall.allowedTCPPorts = [ 21 22 80 443 5900 8080 12121 12122 ];
networking.firewall.allowedUDPPorts = [ 21 22 80 443 5900 8080 ]; networking.firewall.allowedUDPPorts = [ 21 22 80 443 5900 8080 12121 12122 ];
# Or disable the firewall altogether.
# networking.firewall.enable = false; # networking.firewall.enable = false;
# This value determines the NixOS release from which the default # This value determines the NixOS release from which the default

View File

@@ -167,10 +167,10 @@
set -g @tokyo-night-tmux_show_path 1 set -g @tokyo-night-tmux_show_path 1
set -g @tokyo-night-tmux_path_format relative # 'relative' or 'full' set -g @tokyo-night-tmux_path_format relative # 'relative' or 'full'
if-shell "[[ $(hostname) = 'xps13' ]]" { if-shell "[[ $(hostname) = 'xps13' ]]" {
set -g @tokyo-night-tmux_show_netspeed 1 # set -g @tokyo-night-tmux_show_netspeed 1
set -g @tokyo-night-tmux_netspeed_iface 'wlp2s0' set -g @tokyo-night-tmux_netspeed_iface 'wlp2s0'
set -g @tokyo-night-tmux_netspeed_showip 1 set -g @tokyo-night-tmux_netspeed_showip 1
set -g @tokyo-night-tmux_netspeed_refresh 1 # set -g @tokyo-night-tmux_netspeed_refresh 1
set -g @tokyo-night-tmux_show_battery_widget 1 set -g @tokyo-night-tmux_show_battery_widget 1
set -g @tokyo-night-tmux_battery_name "BAT0" set -g @tokyo-night-tmux_battery_name "BAT0"
set -g @tokyo-night-tmux_battery_low_threshold 21 set -g @tokyo-night-tmux_battery_low_threshold 21

View File

@@ -66,16 +66,22 @@
monitor = eDP-1, preferred,0x0,2 monitor = eDP-1, preferred,0x0,2
# monitor = Virtual-1, 2800x1752@120, 1920x0, 1 # monitor = Virtual-1, 2800x1752@120, 1920x0, 1
$terminal = footclient -e tmux new-session zsh -c '~/.local/usr/bin/tmuxstartup.sh' # $terminal = ghostty
$fileManager = footclient -T vifm -e vifm $terminal = footclient
# $terminal = footclient -e tmux new-session zsh -c '~/.local/usr/bin/tmuxstartup.sh'
$fileManager = footclient -T ranger -e ranger
$fileManager = footclient -T ranger -e ranger
$systeminfo = hyprsysteminfo $systeminfo = hyprsysteminfo
$menu = wofi --show drun $menu = wofi --show drun
$browser = qutebrowser $browser = qutebrowser
$notes = footclient -T capture -e pytui -n $notes = footclient -T capture -e pytui -n
$manpages = footclient -T capture -e pytui -m
$sysmon = footclient -T system-monitor -e bashtop $sysmon = footclient -T system-monitor -e bashtop
$editor = neovide
bind = $mainMod SHIFT, M, exec, hyprvirtmon.py bind = $mainMod SHIFT, M, exec, hyprvirtmon.py
bind = $mainMod SHIFT, Return, exec, $terminal bind = $mainMod SHIFT, Return, exec, $terminal
bind = $mainMod, D, exec, $editor
bind = $mainMod, E, exec, $fileManager bind = $mainMod, E, exec, $fileManager
bind = $mainMod SHIFT, C, killactive bind = $mainMod SHIFT, C, killactive
bind = $mainMod SHIFT, Q, exit bind = $mainMod SHIFT, Q, exit
@@ -84,6 +90,7 @@
bind = $mainMod, B, exec, $browser bind = $mainMod, B, exec, $browser
bind = $mainMod, M, exec, $sysmon bind = $mainMod, M, exec, $sysmon
bind = $mainMod CTRL, N, exec, $notes bind = $mainMod CTRL, N, exec, $notes
bind = $mainMod CTRL, M, exec, $manpages
# bind = $mainMod, P, exec, $menu # bind = $mainMod, P, exec, $menu
bind = $mainMod, V, togglefloating bind = $mainMod, V, togglefloating
bind = $mainMod, P, pseudo, # dwindle bind = $mainMod, P, pseudo, # dwindle
@@ -142,7 +149,7 @@
bindel = ,XF86MonBrightnessUp, exec, brightnessctl -e4 -n2 set 5%+ bindel = ,XF86MonBrightnessUp, exec, brightnessctl -e4 -n2 set 5%+
bindel = ,XF86MonBrightnessDown, exec, brightnessctl -e4 -n2 set 5%- bindel = ,XF86MonBrightnessDown, exec, brightnessctl -e4 -n2 set 5%-
# Requires playerctl # Requires playerctl
bindl = , XF86AudioNext, exec, playerctl next bindl = , XF86AudioNext, exec, playerctl next
bindl = , XF86AudioPause, exec, playerctl play-pause bindl = , XF86AudioPause, exec, playerctl play-pause
bindl = , XF86AudioPlay, exec, playerctl play-pause bindl = , XF86AudioPlay, exec, playerctl play-pause
@@ -166,6 +173,39 @@
''; '';
}; };
programs.hyprlock = {
enable = true;
settings = {
general = {
disable_loading_bar = true;
grace = 300;
hide_cursor = true;
no_fade_in = false;
};
background = [
{
path = "screenshot";
blur_passes = 3;
blur_size = 8;
}
];
input-field = [
{
size = "400, 100";
position = "0, -80";
monitor = "";
dots_center = true;
fade_on_empty = false;
font_color = "rgb(202, 211, 245)";
inner_color = "rgb(91, 96, 120)";
outer_color = "rgb(24, 25, 38)";
outline_thickness = 5;
placeholder_text = "Password";
shadow_passes = 2;
}
];
};
};
services.hyprpaper = { services.hyprpaper = {
enable = true; enable = true;
settings = { settings = {
@@ -176,4 +216,25 @@
wallpaper = [ "eDP-1,/etc/nixos/home/Wallpapers/nord1.jpg" ]; wallpaper = [ "eDP-1,/etc/nixos/home/Wallpapers/nord1.jpg" ];
}; };
}; };
services.hypridle = {
enable = true;
settings = {
general = {
after_sleep_cmd = "hyprctl dispatch dpms on";
ignore_dbus_inhibit = false;
lock_cmd = "hyprlock";
};
listener = [
{
timeout = 300;
on-timeout = "hyprlock";
}
{
timeout = 600;
on-timeout = "hyprctl dispatch dpms off";
on-resume = "hyprctl dispatch dpms on";
}
];
};
};
} }