big module system implementation
This commit is contained in:
25
home/modules/browsers/chromium/default.nix
Normal file
25
home/modules/browsers/chromium/default.nix
Normal file
@@ -0,0 +1,25 @@
|
||||
{
|
||||
pkgs,
|
||||
config,
|
||||
lib,
|
||||
...
|
||||
}: let
|
||||
inherit (lib) mkIf mkEnableOption;
|
||||
cfg = config.modules.browsers.chromium;
|
||||
in {
|
||||
options = {
|
||||
modules.browsers.chromium.enable = mkEnableOption "Enables chromium";
|
||||
};
|
||||
config = mkIf cfg.enable {
|
||||
programs.chromium = {
|
||||
enable = true;
|
||||
package = pkgs.ungoogled-chromium;
|
||||
extensions = [
|
||||
"gebbhagfogifgggkldgodflihgfeippi" # return youtube dislike
|
||||
"mnjggcdmjocbbbhaepdhchncahnbgone" # sponsorblock for youtube
|
||||
"ponfpcnoihfmfllpaingbgckeeldkhle" # enhancer for youtube
|
||||
"cjpalhdlnbpafiamejdnhcphjbkeiagm" # ublock origin
|
||||
];
|
||||
};
|
||||
};
|
||||
}
|
||||
44
home/modules/browsers/firefox/default.nix
Normal file
44
home/modules/browsers/firefox/default.nix
Normal file
@@ -0,0 +1,44 @@
|
||||
{
|
||||
inputs,
|
||||
pkgs,
|
||||
config,
|
||||
lib,
|
||||
...
|
||||
}: let
|
||||
inherit (lib) mkIf mkEnableOption;
|
||||
cfg = config.modules.browsers.firefox;
|
||||
in {
|
||||
options = {
|
||||
modules.browsers.firefox.enable = mkEnableOption "Enables firefox";
|
||||
};
|
||||
config = mkIf cfg.enable {
|
||||
programs.firefox = {
|
||||
enable = true;
|
||||
package = pkgs.firefox;
|
||||
profiles = {
|
||||
default = {
|
||||
search = {
|
||||
force = true;
|
||||
default = "DuckDuckGo";
|
||||
privateDefault = "DuckDuckGo";
|
||||
order = ["DuckDuckGo" "Google"];
|
||||
};
|
||||
bookmarks = {};
|
||||
extensions = with inputs.firefox-addons.packages.${pkgs.system}; [
|
||||
ublock-origin
|
||||
sponsorblock
|
||||
clearurls
|
||||
return-youtube-dislikes
|
||||
# enhancer-for-youtube # unfree
|
||||
];
|
||||
settings = {
|
||||
"apz.overscroll.enabled" = true;
|
||||
"browser.aboutConfig.showWarning" = false;
|
||||
"general.autoScroll" = true;
|
||||
"toolkit.legacyUserProfileCustomizations.stylesheets" = true;
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
57
home/modules/comm/discord/default.nix
Normal file
57
home/modules/comm/discord/default.nix
Normal file
@@ -0,0 +1,57 @@
|
||||
{
|
||||
pkgs,
|
||||
config,
|
||||
lib,
|
||||
...
|
||||
}: let
|
||||
inherit (lib) mkIf mkEnableOption;
|
||||
cfg = config.modules.comm.discord;
|
||||
in {
|
||||
options = {
|
||||
modules.comm.discord.enable = mkEnableOption "Enables discord";
|
||||
};
|
||||
config = mkIf cfg.enable {
|
||||
home.packages = with pkgs; [vesktop];
|
||||
|
||||
xdg.configFile."vesktop/themes/base16.css".text =
|
||||
/*
|
||||
css
|
||||
*/
|
||||
''
|
||||
/**
|
||||
* @name Material Gruvbox
|
||||
* @.
|
||||
* @author Costeer
|
||||
* @version 1.5.0
|
||||
* @website https://github.com/Costeer
|
||||
* @source https://github.com/Costeer/Gruvbox-Material-Themes
|
||||
*/
|
||||
|
||||
@import url(https://mwittrien.github.io/BetterDiscordAddons/Themes/DiscordRecolor/DiscordRecolor.css);
|
||||
|
||||
:root {
|
||||
--accentcolor: 137, 180, 130;
|
||||
--accentcolor2: 211, 134, 155;
|
||||
--linkcolor: 125, 174, 163;
|
||||
--mentioncolor: 211, 134, 155;
|
||||
--textbrightest: 221, 199, 161;
|
||||
--textbrighter: 212, 190, 152;
|
||||
--textbright: 168, 153, 132;
|
||||
--textdark: 146, 131, 116;
|
||||
--textdarker: 146, 131, 116;
|
||||
--textdarkest: 80, 80, 80;
|
||||
--font: Input Sans Narrow;
|
||||
--main-font: Input Sans Narrow;
|
||||
--code-font: Input Mono Compressed;
|
||||
--backgroundaccent: 80, 73, 69;
|
||||
--backgroundprimary: 60, 56, 54;
|
||||
--backgroundsecondary: 50, 48, 47;
|
||||
--backgroundsecondaryalt: 40, 40, 40;
|
||||
--backgroundtertiary: 29, 32, 33;
|
||||
--backgroundfloating: 20, 22, 23;
|
||||
--settingsicons: 1;
|
||||
}
|
||||
|
||||
'';
|
||||
};
|
||||
}
|
||||
35
home/modules/default.nix
Normal file
35
home/modules/default.nix
Normal file
@@ -0,0 +1,35 @@
|
||||
{userModules, ...}: {
|
||||
imports = [
|
||||
"${userModules}/wm/hyprland"
|
||||
"${userModules}/wm/utils/hypridle"
|
||||
"${userModules}/wm/utils/hyprlock"
|
||||
"${userModules}/wm/utils/hyprpaper"
|
||||
|
||||
"${userModules}/browsers/firefox"
|
||||
"${userModules}/browsers/chromium"
|
||||
|
||||
"${userModules}/comm/discord"
|
||||
|
||||
"${userModules}/gaming/lutris"
|
||||
"${userModules}/gaming/mangohud"
|
||||
# "${userModules}/create"
|
||||
"${userModules}/devtools/neovim"
|
||||
"${userModules}/devtools/vscode"
|
||||
# "${userModules}/media"
|
||||
"${userModules}/terminal/alacritty"
|
||||
"${userModules}/terminal/foot"
|
||||
"${userModules}/terminal/kitty"
|
||||
"${userModules}/terminal/zellij"
|
||||
"${userModules}/userd/sops"
|
||||
"${userModules}/userd/copyq"
|
||||
"${userModules}/userd/mako"
|
||||
"${userModules}/userd/udiskie"
|
||||
# "${userModules}/userd"
|
||||
"${userModules}/utils/ags"
|
||||
"${userModules}/utils/anyrun"
|
||||
"${userModules}/utils/rofi"
|
||||
"${userModules}/utils/waybar"
|
||||
"${userModules}/utils/yazi"
|
||||
# "${userModules}/wm"
|
||||
];
|
||||
}
|
||||
31
home/modules/devtools/neovim/autocommands.nix
Normal file
31
home/modules/devtools/neovim/autocommands.nix
Normal file
@@ -0,0 +1,31 @@
|
||||
{
|
||||
programs.nixvim.autoCmd = [
|
||||
# Open help in a vertical split
|
||||
{
|
||||
event = "FileType";
|
||||
pattern = "help";
|
||||
command = "wincmd L";
|
||||
}
|
||||
|
||||
# Enable spellcheck for some filetypes
|
||||
{
|
||||
event = "FileType";
|
||||
pattern = [
|
||||
"tex"
|
||||
"latex"
|
||||
"markdown"
|
||||
];
|
||||
command = "setlocal spell spelllang=en,se";
|
||||
}
|
||||
{
|
||||
event = "TextYankPost";
|
||||
desc = "Highlight when yanking (copying) text";
|
||||
# group = "vim.api.nvim_create_augroup('kickstart-highlight-yank', { clear = true })";
|
||||
callback = {
|
||||
__raw = "function()
|
||||
vim.highlight.on_yank()
|
||||
end";
|
||||
};
|
||||
}
|
||||
];
|
||||
}
|
||||
53
home/modules/devtools/neovim/completion.nix
Normal file
53
home/modules/devtools/neovim/completion.nix
Normal file
@@ -0,0 +1,53 @@
|
||||
{
|
||||
programs.nixvim = {
|
||||
opts.completeopt = ["menu" "menuone" "noselect"];
|
||||
|
||||
plugins = {
|
||||
luasnip.enable = true;
|
||||
|
||||
lspkind = {
|
||||
enable = true;
|
||||
|
||||
cmp = {
|
||||
enable = true;
|
||||
menu = {
|
||||
nvim_lsp = "[LSP]";
|
||||
nvim_lua = "[api]";
|
||||
path = "[path]";
|
||||
luasnip = "[snip]";
|
||||
buffer = "[buffer]";
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
cmp = {
|
||||
enable = true;
|
||||
|
||||
settings = {
|
||||
snippet.expand = "function(args) require('luasnip').lsp_expand(args.body) end";
|
||||
|
||||
mapping = {
|
||||
"<C-d>" = "cmp.mapping.scroll_docs(-4)";
|
||||
"<C-f>" = "cmp.mapping.scroll_docs(4)";
|
||||
"<C-Space>" = "cmp.mapping.complete()";
|
||||
"<C-e>" = "cmp.mapping.close()";
|
||||
"<Tab>" = "cmp.mapping(cmp.mapping.select_next_item(), {'i', 's'})";
|
||||
"<S-Tab>" = "cmp.mapping(cmp.mapping.select_prev_item(), {'i', 's'})";
|
||||
"<CR>" = "cmp.mapping.confirm({ select = true })";
|
||||
};
|
||||
|
||||
sources = [
|
||||
{name = "path";}
|
||||
{name = "nvim_lsp";}
|
||||
{name = "luasnip";}
|
||||
{
|
||||
name = "buffer";
|
||||
# Words from other open buffers can also be suggested.
|
||||
option.get_bufnrs.__raw = "vim.api.nvim_list_bufs";
|
||||
}
|
||||
];
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
33
home/modules/devtools/neovim/default.nix
Normal file
33
home/modules/devtools/neovim/default.nix
Normal file
@@ -0,0 +1,33 @@
|
||||
{
|
||||
inputs,
|
||||
config,
|
||||
lib,
|
||||
...
|
||||
}: let
|
||||
inherit (lib) mkIf mkEnableOption;
|
||||
cfg = config.modules.devtools.neovim;
|
||||
in {
|
||||
imports = [
|
||||
inputs.nixvim.homeManagerModules.nixvim
|
||||
./autocommands.nix
|
||||
./completion.nix
|
||||
./keymappings.nix
|
||||
./options.nix
|
||||
./plugins
|
||||
./todo.nix
|
||||
];
|
||||
options = {
|
||||
modules.devtools.neovim.enable = mkEnableOption "Enables neovim";
|
||||
};
|
||||
config = mkIf cfg.enable {
|
||||
programs.nixvim = {
|
||||
enable = true;
|
||||
defaultEditor = true;
|
||||
|
||||
viAlias = true;
|
||||
vimAlias = true;
|
||||
|
||||
luaLoader.enable = true;
|
||||
};
|
||||
};
|
||||
}
|
||||
94
home/modules/devtools/neovim/keymappings.nix
Normal file
94
home/modules/devtools/neovim/keymappings.nix
Normal file
@@ -0,0 +1,94 @@
|
||||
{
|
||||
config,
|
||||
lib,
|
||||
...
|
||||
}: {
|
||||
programs.nixvim = {
|
||||
globals = {
|
||||
mapleader = " ";
|
||||
maplocalleader = " ";
|
||||
};
|
||||
|
||||
keymaps = let
|
||||
normal =
|
||||
lib.mapAttrsToList
|
||||
(key: action: {
|
||||
mode = "n";
|
||||
inherit action key;
|
||||
})
|
||||
{
|
||||
# "<C-c>" = "<cmd> %y+ <CR>";
|
||||
"<C-v>" = "p";
|
||||
"<C-a>" = "ggVG";
|
||||
"<Space>" = "<NOP>";
|
||||
|
||||
# Esc to clear search results
|
||||
"<esc>" = ":noh<CR>";
|
||||
|
||||
# fix Y behaviour
|
||||
Y = "y$";
|
||||
|
||||
# back and fourth between the two most recent files
|
||||
"<C-c>" = ":b#<CR>";
|
||||
|
||||
# close by Ctrl+x
|
||||
"<C-x>" = ":close<CR>";
|
||||
|
||||
# save by Space+s or Ctrl+s
|
||||
"<leader>s" = ":w<CR>";
|
||||
"<C-s>" = ":w<CR>";
|
||||
|
||||
# navigate to left/right window
|
||||
"<leader>h" = "<C-w>h";
|
||||
"<leader>l" = "<C-w>l";
|
||||
|
||||
# Press 'H', 'L' to jump to start/end of a line (first/last character)
|
||||
L = "$";
|
||||
H = "^";
|
||||
|
||||
# resize with arrows
|
||||
"<C-Up>" = ":resize -2<CR>";
|
||||
"<C-Down>" = ":resize +2<CR>";
|
||||
"<C-Left>" = ":vertical resize +2<CR>";
|
||||
"<C-Right>" = ":vertical resize -2<CR>";
|
||||
|
||||
# move current line up/down
|
||||
# M = Alt key
|
||||
"<M-k>" = ":move-2<CR>";
|
||||
"<M-j>" = ":move+<CR>";
|
||||
|
||||
"<leader>rp" = ":!remi push<CR>";
|
||||
};
|
||||
visual =
|
||||
lib.mapAttrsToList
|
||||
(key: action: {
|
||||
mode = "v";
|
||||
inherit action key;
|
||||
})
|
||||
{
|
||||
"<C-c>" = "y";
|
||||
# better indenting
|
||||
">" = ">gv";
|
||||
"<" = "<gv";
|
||||
"<TAB>" = ">gv";
|
||||
"<S-TAB>" = "<gv";
|
||||
|
||||
# move selected line / block of text in visual mode
|
||||
"K" = ":m '<-2<CR>gv=gv";
|
||||
"J" = ":m '>+1<CR>gv=gv";
|
||||
};
|
||||
insert =
|
||||
lib.mapAttrsToList
|
||||
(key: action: {
|
||||
mode = "i";
|
||||
inherit action key;
|
||||
})
|
||||
{
|
||||
"<C-v>" = "<esc>p";
|
||||
};
|
||||
in
|
||||
config.lib.nixvim.keymaps.mkKeymaps
|
||||
{options.silent = true;}
|
||||
(normal ++ visual ++ insert);
|
||||
};
|
||||
}
|
||||
72
home/modules/devtools/neovim/options.nix
Normal file
72
home/modules/devtools/neovim/options.nix
Normal file
@@ -0,0 +1,72 @@
|
||||
{
|
||||
programs.nixvim = {
|
||||
globals = {
|
||||
# Disable useless providers
|
||||
loaded_ruby_provider = 0; # Ruby
|
||||
loaded_perl_provider = 0; # Perl
|
||||
loaded_python_provider = 0; # Python 2
|
||||
};
|
||||
|
||||
clipboard = {
|
||||
# Use system clipboard
|
||||
register = "unnamedplus";
|
||||
|
||||
providers.wl-copy.enable = true;
|
||||
};
|
||||
|
||||
opts = {
|
||||
updatetime = 100; # Faster completion
|
||||
|
||||
# Line numbers
|
||||
relativenumber = false; # Relative line numbers
|
||||
number = true; # Display the absolute line number of the current line
|
||||
hidden = true; # Keep closed buffer open in the background
|
||||
showmode = false;
|
||||
mouse = "a"; # Enable mouse control
|
||||
mousemodel = "popup"; # Mouse right-click extends the current selection
|
||||
splitbelow = true; # A new window is put below the current one
|
||||
splitright = true; # A new window is put right of the current one
|
||||
list = true;
|
||||
listchars = {
|
||||
tab = "▷ ";
|
||||
trail = "·";
|
||||
nbsp = "○";
|
||||
extends = "◣";
|
||||
precedes = "◢";
|
||||
};
|
||||
|
||||
swapfile = false; # Disable the swap file
|
||||
modeline = true; # Tags such as 'vim:ft=sh'
|
||||
modelines = 100; # Sets the type of modelines
|
||||
undofile = true; # Automatically save and restore undo history
|
||||
incsearch = true; # Incremental search: show match for partly typed search command
|
||||
inccommand = "split"; # Search and replace: preview changes in quickfix list
|
||||
ignorecase = true; # When the search query is lower-case, match both lower and upper-case
|
||||
# patterns
|
||||
smartcase = true; # Override the 'ignorecase' option if the search pattern contains upper
|
||||
# case characters
|
||||
scrolloff = 4; # Number of screen lines to show around the cursor
|
||||
cursorline = true; # Highlight the screen line of the cursor
|
||||
cursorcolumn = false; # Highlight the screen column of the cursor
|
||||
signcolumn = "yes"; # Whether to show the signcolumn
|
||||
colorcolumn = ""; # Columns to highlight
|
||||
laststatus = 3; # When to use a status line for the last window
|
||||
fileencoding = "utf-8"; # File-content encoding for the current buffer
|
||||
# termguicolors = true; # Enables 24-bit RGB color in the |TUI|
|
||||
spell = false; # Highlight spelling mistakes (local to window)
|
||||
wrap = false; # Prevent text from wrapping
|
||||
|
||||
# Tab options
|
||||
tabstop = 4; # Number of spaces a <Tab> in the text stands for (local to buffer)
|
||||
shiftwidth = 4; # Number of spaces used for each step of (auto)indent (local to buffer)
|
||||
expandtab = true; # Expand <Tab> to spaces in Insert mode (local to buffer)
|
||||
autoindent = true; # Do clever autoindenting
|
||||
|
||||
textwidth = 0; # Maximum width of text that is being inserted. A longer line will be
|
||||
# broken after white space to get this width.
|
||||
|
||||
# Folding
|
||||
foldlevel = 99; # Folds with a level higher than this number will be closed
|
||||
};
|
||||
};
|
||||
}
|
||||
10
home/modules/devtools/neovim/plugins/barbar.nix
Normal file
10
home/modules/devtools/neovim/plugins/barbar.nix
Normal file
@@ -0,0 +1,10 @@
|
||||
{
|
||||
programs.nixvim.plugins.barbar = {
|
||||
enable = true;
|
||||
keymaps = {
|
||||
next.key = "<TAB>";
|
||||
previous.key = "<S-TAB>";
|
||||
close.key = "<C-w>";
|
||||
};
|
||||
};
|
||||
}
|
||||
8
home/modules/devtools/neovim/plugins/chatgpt.nix
Normal file
8
home/modules/devtools/neovim/plugins/chatgpt.nix
Normal file
@@ -0,0 +1,8 @@
|
||||
{config, ...}: {
|
||||
programs.nixvim.plugins.chatgpt = {
|
||||
enable = true;
|
||||
settings = {
|
||||
api_key_cmd = "cat ${config.sops.secrets.openai_api_key.path}";
|
||||
};
|
||||
};
|
||||
}
|
||||
10
home/modules/devtools/neovim/plugins/comment.nix
Normal file
10
home/modules/devtools/neovim/plugins/comment.nix
Normal file
@@ -0,0 +1,10 @@
|
||||
{
|
||||
programs.nixvim.plugins.comment = {
|
||||
enable = true;
|
||||
|
||||
settings = {
|
||||
opleader.line = "<C-b>";
|
||||
toggler.line = "<C-b>";
|
||||
};
|
||||
};
|
||||
}
|
||||
24
home/modules/devtools/neovim/plugins/conform.nix
Normal file
24
home/modules/devtools/neovim/plugins/conform.nix
Normal file
@@ -0,0 +1,24 @@
|
||||
{
|
||||
programs.nixvim.plugins.conform-nvim = {
|
||||
enable = true;
|
||||
formatOnSave = {
|
||||
lspFallback = true;
|
||||
timeoutMs = 500;
|
||||
};
|
||||
notifyOnError = true;
|
||||
formattersByFt = {
|
||||
liquidsoap = [ "liquidsoap-prettier" ];
|
||||
html = [ [ "prettierd" "prettier" ] ];
|
||||
css = [ [ "prettierd" "prettier" ] ];
|
||||
javascript = [ [ "prettierd" "prettier" ] ];
|
||||
javascriptreact = [ [ "prettierd" "prettier" ] ];
|
||||
typescript = [ [ "prettierd" "prettier" ] ];
|
||||
typescriptreact = [ [ "prettierd" "prettier" ] ];
|
||||
python = [ "black" ];
|
||||
lua = [ "stylua" ];
|
||||
nix = [ "alejandra" ];
|
||||
markdown = [ [ "prettierd" "prettier" ] ];
|
||||
yaml = [ "yamllint" "yamlfmt" ];
|
||||
};
|
||||
};
|
||||
}
|
||||
60
home/modules/devtools/neovim/plugins/default.nix
Normal file
60
home/modules/devtools/neovim/plugins/default.nix
Normal file
@@ -0,0 +1,60 @@
|
||||
{pkgs, ...}: {
|
||||
imports = [
|
||||
./barbar.nix
|
||||
./comment.nix
|
||||
./efm.nix
|
||||
# ./floaterm.nix
|
||||
# ./harpoon.nix
|
||||
./lsp.nix
|
||||
./lualine.nix
|
||||
./markdown-preview.nix
|
||||
./neo-tree.nix
|
||||
./startify.nix
|
||||
./tagbar.nix
|
||||
./telescope.nix
|
||||
./treesitter.nix
|
||||
./chatgpt.nix
|
||||
# ./vimtex.nix
|
||||
./nonels.nix
|
||||
./conform.nix
|
||||
# ./yanky.nix
|
||||
];
|
||||
|
||||
programs.nixvim = {
|
||||
extraPlugins = [pkgs.vimPlugins.gruvbox-material];
|
||||
colorscheme = "gruvbox-material";
|
||||
|
||||
plugins = {
|
||||
gitsigns = {
|
||||
enable = true;
|
||||
settings.signs = {
|
||||
add.text = "+";
|
||||
change.text = "~";
|
||||
};
|
||||
};
|
||||
|
||||
nvim-autopairs.enable = true;
|
||||
|
||||
nvim-colorizer = {
|
||||
enable = true;
|
||||
userDefaultOptions.names = false;
|
||||
};
|
||||
|
||||
oil.enable = true;
|
||||
|
||||
trim = {
|
||||
enable = true;
|
||||
settings = {
|
||||
highlight = false;
|
||||
ft_blocklist = [
|
||||
"checkhealth"
|
||||
"floaterm"
|
||||
"lspinfo"
|
||||
"neo-tree"
|
||||
"TelescopePrompt"
|
||||
];
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
22
home/modules/devtools/neovim/plugins/efm.nix
Normal file
22
home/modules/devtools/neovim/plugins/efm.nix
Normal file
@@ -0,0 +1,22 @@
|
||||
{
|
||||
programs.nixvim.plugins = {
|
||||
lsp.servers.efm = {
|
||||
enable = true;
|
||||
extraOptions.init_options = {
|
||||
documentFormatting = true;
|
||||
documentRangeFormatting = true;
|
||||
hover = true;
|
||||
documentSymbol = true;
|
||||
codeAction = true;
|
||||
completion = true;
|
||||
};
|
||||
};
|
||||
|
||||
lsp-format = {
|
||||
enable = true;
|
||||
lspServersToEnable = ["efm"];
|
||||
};
|
||||
|
||||
efmls-configs.enable = true;
|
||||
};
|
||||
}
|
||||
12
home/modules/devtools/neovim/plugins/floaterm.nix
Normal file
12
home/modules/devtools/neovim/plugins/floaterm.nix
Normal file
@@ -0,0 +1,12 @@
|
||||
{
|
||||
programs.nixvim.plugins.floaterm = {
|
||||
enable = true;
|
||||
|
||||
width = 0.8;
|
||||
height = 0.8;
|
||||
|
||||
title = "";
|
||||
|
||||
keymaps.toggle = "<leader>,";
|
||||
};
|
||||
}
|
||||
20
home/modules/devtools/neovim/plugins/harpoon.nix
Normal file
20
home/modules/devtools/neovim/plugins/harpoon.nix
Normal file
@@ -0,0 +1,20 @@
|
||||
{
|
||||
programs.nixvim = {
|
||||
plugins.harpoon = {
|
||||
enable = true;
|
||||
|
||||
keymapsSilent = true;
|
||||
|
||||
keymaps = {
|
||||
addFile = "<leader>a";
|
||||
toggleQuickMenu = "<C-e>";
|
||||
navFile = {
|
||||
"1" = "<C-j>";
|
||||
"2" = "<C-k>";
|
||||
"3" = "<C-l>";
|
||||
"4" = "<C-m>";
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
87
home/modules/devtools/neovim/plugins/lsp.nix
Normal file
87
home/modules/devtools/neovim/plugins/lsp.nix
Normal file
@@ -0,0 +1,87 @@
|
||||
{
|
||||
programs.nixvim = {
|
||||
plugins = {
|
||||
lsp = {
|
||||
enable = true;
|
||||
|
||||
keymaps = {
|
||||
silent = true;
|
||||
diagnostic = {
|
||||
# Navigate in diagnostics
|
||||
"<leader>k" = "goto_prev";
|
||||
"<leader>j" = "goto_next";
|
||||
};
|
||||
|
||||
lspBuf = {
|
||||
gd = "definition";
|
||||
gD = "references";
|
||||
gt = "type_definition";
|
||||
gi = "implementation";
|
||||
K = "hover";
|
||||
"<F2>" = "rename";
|
||||
};
|
||||
};
|
||||
|
||||
# Language server
|
||||
servers = {
|
||||
# Average webdev LSPs
|
||||
cssls.enable = true; # CSS
|
||||
tailwindcss.enable = true; # TailwindCSS
|
||||
html.enable = true; # HTML
|
||||
astro.enable = false; # AstroJS
|
||||
phpactor.enable = true; # PHP
|
||||
svelte.enable = false; # Svelte
|
||||
vuels.enable = false; # Vue
|
||||
|
||||
# Python
|
||||
pyright.enable = true;
|
||||
|
||||
# Markdown
|
||||
marksman.enable = true;
|
||||
|
||||
# Nix
|
||||
nixd.enable = true;
|
||||
|
||||
# Docker
|
||||
dockerls.enable = true;
|
||||
|
||||
# Bash
|
||||
bashls.enable = true;
|
||||
|
||||
# C/C++
|
||||
clangd.enable = true;
|
||||
|
||||
# C#
|
||||
csharp-ls.enable = true;
|
||||
|
||||
# Yaml
|
||||
yamlls.enable = true;
|
||||
|
||||
# Lua
|
||||
lua-ls = {
|
||||
enable = true;
|
||||
settings.telemetry.enable = false;
|
||||
settings.diagnostics = {
|
||||
globals = ["vim"];
|
||||
};
|
||||
};
|
||||
tsserver = {
|
||||
enable = false; # TS/JS
|
||||
};
|
||||
# Rust
|
||||
rust-analyzer = {
|
||||
enable = true;
|
||||
installRustc = true;
|
||||
installCargo = true;
|
||||
settings = {
|
||||
checkOnSave = true;
|
||||
check = {
|
||||
command = "clippy";
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
47
home/modules/devtools/neovim/plugins/lualine.nix
Normal file
47
home/modules/devtools/neovim/plugins/lualine.nix
Normal file
@@ -0,0 +1,47 @@
|
||||
{
|
||||
programs.nixvim.plugins.lualine = {
|
||||
enable = true;
|
||||
theme = "gruvbox-material";
|
||||
|
||||
globalstatus = true;
|
||||
|
||||
# +-------------------------------------------------+
|
||||
# | A | B | C X | Y | Z |
|
||||
# +-------------------------------------------------+
|
||||
sections = {
|
||||
lualine_a = ["mode"];
|
||||
lualine_b = ["branch"];
|
||||
lualine_c = ["filename" "diff"];
|
||||
|
||||
lualine_x = [
|
||||
"diagnostics"
|
||||
|
||||
# Show active language server
|
||||
{
|
||||
name.__raw = ''
|
||||
function()
|
||||
local msg = ""
|
||||
local buf_ft = vim.api.nvim_buf_get_option(0, 'filetype')
|
||||
local clients = vim.lsp.get_active_clients()
|
||||
if next(clients) == nil then
|
||||
return msg
|
||||
end
|
||||
for _, client in ipairs(clients) do
|
||||
local filetypes = client.config.filetypes
|
||||
if filetypes and vim.fn.index(filetypes, buf_ft) ~= -1 then
|
||||
return client.name
|
||||
end
|
||||
end
|
||||
return msg
|
||||
end
|
||||
'';
|
||||
icon = "";
|
||||
color.fg = "#ffffff";
|
||||
}
|
||||
"encoding"
|
||||
"fileformat"
|
||||
"filetype"
|
||||
];
|
||||
};
|
||||
};
|
||||
}
|
||||
20
home/modules/devtools/neovim/plugins/markdown-preview.nix
Normal file
20
home/modules/devtools/neovim/plugins/markdown-preview.nix
Normal file
@@ -0,0 +1,20 @@
|
||||
{
|
||||
programs.nixvim = {
|
||||
plugins.markdown-preview = {
|
||||
enable = true;
|
||||
|
||||
settings = {
|
||||
auto_close = false;
|
||||
theme = "dark";
|
||||
};
|
||||
};
|
||||
|
||||
files."after/ftplugin/markdown.lua".keymaps = [
|
||||
{
|
||||
mode = "n";
|
||||
key = "<leader>m";
|
||||
action = ":MarkdownPreview<cr>";
|
||||
}
|
||||
];
|
||||
};
|
||||
}
|
||||
22
home/modules/devtools/neovim/plugins/neo-tree.nix
Normal file
22
home/modules/devtools/neovim/plugins/neo-tree.nix
Normal file
@@ -0,0 +1,22 @@
|
||||
{
|
||||
programs.nixvim = {
|
||||
keymaps = [
|
||||
{
|
||||
mode = "n";
|
||||
key = "<leader>n";
|
||||
action = ":Neotree action=focus reveal toggle<CR>";
|
||||
options.silent = true;
|
||||
}
|
||||
];
|
||||
|
||||
plugins.neo-tree = {
|
||||
enable = true;
|
||||
|
||||
closeIfLastWindow = true;
|
||||
window = {
|
||||
width = 30;
|
||||
autoExpandWidth = true;
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
44
home/modules/devtools/neovim/plugins/nonels.nix
Normal file
44
home/modules/devtools/neovim/plugins/nonels.nix
Normal file
@@ -0,0 +1,44 @@
|
||||
{
|
||||
programs.nixvim.plugins.none-ls = {
|
||||
enable = true;
|
||||
settings = {
|
||||
cmd = ["bash -c nvim"];
|
||||
debug = true;
|
||||
};
|
||||
sources = {
|
||||
code_actions = {
|
||||
statix.enable = true;
|
||||
gitsigns.enable = true;
|
||||
};
|
||||
diagnostics = {
|
||||
statix.enable = true;
|
||||
deadnix.enable = true;
|
||||
pylint.enable = true;
|
||||
checkstyle.enable = true;
|
||||
};
|
||||
formatting = {
|
||||
alejandra.enable = true;
|
||||
stylua.enable = true;
|
||||
shfmt.enable = true;
|
||||
nixpkgs_fmt.enable = true;
|
||||
google_java_format.enable = false;
|
||||
prettier = {
|
||||
enable = true;
|
||||
disableTsServerFormatter = true;
|
||||
};
|
||||
black = {
|
||||
enable = true;
|
||||
settings = ''
|
||||
{
|
||||
extra_args = { "--fast" },
|
||||
}
|
||||
'';
|
||||
};
|
||||
};
|
||||
completion = {
|
||||
luasnip.enable = true;
|
||||
spell.enable = true;
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
32
home/modules/devtools/neovim/plugins/startify.nix
Normal file
32
home/modules/devtools/neovim/plugins/startify.nix
Normal file
@@ -0,0 +1,32 @@
|
||||
{
|
||||
programs.nixvim.plugins.startify = {
|
||||
enable = true;
|
||||
|
||||
settings = {
|
||||
custom_header = [
|
||||
""
|
||||
" ███╗ ██╗██╗██╗ ██╗██╗ ██╗██╗███╗ ███╗"
|
||||
" ████╗ ██║██║╚██╗██╔╝██║ ██║██║████╗ ████║"
|
||||
" ██╔██╗ ██║██║ ╚███╔╝ ██║ ██║██║██╔████╔██║"
|
||||
" ██║╚██╗██║██║ ██╔██╗ ╚██╗ ██╔╝██║██║╚██╔╝██║"
|
||||
" ██║ ╚████║██║██╔╝ ██╗ ╚████╔╝ ██║██║ ╚═╝ ██║"
|
||||
" ╚═╝ ╚═══╝╚═╝╚═╝ ╚═╝ ╚═══╝ ╚═╝╚═╝ ╚═╝"
|
||||
];
|
||||
|
||||
# When opening a file or bookmark, change to its directory.
|
||||
change_to_dir = false;
|
||||
|
||||
# By default, the fortune header uses ASCII characters, because they work for everyone.
|
||||
# If you set this option to 1 and your 'encoding' is "utf-8", Unicode box-drawing characters will
|
||||
# be used instead.
|
||||
use_unicode = true;
|
||||
|
||||
lists = [{type = "dir";}];
|
||||
files_number = 30;
|
||||
|
||||
skiplist = [
|
||||
"flake.lock"
|
||||
];
|
||||
};
|
||||
};
|
||||
}
|
||||
17
home/modules/devtools/neovim/plugins/tagbar.nix
Normal file
17
home/modules/devtools/neovim/plugins/tagbar.nix
Normal file
@@ -0,0 +1,17 @@
|
||||
{
|
||||
programs.nixvim = {
|
||||
plugins.tagbar = {
|
||||
enable = true;
|
||||
settings.width = 50;
|
||||
};
|
||||
|
||||
keymaps = [
|
||||
{
|
||||
mode = "n";
|
||||
key = "<C-g>";
|
||||
action = ":TagbarToggle<cr>";
|
||||
options.silent = true;
|
||||
}
|
||||
];
|
||||
};
|
||||
}
|
||||
33
home/modules/devtools/neovim/plugins/telescope.nix
Normal file
33
home/modules/devtools/neovim/plugins/telescope.nix
Normal file
@@ -0,0 +1,33 @@
|
||||
{
|
||||
programs.nixvim = {
|
||||
plugins.telescope = {
|
||||
enable = true;
|
||||
|
||||
keymaps = {
|
||||
# Find files using Telescope command-line sugar.
|
||||
"<leader>ff" = "find_files";
|
||||
"<leader>fg" = "live_grep";
|
||||
"<leader>b" = "buffers";
|
||||
"<leader>fh" = "help_tags";
|
||||
"<leader>fd" = "diagnostics";
|
||||
|
||||
# FZF like bindings
|
||||
"<C-p>" = "git_files";
|
||||
"<leader>p" = "oldfiles";
|
||||
"<C-f>" = "live_grep";
|
||||
};
|
||||
|
||||
settings.defaults = {
|
||||
file_ignore_patterns = [
|
||||
"^.git/"
|
||||
"^.mypy_cache/"
|
||||
"^__pycache__/"
|
||||
"^output/"
|
||||
"^data/"
|
||||
"%.ipynb"
|
||||
];
|
||||
set_env.COLORTERM = "truecolor";
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
26
home/modules/devtools/neovim/plugins/treesitter.nix
Normal file
26
home/modules/devtools/neovim/plugins/treesitter.nix
Normal file
@@ -0,0 +1,26 @@
|
||||
{
|
||||
programs.nixvim.plugins = {
|
||||
treesitter = {
|
||||
enable = true;
|
||||
|
||||
nixvimInjections = true;
|
||||
|
||||
settings = {
|
||||
highlight.enable = true;
|
||||
indent.enable = true;
|
||||
};
|
||||
folding = true;
|
||||
};
|
||||
|
||||
treesitter-refactor = {
|
||||
enable = true;
|
||||
highlightDefinitions = {
|
||||
enable = true;
|
||||
# Set to false if you have an `updatetime` of ~100.
|
||||
clearOnCursorMove = false;
|
||||
};
|
||||
};
|
||||
|
||||
hmts.enable = true;
|
||||
};
|
||||
}
|
||||
77
home/modules/devtools/neovim/plugins/vimtex.nix
Normal file
77
home/modules/devtools/neovim/plugins/vimtex.nix
Normal file
@@ -0,0 +1,77 @@
|
||||
{
|
||||
programs.nixvim = {
|
||||
plugins.vimtex = {
|
||||
enable = true;
|
||||
|
||||
settings = {
|
||||
view_method = "zathura";
|
||||
|
||||
quickfix_enabled = true;
|
||||
quickfix_open_on_warning = false;
|
||||
|
||||
# Ignore undesired errors and warnings
|
||||
quickfix_ignore_filters = [
|
||||
"Underfull"
|
||||
"Overfull"
|
||||
"specifier changed to"
|
||||
"Token not allowed in a PDF string"
|
||||
];
|
||||
|
||||
# TOC settings
|
||||
toc_config = {
|
||||
name = "TOC";
|
||||
layers = ["content" "todo"];
|
||||
resize = true;
|
||||
split_width = 50;
|
||||
todo_sorted = false;
|
||||
show_help = true;
|
||||
show_numbers = true;
|
||||
mode = 2;
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
files."after/ftplugin/tex.lua".keymaps = [
|
||||
{
|
||||
mode = "n";
|
||||
key = "m";
|
||||
action = ":VimtexView<cr>";
|
||||
}
|
||||
];
|
||||
|
||||
autoCmd = [
|
||||
{
|
||||
event = ["BufEnter" "BufWinEnter"];
|
||||
pattern = "*.tex";
|
||||
command = "set filetype=tex \"| VimtexTocOpen";
|
||||
}
|
||||
|
||||
# Folding
|
||||
{
|
||||
event = "FileType";
|
||||
pattern = ["tex" "latex"];
|
||||
callback.__raw = ''
|
||||
function ()
|
||||
vim.o.foldmethod = 'expr'
|
||||
vim.o.foldexpr = 'vimtex#fold#level(v:lnum)'
|
||||
vim.o.foldtext = 'vimtex#fold#text()'
|
||||
end
|
||||
'';
|
||||
}
|
||||
|
||||
# Compile on initialization
|
||||
{
|
||||
event = "User";
|
||||
pattern = "VimtexEventInitPost";
|
||||
callback = "vimtex#compiler#compile";
|
||||
}
|
||||
|
||||
# Cleanup on exit
|
||||
{
|
||||
event = "User";
|
||||
pattern = "VimtexEventQuit";
|
||||
command = "call vimtex#compiler#clean(0)";
|
||||
}
|
||||
];
|
||||
};
|
||||
}
|
||||
5
home/modules/devtools/neovim/plugins/yanky.nix
Normal file
5
home/modules/devtools/neovim/plugins/yanky.nix
Normal file
@@ -0,0 +1,5 @@
|
||||
{
|
||||
programs.nixvim.plugins.yanky = {
|
||||
enable = true;
|
||||
};
|
||||
}
|
||||
26
home/modules/devtools/neovim/todo.nix
Normal file
26
home/modules/devtools/neovim/todo.nix
Normal file
@@ -0,0 +1,26 @@
|
||||
{
|
||||
programs.nixvim = {
|
||||
highlight.Todo = {
|
||||
fg = "Blue";
|
||||
bg = "Yellow";
|
||||
};
|
||||
|
||||
match.TODO = "TODO";
|
||||
|
||||
keymaps = [
|
||||
{
|
||||
mode = "n";
|
||||
key = "<C-t>";
|
||||
action.__raw = ''
|
||||
function()
|
||||
require('telescope.builtin').live_grep({
|
||||
default_text="TODO",
|
||||
initial_mode="normal"
|
||||
})
|
||||
end
|
||||
'';
|
||||
options.silent = true;
|
||||
}
|
||||
];
|
||||
};
|
||||
}
|
||||
17
home/modules/devtools/vscode/default.nix
Normal file
17
home/modules/devtools/vscode/default.nix
Normal file
@@ -0,0 +1,17 @@
|
||||
{
|
||||
config,
|
||||
lib,
|
||||
...
|
||||
}: let
|
||||
inherit (lib) mkIf mkEnableOption;
|
||||
cfg = config.modules.devtools.vscode;
|
||||
in {
|
||||
options = {
|
||||
modules.devtools.vscode.enable = mkEnableOption "Enables vscode";
|
||||
};
|
||||
config = mkIf cfg.enable {
|
||||
programs.vscode = {
|
||||
enable = true;
|
||||
};
|
||||
};
|
||||
}
|
||||
25
home/modules/gaming/lutris/default.nix
Normal file
25
home/modules/gaming/lutris/default.nix
Normal file
@@ -0,0 +1,25 @@
|
||||
{
|
||||
pkgs,
|
||||
config,
|
||||
lib,
|
||||
...
|
||||
}: let
|
||||
inherit (lib) mkIf mkEnableOption;
|
||||
cfg = config.modules.gaming.lutris;
|
||||
in {
|
||||
options = {
|
||||
modules.gaming.lutris.enable = mkEnableOption "Enables lutris";
|
||||
};
|
||||
config = mkIf cfg.enable {
|
||||
home.packages = [
|
||||
(pkgs.lutris.override {
|
||||
extraPkgs = p: [
|
||||
p.wineWowPackages.staging
|
||||
p.pixman
|
||||
p.libjpeg
|
||||
p.gnome.zenity
|
||||
];
|
||||
})
|
||||
];
|
||||
};
|
||||
}
|
||||
20
home/modules/gaming/mangohud/default.nix
Normal file
20
home/modules/gaming/mangohud/default.nix
Normal file
@@ -0,0 +1,20 @@
|
||||
{
|
||||
config,
|
||||
lib,
|
||||
...
|
||||
}: let
|
||||
inherit (lib) mkIf mkEnableOption;
|
||||
cfg = config.modules.gaming.mangohud;
|
||||
in {
|
||||
options = {
|
||||
modules.gaming.mangohud.enable = mkEnableOption "Enables mangohud";
|
||||
};
|
||||
config = mkIf cfg.enable {
|
||||
programs.mangohud = {
|
||||
enable = true;
|
||||
settings = {
|
||||
full = true;
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
87
home/modules/terminal/alacritty/default.nix
Normal file
87
home/modules/terminal/alacritty/default.nix
Normal file
@@ -0,0 +1,87 @@
|
||||
{
|
||||
config,
|
||||
lib,
|
||||
...
|
||||
}: let
|
||||
inherit (lib) mkIf mkEnableOption;
|
||||
cfg = config.modules.terminal.alacritty;
|
||||
in {
|
||||
options = {
|
||||
modules.terminal.alacritty.enable = mkEnableOption "Enables firefox";
|
||||
};
|
||||
config = mkIf cfg.enable {
|
||||
programs.alacritty = {
|
||||
enable = true;
|
||||
settings = {
|
||||
# Default colors
|
||||
colors.primary = {
|
||||
background = "#282828";
|
||||
foreground = "#d4be98";
|
||||
};
|
||||
colors = {
|
||||
# Normal colors
|
||||
normal = {
|
||||
black = "#3c3836";
|
||||
red = "#ea6962";
|
||||
green = "#a9b665";
|
||||
yellow = "#d8a657";
|
||||
blue = "#7daea3";
|
||||
magenta = "#d3869b";
|
||||
cyan = "#89b482";
|
||||
white = "#d4be98";
|
||||
};
|
||||
# Bright colors (same as normal colors)
|
||||
bright = {
|
||||
black = "#3c3836";
|
||||
red = "#ea6962";
|
||||
green = "#a9b665";
|
||||
yellow = "#d8a657";
|
||||
blue = "#7daea3";
|
||||
magenta = "#d3869b";
|
||||
cyan = "#89b482";
|
||||
white = "#d4be98";
|
||||
};
|
||||
};
|
||||
font = {
|
||||
size = 10;
|
||||
normal = {
|
||||
family = "Input Mono Compressed";
|
||||
style = "Light";
|
||||
};
|
||||
bold = {
|
||||
family = "Input Mono Compressed";
|
||||
style = "Regular";
|
||||
};
|
||||
italic = {
|
||||
family = "Input Mono Compressed";
|
||||
style = "Italic";
|
||||
};
|
||||
};
|
||||
keyboard.bindings = [
|
||||
{
|
||||
action = "Copy";
|
||||
key = "C";
|
||||
mods = "Command";
|
||||
}
|
||||
{
|
||||
action = "Paste";
|
||||
key = "V";
|
||||
mods = "Command";
|
||||
}
|
||||
];
|
||||
window = {
|
||||
dynamic_title = true;
|
||||
opacity = 0.9;
|
||||
padding = {
|
||||
x = 5;
|
||||
y = 5;
|
||||
};
|
||||
dimensions = {
|
||||
columns = 120;
|
||||
lines = 35;
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
248
home/modules/terminal/foot/default.nix
Normal file
248
home/modules/terminal/foot/default.nix
Normal file
@@ -0,0 +1,248 @@
|
||||
{ pkgs
|
||||
, config
|
||||
, lib
|
||||
, ...
|
||||
}:
|
||||
let
|
||||
inherit (lib) mkIf mkEnableOption;
|
||||
cfg = config.modules.terminal.foot;
|
||||
in
|
||||
{
|
||||
options = {
|
||||
modules.terminal.foot.enable = mkEnableOption "Enables foot terminal";
|
||||
};
|
||||
config = mkIf cfg.enable {
|
||||
programs.foot = {
|
||||
enable = true;
|
||||
package = pkgs.foot;
|
||||
settings = {
|
||||
# -*- conf -*-
|
||||
|
||||
# shell=$SHELL (if set, otherwise user's default shell from /etc/passwd)
|
||||
# term=foot (or xterm-256color if built with -Dterminfo=disabled)
|
||||
# login-shell=no
|
||||
|
||||
# app-id=foot # globally set wayland app-id. Default values are "foot" and "footclient" for desktop and server mode
|
||||
# title=foot
|
||||
# locked-title=no
|
||||
|
||||
# font=monospace:size=8
|
||||
# font-bold=<bold variant of regular font>
|
||||
# font-italic=<italic variant of regular font>
|
||||
# font-bold-italic=<bold+italic variant of regular font>
|
||||
# font-size-adjustment=0.5
|
||||
# line-height=<font metrics>
|
||||
# letter-spacing=0
|
||||
# horizontal-letter-offset=0
|
||||
# vertical-letter-offset=0
|
||||
# underline-offset=<font metrics>
|
||||
# underline-thickness=<font underline thickness>
|
||||
# box-drawings-uses-font-glyphs=no
|
||||
# dpi-aware=no
|
||||
|
||||
# initial-window-size-pixels=700x500 # Or,
|
||||
# initial-window-size-chars=<COLSxROWS>
|
||||
# initial-window-mode=windowed
|
||||
# pad=0x0 # optionally append 'center'
|
||||
# resize-by-cells=yes
|
||||
# resize-delay-ms=100
|
||||
|
||||
# notify=notify-send -a ${app-id} -i ${app-id} ${title} ${body}
|
||||
|
||||
# bold-text-in-bright=no
|
||||
# word-delimiters=,│`|:"'()[]{}<>
|
||||
# selection-target=primary
|
||||
# workers=<number of logical CPUs>
|
||||
# utmp-helper=/usr/lib/utempter/utempter # When utmp backend is ‘libutempter’ (Linux)
|
||||
# utmp-helper=/usr/libexec/ulog-helper # When utmp backend is ‘ulog’ (FreeBSD)
|
||||
|
||||
main = {
|
||||
font = "Input Mono Compressed:size=12";
|
||||
box-drawings-uses-font-glyphs = "yes";
|
||||
dpi-aware = "no";
|
||||
pad = "3x1";
|
||||
term = "xterm-256color";
|
||||
};
|
||||
|
||||
environment = {
|
||||
# name=value
|
||||
};
|
||||
|
||||
bell = {
|
||||
urgent = "no";
|
||||
notify = "no";
|
||||
visual = "no";
|
||||
command = "no";
|
||||
command-focused = "no";
|
||||
};
|
||||
|
||||
scrollback = {
|
||||
lines = "100";
|
||||
# multiplier=3.0
|
||||
# indicator-position=relative
|
||||
# indicator-format=""
|
||||
};
|
||||
|
||||
url = {
|
||||
# launch=xdg-open ${url}
|
||||
# label-letters=sadfjklewcmpgh
|
||||
# osc8-underline=url-mode
|
||||
# protocols=http, https, ftp, ftps, file, gemini, gopher
|
||||
# uri-characters=abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789-_.,~:;/?#@!$&%*+="'()[]
|
||||
};
|
||||
|
||||
cursor = {
|
||||
style = "block";
|
||||
# color=<inverse foreground/background>
|
||||
blink = "no";
|
||||
# blink-rate=500
|
||||
# beam-thickness=1.5
|
||||
# underline-thickness=<font underline thickness>
|
||||
};
|
||||
|
||||
mouse = {
|
||||
hide-when-typing = "no";
|
||||
# alternate-scroll-mode=yes
|
||||
};
|
||||
|
||||
touch = {
|
||||
# long-press-delay=400
|
||||
};
|
||||
|
||||
colors = {
|
||||
alpha = "0.9";
|
||||
background = "282828";
|
||||
foreground = "ebdbb2";
|
||||
regular0 = "282828";
|
||||
regular1 = "cc241d";
|
||||
regular2 = "98971a";
|
||||
regular3 = "d79921";
|
||||
regular4 = "458588";
|
||||
regular5 = "b16286";
|
||||
regular6 = "689d6a";
|
||||
regular7 = "a89984";
|
||||
bright0 = "928374";
|
||||
bright1 = "fb4934";
|
||||
bright2 = "b8bb26";
|
||||
bright3 = "fabd2f";
|
||||
bright4 = "83a598";
|
||||
bright5 = "d3869b";
|
||||
bright6 = "8ec07c";
|
||||
bright7 = "ebdbb2";
|
||||
};
|
||||
|
||||
csd = {
|
||||
# preferred=server
|
||||
# size=26
|
||||
# font=<primary font>
|
||||
# color=<foreground color>
|
||||
# hide-when-maximized=no
|
||||
# double-click-to-maximize=yes
|
||||
# border-width=0
|
||||
# border-color=<csd.color>
|
||||
# button-width=26
|
||||
# button-color=<background color>
|
||||
# button-minimize-color=<regular4>
|
||||
# button-maximize-color=<regular2>
|
||||
# button-close-color=<regular1>
|
||||
};
|
||||
|
||||
key-bindings = {
|
||||
# scrollback-up-page=Shift+Page_Up
|
||||
# scrollback-up-half-page=none
|
||||
# scrollback-up-line=none
|
||||
# scrollback-down-page=Shift+Page_Down
|
||||
# scrollback-down-half-page=none
|
||||
# scrollback-down-line=none
|
||||
# scrollback-home=none
|
||||
# scrollback-end=none
|
||||
# clipboard-copy=Control+Shift+c XF86Copy
|
||||
# clipboard-paste=Control+Shift+v XF86Paste
|
||||
# primary-paste=Shift+Insert
|
||||
# search-start=Control+Shift+r
|
||||
# font-increase=Control+plus Control+equal Control+KP_Add
|
||||
# font-decrease=Control+minus Control+KP_Subtract
|
||||
# font-reset=Control+0 Control+KP_0
|
||||
# spawn-terminal=Control+Shift+n
|
||||
# minimize=none
|
||||
# maximize=none
|
||||
# fullscreen=none
|
||||
# pipe-visible=[sh -c "xurls | fuzzel | xargs -r firefox"] none
|
||||
# pipe-scrollback=[sh -c "xurls | fuzzel | xargs -r firefox"] none
|
||||
# pipe-selected=[xargs -r firefox] none
|
||||
# pipe-command-output=[wl-copy] none # Copy last command's output to the clipboard
|
||||
# show-urls-launch=Control+Shift+o
|
||||
# show-urls-copy=none
|
||||
# show-urls-persistent=none
|
||||
# prompt-prev=Control+Shift+z
|
||||
# prompt-next=Control+Shift+x
|
||||
# unicode-input=Control+Shift+u
|
||||
# noop=none
|
||||
};
|
||||
|
||||
search-bindings = {
|
||||
# cancel=Control+g Control+c Escape
|
||||
# commit=Return
|
||||
# find-prev=Control+r
|
||||
# find-next=Control+s
|
||||
# cursor-left=Left Control+b
|
||||
# cursor-left-word=Control+Left Mod1+b
|
||||
# cursor-right=Right Control+f
|
||||
# cursor-right-word=Control+Right Mod1+f
|
||||
# cursor-home=Home Control+a
|
||||
# cursor-end=End Control+e
|
||||
# delete-prev=BackSpace
|
||||
# delete-prev-word=Mod1+BackSpace Control+BackSpace
|
||||
# delete-next=Delete
|
||||
# delete-next-word=Mod1+d Control+Delete
|
||||
# extend-char=Shift+Right
|
||||
# extend-to-word-boundary=Control+w Control+Shift+Right
|
||||
# extend-to-next-whitespace=Control+Shift+w
|
||||
# extend-line-down=Shift+Down
|
||||
# extend-backward-char=Shift+Left
|
||||
# extend-backward-to-word-boundary=Control+Shift+Left
|
||||
# extend-backward-to-next-whitespace=none
|
||||
# extend-line-up=Shift+Up
|
||||
# clipboard-paste=Control+v Control+Shift+v Control+y XF86Paste
|
||||
# primary-paste=Shift+Insert
|
||||
# unicode-input=none
|
||||
# quit=none
|
||||
# scrollback-up-page=Shift+Page_Up
|
||||
# scrollback-up-half-page=none
|
||||
# scrollback-up-line=none
|
||||
# scrollback-down-page=Shift+Page_Down
|
||||
# scrollback-down-half-page=none
|
||||
# scrollback-down-line=none
|
||||
# scrollback-home=none
|
||||
# scrollback-end=none
|
||||
};
|
||||
|
||||
url-bindings = {
|
||||
# cancel=Control+g Control+c Control+d Escape
|
||||
# toggle-url-visible=t
|
||||
};
|
||||
|
||||
text-bindings = {
|
||||
# \x03=Mod4+c # Map Super+c -> Ctrl+c
|
||||
};
|
||||
|
||||
mouse-bindings = {
|
||||
# scrollback-up-mouse=BTN_BACK
|
||||
# scrollback-down-mouse=BTN_FORWARD
|
||||
# selection-override-modifiers=Shift
|
||||
# primary-paste=BTN_MIDDLE
|
||||
# select-begin=BTN_LEFT
|
||||
# select-begin-block=Control+BTN_LEFT
|
||||
# select-extend=BTN_RIGHT
|
||||
# select-extend-character-wise=Control+BTN_RIGHT
|
||||
# select-word=BTN_LEFT-2
|
||||
# select-word-whitespace=Control+BTN_LEFT-2
|
||||
# select-quote = BTN_LEFT-3
|
||||
# select-row=BTN_LEFT-4
|
||||
};
|
||||
|
||||
# vim: ft=dosini
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
107
home/modules/terminal/kitty/default.nix
Normal file
107
home/modules/terminal/kitty/default.nix
Normal file
@@ -0,0 +1,107 @@
|
||||
{ config
|
||||
, lib
|
||||
, ...
|
||||
}:
|
||||
let
|
||||
inherit (lib) mkIf mkEnableOption;
|
||||
cfg = config.modules.terminal.kitty;
|
||||
in
|
||||
{
|
||||
options = {
|
||||
modules.terminal.kitty.enable = mkEnableOption "Enables kitty terminal";
|
||||
};
|
||||
config = mkIf cfg.enable {
|
||||
programs.kitty = {
|
||||
enable = true;
|
||||
settings = {
|
||||
# include = "theme.conf";
|
||||
enable_audio_bell = false;
|
||||
open_url_with = "firefox-nightly";
|
||||
font_family = "Input Mono Compressed Extra Light";
|
||||
bold_font = "auto";
|
||||
italic_font = "auto";
|
||||
bold_italic_font = "auto";
|
||||
font_size = "11.0";
|
||||
cursor_blink_interval = 0;
|
||||
copy_on_select = "clipboard";
|
||||
background_opacity = "0.95";
|
||||
background_blur = "32";
|
||||
window_padding_width = 3;
|
||||
# tab_bar_min_tabs = 1;
|
||||
# tab_bar_edge = "bottom";
|
||||
tab_bar_style = "separator";
|
||||
tab_bar_margin_width = "0.0";
|
||||
tab_bar_margin_height = "0.0 0.0";
|
||||
active_tab_font_style = "normal";
|
||||
inactive_tab_font_style = "normal";
|
||||
# tab_title_max_length = 30;
|
||||
# # colors
|
||||
# active_tab_foreground = "#32302f";
|
||||
# active_tab_background = "#282828";
|
||||
# inactive_tab_foreground = "#282828";
|
||||
# inactive_tab_background = "#504945";
|
||||
tab_bar_background = "#504945";
|
||||
tab_bar_min_tabs = 1;
|
||||
tab_bar_edge = "bottom";
|
||||
# tab_powerline_style = "slanted";
|
||||
};
|
||||
extraConfig = ''
|
||||
kitty_mod shift+ctrl
|
||||
map kitty_mod+q close_tab
|
||||
map ctrl+shift+c copy_to_clipboard
|
||||
map ctrl+shift+v paste_from_clipboard
|
||||
tab_separator ""
|
||||
tab_title_template "{fmt.fg._504945}{fmt.bg.default}▓{fmt.fg._282828}{fmt.bg.default}{index}{fmt.fg._282828}{fmt.bg._504945} {title[:15] + (title[15:] and '…')} {fmt.fg._504945}{fmt.bg.default}▓ "
|
||||
active_tab_title_template "{fmt.fg._282828}{fmt.bg.default}▓{fmt.fg._A89984}{fmt.bg._282828}{fmt.fg._A89984}{fmt.bg._282828} {title[:40] + (title[40:] and '…')} {fmt.fg._282828}{fmt.bg.default}▓ "
|
||||
|
||||
# vim:ft=kitty
|
||||
## name: Gruvbox Material Dark Cnst
|
||||
## author: Sainnhe Park
|
||||
## license: MIT
|
||||
## upstream: https://raw.githubusercontent.com/rsaihe/gruvbox-material-kitty/main/colors/gruvbox-material-dark-medium.conf
|
||||
## blurb: A modified version of Gruvbox with softer contrasts
|
||||
|
||||
background #282828
|
||||
foreground #d4be98
|
||||
|
||||
selection_background #d4be98
|
||||
selection_foreground #282828
|
||||
|
||||
cursor #a89984
|
||||
cursor_text_color background
|
||||
|
||||
# Black
|
||||
color0 #665c54
|
||||
color8 #928374
|
||||
|
||||
# Red
|
||||
color1 #ea6962
|
||||
color9 #ea6962
|
||||
|
||||
# Green
|
||||
color2 #a9b665
|
||||
color10 #a9b665
|
||||
|
||||
# Yellow
|
||||
color3 #e78a4e
|
||||
color11 #d8a657
|
||||
|
||||
# Blue
|
||||
color4 #7daea3
|
||||
color12 #7daea3
|
||||
|
||||
# Magenta
|
||||
color5 #d3869b
|
||||
color13 #d3869b
|
||||
|
||||
# Cyan
|
||||
color6 #89b482
|
||||
color14 #89b482
|
||||
|
||||
# White
|
||||
color7 #d4be98
|
||||
color15 #d4be98
|
||||
'';
|
||||
};
|
||||
};
|
||||
}
|
||||
44
home/modules/terminal/wezterm/default.nix
Normal file
44
home/modules/terminal/wezterm/default.nix
Normal file
@@ -0,0 +1,44 @@
|
||||
{
|
||||
pkgs,
|
||||
inputs,
|
||||
...
|
||||
}: let
|
||||
enable_wayland = "true";
|
||||
# weztermPkg = pkgs.wezterm;
|
||||
weztermFlake = inputs.wezterm.packages.${pkgs.system}.default;
|
||||
in {
|
||||
programs.wezterm = {
|
||||
enable = true;
|
||||
package = weztermFlake;
|
||||
extraConfig = ''
|
||||
local wezterm = require 'wezterm';
|
||||
|
||||
local config = {
|
||||
-- font = wezterm.font("Input Mono Compressed"),
|
||||
font_size = 12,
|
||||
check_for_updates = false,
|
||||
color_scheme = 'Gruvbox Material (Gogh)',
|
||||
default_cursor_style = 'SteadyBar',
|
||||
enable_scroll_bar = true,
|
||||
hide_tab_bar_if_only_one_tab = true,
|
||||
scrollback_lines = 10000,
|
||||
window_background_opacity = 0.9,
|
||||
}
|
||||
if wezterm.target_triple == "x86_64-pc-windows-msvc" then
|
||||
config.default_prog = { "powershell.exe" }
|
||||
else
|
||||
config.enable_wayland = ${enable_wayland}
|
||||
-- config.window_decorations = "TITLE"
|
||||
config.window_close_confirmation = "NeverPrompt"
|
||||
-- config.freetype_load_target = "Light"
|
||||
-- config.freetype_render_target = "HorizontalLcd"
|
||||
local f = wezterm.font_with_fallback({
|
||||
{family="Input Mono Compressed", weight="Light"},
|
||||
{family="Input Sans Narrow", weight="Light"},
|
||||
})
|
||||
config.font = f;
|
||||
end
|
||||
return config
|
||||
'';
|
||||
};
|
||||
}
|
||||
25
home/modules/terminal/wezterm/default.nixbak
Normal file
25
home/modules/terminal/wezterm/default.nixbak
Normal file
@@ -0,0 +1,25 @@
|
||||
{
|
||||
pkgs,
|
||||
inputs,
|
||||
...
|
||||
}: {
|
||||
programs.wezterm = {
|
||||
enable = true;
|
||||
package = inputs.wezterm.packages.${pkgs.system}.default;
|
||||
|
||||
extraConfig = ''
|
||||
return {
|
||||
enable_wayland = true,
|
||||
font = wezterm.font("Input Mono Compressed"),
|
||||
font_size = 12,
|
||||
check_for_updates = false,
|
||||
color_scheme = 'Gruvbox Material (Gogh)',
|
||||
default_cursor_style = 'SteadyBar',
|
||||
enable_scroll_bar = true,
|
||||
hide_tab_bar_if_only_one_tab = true,
|
||||
scrollback_lines = 10000,
|
||||
window_background_opacity = 0.9,
|
||||
}
|
||||
'';
|
||||
};
|
||||
}
|
||||
89
home/modules/terminal/zellij/default.nix
Normal file
89
home/modules/terminal/zellij/default.nix
Normal file
@@ -0,0 +1,89 @@
|
||||
{
|
||||
config,
|
||||
lib,
|
||||
...
|
||||
}: let
|
||||
inherit (lib) mkIf mkEnableOption;
|
||||
cfg = config.modules.terminal.zellij;
|
||||
in {
|
||||
options = {
|
||||
modules.terminal.zellij.enable = mkEnableOption "Enables zellij";
|
||||
};
|
||||
config = mkIf cfg.enable {
|
||||
programs.zellij = {
|
||||
enable = true;
|
||||
enableZshIntegration = false;
|
||||
};
|
||||
home.shellAliases = {
|
||||
zr = "zellij run --";
|
||||
zrf = "zellij run --floating --";
|
||||
ze = "zellij edit";
|
||||
zef = "zellij edit --floating";
|
||||
};
|
||||
|
||||
xdg.configFile."zellij/config.kdl".text = ''
|
||||
default_layout "compact"
|
||||
mouse_mode true
|
||||
copy_on_select true
|
||||
copy_command "wl-copy"
|
||||
simplified_ui false
|
||||
scrollback_editor "/home/cnst/.nix-profile/bin/nvim"
|
||||
pane_frames true
|
||||
on_force_close "detach"
|
||||
|
||||
ui {
|
||||
pane_frames {
|
||||
rounded_corners false
|
||||
}
|
||||
}
|
||||
|
||||
keybinds {
|
||||
normal {
|
||||
bind "Alt m" {
|
||||
LaunchPlugin "file:~/.config/zellij/plugins/monocle.wasm" {
|
||||
in_place true
|
||||
kiosk true
|
||||
};
|
||||
SwitchToMode "Normal"
|
||||
}
|
||||
bind "Ctrl f" {
|
||||
LaunchOrFocusPlugin "file:~/.config/zellij/plugins/monocle.wasm" {
|
||||
floating true
|
||||
}
|
||||
SwitchToMode "Normal"
|
||||
}
|
||||
bind "Alt 1" { GoToTab 1;}
|
||||
bind "Alt 2" { GoToTab 2;}
|
||||
bind "Alt 3" { GoToTab 3;}
|
||||
bind "Alt 4" { GoToTab 4;}
|
||||
}
|
||||
|
||||
shared_except "locked" {
|
||||
bind "Ctrl y" {
|
||||
LaunchOrFocusPlugin "file:~/.config/zellij/plugins/room.wasm" {
|
||||
floating true
|
||||
ignore_case true
|
||||
}
|
||||
}
|
||||
}
|
||||
unbind "Ctrl b" "Ctrl h" "Ctrl g" "Alt j"
|
||||
}
|
||||
|
||||
themes {
|
||||
gruvbox-dark {
|
||||
bg "#282828"
|
||||
fg "#D5C4A1"
|
||||
black "#3C3836"
|
||||
red "#CC241D"
|
||||
green "#98971A"
|
||||
yellow "#D79921"
|
||||
blue "#458588"
|
||||
magenta "#B16286"
|
||||
cyan "#689D6A"
|
||||
white "#FBF1C7"
|
||||
orange "#D65D0E"
|
||||
}
|
||||
}
|
||||
'';
|
||||
};
|
||||
}
|
||||
17
home/modules/userd/copyq/default.nix
Normal file
17
home/modules/userd/copyq/default.nix
Normal file
@@ -0,0 +1,17 @@
|
||||
{
|
||||
config,
|
||||
lib,
|
||||
...
|
||||
}: let
|
||||
inherit (lib) mkIf mkEnableOption;
|
||||
cfg = config.modules.userd.copyq;
|
||||
in {
|
||||
options = {
|
||||
modules.userd.copyq.enable = mkEnableOption "Enables copyq";
|
||||
};
|
||||
config = mkIf cfg.enable {
|
||||
services.copyq = {
|
||||
enable = true;
|
||||
};
|
||||
};
|
||||
}
|
||||
39
home/modules/userd/mako/default.nix
Normal file
39
home/modules/userd/mako/default.nix
Normal file
@@ -0,0 +1,39 @@
|
||||
{
|
||||
config,
|
||||
lib,
|
||||
...
|
||||
}: let
|
||||
inherit (lib) mkIf mkEnableOption;
|
||||
cfg = config.modules.userd.mako;
|
||||
in {
|
||||
options = {
|
||||
modules.userd.mako.enable = mkEnableOption "Enables mako";
|
||||
};
|
||||
config = mkIf cfg.enable {
|
||||
services.mako = {
|
||||
enable = true;
|
||||
iconPath = "$HOME/.nix-profile/share/icons/Gruvbox-Plus-Dark";
|
||||
font = "FiraCode Nerd Font Medium 12";
|
||||
padding = "20";
|
||||
margin = "10";
|
||||
anchor = "top-right";
|
||||
width = 400;
|
||||
height = 150;
|
||||
borderSize = 2;
|
||||
defaultTimeout = 12000;
|
||||
backgroundColor = "#3c3836dd";
|
||||
borderColor = "#689d6add";
|
||||
textColor = "#d5c4a1dd";
|
||||
layer = "overlay";
|
||||
extraConfig = ''
|
||||
max-history=50
|
||||
max-visible=4
|
||||
outer-margin=25
|
||||
icon-location=right
|
||||
max-icon-size=48
|
||||
[mode=do-not-disturb]
|
||||
invisible=1
|
||||
'';
|
||||
};
|
||||
};
|
||||
}
|
||||
74
home/modules/userd/sops/default.nix
Normal file
74
home/modules/userd/sops/default.nix
Normal file
@@ -0,0 +1,74 @@
|
||||
{
|
||||
inputs,
|
||||
self,
|
||||
lib,
|
||||
config,
|
||||
...
|
||||
}: let
|
||||
defaultConfig = {
|
||||
age = {sshKeyPaths = ["/home/cnst/.ssh/id_ed25519"];};
|
||||
defaultSopsFile = "${self}/secrets/cnst-secrets.yaml";
|
||||
secrets = {
|
||||
openai_api_key = {
|
||||
format = "yaml";
|
||||
sopsFile = "${self}/secrets/cnst-secrets.yaml";
|
||||
};
|
||||
ssh_user = {
|
||||
format = "yaml";
|
||||
sopsFile = "${self}/secrets/cnst-secrets.yaml";
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
userSpecificConfig = lib.mkMerge [
|
||||
(lib.mkIf (config.home.username == "toothpick") {
|
||||
age = {sshKeyPaths = ["/home/toothpick/.ssh/id_ed25519"];};
|
||||
defaultSopsFile = "${self}/secrets/toothpick-secrets.yaml";
|
||||
secrets = {
|
||||
openai_api_key = {
|
||||
format = "yaml";
|
||||
sopsFile = "${self}/secrets/toothpick-secrets.yaml";
|
||||
};
|
||||
ssh_user = {
|
||||
format = "yaml";
|
||||
sopsFile = "${self}/secrets/toothpick-secrets.yaml";
|
||||
};
|
||||
};
|
||||
})
|
||||
(lib.mkIf (config.home.username == "adam") {
|
||||
age = {sshKeyPaths = ["/home/adam/.ssh/id_ed25519"];};
|
||||
defaultSopsFile = "${self}/secrets/adam-secrets.yaml";
|
||||
secrets = {
|
||||
openai_api_key = {
|
||||
format = "yaml";
|
||||
sopsFile = "${self}/secrets/adam-secrets.yaml";
|
||||
};
|
||||
ssh_user = {
|
||||
format = "yaml";
|
||||
sopsFile = "${self}/secrets/adam-secrets.yaml";
|
||||
};
|
||||
};
|
||||
})
|
||||
];
|
||||
inherit (lib) mkIf mkEnableOption;
|
||||
cfg = config.modules.userd.sops;
|
||||
in {
|
||||
imports = [
|
||||
inputs.sops-nix.homeManagerModules.sops
|
||||
];
|
||||
options = {
|
||||
modules.userd.sops.enable = mkEnableOption "Enables sops home environment";
|
||||
};
|
||||
config = mkIf cfg.enable {
|
||||
sops = lib.mkMerge [
|
||||
{
|
||||
gnupg = {
|
||||
home = "~/.gnupg";
|
||||
sshKeyPaths = [];
|
||||
};
|
||||
}
|
||||
defaultConfig
|
||||
userSpecificConfig
|
||||
];
|
||||
};
|
||||
}
|
||||
19
home/modules/userd/udiskie/default.nix
Normal file
19
home/modules/userd/udiskie/default.nix
Normal file
@@ -0,0 +1,19 @@
|
||||
{
|
||||
config,
|
||||
lib,
|
||||
...
|
||||
}: let
|
||||
inherit (lib) mkIf mkEnableOption;
|
||||
cfg = config.modules.userd.udiskie;
|
||||
in {
|
||||
options = {
|
||||
modules.userd.udiskie.enable = mkEnableOption "Enables udiskie";
|
||||
};
|
||||
config = mkIf cfg.enable {
|
||||
services.udiskie = {
|
||||
enable = true;
|
||||
tray = "always";
|
||||
notify = false;
|
||||
};
|
||||
};
|
||||
}
|
||||
3
home/modules/utils/ags/.gitignore
vendored
Normal file
3
home/modules/utils/ags/.gitignore
vendored
Normal file
@@ -0,0 +1,3 @@
|
||||
style.css
|
||||
style.css.map
|
||||
types
|
||||
57
home/modules/utils/ags/default.nix
Normal file
57
home/modules/utils/ags/default.nix
Normal file
@@ -0,0 +1,57 @@
|
||||
{
|
||||
inputs,
|
||||
pkgs,
|
||||
lib,
|
||||
config,
|
||||
...
|
||||
}: let
|
||||
requiredDeps = with pkgs; [
|
||||
bash
|
||||
bun
|
||||
coreutils
|
||||
dart-sass
|
||||
gawk
|
||||
imagemagick
|
||||
procps
|
||||
ripgrep
|
||||
util-linux
|
||||
];
|
||||
|
||||
guiDeps = with pkgs; [
|
||||
gnome.gnome-control-center
|
||||
mission-center
|
||||
overskride
|
||||
wlogout
|
||||
];
|
||||
|
||||
dependencies = requiredDeps ++ guiDeps;
|
||||
inherit (lib) mkIf mkEnableOption;
|
||||
cfg = config.modules.utils.ags;
|
||||
in {
|
||||
imports = [
|
||||
inputs.ags.homeManagerModules.default
|
||||
];
|
||||
options = {
|
||||
modules.utils.ags.enable = mkEnableOption "Enables ags";
|
||||
};
|
||||
|
||||
config = mkIf cfg.enable {
|
||||
programs.ags.enable = true;
|
||||
|
||||
systemd.user.services.ags = {
|
||||
Unit = {
|
||||
Description = "Aylur's Gtk Shell";
|
||||
PartOf = [
|
||||
"tray.target"
|
||||
"graphical-session.target"
|
||||
];
|
||||
};
|
||||
Service = {
|
||||
Environment = "PATH=/run/wrappers/bin:${lib.makeBinPath dependencies}";
|
||||
ExecStart = "${cfg.package}/bin/ags";
|
||||
Restart = "on-failure";
|
||||
};
|
||||
Install.WantedBy = ["graphical-session.target"];
|
||||
};
|
||||
};
|
||||
}
|
||||
23
home/modules/utils/anyrun/default.nix
Normal file
23
home/modules/utils/anyrun/default.nix
Normal file
@@ -0,0 +1,23 @@
|
||||
{
|
||||
inputs,
|
||||
config,
|
||||
lib,
|
||||
...
|
||||
}: let
|
||||
inherit (lib) mkIf mkEnableOption;
|
||||
cfg = config.modules.utils.anyrun;
|
||||
in {
|
||||
imports = [
|
||||
inputs.anyrun.homeManagerModules.default
|
||||
];
|
||||
options = {
|
||||
modules.utils.anyrun.enable = mkEnableOption "Enables anyrun";
|
||||
};
|
||||
config = mkIf cfg.enable {
|
||||
programs.anyrun = {
|
||||
enable = true;
|
||||
|
||||
#extraCss = builtins.readFile (./. + "/style-dark.css");
|
||||
};
|
||||
};
|
||||
}
|
||||
21
home/modules/utils/rofi/default.nix
Normal file
21
home/modules/utils/rofi/default.nix
Normal file
@@ -0,0 +1,21 @@
|
||||
{
|
||||
pkgs,
|
||||
config,
|
||||
lib,
|
||||
...
|
||||
}: let
|
||||
inherit (lib) mkIf mkEnableOption;
|
||||
cfg = config.modules.utils.rofi;
|
||||
in {
|
||||
options = {
|
||||
modules.utils.rofi.enable = mkEnableOption "Enables firefox";
|
||||
};
|
||||
config = mkIf cfg.enable {
|
||||
programs.rofi = {
|
||||
enable = true;
|
||||
package = pkgs.rofi-wayland-unwrapped;
|
||||
configPath = "home/cnst/.config/rofi/config.rasi";
|
||||
font = "Rec Mono Linear 11";
|
||||
};
|
||||
};
|
||||
}
|
||||
19
home/modules/utils/waybar/default.nix
Normal file
19
home/modules/utils/waybar/default.nix
Normal file
@@ -0,0 +1,19 @@
|
||||
{
|
||||
pkgs,
|
||||
config,
|
||||
lib,
|
||||
...
|
||||
}: let
|
||||
inherit (lib) mkIf mkEnableOption;
|
||||
cfg = config.modules.utils.waybar;
|
||||
in {
|
||||
options = {
|
||||
modules.utils.waybar.enable = mkEnableOption "Enables waybar";
|
||||
};
|
||||
config = mkIf cfg.enable {
|
||||
programs.waybar = {
|
||||
enable = true;
|
||||
package = pkgs.waybar;
|
||||
};
|
||||
};
|
||||
}
|
||||
47
home/modules/utils/yazi/default.nix
Normal file
47
home/modules/utils/yazi/default.nix
Normal file
@@ -0,0 +1,47 @@
|
||||
{
|
||||
pkgs,
|
||||
config,
|
||||
lib,
|
||||
...
|
||||
}: let
|
||||
inherit (lib) mkIf mkEnableOption;
|
||||
cfg = config.modules.utils.yazi;
|
||||
in {
|
||||
imports = [
|
||||
./theme
|
||||
];
|
||||
|
||||
options = {
|
||||
modules.utils.yazi.enable = mkEnableOption "Enables yazi";
|
||||
};
|
||||
config = mkIf cfg.enable {
|
||||
programs.yazi = {
|
||||
enable = true;
|
||||
|
||||
package = pkgs.yazi;
|
||||
|
||||
enableBashIntegration = config.programs.bash.enable;
|
||||
enableZshIntegration = config.programs.zsh.enable;
|
||||
|
||||
settings = {
|
||||
manager = {
|
||||
layout = [1 4 3];
|
||||
sort_by = "alphabetical";
|
||||
sort_sensitive = true;
|
||||
sort_reverse = false;
|
||||
sort_dir_first = true;
|
||||
linemode = "none";
|
||||
show_hidden = false;
|
||||
show_symlink = true;
|
||||
};
|
||||
|
||||
preview = {
|
||||
tab_size = 2;
|
||||
max_width = 600;
|
||||
max_height = 900;
|
||||
cache_dir = config.xdg.cacheHome;
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
13
home/modules/utils/yazi/theme/default.nix
Normal file
13
home/modules/utils/yazi/theme/default.nix
Normal file
@@ -0,0 +1,13 @@
|
||||
{
|
||||
imports = [
|
||||
./filetype.nix
|
||||
./help.nix
|
||||
./icons.nix
|
||||
./input.nix
|
||||
./manager.nix
|
||||
./select.nix
|
||||
./status.nix
|
||||
./tasks.nix
|
||||
./which.nix
|
||||
];
|
||||
}
|
||||
59
home/modules/utils/yazi/theme/filetype.nix
Normal file
59
home/modules/utils/yazi/theme/filetype.nix
Normal file
@@ -0,0 +1,59 @@
|
||||
{
|
||||
programs.yazi.theme.filetype.rules = [
|
||||
# Images
|
||||
{
|
||||
mime = "image/*";
|
||||
fg = "#83a598";
|
||||
}
|
||||
|
||||
# Videos
|
||||
{
|
||||
mime = "video/*";
|
||||
fg = "#b8bb26";
|
||||
}
|
||||
{
|
||||
mime = "audio/*";
|
||||
fg = "#b8bb26";
|
||||
}
|
||||
|
||||
# Archives
|
||||
{
|
||||
mime = "application/zip";
|
||||
fg = "#fe8019";
|
||||
}
|
||||
{
|
||||
mime = "application/gzip";
|
||||
fg = "#fe8019";
|
||||
}
|
||||
{
|
||||
mime = "application/x-tar";
|
||||
fg = "#fe8019";
|
||||
}
|
||||
{
|
||||
mime = "application/x-bzip";
|
||||
fg = "#fe8019";
|
||||
}
|
||||
{
|
||||
mime = "application/x-bzip2";
|
||||
fg = "#fe8019";
|
||||
}
|
||||
{
|
||||
mime = "application/x-7z-compressed";
|
||||
fg = "#fe8019";
|
||||
}
|
||||
{
|
||||
mime = "application/x-rar";
|
||||
fg = "#fe8019";
|
||||
}
|
||||
|
||||
# Fallback
|
||||
{
|
||||
name = "*";
|
||||
fg = "#a89984";
|
||||
}
|
||||
{
|
||||
name = "*/";
|
||||
fg = "#83a598";
|
||||
}
|
||||
];
|
||||
}
|
||||
15
home/modules/utils/yazi/theme/help.nix
Normal file
15
home/modules/utils/yazi/theme/help.nix
Normal file
@@ -0,0 +1,15 @@
|
||||
{
|
||||
programs.yazi.theme.help = {
|
||||
on = {fg = "#fe8019";};
|
||||
exec = {fg = "#83a598";};
|
||||
desc = {fg = "#928374";};
|
||||
hovered = {
|
||||
bg = "#504945";
|
||||
bold = true;
|
||||
};
|
||||
footer = {
|
||||
fg = "#3c3836";
|
||||
bg = "#a89984";
|
||||
};
|
||||
};
|
||||
}
|
||||
503
home/modules/utils/yazi/theme/icons.nix
Normal file
503
home/modules/utils/yazi/theme/icons.nix
Normal file
@@ -0,0 +1,503 @@
|
||||
{
|
||||
programs.yazi.theme.icon.rules = [
|
||||
# Home
|
||||
{
|
||||
name = ".config/";
|
||||
text = "";
|
||||
}
|
||||
{
|
||||
name = ".ssh/";
|
||||
text = "";
|
||||
}
|
||||
{
|
||||
name = "Desktop/";
|
||||
text = "";
|
||||
}
|
||||
{
|
||||
name = "Development/";
|
||||
text = "";
|
||||
}
|
||||
{
|
||||
name = "Documents/";
|
||||
text = "";
|
||||
}
|
||||
{
|
||||
name = "Downloads/";
|
||||
text = "";
|
||||
}
|
||||
{
|
||||
name = "Library/";
|
||||
text = "";
|
||||
}
|
||||
{
|
||||
name = "Movies/";
|
||||
text = "";
|
||||
}
|
||||
{
|
||||
name = "Music/";
|
||||
text = "";
|
||||
}
|
||||
{
|
||||
name = "Pictures/";
|
||||
text = "";
|
||||
}
|
||||
{
|
||||
name = "Videos/";
|
||||
text = "";
|
||||
}
|
||||
{
|
||||
name = "Public/";
|
||||
text = "";
|
||||
}
|
||||
|
||||
# Git
|
||||
{
|
||||
name = ".git/";
|
||||
text = "";
|
||||
}
|
||||
{
|
||||
name = ".gitignore";
|
||||
text = "";
|
||||
}
|
||||
{
|
||||
name = ".gitmodules";
|
||||
text = "";
|
||||
}
|
||||
{
|
||||
name = ".gitattributes";
|
||||
text = "";
|
||||
}
|
||||
|
||||
# Dotfiles
|
||||
{
|
||||
name = ".DS_Store";
|
||||
text = "";
|
||||
}
|
||||
{
|
||||
name = ".bashrc";
|
||||
text = "";
|
||||
}
|
||||
{
|
||||
name = ".bashprofile";
|
||||
text = "";
|
||||
}
|
||||
{
|
||||
name = ".zshrc";
|
||||
text = "";
|
||||
}
|
||||
{
|
||||
name = ".zshenv";
|
||||
text = "";
|
||||
}
|
||||
{
|
||||
name = ".zprofile";
|
||||
text = "";
|
||||
}
|
||||
{
|
||||
name = ".vimrc";
|
||||
text = "";
|
||||
}
|
||||
|
||||
# Text
|
||||
{
|
||||
name = "*.txt";
|
||||
text = "";
|
||||
}
|
||||
{
|
||||
name = "*.md";
|
||||
text = "";
|
||||
}
|
||||
{
|
||||
name = "*.rst";
|
||||
text = "";
|
||||
}
|
||||
{
|
||||
name = "COPYING";
|
||||
text = "";
|
||||
}
|
||||
{
|
||||
name = "LICENSE";
|
||||
text = "";
|
||||
}
|
||||
|
||||
# Archives
|
||||
{
|
||||
name = "*.zip";
|
||||
text = "";
|
||||
}
|
||||
{
|
||||
name = "*.tar";
|
||||
text = "";
|
||||
}
|
||||
{
|
||||
name = "*.gz";
|
||||
text = "";
|
||||
}
|
||||
{
|
||||
name = "*.7z";
|
||||
text = "";
|
||||
}
|
||||
{
|
||||
name = "*.bz2";
|
||||
text = "";
|
||||
}
|
||||
{
|
||||
name = "*.xz";
|
||||
text = "";
|
||||
}
|
||||
|
||||
# Documents
|
||||
{
|
||||
name = "*.csv";
|
||||
text = "";
|
||||
}
|
||||
{
|
||||
name = "*.doc";
|
||||
text = "";
|
||||
}
|
||||
{
|
||||
name = "*.doct";
|
||||
text = "";
|
||||
}
|
||||
{
|
||||
name = "*.docx";
|
||||
text = "";
|
||||
}
|
||||
{
|
||||
name = "*.dot";
|
||||
text = "";
|
||||
}
|
||||
{
|
||||
name = "*.ods";
|
||||
text = "";
|
||||
}
|
||||
{
|
||||
name = "*.ots";
|
||||
text = "";
|
||||
}
|
||||
{
|
||||
name = "*.pdf";
|
||||
text = "";
|
||||
}
|
||||
{
|
||||
name = "*.pom";
|
||||
text = "";
|
||||
}
|
||||
{
|
||||
name = "*.pot";
|
||||
text = "";
|
||||
}
|
||||
{
|
||||
name = "*.ppm";
|
||||
text = "";
|
||||
}
|
||||
{
|
||||
name = "*.pps";
|
||||
text = "";
|
||||
}
|
||||
{
|
||||
name = "*.ppt";
|
||||
text = "";
|
||||
}
|
||||
{
|
||||
name = "*.potx";
|
||||
text = "";
|
||||
}
|
||||
{
|
||||
name = "*.ppmx";
|
||||
text = "";
|
||||
}
|
||||
{
|
||||
name = "*.ppsx";
|
||||
text = "";
|
||||
}
|
||||
{
|
||||
name = "*.pptx";
|
||||
text = "";
|
||||
}
|
||||
{
|
||||
name = "*.xlc";
|
||||
text = "";
|
||||
}
|
||||
{
|
||||
name = "*.xlm";
|
||||
text = "";
|
||||
}
|
||||
{
|
||||
name = "*.xls";
|
||||
text = "";
|
||||
}
|
||||
{
|
||||
name = "*.xlt";
|
||||
text = "";
|
||||
}
|
||||
{
|
||||
name = "*.xlsm";
|
||||
text = "";
|
||||
}
|
||||
{
|
||||
name = "*.xlsx";
|
||||
text = "";
|
||||
}
|
||||
|
||||
# Audio
|
||||
{
|
||||
name = "*.mp3";
|
||||
text = "";
|
||||
}
|
||||
{
|
||||
name = "*.flac";
|
||||
text = "";
|
||||
}
|
||||
{
|
||||
name = "*.wav";
|
||||
text = "";
|
||||
}
|
||||
{
|
||||
name = "*.aac";
|
||||
text = "";
|
||||
}
|
||||
{
|
||||
name = "*.ogg";
|
||||
text = "";
|
||||
}
|
||||
{
|
||||
name = "*.m4a";
|
||||
text = "";
|
||||
}
|
||||
{
|
||||
name = "*.mp2";
|
||||
text = "";
|
||||
}
|
||||
|
||||
# Movies
|
||||
{
|
||||
name = "*.mp4";
|
||||
text = "";
|
||||
}
|
||||
{
|
||||
name = "*.mkv";
|
||||
text = "";
|
||||
}
|
||||
{
|
||||
name = "*.avi";
|
||||
text = "";
|
||||
}
|
||||
{
|
||||
name = "*.mov";
|
||||
text = "";
|
||||
}
|
||||
{
|
||||
name = "*.webm";
|
||||
text = "";
|
||||
}
|
||||
|
||||
# Images
|
||||
{
|
||||
name = "*.jpg";
|
||||
text = "";
|
||||
}
|
||||
{
|
||||
name = "*.jpeg";
|
||||
text = "";
|
||||
}
|
||||
{
|
||||
name = "*.png";
|
||||
text = "";
|
||||
}
|
||||
{
|
||||
name = "*.gif";
|
||||
text = "";
|
||||
}
|
||||
{
|
||||
name = "*.webp";
|
||||
text = "";
|
||||
}
|
||||
{
|
||||
name = "*.avif";
|
||||
text = "";
|
||||
}
|
||||
{
|
||||
name = "*.bmp";
|
||||
text = "";
|
||||
}
|
||||
{
|
||||
name = "*.ico";
|
||||
text = "";
|
||||
}
|
||||
{
|
||||
name = "*.svg";
|
||||
text = "";
|
||||
}
|
||||
{
|
||||
name = "*.xcf";
|
||||
text = "";
|
||||
}
|
||||
{
|
||||
name = "*.HEIC";
|
||||
text = "";
|
||||
}
|
||||
|
||||
# Programming
|
||||
{
|
||||
name = "*.c";
|
||||
text = "";
|
||||
}
|
||||
{
|
||||
name = "*.cpp";
|
||||
text = "";
|
||||
}
|
||||
{
|
||||
name = "*.h";
|
||||
text = "";
|
||||
}
|
||||
{
|
||||
name = "*.hpp";
|
||||
text = "";
|
||||
}
|
||||
{
|
||||
name = "*.rs";
|
||||
text = "";
|
||||
}
|
||||
{
|
||||
name = "*.go";
|
||||
text = "";
|
||||
}
|
||||
{
|
||||
name = "*.py";
|
||||
text = "";
|
||||
}
|
||||
{
|
||||
name = "*.hs";
|
||||
text = "";
|
||||
}
|
||||
{
|
||||
name = "*.js";
|
||||
text = "";
|
||||
}
|
||||
{
|
||||
name = "*.ts";
|
||||
text = "";
|
||||
}
|
||||
{
|
||||
name = "*.tsx";
|
||||
text = "";
|
||||
}
|
||||
{
|
||||
name = "*.jsx";
|
||||
text = "";
|
||||
}
|
||||
{
|
||||
name = "*.rb";
|
||||
text = "";
|
||||
}
|
||||
{
|
||||
name = "*.php";
|
||||
text = "";
|
||||
}
|
||||
{
|
||||
name = "*.java";
|
||||
text = "";
|
||||
}
|
||||
{
|
||||
name = "*.sh";
|
||||
text = "";
|
||||
}
|
||||
{
|
||||
name = "*.fish";
|
||||
text = "";
|
||||
}
|
||||
{
|
||||
name = "*.swift";
|
||||
text = "";
|
||||
}
|
||||
{
|
||||
name = "*.vim";
|
||||
text = "";
|
||||
}
|
||||
{
|
||||
name = "*.lua";
|
||||
text = "";
|
||||
}
|
||||
{
|
||||
name = "*.html";
|
||||
text = "";
|
||||
}
|
||||
{
|
||||
name = "*.css";
|
||||
text = "";
|
||||
}
|
||||
{
|
||||
name = "*.sass";
|
||||
text = "";
|
||||
}
|
||||
{
|
||||
name = "*.scss";
|
||||
text = "";
|
||||
}
|
||||
{
|
||||
name = "*.json";
|
||||
text = "";
|
||||
}
|
||||
{
|
||||
name = "*.toml";
|
||||
text = "";
|
||||
}
|
||||
{
|
||||
name = "*.yml";
|
||||
text = "";
|
||||
}
|
||||
{
|
||||
name = "*.yaml";
|
||||
text = "";
|
||||
}
|
||||
{
|
||||
name = "*.ini";
|
||||
text = "";
|
||||
}
|
||||
{
|
||||
name = "*.conf";
|
||||
text = "";
|
||||
}
|
||||
{
|
||||
name = "*.lock";
|
||||
text = "";
|
||||
}
|
||||
{
|
||||
name = "*.nix";
|
||||
text = "";
|
||||
}
|
||||
{
|
||||
name = "Containerfile";
|
||||
text = "";
|
||||
}
|
||||
{
|
||||
name = "Dockerfile";
|
||||
text = "";
|
||||
}
|
||||
|
||||
# Misc
|
||||
{
|
||||
name = "*.bin";
|
||||
text = "";
|
||||
}
|
||||
{
|
||||
name = "*.exe";
|
||||
text = "";
|
||||
}
|
||||
{
|
||||
name = "*.pkg";
|
||||
text = "";
|
||||
}
|
||||
|
||||
# Default
|
||||
{
|
||||
name = "*";
|
||||
text = "";
|
||||
}
|
||||
{
|
||||
name = "*/";
|
||||
text = "";
|
||||
}
|
||||
];
|
||||
}
|
||||
8
home/modules/utils/yazi/theme/input.nix
Normal file
8
home/modules/utils/yazi/theme/input.nix
Normal file
@@ -0,0 +1,8 @@
|
||||
{
|
||||
programs.yazi.theme.input = {
|
||||
border = {fg = "#bdae93";};
|
||||
title = {};
|
||||
value = {};
|
||||
selected = {reversed = true;};
|
||||
};
|
||||
}
|
||||
59
home/modules/utils/yazi/theme/manager.nix
Normal file
59
home/modules/utils/yazi/theme/manager.nix
Normal file
@@ -0,0 +1,59 @@
|
||||
{
|
||||
programs.yazi.theme.manager = {
|
||||
cwd = {fg = "#83a598";};
|
||||
# Hovered
|
||||
hovered = {
|
||||
fg = "#282828";
|
||||
bg = "#83a598";
|
||||
};
|
||||
|
||||
preview_hovered = {underline = true;};
|
||||
|
||||
# Find
|
||||
find_keyword = {
|
||||
fg = "#b8bb26";
|
||||
italic = true;
|
||||
};
|
||||
find_position = {
|
||||
fg = "#fe8019";
|
||||
bg = "reset";
|
||||
italic = true;
|
||||
};
|
||||
|
||||
# Marker
|
||||
marker_selected = {
|
||||
fg = "#b8bb26";
|
||||
bg = "#b8bb26";
|
||||
};
|
||||
marker_copied = {
|
||||
fg = "#b8bb26";
|
||||
bg = "#b8bb26";
|
||||
};
|
||||
marker_cut = {
|
||||
fg = "#fb4934";
|
||||
bg = "#fb4934";
|
||||
};
|
||||
|
||||
# Tab
|
||||
tab_active = {
|
||||
fg = "#282828";
|
||||
bg = "#504945";
|
||||
};
|
||||
tab_inactive = {
|
||||
fg = "#a89984";
|
||||
bg = "#3c3836";
|
||||
};
|
||||
tab_width = 1;
|
||||
|
||||
# Border;
|
||||
border_symbol = "│";
|
||||
border_style = {fg = "#665c54";};
|
||||
|
||||
# Offset;
|
||||
folder_offset = [1 0 1 0];
|
||||
preview_offset = [1 1 1 1];
|
||||
|
||||
# Highlighting;
|
||||
syntect_theme = "";
|
||||
};
|
||||
}
|
||||
7
home/modules/utils/yazi/theme/select.nix
Normal file
7
home/modules/utils/yazi/theme/select.nix
Normal file
@@ -0,0 +1,7 @@
|
||||
{
|
||||
programs.yazi.theme.select = {
|
||||
border = {fg = "#504945";};
|
||||
active = {fg = "#fe8019";};
|
||||
inactive = {};
|
||||
};
|
||||
}
|
||||
48
home/modules/utils/yazi/theme/status.nix
Normal file
48
home/modules/utils/yazi/theme/status.nix
Normal file
@@ -0,0 +1,48 @@
|
||||
{
|
||||
programs.yazi.theme.status = {
|
||||
separator_open = "▒";
|
||||
separator_close = "▒";
|
||||
separator_style = {
|
||||
fg = "#3c3836";
|
||||
bg = "#3c3836";
|
||||
};
|
||||
|
||||
# Mode;
|
||||
mode_normal = {
|
||||
fg = "#282828";
|
||||
bg = "#A89984";
|
||||
bold = true;
|
||||
};
|
||||
mode_select = {
|
||||
fg = "#282828";
|
||||
bg = "#b8bb26";
|
||||
bold = true;
|
||||
};
|
||||
mode_unset = {
|
||||
fg = "#282828";
|
||||
bg = "#d3869b";
|
||||
bold = true;
|
||||
};
|
||||
|
||||
# Progress;
|
||||
progress_label = {
|
||||
fg = "#ebdbb2";
|
||||
bold = true;
|
||||
};
|
||||
progress_normal = {
|
||||
fg = "#504945";
|
||||
bg = "#3c3836";
|
||||
};
|
||||
progress_error = {
|
||||
fg = "#fb4934";
|
||||
bg = "#3c3836";
|
||||
};
|
||||
|
||||
# Permissions;
|
||||
permissions_t = {fg = "#504945";};
|
||||
permissions_r = {fg = "#b8bb26";};
|
||||
permissions_w = {fg = "#fb4934";};
|
||||
permissions_x = {fg = "#b8bb26";};
|
||||
permissions_s = {fg = "#665c54";};
|
||||
};
|
||||
}
|
||||
7
home/modules/utils/yazi/theme/tasks.nix
Normal file
7
home/modules/utils/yazi/theme/tasks.nix
Normal file
@@ -0,0 +1,7 @@
|
||||
{
|
||||
programs.yazi.theme.tasks = {
|
||||
border = {fg = "#504945";};
|
||||
title = {};
|
||||
hovered = {underline = true;};
|
||||
};
|
||||
}
|
||||
10
home/modules/utils/yazi/theme/which.nix
Normal file
10
home/modules/utils/yazi/theme/which.nix
Normal file
@@ -0,0 +1,10 @@
|
||||
{
|
||||
programs.yazi.theme.which = {
|
||||
mask = {bg = "#3c3836";};
|
||||
cand = {fg = "#83a598";};
|
||||
rest = {fg = "#928374";};
|
||||
desc = {fg = "#fe8019";};
|
||||
separator = " ";
|
||||
separator_style = {fg = "#504945";};
|
||||
};
|
||||
}
|
||||
48
home/modules/wm/hyprland/adam/appearance.nix
Normal file
48
home/modules/wm/hyprland/adam/appearance.nix
Normal file
@@ -0,0 +1,48 @@
|
||||
{
|
||||
wayland.windowManager.hyprland.settings = {
|
||||
general = {
|
||||
gaps_in = 2;
|
||||
gaps_out = 4;
|
||||
border_size = 3;
|
||||
#col.active_border = rgba(33ccffee) rgba(00ff99ee) 45deg
|
||||
#col.inactive_border = rgba(595959aa)
|
||||
"col.active_border" = "rgb(4c7a5d)"; # rgba(b16286ee) 45deg
|
||||
"col.inactive_border" = "rgb(504945)";
|
||||
layout = "dwindle";
|
||||
allow_tearing = false;
|
||||
resize_on_border = true;
|
||||
};
|
||||
decoration = {
|
||||
rounding = 0;
|
||||
blur = {
|
||||
enabled = true;
|
||||
size = 8;
|
||||
passes = 1;
|
||||
vibrancy = 0.1696;
|
||||
};
|
||||
drop_shadow = false;
|
||||
shadow_range = 4;
|
||||
shadow_render_power = 3;
|
||||
# col.shadow = rgba(1a1a1aee)
|
||||
};
|
||||
animations = {
|
||||
enabled = true;
|
||||
bezier = [
|
||||
"myBezier,0.05, 0.9, 0.1, 1.05"
|
||||
];
|
||||
animation = [
|
||||
"windows, 1, 3, myBezier"
|
||||
"windowsOut, 1, 3, default, popin 80%"
|
||||
"border, 1, 3, default"
|
||||
"borderangle, 1, 8, default"
|
||||
"fade, 1, 7, default"
|
||||
"workspaces, 1, 3, default"
|
||||
];
|
||||
};
|
||||
dwindle = {
|
||||
# See https://wiki.hyprland.org/Configuring/Dwindle-Layout/ for more
|
||||
pseudotile = true; # master switch for pseudotiling. Enabling is bound to mainMod + P in the keybinds section below
|
||||
preserve_split = true; # you probably want this
|
||||
};
|
||||
};
|
||||
}
|
||||
23
home/modules/wm/hyprland/adam/default.nix
Normal file
23
home/modules/wm/hyprland/adam/default.nix
Normal file
@@ -0,0 +1,23 @@
|
||||
{inputs, ...}: {
|
||||
imports = [
|
||||
inputs.hyprland.homeManagerModules.default
|
||||
./appearance.nix
|
||||
./inputs.nix
|
||||
./keybinds.nix
|
||||
./rules.nix
|
||||
./startup.nix
|
||||
];
|
||||
config = {
|
||||
wayland.windowManager.hyprland = {
|
||||
enable = true;
|
||||
xwayland.enable = true;
|
||||
systemd = {
|
||||
variables = ["--all"];
|
||||
extraCommands = [
|
||||
"systemctl --user stop graphical-session.target"
|
||||
"systemctl --user start hyprland-session.target"
|
||||
];
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
75
home/modules/wm/hyprland/adam/inputs.nix
Normal file
75
home/modules/wm/hyprland/adam/inputs.nix
Normal file
@@ -0,0 +1,75 @@
|
||||
{
|
||||
wayland.windowManager.hyprland.settings = {
|
||||
monitor = [
|
||||
"DP-3, 2560x1440@143.86, auto, auto"
|
||||
"eDP-1,1920x1200@60.02,auto,1"
|
||||
];
|
||||
env = [
|
||||
"QT_WAYLAND_DISABLE_WINDOWDECORATION,1"
|
||||
];
|
||||
|
||||
input = {
|
||||
follow_mouse = 1;
|
||||
accel_profile = "flat";
|
||||
sensitivity = 0; # -1.0 - 1.0, 0 means no modification.
|
||||
|
||||
touchpad = {
|
||||
natural_scroll = true;
|
||||
disable_while_typing = true;
|
||||
clickfinger_behavior = true;
|
||||
scroll_factor = 0.5;
|
||||
};
|
||||
};
|
||||
# Desktop keyboard
|
||||
device = [
|
||||
{
|
||||
name = "pfu-limited-hhkb-hybrid";
|
||||
kb_layout = "hhkbse";
|
||||
kb_options = "lv3:rwin_switch";
|
||||
}
|
||||
{
|
||||
name = "hhkb-hybrid_1-keyboard";
|
||||
kb_layout = "hhkbse";
|
||||
kb_options = "lv3:rwin_switch";
|
||||
}
|
||||
# Laptop keyboard
|
||||
{
|
||||
name = "at-translated-set-2-keyboard";
|
||||
kb_layout = "se";
|
||||
kb_options = "ctrl:swapcaps";
|
||||
}
|
||||
];
|
||||
gestures = {
|
||||
workspace_swipe = true;
|
||||
workspace_swipe_distance = 400;
|
||||
workspace_swipe_fingers = 3;
|
||||
workspace_swipe_cancel_ratio = 0.2;
|
||||
workspace_swipe_min_speed_to_force = 5;
|
||||
workspace_swipe_direction_lock = true;
|
||||
workspace_swipe_direction_lock_threshold = 10;
|
||||
workspace_swipe_create_new = true;
|
||||
};
|
||||
misc = {
|
||||
vrr = 2;
|
||||
mouse_move_enables_dpms = 1;
|
||||
key_press_enables_dpms = 0;
|
||||
force_default_wallpaper = 0;
|
||||
disable_hyprland_logo = true;
|
||||
disable_splash_rendering = true;
|
||||
disable_autoreload = true;
|
||||
};
|
||||
xwayland = {
|
||||
force_zero_scaling = false;
|
||||
};
|
||||
render = {
|
||||
# explicit_sync = 2;
|
||||
# explicit_sync_kms = 2;
|
||||
# direct_scanout = false;
|
||||
};
|
||||
# cursor = {
|
||||
# no_hardware_cursors = true;
|
||||
# no_break_fs_vrr = true;
|
||||
# min_refresh_rate = 24;
|
||||
# };
|
||||
};
|
||||
}
|
||||
101
home/modules/wm/hyprland/adam/keybinds.nix
Normal file
101
home/modules/wm/hyprland/adam/keybinds.nix
Normal file
@@ -0,0 +1,101 @@
|
||||
# KEYBINDS
|
||||
{
|
||||
wayland.windowManager.hyprland.settings = {
|
||||
"$terminal" = "kitty";
|
||||
"$fileManager" = "thunar";
|
||||
"$passwordManager" = "keepassxc";
|
||||
"$menu" = "pkill anyrun || anyrun | xargs hyprctl dispatch exec --";
|
||||
"$menuw" = "pkill anyrun || anyrun | xargs hyprctl dispatch exec --";
|
||||
"$browser" = "firefox-nightly";
|
||||
"$browserinc" = "firefox-nightly --private-window";
|
||||
"$yazi" = "alacritty -e yazi";
|
||||
|
||||
# See https://wiki.hyprland.org/Configuring/Keywords/ for more
|
||||
"$mod" = "SUPER";
|
||||
|
||||
bind = [
|
||||
# Custom binds
|
||||
"$mod SHIFT, B, exec, pkill -SIGUSR2 waybar" # Reload waybar
|
||||
|
||||
# Example binds, see https://wiki.hyprland.org/Configuring/Binds/ for more
|
||||
"$mod, A, exec, pkill -SIGUSR1 waybar"
|
||||
"$mod, T, exec, $terminal"
|
||||
"$mod, W, exec, $browser"
|
||||
"$mod, K, exec, $passwordManager"
|
||||
"$mod SHIFT, W, exec, $browserinc"
|
||||
"$mod, Q, killactive,"
|
||||
#bind = $mod, M, exec, hyprctl dispatch exit
|
||||
#bind = $mod, E, exec, $fileManager
|
||||
"$mod, E, exec, $fileManager"
|
||||
"$mod SHIFT, E, exec, $yazi"
|
||||
"$mod, F, fullscreen,"
|
||||
"$mod SHIFT, F, togglefloating,"
|
||||
"$mod, SPACE, exec, $menu"
|
||||
"$mod, P, pseudo," # dwindle
|
||||
"$mod, J, togglesplit," # dwindle
|
||||
"$mod, C, exec, hyprctl dispatch exec copyq toggle"
|
||||
"$mod, TAB, exec, $menuw"
|
||||
|
||||
# Move focus with mainMod + arrow keys
|
||||
"$mod, left, movefocus, l"
|
||||
"$mod, right, movefocus, r"
|
||||
"$mod, up, movefocus, u"
|
||||
"$mod, down, movefocus, d"
|
||||
|
||||
# Switch workspaces with mainMod + [0-9]
|
||||
"$mod, 1, workspace, 1"
|
||||
"$mod, 2, workspace, 2"
|
||||
"$mod, 3, workspace, 3"
|
||||
"$mod, 4, workspace, 4"
|
||||
"$mod, 5, workspace, 5"
|
||||
"$mod, 6, workspace, 6"
|
||||
"$mod, 7, workspace, 7"
|
||||
"$mod, 8, workspace, 8"
|
||||
"$mod, 9, workspace, 9"
|
||||
"$mod, 0, workspace, 10"
|
||||
|
||||
# Move active window to a workspace with mainMod + SHIFT + [0-9]
|
||||
"$mod SHIFT, 1, movetoworkspace, 1"
|
||||
"$mod SHIFT, 2, movetoworkspace, 2"
|
||||
"$mod SHIFT, 3, movetoworkspace, 3"
|
||||
"$mod SHIFT, 4, movetoworkspace, 4"
|
||||
"$mod SHIFT, 5, movetoworkspace, 5"
|
||||
"$mod SHIFT, 6, movetoworkspace, 6"
|
||||
"$mod SHIFT, 7, movetoworkspace, 7"
|
||||
"$mod SHIFT, 8, movetoworkspace, 8"
|
||||
"$mod SHIFT, 9, movetoworkspace, 9"
|
||||
"$mod SHIFT, 0, movetoworkspace, 10"
|
||||
|
||||
# Laptop controls
|
||||
",XF86AudioLowerVolume, exec, pamixer -d 5"
|
||||
",XF86AudioRaiseVolume, exec, pamixer -i 5"
|
||||
",XF86AudioMute, exec, pamixer -m"
|
||||
",XF86AudioMicMute, exec, pactl -- set-source-mute 0 toggle"
|
||||
",XF86MonBrightnessDown, exec, brightnessctl s 10%-"
|
||||
",XF86MonBrightnessUp, exec, brightnessctl s +10%"
|
||||
|
||||
"$mod, XF86MonBrightnessUp, exec, hyprctl dispatch dpms on"
|
||||
"$mod, XF86MonBrightnessDown, exec, hyprctl dispatch dpms off"
|
||||
|
||||
# Screenshot a window
|
||||
"$mod, F10, exec, hyprshot -m window"
|
||||
# Screenshot a monitor
|
||||
", F10, exec, hyprshot -m output"
|
||||
# Screenshot a region
|
||||
"$mod SHIFT, F10, exec, hyprshot -m region"
|
||||
|
||||
# Example special workspace (scratchpad)
|
||||
"$mod, S, togglespecialworkspace, magic"
|
||||
"$mod SHIFT, S, movetoworkspace, special:magic"
|
||||
|
||||
# Scroll through existing workspaces with mainMod + scroll
|
||||
# bind = $mod, mouse_down, workspace, e+1
|
||||
# bind = $mod, mouse_up, workspace, e-1
|
||||
];
|
||||
# Move/resize windows with mainMod + LMB/RMB and dragging
|
||||
bindm = [
|
||||
"$mod, mouse:272, movewindow"
|
||||
"$mod, mouse:273, resizewindow"
|
||||
];
|
||||
};
|
||||
}
|
||||
44
home/modules/wm/hyprland/adam/rules.nix
Normal file
44
home/modules/wm/hyprland/adam/rules.nix
Normal file
@@ -0,0 +1,44 @@
|
||||
{
|
||||
wayland.windowManager.hyprland.settings = {
|
||||
# CALCURSE SETTINGS
|
||||
windowrulev2 = [
|
||||
"float,initialTitle:(floatcal)"
|
||||
"size 843 650,initialTitle:(floatcal)"
|
||||
"move 100%-w-20 40,initialTitle:(floatcal)"
|
||||
#windowrulev2 = move 1708 32,class:(floatcal)
|
||||
|
||||
# RANGER/NNN SETTINGS
|
||||
"float,class:(floatranger)"
|
||||
"float,class:(floatnnn)"
|
||||
#windowrulev2 = size 843 650,class:(floatranger)
|
||||
#windowrulev2 = move 1708 32,class:(floatranger)
|
||||
#windowrulev2 = move 1708 32;size 843 650;dimaround;float,class:^(kitty)$,title:^(kitty)$
|
||||
# See https://wiki.hyprland.org/Configuring/Window-Rules/ for more
|
||||
"suppressevent maximize, class:.* # You'll probably like this."
|
||||
#windowrulev2 = noshadow, floating:0
|
||||
"float,class:^(org.keepassxc.KeePassXC)$"
|
||||
"center,class:^(org.keepassxc.KeePassXC)$"
|
||||
"float,class:^(imv)$"
|
||||
"float,class:^(com.github.hluk.copyq)$"
|
||||
"float,class:^(blueman-manager)$"
|
||||
"center,class:^(nwg-look)$"
|
||||
"float,class:^(nwg-look)$"
|
||||
"float,class:^(Lxappearance)$"
|
||||
"float,class:(pavucontrol)$"
|
||||
"move 100%-w-20 40,class:(pavucontrol)$"
|
||||
"float,class:^(polkit-gnome-authentication-agent-1)$"
|
||||
"float,class:^(org.gnome.Calculator)$"
|
||||
"size 741 585,class:(pavucontrol)$"
|
||||
"float,class:^(cnst.test)$"
|
||||
"float,class:^(org.corectrl.CoreCtrl)$"
|
||||
"float,class:^(feh)$"
|
||||
"float,class:^(com.example.gtk-adieux)$"
|
||||
];
|
||||
windowrule = [
|
||||
"center, ^(xarchiver)$"
|
||||
"float, ^(xarchiver)$"
|
||||
"float, ^(org.gnome.FileRoller)$"
|
||||
"float, ^(org.freedesktop.impl.portal.desktop.kde)$"
|
||||
];
|
||||
};
|
||||
}
|
||||
20
home/modules/wm/hyprland/adam/startup.nix
Normal file
20
home/modules/wm/hyprland/adam/startup.nix
Normal file
@@ -0,0 +1,20 @@
|
||||
{
|
||||
wayland.windowManager.hyprland.settings = {
|
||||
exec-once = [
|
||||
# STARTUP
|
||||
# exec-once = systemctl --user import-environment WAYLAND_DISPLAY XDG_CURRENT_DESKTOP
|
||||
"systemctl --user start polkit-gnome-authentication-agent-1"
|
||||
# exec-once = lxqt-policykit-agent &
|
||||
"waybar"
|
||||
"pamixer --set-volume 50"
|
||||
"blueman-applet & udiskie -Nt"
|
||||
"nm-applet --indicator"
|
||||
"mullvad-vpn"
|
||||
# exec-once = swaybg -i ~/media/images/wallpaper.png
|
||||
"wl-clip-persist --clipboard regular --all-mime-type-regex '^(?!x-kde-passwordManagerHint).+'"
|
||||
# exec-once = hyprctl dispatch exec "sleep 4s && copyq --start-server"
|
||||
"hyprctl dispatch exec 'sleep 5s && keepassxc'"
|
||||
"hyprctl dispatch exec 'sleep 3s && solaar -w hide'"
|
||||
];
|
||||
};
|
||||
}
|
||||
60
home/modules/wm/hyprland/cnst/appearance.nix
Normal file
60
home/modules/wm/hyprland/cnst/appearance.nix
Normal file
@@ -0,0 +1,60 @@
|
||||
{
|
||||
lib,
|
||||
config,
|
||||
...
|
||||
}: let
|
||||
inherit (lib) mkIf mkEnableOption;
|
||||
cfg = config.modules.wm.hyprland.cnst.appearance;
|
||||
in {
|
||||
options = {
|
||||
modules.wm.hyprland.cnst.appearance.enable = mkEnableOption "Enables appearance settings in Hyprland";
|
||||
};
|
||||
config = mkIf cfg.enable {
|
||||
wayland.windowManager.hyprland.settings = {
|
||||
general = {
|
||||
gaps_in = 2;
|
||||
gaps_out = 4;
|
||||
border_size = 3;
|
||||
#col.active_border = rgba(33ccffee) rgba(00ff99ee) 45deg
|
||||
#col.inactive_border = rgba(595959aa)
|
||||
"col.active_border" = "rgb(4c7a5d)"; # rgba(b16286ee) 45deg
|
||||
"col.inactive_border" = "rgb(504945)";
|
||||
layout = "dwindle";
|
||||
allow_tearing = false;
|
||||
resize_on_border = true;
|
||||
};
|
||||
decoration = {
|
||||
rounding = 0;
|
||||
blur = {
|
||||
enabled = true;
|
||||
size = 8;
|
||||
passes = 1;
|
||||
vibrancy = 0.1696;
|
||||
};
|
||||
drop_shadow = false;
|
||||
shadow_range = 4;
|
||||
shadow_render_power = 3;
|
||||
# col.shadow = rgba(1a1a1aee)
|
||||
};
|
||||
animations = {
|
||||
enabled = true;
|
||||
bezier = [
|
||||
"myBezier,0.05, 0.9, 0.1, 1.05"
|
||||
];
|
||||
animation = [
|
||||
"windows, 1, 3, myBezier"
|
||||
"windowsOut, 1, 3, default, popin 80%"
|
||||
"border, 1, 3, default"
|
||||
"borderangle, 1, 8, default"
|
||||
"fade, 1, 7, default"
|
||||
"workspaces, 1, 3, default"
|
||||
];
|
||||
};
|
||||
dwindle = {
|
||||
# See https://wiki.hyprland.org/Configuring/Dwindle-Layout/ for more
|
||||
pseudotile = true; # master switch for pseudotiling. Enabling is bound to mainMod + P in the keybinds section below
|
||||
preserve_split = true; # you probably want this
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
44
home/modules/wm/hyprland/cnst/default.nix
Normal file
44
home/modules/wm/hyprland/cnst/default.nix
Normal file
@@ -0,0 +1,44 @@
|
||||
{
|
||||
inputs,
|
||||
config,
|
||||
lib,
|
||||
pkgs,
|
||||
userModules,
|
||||
...
|
||||
}: let
|
||||
inherit (lib) mkIf mkEnableOption mkDefault;
|
||||
cfg = config.modules.wm.hyprland.cnst;
|
||||
in {
|
||||
imports = [
|
||||
"${userModules}/wm/hyprland/cnst/appearance.nix"
|
||||
"${userModules}/wm/hyprland/cnst/inputs.nix"
|
||||
"${userModules}/wm/hyprland/cnst/keybinds.nix"
|
||||
"${userModules}/wm/hyprland/cnst/rules.nix"
|
||||
"${userModules}/wm/hyprland/cnst/startup.nix"
|
||||
];
|
||||
|
||||
options = {
|
||||
modules.wm.hyprland.cnst.enable = mkEnableOption "Enable Hyprland";
|
||||
};
|
||||
|
||||
config = mkIf cfg.enable {
|
||||
modules.wm.hyprland.cnst = {
|
||||
appearance.enable = mkDefault cfg.enable;
|
||||
inputs.enable = mkDefault cfg.enable;
|
||||
keybinds.enable = mkDefault cfg.enable;
|
||||
rules.enable = mkDefault cfg.enable;
|
||||
startup.enable = mkDefault cfg.enable;
|
||||
};
|
||||
wayland.windowManager.hyprland = {
|
||||
enable = true;
|
||||
package = inputs.hyprland.packages.${pkgs.system}.default;
|
||||
systemd = {
|
||||
variables = ["--all"];
|
||||
extraCommands = [
|
||||
"systemctl --user stop graphical-session.target"
|
||||
"systemctl --user start hyprland-session.target"
|
||||
];
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
87
home/modules/wm/hyprland/cnst/inputs.nix
Normal file
87
home/modules/wm/hyprland/cnst/inputs.nix
Normal file
@@ -0,0 +1,87 @@
|
||||
{
|
||||
lib,
|
||||
config,
|
||||
...
|
||||
}: let
|
||||
inherit (lib) mkIf mkEnableOption;
|
||||
cfg = config.modules.wm.hyprland.cnst.inputs;
|
||||
in {
|
||||
options = {
|
||||
modules.wm.hyprland.cnst.inputs.enable = mkEnableOption "Enables input settings in Hyprland";
|
||||
};
|
||||
config = mkIf cfg.enable {
|
||||
wayland.windowManager.hyprland.settings = {
|
||||
monitor = [
|
||||
"DP-3, 2560x1440@143.86, auto, auto"
|
||||
"eDP-1,1920x1200@60.02,auto,1"
|
||||
];
|
||||
env = [
|
||||
"QT_WAYLAND_DISABLE_WINDOWDECORATION,1"
|
||||
];
|
||||
|
||||
input = {
|
||||
follow_mouse = 1;
|
||||
accel_profile = "flat";
|
||||
sensitivity = 0; # -1.0 - 1.0, 0 means no modification.
|
||||
|
||||
touchpad = {
|
||||
natural_scroll = true;
|
||||
disable_while_typing = true;
|
||||
clickfinger_behavior = true;
|
||||
scroll_factor = 0.5;
|
||||
};
|
||||
};
|
||||
# Desktop keyboard
|
||||
device = [
|
||||
{
|
||||
name = "pfu-limited-hhkb-hybrid";
|
||||
kb_layout = "hhkbse";
|
||||
kb_options = "lv3:rwin_switch";
|
||||
}
|
||||
{
|
||||
name = "hhkb-hybrid_1-keyboard";
|
||||
kb_layout = "hhkbse";
|
||||
kb_options = "lv3:rwin_switch";
|
||||
}
|
||||
# Laptop keyboard
|
||||
{
|
||||
name = "at-translated-set-2-keyboard";
|
||||
kb_layout = "se";
|
||||
kb_options = "ctrl:swapcaps";
|
||||
}
|
||||
];
|
||||
gestures = {
|
||||
workspace_swipe = true;
|
||||
workspace_swipe_distance = 400;
|
||||
workspace_swipe_fingers = 3;
|
||||
workspace_swipe_cancel_ratio = 0.2;
|
||||
workspace_swipe_min_speed_to_force = 5;
|
||||
workspace_swipe_direction_lock = true;
|
||||
workspace_swipe_direction_lock_threshold = 10;
|
||||
workspace_swipe_create_new = true;
|
||||
};
|
||||
misc = {
|
||||
vrr = 2;
|
||||
mouse_move_enables_dpms = 1;
|
||||
key_press_enables_dpms = 0;
|
||||
force_default_wallpaper = 0;
|
||||
disable_hyprland_logo = true;
|
||||
disable_splash_rendering = true;
|
||||
disable_autoreload = true;
|
||||
};
|
||||
xwayland = {
|
||||
force_zero_scaling = false;
|
||||
};
|
||||
render = {
|
||||
explicit_sync = 2;
|
||||
explicit_sync_kms = 2;
|
||||
direct_scanout = false;
|
||||
};
|
||||
# cursor = {
|
||||
# no_hardware_cursors = true;
|
||||
# no_break_fs_vrr = true;
|
||||
# min_refresh_rate = 24;
|
||||
# };
|
||||
};
|
||||
};
|
||||
}
|
||||
116
home/modules/wm/hyprland/cnst/keybinds.nix
Normal file
116
home/modules/wm/hyprland/cnst/keybinds.nix
Normal file
@@ -0,0 +1,116 @@
|
||||
{
|
||||
lib,
|
||||
config,
|
||||
pkgs,
|
||||
...
|
||||
}: let
|
||||
inherit (lib) mkIf mkEnableOption;
|
||||
cfg = config.modules.wm.hyprland.cnst.keybinds;
|
||||
in {
|
||||
options = {
|
||||
modules.wm.hyprland.cnst.keybinds.enable = mkEnableOption "Enables keybind settings in Hyprland";
|
||||
};
|
||||
config = mkIf cfg.enable {
|
||||
wayland.windowManager.hyprland.settings = {
|
||||
"$terminal" = "kitty";
|
||||
"$fileManager" = "thunar";
|
||||
"$passwordManager" = "keepassxc";
|
||||
"$menu" = "pkill anyrun || anyrun | xargs hyprctl dispatch exec --";
|
||||
"$menuw" = "pkill anyrun || anyrun | xargs hyprctl dispatch exec --";
|
||||
"$browser" = "firefox";
|
||||
"$browserinc" = "firefox --private-window";
|
||||
"$yazi" = "alacritty -e yazi";
|
||||
|
||||
# See https://wiki.hyprland.org/Configuring/Keywords/ for more
|
||||
"$mod" = "SUPER";
|
||||
|
||||
bind = let
|
||||
grimblast = lib.getExe pkgs.grimblast;
|
||||
tesseract = lib.getExe pkgs.tesseract;
|
||||
notify-send = lib.getExe' pkgs.libnotify "notify-send";
|
||||
in [
|
||||
# Custom binds
|
||||
"$mod SHIFT, B, exec, pkill -SIGUSR2 waybar" # Reload waybar
|
||||
|
||||
# Example binds, see https://wiki.hyprland.org/Configuring/Binds/ for more
|
||||
"$mod, A, exec, pkill -SIGUSR1 waybar"
|
||||
"$mod, T, exec, $terminal"
|
||||
"$mod, W, exec, $browser"
|
||||
"$mod, K, exec, $passwordManager"
|
||||
"$mod SHIFT, W, exec, $browserinc"
|
||||
"$mod, Q, killactive,"
|
||||
#bind = $mod, M, exec, hyprctl dispatch exit
|
||||
#bind = $mod, E, exec, $fileManager
|
||||
"$mod, E, exec, $fileManager"
|
||||
"$mod SHIFT, E, exec, $yazi"
|
||||
"$mod, F, fullscreen,"
|
||||
"$mod SHIFT, F, togglefloating,"
|
||||
"$mod, SPACE, exec, $menu"
|
||||
"$mod, P, pseudo," # dwindle
|
||||
"$mod, J, togglesplit," # dwindle
|
||||
"$mod, C, exec, hyprctl dispatch exec copyq toggle"
|
||||
"$mod, TAB, exec, $menuw"
|
||||
|
||||
# Move focus with mainMod + arrow keys
|
||||
"$mod, left, movefocus, l"
|
||||
"$mod, right, movefocus, r"
|
||||
"$mod, up, movefocus, u"
|
||||
"$mod, down, movefocus, d"
|
||||
|
||||
# Switch workspaces with mainMod + [0-9]
|
||||
"$mod, 1, workspace, 1"
|
||||
"$mod, 2, workspace, 2"
|
||||
"$mod, 3, workspace, 3"
|
||||
"$mod, 4, workspace, 4"
|
||||
"$mod, 5, workspace, 5"
|
||||
"$mod, 6, workspace, 6"
|
||||
"$mod, 7, workspace, 7"
|
||||
"$mod, 8, workspace, 8"
|
||||
"$mod, 9, workspace, 9"
|
||||
"$mod, 0, workspace, 10"
|
||||
|
||||
# Move active window to a workspace with mainMod + SHIFT + [0-9]
|
||||
"$mod SHIFT, 1, movetoworkspace, 1"
|
||||
"$mod SHIFT, 2, movetoworkspace, 2"
|
||||
"$mod SHIFT, 3, movetoworkspace, 3"
|
||||
"$mod SHIFT, 4, movetoworkspace, 4"
|
||||
"$mod SHIFT, 5, movetoworkspace, 5"
|
||||
"$mod SHIFT, 6, movetoworkspace, 6"
|
||||
"$mod SHIFT, 7, movetoworkspace, 7"
|
||||
"$mod SHIFT, 8, movetoworkspace, 8"
|
||||
"$mod SHIFT, 9, movetoworkspace, 9"
|
||||
"$mod SHIFT, 0, movetoworkspace, 10"
|
||||
|
||||
# Laptop controls
|
||||
",XF86AudioLowerVolume, exec, pamixer -d 5"
|
||||
",XF86AudioRaiseVolume, exec, pamixer -i 5"
|
||||
",XF86AudioMute, exec, pamixer -m"
|
||||
",XF86AudioMicMute, exec, pactl -- set-source-mute 0 toggle"
|
||||
",XF86MonBrightnessDown, exec, brightnessctl s 10%-"
|
||||
",XF86MonBrightnessUp, exec, brightnessctl s +10%"
|
||||
|
||||
"$mod, XF86MonBrightnessUp, exec, hyprctl dispatch dpms on"
|
||||
"$mod, XF86MonBrightnessDown, exec, hyprctl dispatch dpms off"
|
||||
|
||||
# Screenshotting
|
||||
",Insert,exec,${grimblast} --notify --freeze copysave area"
|
||||
"SHIFT,Insert,exec,${grimblast} --notify --freeze copysave output"
|
||||
# To OCR
|
||||
"ALT,Insert,exec,${grimblast} --freeze save area - | ${tesseract} - - | wl-copy && ${notify-send} -t 3000 'OCR result copied to buffer'"
|
||||
|
||||
# Example special workspace (scratchpad)
|
||||
"$mod, S, togglespecialworkspace, magic"
|
||||
"$mod SHIFT, S, movetoworkspace, special:magic"
|
||||
|
||||
# Scroll through existing workspaces with mainMod + scroll
|
||||
# bind = $mod, mouse_down, workspace, e+1
|
||||
# bind = $mod, mouse_up, workspace, e-1
|
||||
];
|
||||
# Move/resize windows with mainMod + LMB/RMB and dragging
|
||||
bindm = [
|
||||
"$mod, mouse:272, movewindow"
|
||||
"$mod, mouse:273, resizewindow"
|
||||
];
|
||||
};
|
||||
};
|
||||
}
|
||||
56
home/modules/wm/hyprland/cnst/rules.nix
Normal file
56
home/modules/wm/hyprland/cnst/rules.nix
Normal file
@@ -0,0 +1,56 @@
|
||||
{
|
||||
lib,
|
||||
config,
|
||||
...
|
||||
}: let
|
||||
inherit (lib) mkIf mkEnableOption;
|
||||
cfg = config.modules.wm.hyprland.cnst.rules;
|
||||
in {
|
||||
options = {
|
||||
modules.wm.hyprland.cnst.rules.enable = mkEnableOption "Enables window rule settings in Hyprland";
|
||||
};
|
||||
config = mkIf cfg.enable {
|
||||
wayland.windowManager.hyprland.settings = {
|
||||
# CALCURSE SETTINGS
|
||||
windowrulev2 = [
|
||||
"float,initialTitle:(floatcal)"
|
||||
"size 843 650,initialTitle:(floatcal)"
|
||||
"move 100%-w-20 40,initialTitle:(floatcal)"
|
||||
#windowrulev2 = move 1708 32,class:(floatcal)
|
||||
|
||||
# RANGER/NNN SETTINGS
|
||||
"float,class:(floatranger)"
|
||||
"float,class:(floatnnn)"
|
||||
#windowrulev2 = size 843 650,class:(floatranger)
|
||||
#windowrulev2 = move 1708 32,class:(floatranger)
|
||||
#windowrulev2 = move 1708 32;size 843 650;dimaround;float,class:^(kitty)$,title:^(kitty)$
|
||||
# See https://wiki.hyprland.org/Configuring/Window-Rules/ for more
|
||||
"suppressevent maximize, class:.* # You'll probably like this."
|
||||
#windowrulev2 = noshadow, floating:0
|
||||
"float,class:^(org.keepassxc.KeePassXC)$"
|
||||
"center,class:^(org.keepassxc.KeePassXC)$"
|
||||
"float,class:^(imv)$"
|
||||
"float,class:^(com.github.hluk.copyq)$"
|
||||
"float,class:^(blueman-manager)$"
|
||||
"center,class:^(nwg-look)$"
|
||||
"float,class:^(nwg-look)$"
|
||||
"float,class:^(Lxappearance)$"
|
||||
"float,class:(pavucontrol)$"
|
||||
"move 100%-w-20 40,class:(pavucontrol)$"
|
||||
"float,class:^(polkit-gnome-authentication-agent-1)$"
|
||||
"float,class:^(org.gnome.Calculator)$"
|
||||
"size 741 585,class:(pavucontrol)$"
|
||||
"float,class:^(cnst.test)$"
|
||||
"float,class:^(org.corectrl.CoreCtrl)$"
|
||||
"float,class:^(feh)$"
|
||||
"float,class:^(com.example.gtk-adieux)$"
|
||||
];
|
||||
windowrule = [
|
||||
"center, ^(xarchiver)$"
|
||||
"float, ^(xarchiver)$"
|
||||
"float, ^(org.gnome.FileRoller)$"
|
||||
"float, ^(org.freedesktop.impl.portal.desktop.kde)$"
|
||||
];
|
||||
};
|
||||
};
|
||||
}
|
||||
32
home/modules/wm/hyprland/cnst/startup.nix
Normal file
32
home/modules/wm/hyprland/cnst/startup.nix
Normal file
@@ -0,0 +1,32 @@
|
||||
{
|
||||
lib,
|
||||
config,
|
||||
...
|
||||
}: let
|
||||
inherit (lib) mkIf mkEnableOption;
|
||||
cfg = config.modules.wm.hyprland.cnst.startup;
|
||||
in {
|
||||
options = {
|
||||
modules.wm.hyprland.cnst.startup.enable = mkEnableOption "Enables startup settings in Hyprland";
|
||||
};
|
||||
config = mkIf cfg.enable {
|
||||
wayland.windowManager.hyprland.settings = {
|
||||
exec-once = [
|
||||
# STARTUP
|
||||
# exec-once = systemctl --user import-environment WAYLAND_DISPLAY XDG_CURRENT_DESKTOP
|
||||
"systemctl --user start polkit-gnome-authentication-agent-1"
|
||||
# exec-once = lxqt-policykit-agent &
|
||||
"waybar"
|
||||
"pamixer --set-volume 50"
|
||||
"blueman-applet & udiskie -Nt"
|
||||
"nm-applet --indicator"
|
||||
"mullvad-vpn"
|
||||
# exec-once = swaybg -i ~/media/images/wallpaper.png
|
||||
"wl-clip-persist --clipboard regular --all-mime-type-regex '^(?!x-kde-passwordManagerHint).+'"
|
||||
# exec-once = hyprctl dispatch exec "sleep 4s && copyq --start-server"
|
||||
"hyprctl dispatch exec 'sleep 5s && keepassxc'"
|
||||
"hyprctl dispatch exec 'sleep 3s && solaar -w hide'"
|
||||
];
|
||||
};
|
||||
};
|
||||
}
|
||||
7
home/modules/wm/hyprland/default.nix
Normal file
7
home/modules/wm/hyprland/default.nix
Normal file
@@ -0,0 +1,7 @@
|
||||
{userModules, ...}: {
|
||||
imports = [
|
||||
"${userModules}/wm/hyprland/cnst"
|
||||
"${userModules}/wm/hyprland/toothpick"
|
||||
# "${userModules}/wm/hyprland/adam"
|
||||
];
|
||||
}
|
||||
60
home/modules/wm/hyprland/toothpick/appearance.nix
Normal file
60
home/modules/wm/hyprland/toothpick/appearance.nix
Normal file
@@ -0,0 +1,60 @@
|
||||
{
|
||||
lib,
|
||||
config,
|
||||
...
|
||||
}: let
|
||||
inherit (lib) mkIf mkEnableOption;
|
||||
cfg = config.modules.wm.hyprland.toothpick.appearance;
|
||||
in {
|
||||
options = {
|
||||
modules.wm.hyprland.toothpick.appearance.enable = mkEnableOption "Enables appearance settings in Hyprland";
|
||||
};
|
||||
config = mkIf cfg.enable {
|
||||
wayland.windowManager.hyprland.settings = {
|
||||
general = {
|
||||
gaps_in = 2;
|
||||
gaps_out = 4;
|
||||
border_size = 3;
|
||||
#col.active_border = rgba(33ccffee) rgba(00ff99ee) 45deg
|
||||
#col.inactive_border = rgba(595959aa)
|
||||
"col.active_border" = "rgb(4c7a5d)"; # rgba(b16286ee) 45deg
|
||||
"col.inactive_border" = "rgb(504945)";
|
||||
layout = "dwindle";
|
||||
allow_tearing = false;
|
||||
resize_on_border = true;
|
||||
};
|
||||
decoration = {
|
||||
rounding = 0;
|
||||
blur = {
|
||||
enabled = true;
|
||||
size = 8;
|
||||
passes = 1;
|
||||
vibrancy = 0.1696;
|
||||
};
|
||||
drop_shadow = false;
|
||||
shadow_range = 4;
|
||||
shadow_render_power = 3;
|
||||
# col.shadow = rgba(1a1a1aee)
|
||||
};
|
||||
animations = {
|
||||
enabled = true;
|
||||
bezier = [
|
||||
"myBezier,0.05, 0.9, 0.1, 1.05"
|
||||
];
|
||||
animation = [
|
||||
"windows, 1, 3, myBezier"
|
||||
"windowsOut, 1, 3, default, popin 80%"
|
||||
"border, 1, 3, default"
|
||||
"borderangle, 1, 8, default"
|
||||
"fade, 1, 7, default"
|
||||
"workspaces, 1, 3, default"
|
||||
];
|
||||
};
|
||||
dwindle = {
|
||||
# See https://wiki.hyprland.org/Configuring/Dwindle-Layout/ for more
|
||||
pseudotile = true; # master switch for pseudotiling. Enabling is bound to mainMod + P in the keybinds section below
|
||||
preserve_split = true; # you probably want this
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
44
home/modules/wm/hyprland/toothpick/default.nix
Normal file
44
home/modules/wm/hyprland/toothpick/default.nix
Normal file
@@ -0,0 +1,44 @@
|
||||
{
|
||||
inputs,
|
||||
config,
|
||||
lib,
|
||||
pkgs,
|
||||
userModules,
|
||||
...
|
||||
}: let
|
||||
inherit (lib) mkIf mkEnableOption mkDefault;
|
||||
cfg = config.modules.wm.hyprland.toothpick;
|
||||
in {
|
||||
imports = [
|
||||
"${userModules}/wm/hyprland/toothpick/appearance.nix"
|
||||
"${userModules}/wm/hyprland/toothpick/inputs.nix"
|
||||
"${userModules}/wm/hyprland/toothpick/keybinds.nix"
|
||||
"${userModules}/wm/hyprland/toothpick/rules.nix"
|
||||
"${userModules}/wm/hyprland/toothpick/startup.nix"
|
||||
];
|
||||
|
||||
options = {
|
||||
modules.wm.hyprland.toothpick.enable = mkEnableOption "Enable Hyprland";
|
||||
};
|
||||
|
||||
config = mkIf cfg.enable {
|
||||
modules.wm.hyprland.toothpick = {
|
||||
appearance.enable = mkDefault cfg.enable;
|
||||
inputs.enable = mkDefault cfg.enable;
|
||||
keybinds.enable = mkDefault cfg.enable;
|
||||
rules.enable = mkDefault cfg.enable;
|
||||
startup.enable = mkDefault cfg.enable;
|
||||
};
|
||||
wayland.windowManager.hyprland = {
|
||||
enable = true;
|
||||
package = inputs.hyprland.packages.${pkgs.system}.default;
|
||||
systemd = {
|
||||
variables = ["--all"];
|
||||
extraCommands = [
|
||||
"systemctl --user stop graphical-session.target"
|
||||
"systemctl --user start hyprland-session.target"
|
||||
];
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
73
home/modules/wm/hyprland/toothpick/inputs.nix
Normal file
73
home/modules/wm/hyprland/toothpick/inputs.nix
Normal file
@@ -0,0 +1,73 @@
|
||||
{
|
||||
lib,
|
||||
config,
|
||||
...
|
||||
}: let
|
||||
inherit (lib) mkIf mkEnableOption;
|
||||
cfg = config.modules.wm.hyprland.toothpick.inputs;
|
||||
in {
|
||||
options = {
|
||||
modules.wm.hyprland.toothpick.inputs.enable = mkEnableOption "Enables input settings in Hyprland";
|
||||
};
|
||||
config = mkIf cfg.enable {
|
||||
wayland.windowManager.hyprland.settings = {
|
||||
monitor = [
|
||||
"monitor=DVI-D-1,1920x1080@144,auto,1"
|
||||
];
|
||||
env = [
|
||||
"QT_WAYLAND_DISABLE_WINDOWDECORATION,1"
|
||||
];
|
||||
|
||||
input = {
|
||||
follow_mouse = 1;
|
||||
accel_profile = "flat";
|
||||
sensitivity = 0; # -1.0 - 1.0, 0 means no modification.
|
||||
|
||||
touchpad = {
|
||||
natural_scroll = true;
|
||||
disable_while_typing = true;
|
||||
clickfinger_behavior = true;
|
||||
scroll_factor = 0.5;
|
||||
};
|
||||
};
|
||||
# Desktop keyboard
|
||||
device = [
|
||||
{
|
||||
name = "usb-hid-keyboard";
|
||||
kb_layout = "se";
|
||||
}
|
||||
];
|
||||
gestures = {
|
||||
workspace_swipe = true;
|
||||
workspace_swipe_distance = 400;
|
||||
workspace_swipe_fingers = 3;
|
||||
workspace_swipe_cancel_ratio = 0.2;
|
||||
workspace_swipe_min_speed_to_force = 5;
|
||||
workspace_swipe_direction_lock = true;
|
||||
workspace_swipe_direction_lock_threshold = 10;
|
||||
workspace_swipe_create_new = true;
|
||||
};
|
||||
misc = {
|
||||
vrr = 2;
|
||||
mouse_move_enables_dpms = 1;
|
||||
key_press_enables_dpms = 0;
|
||||
force_default_wallpaper = 0;
|
||||
disable_hyprland_logo = true;
|
||||
disable_splash_rendering = true;
|
||||
};
|
||||
xwayland = {
|
||||
force_zero_scaling = false;
|
||||
};
|
||||
render = {
|
||||
explicit_sync = 2;
|
||||
explicit_sync_kms = 2;
|
||||
direct_scanout = false;
|
||||
};
|
||||
cursor = {
|
||||
no_hardware_cursors = true;
|
||||
# no_break_fs_vrr = true;
|
||||
# min_refresh_rate = 60;
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
116
home/modules/wm/hyprland/toothpick/keybinds.nix
Normal file
116
home/modules/wm/hyprland/toothpick/keybinds.nix
Normal file
@@ -0,0 +1,116 @@
|
||||
{
|
||||
lib,
|
||||
config,
|
||||
pkgs,
|
||||
...
|
||||
}: let
|
||||
inherit (lib) mkIf mkEnableOption;
|
||||
cfg = config.modules.wm.hyprland.toothpick.keybinds;
|
||||
in {
|
||||
options = {
|
||||
modules.wm.hyprland.toothpick.keybinds.enable = mkEnableOption "Enables keybind settings in Hyprland";
|
||||
};
|
||||
config = mkIf cfg.enable {
|
||||
wayland.windowManager.hyprland.settings = {
|
||||
"$terminal" = "foot";
|
||||
"$fileManager" = "thunar";
|
||||
"$passwordManager" = "keepassxc";
|
||||
"$menu" = "pkill anyrun || anyrun | xargs hyprctl dispatch exec --";
|
||||
"$menuw" = "pkill anyrun || anyrun | xargs hyprctl dispatch exec --";
|
||||
"$browser" = "firefox";
|
||||
"$browserinc" = "firefox --private-window";
|
||||
"$ranger" = "rangerscript";
|
||||
|
||||
# See https://wiki.hyprland.org/Configuring/Keywords/ for more
|
||||
"$mod" = "ALT_L";
|
||||
|
||||
bind = let
|
||||
grimblast = lib.getExe pkgs.grimblast;
|
||||
tesseract = lib.getExe pkgs.tesseract;
|
||||
notify-send = lib.getExe' pkgs.libnotify "notify-send";
|
||||
in [
|
||||
# Custom binds
|
||||
"$mod SHIFT, B, exec, pkill -SIGUSR2 waybar" # Reload waybar
|
||||
|
||||
# Example binds, see https://wiki.hyprland.org/Configuring/Binds/ for more
|
||||
"$mod, A, exec, pkill -SIGUSR1 waybar"
|
||||
"$mod, T, exec, $terminal"
|
||||
"$mod, W, exec, $browser"
|
||||
"$mod, K, exec, $passwordManager"
|
||||
"$mod SHIFT, W, exec, $browserinc"
|
||||
"$mod, Q, killactive,"
|
||||
#bind = $mod, M, exec, hyprctl dispatch exit
|
||||
#bind = $mod, E, exec, $fileManager
|
||||
"$mod, E, exec, $fileManager"
|
||||
"$mod SHIFT, E, exec, $ranger"
|
||||
"$mod, F, fullscreen,"
|
||||
"$mod SHIFT, F, togglefloating,"
|
||||
"$mod, SPACE, exec, $menu"
|
||||
"$mod, P, pseudo," # dwindle
|
||||
"$mod, J, togglesplit," # dwindle
|
||||
"$mod, C, exec, hyprctl dispatch exec copyq toggle"
|
||||
"$mod, TAB, exec, $menuw"
|
||||
|
||||
# Move focus with mainMod + arrow keys
|
||||
"$mod, left, movefocus, l"
|
||||
"$mod, right, movefocus, r"
|
||||
"$mod, up, movefocus, u"
|
||||
"$mod, down, movefocus, d"
|
||||
|
||||
# Switch workspaces with mainMod + [0-9]
|
||||
"$mod, 1, workspace, 1"
|
||||
"$mod, 2, workspace, 2"
|
||||
"$mod, 3, workspace, 3"
|
||||
"$mod, 4, workspace, 4"
|
||||
"$mod, 5, workspace, 5"
|
||||
"$mod, 6, workspace, 6"
|
||||
"$mod, 7, workspace, 7"
|
||||
"$mod, 8, workspace, 8"
|
||||
"$mod, 9, workspace, 9"
|
||||
"$mod, 0, workspace, 10"
|
||||
|
||||
# Move active window to a workspace with mainMod + SHIFT + [0-9]
|
||||
"$mod SHIFT, 1, movetoworkspace, 1"
|
||||
"$mod SHIFT, 2, movetoworkspace, 2"
|
||||
"$mod SHIFT, 3, movetoworkspace, 3"
|
||||
"$mod SHIFT, 4, movetoworkspace, 4"
|
||||
"$mod SHIFT, 5, movetoworkspace, 5"
|
||||
"$mod SHIFT, 6, movetoworkspace, 6"
|
||||
"$mod SHIFT, 7, movetoworkspace, 7"
|
||||
"$mod SHIFT, 8, movetoworkspace, 8"
|
||||
"$mod SHIFT, 9, movetoworkspace, 9"
|
||||
"$mod SHIFT, 0, movetoworkspace, 10"
|
||||
|
||||
# Laptop controls
|
||||
",XF86AudioLowerVolume, exec, pamixer -d 5"
|
||||
",XF86AudioRaiseVolume, exec, pamixer -i 5"
|
||||
",XF86AudioMute, exec, pamixer -m"
|
||||
",XF86AudioMicMute, exec, pactl -- set-source-mute 0 toggle"
|
||||
",XF86MonBrightnessDown, exec, brightnessctl s 10%-"
|
||||
",XF86MonBrightnessUp, exec, brightnessctl s +10%"
|
||||
|
||||
"$mod, XF86MonBrightnessUp, exec, hyprctl dispatch dpms on"
|
||||
"$mod, XF86MonBrightnessDown, exec, hyprctl dispatch dpms off"
|
||||
|
||||
# Screenshotting
|
||||
",Print,exec,${grimblast} --notify --freeze copysave area"
|
||||
"SHIFT,Print,exec,${grimblast} --notify --freeze copysave output"
|
||||
# To OCR
|
||||
"ALT,Print,exec,${grimblast} --freeze save area - | ${tesseract} - - | wl-copy && ${notify-send} -t 3000 'OCR result copied to buffer'"
|
||||
|
||||
# Example special workspace (scratchpad)
|
||||
"$mod, S, togglespecialworkspace, magic"
|
||||
"$mod SHIFT, S, movetoworkspace, special:magic"
|
||||
|
||||
# Scroll through existing workspaces with mainMod + scroll
|
||||
# bind = $mod, mouse_down, workspace, e+1
|
||||
# bind = $mod, mouse_up, workspace, e-1
|
||||
];
|
||||
# Move/resize windows with mainMod + LMB/RMB and dragging
|
||||
bindm = [
|
||||
"$mod, mouse:272, movewindow"
|
||||
"$mod, mouse:273, resizewindow"
|
||||
];
|
||||
};
|
||||
};
|
||||
}
|
||||
53
home/modules/wm/hyprland/toothpick/rules.nix
Normal file
53
home/modules/wm/hyprland/toothpick/rules.nix
Normal file
@@ -0,0 +1,53 @@
|
||||
{
|
||||
lib,
|
||||
config,
|
||||
...
|
||||
}: let
|
||||
inherit (lib) mkIf mkEnableOption;
|
||||
cfg = config.modules.wm.hyprland.toothpick.rules;
|
||||
in {
|
||||
options = {
|
||||
modules.wm.hyprland.toothpick.rules.enable = mkEnableOption "Enables window rule settings in Hyprland";
|
||||
};
|
||||
config = mkIf cfg.enable {
|
||||
wayland.windowManager.hyprland.settings = {
|
||||
# CALCURSE SETTINGS
|
||||
windowrulev2 = [
|
||||
"float,initialTitle:(floatcal)"
|
||||
"size 843 650,initialTitle:(floatcal)"
|
||||
"move 100%-w-20 40,initialTitle:(floatcal)"
|
||||
#windowrulev2 = move 1708 32,class:(floatcal)
|
||||
|
||||
# RANGER/NNN SETTINGS
|
||||
"float,class:(floatranger)"
|
||||
"float,class:(floatnnn)"
|
||||
#windowrulev2 = size 843 650,class:(floatranger)
|
||||
#windowrulev2 = move 1708 32,class:(floatranger)
|
||||
#windowrulev2 = move 1708 32;size 843 650;dimaround;float,class:^(kitty)$,title:^(kitty)$
|
||||
# See https://wiki.hyprland.org/Configuring/Window-Rules/ for more
|
||||
"suppressevent maximize, class:.* # You'll probably like this."
|
||||
#windowrulev2 = noshadow, floating:0
|
||||
"float,class:^(org.keepassxc.KeePassXC)$"
|
||||
"center,class:^(org.keepassxc.KeePassXC)$"
|
||||
"float,class:^(imv)$"
|
||||
"float,class:^(com.github.hluk.copyq)$"
|
||||
"float,class:^(blueman-manager)$"
|
||||
"center,class:^(nwg-look)$"
|
||||
"float,class:^(nwg-look)$"
|
||||
"float,class:^(Lxappearance)$"
|
||||
"float,class:(pavucontrol)$"
|
||||
"move 100%-w-20 40,class:(pavucontrol)$"
|
||||
"float,class:^(polkit-gnome-authentication-agent-1)$"
|
||||
"float,class:^(org.gnome.Calculator)$"
|
||||
"size 741 585,class:(pavucontrol)$"
|
||||
"float,class:^(org.corectrl.CoreCtrl)$"
|
||||
"float,class:^(feh)$"
|
||||
];
|
||||
windowrule = [
|
||||
"center, ^(xarchiver)$"
|
||||
"float, ^(xarchiver)$"
|
||||
"float, ^(org.gnome.FileRoller)$"
|
||||
];
|
||||
};
|
||||
};
|
||||
}
|
||||
32
home/modules/wm/hyprland/toothpick/startup.nix
Normal file
32
home/modules/wm/hyprland/toothpick/startup.nix
Normal file
@@ -0,0 +1,32 @@
|
||||
{
|
||||
lib,
|
||||
config,
|
||||
...
|
||||
}: let
|
||||
inherit (lib) mkIf mkEnableOption;
|
||||
cfg = config.modules.wm.hyprland.toothpick.startup;
|
||||
in {
|
||||
options = {
|
||||
modules.wm.hyprland.toothpick.startup.enable = mkEnableOption "Enables startup settings in Hyprland";
|
||||
};
|
||||
config = mkIf cfg.enable {
|
||||
wayland.windowManager.hyprland.settings = {
|
||||
exec-once = [
|
||||
# STARTUP
|
||||
# exec-once = systemctl --user import-environment WAYLAND_DISPLAY XDG_CURRENT_DESKTOP
|
||||
"systemctl --user start polkit-gnome-authentication-agent-1"
|
||||
# exec-once = lxqt-policykit-agent &
|
||||
"waybar"
|
||||
"pamixer --set-volume 50"
|
||||
"blueman-applet & udiskie -Nt"
|
||||
"nm-applet --indicator"
|
||||
"mullvad-vpn"
|
||||
# exec-once = swaybg -i ~/media/images/wallpaper.png
|
||||
"wl-clip-persist --clipboard regular --all-mime-type-regex '^(?!x-kde-passwordManagerHint).+'"
|
||||
# exec-once = hyprctl dispatch exec "sleep 4s && copyq --start-server"
|
||||
"hyprctl dispatch exec 'sleep 5s && keepassxc'"
|
||||
"hyprctl dispatch exec 'sleep 3s && solaar -w hide'"
|
||||
];
|
||||
};
|
||||
};
|
||||
}
|
||||
36
home/modules/wm/utils/hypridle/default.nix
Normal file
36
home/modules/wm/utils/hypridle/default.nix
Normal file
@@ -0,0 +1,36 @@
|
||||
{
|
||||
config,
|
||||
lib,
|
||||
...
|
||||
}: let
|
||||
inherit (lib) mkIf mkEnableOption;
|
||||
cfg = config.modules.wm.utils.hypridle;
|
||||
in {
|
||||
options = {
|
||||
modules.wm.utils.hypridle.enable = mkEnableOption "Enables hypridle";
|
||||
};
|
||||
config = mkIf cfg.enable {
|
||||
services.hypridle = {
|
||||
enable = true;
|
||||
settings = {
|
||||
general = {
|
||||
lock_cmd = "hyprlock";
|
||||
before_sleep_cmd = "$lock_cmd";
|
||||
after_sleep_cmd = "hyprctl dispatch dpms on";
|
||||
};
|
||||
|
||||
listener = [
|
||||
{
|
||||
timeout = 900; # 15mins
|
||||
on-timeout = "hyprlock";
|
||||
}
|
||||
{
|
||||
timeout = 1200; # 20mins
|
||||
on-timeout = "hyprctl dispatch dpms off";
|
||||
on-resume = "hyprctl dispatch dpms on";
|
||||
}
|
||||
];
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
90
home/modules/wm/utils/hyprlock/default.nix
Normal file
90
home/modules/wm/utils/hyprlock/default.nix
Normal file
@@ -0,0 +1,90 @@
|
||||
{
|
||||
inputs,
|
||||
pkgs,
|
||||
config,
|
||||
lib,
|
||||
...
|
||||
}: let
|
||||
inherit (lib) mkIf mkEnableOption;
|
||||
cfg = config.modules.wm.utils.hyprlock;
|
||||
in {
|
||||
options = {
|
||||
modules.wm.utils.hyprlock.enable = mkEnableOption "Enables hyprlock";
|
||||
};
|
||||
config = mkIf cfg.enable {
|
||||
programs.hyprlock = {
|
||||
enable = true;
|
||||
package = inputs.hyprlock.packages.${pkgs.system}.hyprlock;
|
||||
settings = {
|
||||
general = {
|
||||
disable_loading_bar = true;
|
||||
hide_cursor = true;
|
||||
no_fade_in = true;
|
||||
no_fade_out = true;
|
||||
ignore_empty_input = true;
|
||||
immediate_render = true;
|
||||
};
|
||||
background = [
|
||||
{
|
||||
monitor = "";
|
||||
path = "~/media/images/dunes.png";
|
||||
}
|
||||
];
|
||||
input-field = [
|
||||
{
|
||||
monitor = "";
|
||||
size = "200, 50";
|
||||
outline_thickness = 0;
|
||||
dots_size = 0.1;
|
||||
dots_spacing = 0.3;
|
||||
dots_center = true;
|
||||
dots_rounding = -1;
|
||||
outer_color = "rgba(0,0,0,0)";
|
||||
inner_color = "rgba(0,0,0,0)";
|
||||
font_color = "rgba(FFFFFFFF)";
|
||||
fade_on_empty = false;
|
||||
fade_timeout = 0;
|
||||
fail_text = "";
|
||||
fail_transition = 0;
|
||||
placeholder_text = "";
|
||||
hide_input = false;
|
||||
rounding = 0;
|
||||
check_color = "rgba(0,0,0,0)";
|
||||
fail_color = "rgba(0,0,0,0)";
|
||||
position = "0, 20";
|
||||
halign = "center";
|
||||
valign = "center";
|
||||
}
|
||||
];
|
||||
label = [
|
||||
# date
|
||||
{
|
||||
monitor = "";
|
||||
text = "cmd[update:3600000] date +'%A, %B %d'";
|
||||
shadow_passes = 1;
|
||||
shadow_boost = 0.5;
|
||||
color = "rgba(FFFFFFFF)";
|
||||
font_size = 25;
|
||||
font_family = "Input Mono Compressed";
|
||||
position = "0, 230";
|
||||
halign = "center";
|
||||
valign = "center";
|
||||
}
|
||||
# clock
|
||||
{
|
||||
monitor = "";
|
||||
text = "cmd[update:1000] echo '$TIME'";
|
||||
shadow_passes = 1;
|
||||
shadow_boost = 0.5;
|
||||
color = "rgba(FFFFFFFF)";
|
||||
font_size = 85;
|
||||
font_family = "Input Mono Compressed";
|
||||
position = "0, 300";
|
||||
halign = "center";
|
||||
valign = "center";
|
||||
}
|
||||
];
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
45
home/modules/wm/utils/hyprpaper/default.nix
Normal file
45
home/modules/wm/utils/hyprpaper/default.nix
Normal file
@@ -0,0 +1,45 @@
|
||||
{
|
||||
config,
|
||||
lib,
|
||||
...
|
||||
}: let
|
||||
inherit (lib) mkIf mkEnableOption;
|
||||
cfg = config.modules.wm.utils.hyprpaper;
|
||||
in {
|
||||
options = {
|
||||
modules.wm.utils.hyprpaper.enable = mkEnableOption "Enables hyprpaper";
|
||||
};
|
||||
config = mkIf cfg.enable {
|
||||
services.hyprpaper = {
|
||||
enable = true;
|
||||
settings = {
|
||||
ipc = "on";
|
||||
splash = false;
|
||||
splash_offset = 2.0;
|
||||
|
||||
preload = [
|
||||
"~/media/images/nix.png"
|
||||
"~/media/images/stacks.png"
|
||||
"~/media/images/ship.png"
|
||||
"~/media/images/cabin.png"
|
||||
"~/media/images/dunes.png"
|
||||
"~/media/images/globe.png"
|
||||
"~/media/images/space.jpg"
|
||||
"~/media/images/galaxy.png"
|
||||
"~/media/images/deathstar.png"
|
||||
"~/media/images/trollskog.png"
|
||||
];
|
||||
|
||||
wallpaper = [
|
||||
# cnix
|
||||
"DP-3,~/media/images/dunes.png"
|
||||
# adampad
|
||||
"eDP-1,~/media/images/dunes.png"
|
||||
# toothpc
|
||||
"DVI-D-1,~/media/images/dunes.png"
|
||||
# "DP-1,/share/wallpapers/cat_pacman.png"
|
||||
];
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
Reference in New Issue
Block a user