Renamed home to programs, moved definition to user level
This commit is contained in:
16
programs/wm/common/audio.nix
Normal file
16
programs/wm/common/audio.nix
Normal file
@@ -0,0 +1,16 @@
|
||||
{
|
||||
pkgs,
|
||||
...
|
||||
}:
|
||||
{
|
||||
home.packages = with pkgs; [
|
||||
# audio control
|
||||
pavucontrol
|
||||
playerctl
|
||||
pulsemixer
|
||||
];
|
||||
|
||||
services = {
|
||||
playerctld.enable = true;
|
||||
};
|
||||
}
|
40
programs/wm/common/cava.nix
Normal file
40
programs/wm/common/cava.nix
Normal file
@@ -0,0 +1,40 @@
|
||||
{ ... }:
|
||||
|
||||
{
|
||||
programs.cava = {
|
||||
enable = true;
|
||||
settings = {
|
||||
|
||||
general = {
|
||||
framerate = 120;
|
||||
bars = 0;
|
||||
bar_width = 2;
|
||||
bar_spacing = 1;
|
||||
#bar_height = 32;
|
||||
sensitivity = 90;
|
||||
autosens = 1;
|
||||
};
|
||||
|
||||
input = {
|
||||
method = "pipewire";
|
||||
source = "auto";
|
||||
sample_rate = 44100;
|
||||
sample_bits = 16;
|
||||
};
|
||||
|
||||
output = {
|
||||
channels = "stereo";
|
||||
mono_option = "average";
|
||||
reverse = 0;
|
||||
waveform = 0;
|
||||
};
|
||||
|
||||
smoothing = {
|
||||
monstercat = 1;
|
||||
waves = 0;
|
||||
noise_reduction = 0.77;
|
||||
};
|
||||
|
||||
};
|
||||
};
|
||||
}
|
11
programs/wm/common/floorp.nix
Normal file
11
programs/wm/common/floorp.nix
Normal file
@@ -0,0 +1,11 @@
|
||||
{
|
||||
username,
|
||||
...
|
||||
}:
|
||||
{
|
||||
programs.floorp = {
|
||||
enable = true;
|
||||
profiles.${username} = { };
|
||||
};
|
||||
|
||||
}
|
112
programs/wm/common/kitty.nix
Normal file
112
programs/wm/common/kitty.nix
Normal file
@@ -0,0 +1,112 @@
|
||||
{ lib, ... }:
|
||||
{
|
||||
programs.kitty = lib.mkForce {
|
||||
enable = true;
|
||||
settings = {
|
||||
themeFile = "Catppuccin-Mocha";
|
||||
confirm_os_window_close = 0;
|
||||
dynamic_background_opacity = true;
|
||||
enable_audio_bell = false;
|
||||
mouse_hide_wait = "-1.0";
|
||||
window_padding_width = 10;
|
||||
background_opacity = "0.8";
|
||||
background_blur = 5;
|
||||
tab_bar_min_tabs = 1;
|
||||
tab_bar_edge = "bottom";
|
||||
tab_bar_style = "powerline";
|
||||
tab_powerline_style = "slanted";
|
||||
tab_title_template = "{title}{' :{}:'.format(num_windows) if num_windows > 1 else ''}";
|
||||
symbol_map =
|
||||
let
|
||||
mappings = [
|
||||
"U+23FB-U+23FE"
|
||||
"U+2B58"
|
||||
"U+E200-U+E2A9"
|
||||
"U+E0A0-U+E0A3"
|
||||
"U+E0B0-U+E0BF"
|
||||
"U+E0C0-U+E0C8"
|
||||
"U+E0CC-U+E0CF"
|
||||
"U+E0D0-U+E0D2"
|
||||
"U+E0D4"
|
||||
"U+E700-U+E7C5"
|
||||
"U+F000-U+F2E0"
|
||||
"U+2665"
|
||||
"U+26A1"
|
||||
"U+F400-U+F4A8"
|
||||
"U+F67C"
|
||||
"U+E000-U+E00A"
|
||||
"U+F300-U+F313"
|
||||
"U+E5FA-U+E62B"
|
||||
];
|
||||
in
|
||||
(builtins.concatStringsSep "," mappings) + " Symbols Nerd Font";
|
||||
};
|
||||
};
|
||||
|
||||
programs.starship = {
|
||||
enable = true;
|
||||
settings = {
|
||||
add_newline = true;
|
||||
command_timeout = 500;
|
||||
|
||||
format = "$username$hostname $directory $git_branch$git_status\n$character ";
|
||||
right_format = "$cmd_duration";
|
||||
|
||||
username = {
|
||||
style_user = "bold #cba6f7";
|
||||
style_root = "bold #f38ba8";
|
||||
format = "[┌](bold #a6e3a1)[$user]($style)";
|
||||
show_always = true;
|
||||
};
|
||||
|
||||
hostname = {
|
||||
style = "bold #74c7ec";
|
||||
format = "[@](bold #fab387)[$hostname]($style)";
|
||||
ssh_only = false;
|
||||
};
|
||||
|
||||
directory = {
|
||||
style = "bold #a6e3a1";
|
||||
truncation_length = 0;
|
||||
truncation_symbol = "";
|
||||
format = "[⤇ ](bold #f38ba8)[《$path》]($style)";
|
||||
};
|
||||
|
||||
git_branch = {
|
||||
format = "[⟦$branch⟧]($style)";
|
||||
style = "bold #f9e2af";
|
||||
};
|
||||
|
||||
# Git status module settings
|
||||
git_status = {
|
||||
format = "[[(*$conflicted$untracked$modified$staged$renamed$deleted)](red) ($ahead_behind$stashed)]($style)";
|
||||
style = "bold #a6e3a1";
|
||||
conflicted = "";
|
||||
untracked = "";
|
||||
modified = "";
|
||||
staged = "";
|
||||
renamed = "";
|
||||
deleted = "";
|
||||
};
|
||||
|
||||
# Command duration module
|
||||
cmd_duration = {
|
||||
format = "[$duration]($style)";
|
||||
style = "bold #cdd6f4";
|
||||
min_time = 5000; # Only show if command takes longer than 5 seconds
|
||||
};
|
||||
|
||||
# Character module (prompt symbol)
|
||||
character = {
|
||||
success_symbol = "[└──────⇴ ](bold #a6e3a1)";
|
||||
error_symbol = "[└──────⇴ ](bold #f38ba8)";
|
||||
};
|
||||
|
||||
nix_shell = {
|
||||
format = "[$symbol$state( \($name\))]($style)";
|
||||
symbol = "U+02744";
|
||||
style = "bold #89dceb";
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
267
programs/wm/common/neovim/config.lua
Normal file
267
programs/wm/common/neovim/config.lua
Normal file
@@ -0,0 +1,267 @@
|
||||
-- Basics
|
||||
vim.g.mapleader = " "
|
||||
|
||||
-- Yank to system clipboard
|
||||
vim.keymap.set("n", "y", '"+y', { desc = "Yank to clipboard" })
|
||||
vim.keymap.set("v", "y", '"+y', { desc = "Yank to clipboard" })
|
||||
vim.keymap.set("n", "Y", '"+Y', { desc = "Yank line to clipboard" })
|
||||
|
||||
-- Also make delete operations use system clipboard
|
||||
vim.keymap.set("n", "d", '"+d', { desc = "Delete to clipboard" })
|
||||
vim.keymap.set("v", "d", '"+d', { desc = "Delete to clipboard" })
|
||||
vim.keymap.set("n", "D", '"+D', { desc = "Delete line to clipboard" })
|
||||
|
||||
-- Paste from system clipboard
|
||||
vim.keymap.set("n", "p", '"+p', { desc = "Paste from clipboard" })
|
||||
vim.keymap.set("v", "p", '"+p', { desc = "Paste from clipboard" })
|
||||
|
||||
-- Treesitter
|
||||
require("nvim-treesitter.configs").setup({
|
||||
ensure_installed = { "lua", "nix", "python", "javascript", "rust", "rasi" },
|
||||
sync_install = false,
|
||||
auto_install = true,
|
||||
highlight = {
|
||||
enable = true,
|
||||
additional_vim_regex_highlighting = false,
|
||||
},
|
||||
|
||||
parser_install_dir = vim.fn.stdpath("data") .. "/treesitter",
|
||||
})
|
||||
vim.opt.runtimepath:append(vim.fn.stdpath("data") .. "/treesitter")
|
||||
|
||||
-- Linting
|
||||
require("lint").linters_by_ft = {}
|
||||
vim.api.nvim_create_autocmd({ "BufWritePost" }, {
|
||||
callback = function()
|
||||
require("lint").try_lint()
|
||||
end,
|
||||
})
|
||||
|
||||
-- Mason Setup
|
||||
require("mason").setup({
|
||||
ui = {
|
||||
icons = {
|
||||
package_installed = "✓",
|
||||
package_pending = "➜",
|
||||
package_uninstalled = "✗",
|
||||
},
|
||||
},
|
||||
})
|
||||
|
||||
require("mason-lspconfig").setup({
|
||||
ensure_installed = {
|
||||
"lua_ls",
|
||||
"nil_ls",
|
||||
"rust_analyzer",
|
||||
"pylsp",
|
||||
},
|
||||
automatic_installation = true,
|
||||
})
|
||||
|
||||
-- LSP Config
|
||||
local cmp = require("cmp")
|
||||
cmp.setup({
|
||||
snippet = {
|
||||
expand = function(args)
|
||||
require("luasnip").lsp_expand(args.body)
|
||||
end,
|
||||
},
|
||||
mapping = cmp.mapping.preset.insert({
|
||||
["<C-b>"] = cmp.mapping.scroll_docs(-4),
|
||||
["<C-f>"] = cmp.mapping.scroll_docs(4),
|
||||
["<C-Space>"] = cmp.mapping.complete(),
|
||||
["<C-e>"] = cmp.mapping.abort(),
|
||||
["<CR>"] = cmp.mapping.confirm({ select = true }),
|
||||
}),
|
||||
sources = cmp.config.sources({
|
||||
{ name = "nvim_lsp" },
|
||||
{ name = "luasnip" },
|
||||
}, {
|
||||
{ name = "buffer" },
|
||||
{ name = "path" },
|
||||
}),
|
||||
})
|
||||
|
||||
local lspconfig = require("lspconfig")
|
||||
local capabilities = require("cmp_nvim_lsp").default_capabilities()
|
||||
vim.keymap.set("n", "gd", vim.lsp.buf.definition, {})
|
||||
vim.keymap.set("n", "K", vim.lsp.buf.hover, {})
|
||||
vim.keymap.set("n", "<leader>rn", vim.lsp.buf.rename, {})
|
||||
vim.keymap.set("n", "<leader>ca", vim.lsp.buf.code_action, {})
|
||||
|
||||
-- Setup language servers
|
||||
lspconfig.lua_ls.setup({
|
||||
capabilities = capabilities,
|
||||
settings = {
|
||||
Lua = {
|
||||
runtime = { version = "LuaJIT" },
|
||||
diagnostics = { globals = { "vim" } },
|
||||
workspace = { library = vim.api.nvim_get_runtime_file("", true) },
|
||||
telemetry = { enable = false },
|
||||
},
|
||||
},
|
||||
})
|
||||
|
||||
lspconfig.nil_ls.setup({ capabilities = capabilities })
|
||||
lspconfig.rust_analyzer.setup({ capabilities = capabilities })
|
||||
lspconfig.pylsp.setup({ capabilities = capabilities })
|
||||
lspconfig.stylelint_lsp.setup({
|
||||
cmd = { "stylelint-lsp", "--stdio" },
|
||||
filetypes = { "css", "scss", "rasi" },
|
||||
capabilities = vim.lsp.protocol.make_client_capabilities(),
|
||||
})
|
||||
|
||||
-- Conform
|
||||
require("conform").setup({
|
||||
formatters_by_ft = {
|
||||
lua = { "stylua" },
|
||||
nix = { "nixfmt" },
|
||||
python = { "black" },
|
||||
rust = { "rustfmt" },
|
||||
rasi = { "prettierd" },
|
||||
},
|
||||
format_on_save = {
|
||||
timeout_ms = 500,
|
||||
lsp_fallback = true,
|
||||
},
|
||||
})
|
||||
|
||||
-- Yazi
|
||||
require("yazi").setup({
|
||||
open_for_directories = true,
|
||||
})
|
||||
|
||||
vim.keymap.set("n", "<leader>fy", function()
|
||||
require("yazi").yazi(nil, vim.loop.cwd())
|
||||
end, { desc = "Open Yazi file manager" })
|
||||
|
||||
vim.keymap.set("n", "<leader>fd", function()
|
||||
require("yazi").yazi(nil, vim.fn.expand("%:p:h"))
|
||||
end, { desc = "Open Yazi in current file directory" })
|
||||
|
||||
-- Telescope
|
||||
require("telescope").setup()
|
||||
|
||||
local telescope = require("telescope.builtin")
|
||||
vim.keymap.set("n", "<leader>ff", telescope.find_files, { desc = "Telescope find files" })
|
||||
vim.keymap.set("n", "<leader>fg", telescope.live_grep, { desc = "Telescope live grep" })
|
||||
vim.keymap.set("n", "<leader>fb", telescope.buffers, { desc = "Telescope buffers" })
|
||||
vim.keymap.set("n", "<leader>fh", telescope.help_tags, { desc = "Telescope help tags" })
|
||||
|
||||
-- Styling
|
||||
require("catppuccin").setup({
|
||||
flavour = "mocha",
|
||||
transparent_background = true,
|
||||
term_colors = true,
|
||||
integration = {
|
||||
treesitter = true,
|
||||
mason = true,
|
||||
lsp_trouble = true,
|
||||
which_key = true,
|
||||
cmp = true,
|
||||
gitsigns = true,
|
||||
telescope = true,
|
||||
nvimtree = true,
|
||||
dashboard = true,
|
||||
notify = true,
|
||||
indent_blankline = true,
|
||||
toggleterm = true, -- Important for transparent terminals
|
||||
},
|
||||
})
|
||||
|
||||
vim.cmd.colorscheme("catppuccin")
|
||||
vim.opt.number = true
|
||||
vim.opt.cursorline = true
|
||||
vim.opt.showmode = false
|
||||
vim.opt.syntax = "enable"
|
||||
vim.opt.hlsearch = true
|
||||
vim.opt.incsearch = true
|
||||
vim.opt.tabstop = 4
|
||||
vim.opt.termguicolors = true
|
||||
|
||||
local colors = require("catppuccin.palettes").get_palette("mocha")
|
||||
vim.api.nvim_set_hl(0, "LineNr", { fg = colors.text, bg = "NONE" })
|
||||
vim.api.nvim_set_hl(0, "CursorLineNr", { fg = colors.pink, bg = "NONE", bold = true })
|
||||
|
||||
-- ToggleTerm setup
|
||||
require("toggleterm").setup({
|
||||
size = 20,
|
||||
open_mapping = [[<c-\>]],
|
||||
direction = "float",
|
||||
float_opts = {
|
||||
border = "single",
|
||||
width = 200,
|
||||
height = 40,
|
||||
},
|
||||
})
|
||||
|
||||
vim.keymap.set("n", "<leader>h", function()
|
||||
require("toggleterm").toggle(1, 10, vim.loop.cwd(), "horizontal")
|
||||
end, { desc = "Toggle terminal (horizontal)" })
|
||||
|
||||
vim.keymap.set("n", "<leader>v", function()
|
||||
require("toggleterm").toggle(2, 60, vim.loop.cwd(), "vertical")
|
||||
end, { desc = "Toggle terminal (vertical)" })
|
||||
|
||||
vim.keymap.set("n", "<leader>ft", function()
|
||||
require("toggleterm").toggle(3, 20, vim.loop.cwd(), "float")
|
||||
end, { desc = "Toggle terminal (float)" })
|
||||
|
||||
vim.keymap.set("t", "<C-t>", "<Cmd>ToggleTerm<CR>", { desc = "Toggle terminal" })
|
||||
vim.keymap.set("t", "<C-v>", "<C-\\><C-n>v", { desc = "Exit terminal and enter visual mode" })
|
||||
|
||||
-- Statusline
|
||||
require("lualine").setup({
|
||||
options = {
|
||||
theme = "catppuccin",
|
||||
component_separators = { left = "|", right = "|" },
|
||||
section_separators = { left = "", right = "" },
|
||||
},
|
||||
})
|
||||
|
||||
-- Dashboard
|
||||
local alpha = require("alpha")
|
||||
local dashboard = require("alpha.themes.dashboard")
|
||||
|
||||
dashboard.section.header.val = {
|
||||
"⣿⣿⣿⣿⣿⣿⣿⣿⣿⢿⣯⣿⠿⣟⣷⣯⣛⢿⣿⣿⣾⣟⣿⣿⣿⣿⣿⣿⣿⣿⣿",
|
||||
"⣿⣿⣿⣿⣿⣿⣿⡿⣵⣿⡿⣴⣽⡟⣳⢿⢽⣽⣕⣽⢿⡿⣿⣟⣿⣿⣿⣿⣿⣿⣿",
|
||||
"⣿⣿⣿⣷⣿⣿⢟⣫⣿⢟⢟⣾⣾⣿⣿⣞⢳⣻⢞⣎⠿⢞⣊⣿⣞⣿⣿⣿⣿⣿⢽",
|
||||
"⣿⣿⣿⣿⣿⣏⢯⣿⣏⣏⠔⢇⣿⢢⢆⢀⢆⣧⣼⢻⢰⡧⢻⣝⣏⡸⣧⣾⣿⣿⣿",
|
||||
"⣿⣿⣿⣿⡟⣻⣿⣿⡾⡿⡼⢸⡝⣝⡳⢢⣧⢳⣳⢷⡇⣗⢺⡺⣿⡧⣿⣿⣿⢿⢿",
|
||||
"⣿⡿⣿⣼⡼⣿⣿⡗⡧⣧⠁⡝⣧⣳⠅⡾⠈⣎⢮⣧⣿⣿⣗⣷⣻⢷⣏⣼⢏⣺⣿",
|
||||
"⣿⣿⣿⣻⣿⣿⣿⢧⣿⢹⠉⢷⢿⣧⣲⡏⡀⡈⢆⠳⣿⡿⢿⣿⣱⢿⢫⣷⣝⣿⣿",
|
||||
"⣿⣿⣿⡯⡟⣿⣿⢽⣡⠟⢿⣮⠁⠙⠛⠈⡴⢿⣿⡷⣬⣽⢽⠧⣷⡏⣿⡇⣧⣽⣿",
|
||||
"⣿⠟⢻⡧⡇⣿⡇⣇⣆⢄⡜⢃⡀⡀⡀⡀⡀⢎⣁⠁⣸⣗⣸⣿⣧⣼⡿⢹⢿⢾⣿",
|
||||
"⣿⣷⣾⣿⢻⣿⢧⢻⣽⡀⡀⡀⡀⢄⡀⡀⡀⡀⡀⢀⣷⡸⡟⣿⣶⣻⣧⡛⡱⢝⣿",
|
||||
"⣿⣿⣿⣿⢸⡿⢚⡜⣿⣇⡀⡀⡀⡀⡀⡀⡀⡀⠚⢁⢣⣜⡿⣿⡇⢼⣿⠨⣸⣿⣿",
|
||||
"⣿⣄⣿⣗⢾⢻⣧⢿⣾⣿⣦⡀⡀⠑⠚⠉⡀⡀⣤⣿⢨⣿⠗⣻⢣⣿⢹⢈⣽⣿⣿",
|
||||
"⣿⣿⣿⣿⢎⡄⢿⣞⡇⣿⠹⣿⣶⣀⡀⣀⡴⡩⢸⢏⣿⣿⣶⢻⣾⢏⡞⠡⢽⣇⣾",
|
||||
"⣿⣿⣿⣮⣼⢬⣦⢿⣳⣌⠧⡉⠈⣇⣛⣁⣈⣼⣿⡸⠫⠛⠐⠛⠕⣙⣻⣬⣼⣿⣿",
|
||||
"⢟⢿⣿⣿⣿⡢⣃⣪⣭⣡⣤⣶⠟⡿⠿⠿⠿⠛⢁⣿⣿⢩⠉⡀⠈⠓⡝⣿⣿⣿⣿",
|
||||
"⣾⣿⣿⣿⣿⠞⢔⡣⡴⣾⣿⠓⣤⢧⡼⣉⠠⢤⣿⣿⠇⠃⡀⡀⡀⡀⡸⢿⣾⣿⣿",
|
||||
"⣿⣿⣿⡿⣺⡸⢗⢠⣇⣿⣿⠊⠃⡀⠉⡀⢠⣿⣿⠟⡸⡀⡀⡀⡀⡀⣃⣬⠽⠿⣿",
|
||||
"⣿⣿⣿⣿⡇⡏⢸⣿⠟⣽⡇⡀⡀⡀⡀⣴⣟⢭⣾⣿⡇⠎⣠⠒⠉⠈⢀⡀⢨⡋⣿",
|
||||
"⠛⠛⠛⠋⠃⠓⠚⠛⠘⠛⠃⡀⠊⡀⠛⠛⠛⠂⠛⠛⠓⠁⠚⡀⠂⠒⠒⠐⠒⠋⠛",
|
||||
}
|
||||
|
||||
dashboard.section.buttons.val = {
|
||||
dashboard.button("e", "[+] New file", ":ene <BAR> startinsert <CR>"),
|
||||
dashboard.button("f", "[?] Find file", ":Telescope find_files <CR>"),
|
||||
dashboard.button("r", "[~] Recent files", ":Telescope oldfiles <CR>"),
|
||||
dashboard.button("y", "[Y] Yazi", ":Yazi<CR>"),
|
||||
dashboard.button("m", "[M] Mason", ":Mason<CR>"),
|
||||
dashboard.button("q", "[X] Quit", ":qa<CR>"),
|
||||
}
|
||||
|
||||
dashboard.section.footer.val = "Circuits hum in anticipation of your will."
|
||||
|
||||
vim.api.nvim_create_autocmd("VimEnter", {
|
||||
callback = function()
|
||||
if vim.fn.argc() == 0 then
|
||||
require("alpha").start()
|
||||
end
|
||||
end,
|
||||
})
|
||||
|
||||
alpha.setup(dashboard.config)
|
83
programs/wm/common/neovim/default.nix
Normal file
83
programs/wm/common/neovim/default.nix
Normal file
@@ -0,0 +1,83 @@
|
||||
{ pkgs, ... }:
|
||||
{
|
||||
programs.neovim = {
|
||||
enable = true;
|
||||
viAlias = true;
|
||||
vimAlias = true;
|
||||
defaultEditor = true;
|
||||
#extraPackages = with pkgs; [ ];
|
||||
|
||||
plugins = with pkgs.vimPlugins; [
|
||||
nvim-treesitter
|
||||
nvim-lint
|
||||
catppuccin-nvim
|
||||
mason-nvim
|
||||
mason-lspconfig-nvim
|
||||
nvim-lspconfig
|
||||
nvim-cmp
|
||||
cmp-nvim-lsp
|
||||
cmp-buffer
|
||||
cmp-path
|
||||
cmp-cmdline
|
||||
luasnip
|
||||
lualine-nvim
|
||||
yazi-nvim
|
||||
alpha-nvim
|
||||
cheatsheet-nvim
|
||||
toggleterm-nvim
|
||||
|
||||
# AI Stuff
|
||||
avante-nvim
|
||||
plenary-nvim
|
||||
nui-nvim
|
||||
dressing-nvim
|
||||
nvim-web-devicons
|
||||
img-clip-nvim
|
||||
render-markdown-nvim
|
||||
|
||||
# Add conform.nvim as a custom plugin
|
||||
(pkgs.vimUtils.buildVimPlugin {
|
||||
name = "conform-nvim";
|
||||
src = pkgs.fetchFromGitHub {
|
||||
owner = "stevearc";
|
||||
repo = "conform.nvim";
|
||||
rev = "stable";
|
||||
sha256 = "sha256-pUF9F5QoDzCZuVRcJEF91M8Qjkh/xosMkf9tRavkmJs=";
|
||||
};
|
||||
})
|
||||
|
||||
# Add telescope.vim as a custom plugin
|
||||
(pkgs.vimUtils.buildVimPlugin {
|
||||
name = "telescope-nvim";
|
||||
src = pkgs.fetchFromGitHub {
|
||||
owner = "nvim-telescope";
|
||||
repo = "telescope.nvim";
|
||||
rev = "0.1.8";
|
||||
sha256 = "sha256-e1ulhc4IIvUgpjKQrSqPY4WpXuez6wlxL6Min9U0o5Q=";
|
||||
};
|
||||
})
|
||||
|
||||
];
|
||||
|
||||
extraLuaConfig = builtins.readFile (./. + "/config.lua");
|
||||
};
|
||||
|
||||
home.packages = with pkgs; [
|
||||
nixfmt-rfc-style
|
||||
stylua
|
||||
black
|
||||
nodePackages.prettier
|
||||
rustfmt
|
||||
nodejs
|
||||
prettierd
|
||||
stylelint-lsp
|
||||
# Mason Binarys
|
||||
lua-language-server
|
||||
nil
|
||||
rust-analyzer
|
||||
python3Packages.python-lsp-server
|
||||
# Avante
|
||||
curl
|
||||
cargo
|
||||
];
|
||||
}
|
331
programs/wm/common/neovim/default.nix.back1
Normal file
331
programs/wm/common/neovim/default.nix.back1
Normal file
@@ -0,0 +1,331 @@
|
||||
{ pkgs, ... }:
|
||||
{
|
||||
programs.nixvim = {
|
||||
enable = true;
|
||||
defaultEditor = true;
|
||||
viAlias = true;
|
||||
vimAlias = true;
|
||||
|
||||
# ===================
|
||||
# Basic Options
|
||||
# ===================
|
||||
options = {
|
||||
number = true;
|
||||
cursorline = true;
|
||||
showmode = false;
|
||||
syntax = "enable";
|
||||
hlsearch = true;
|
||||
incsearch = true;
|
||||
tabstop = 4;
|
||||
termguicolors = true;
|
||||
};
|
||||
|
||||
globals.mapleader = " ";
|
||||
|
||||
keymaps = [
|
||||
# Clipboard
|
||||
{
|
||||
mode = "n";
|
||||
key = "y";
|
||||
action = "\"+y";
|
||||
options.desc = "Yank to clipboard";
|
||||
}
|
||||
{
|
||||
mode = "v";
|
||||
key = "y";
|
||||
action = "\"+y";
|
||||
options.desc = "Yank to clipboard";
|
||||
}
|
||||
{
|
||||
mode = "n";
|
||||
key = "Y";
|
||||
action = "\"+Y";
|
||||
options.desc = "Yank line to clipboard";
|
||||
}
|
||||
{
|
||||
mode = "n";
|
||||
key = "d";
|
||||
action = "\"+d";
|
||||
options.desc = "Delete to clipboard";
|
||||
}
|
||||
{
|
||||
mode = "v";
|
||||
key = "d";
|
||||
action = "\"+d";
|
||||
options.desc = "Delete to clipboard";
|
||||
}
|
||||
{
|
||||
mode = "n";
|
||||
key = "D";
|
||||
action = "\"+D";
|
||||
options.desc = "Delete line to clipboard";
|
||||
}
|
||||
{
|
||||
mode = "n";
|
||||
key = "p";
|
||||
action = "\"+p";
|
||||
options.desc = "Paste from clipboard";
|
||||
}
|
||||
{
|
||||
mode = "v";
|
||||
key = "p";
|
||||
action = "\"+p";
|
||||
options.desc = "Paste from clipboard";
|
||||
}
|
||||
];
|
||||
|
||||
# ===================
|
||||
# Plugins
|
||||
# ===================
|
||||
plugins = {
|
||||
# Treesitter
|
||||
treesitter = {
|
||||
enable = true;
|
||||
ensureInstalled = [
|
||||
"lua"
|
||||
"nix"
|
||||
"python"
|
||||
"javascript"
|
||||
"rust"
|
||||
"rasi"
|
||||
];
|
||||
};
|
||||
|
||||
# Lint
|
||||
lint.enable = true;
|
||||
|
||||
# Mason + LSP
|
||||
mason.enable = true;
|
||||
mason-lspconfig = {
|
||||
enable = true;
|
||||
ensureInstalled = [
|
||||
"lua_ls"
|
||||
"nil_ls"
|
||||
"rust_analyzer"
|
||||
"pylsp"
|
||||
"stylelint_lsp"
|
||||
];
|
||||
};
|
||||
|
||||
lsp = {
|
||||
enable = true;
|
||||
servers = {
|
||||
lua_ls.settings.Lua = {
|
||||
runtime.version = "LuaJIT";
|
||||
diagnostics.globals = [ "vim" ];
|
||||
telemetry.enable = false;
|
||||
};
|
||||
nil_ls.enable = true;
|
||||
rust_analyzer.enable = true;
|
||||
pylsp.enable = true;
|
||||
stylelint_lsp = {
|
||||
enable = true;
|
||||
filetypes = [
|
||||
"css"
|
||||
"scss"
|
||||
"rasi"
|
||||
];
|
||||
cmd = [
|
||||
"stylelint-lsp"
|
||||
"--stdio"
|
||||
];
|
||||
};
|
||||
};
|
||||
keymaps.lspBuf = {
|
||||
gd = "definition";
|
||||
K = "hover";
|
||||
"<leader>rn" = "rename";
|
||||
"<leader>ca" = "code_action";
|
||||
};
|
||||
};
|
||||
|
||||
# Completion
|
||||
cmp = {
|
||||
enable = true;
|
||||
sources = [
|
||||
{ name = "nvim_lsp"; }
|
||||
{ name = "luasnip"; }
|
||||
{ name = "avante_commands"; }
|
||||
{ name = "avante_mentions"; }
|
||||
{ name = "buffer"; }
|
||||
{ name = "path"; }
|
||||
];
|
||||
};
|
||||
luasnip.enable = true;
|
||||
|
||||
# Conform
|
||||
conform-nvim = {
|
||||
enable = true;
|
||||
formattersByFt = {
|
||||
lua = [ "stylua" ];
|
||||
nix = [ "nixfmt" ];
|
||||
python = [ "black" ];
|
||||
rust = [ "rustfmt" ];
|
||||
rasi = [ "prettierd" ];
|
||||
};
|
||||
formatOnSave = {
|
||||
timeoutMs = 500;
|
||||
lspFallback = true;
|
||||
};
|
||||
};
|
||||
|
||||
# Telescope
|
||||
telescope = {
|
||||
enable = true;
|
||||
keymaps = {
|
||||
"<leader>ff" = "find_files";
|
||||
"<leader>fg" = "live_grep";
|
||||
"<leader>fb" = "buffers";
|
||||
"<leader>fh" = "help_tags";
|
||||
};
|
||||
};
|
||||
|
||||
# Toggleterm
|
||||
toggleterm = {
|
||||
enable = true;
|
||||
settings = {
|
||||
size = 20;
|
||||
direction = "float";
|
||||
float_opts = {
|
||||
border = "single";
|
||||
width = 200;
|
||||
height = 40;
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
# Statusline
|
||||
lualine = {
|
||||
enable = true;
|
||||
settings.options = {
|
||||
theme = "catppuccin";
|
||||
component_separators = {
|
||||
left = "|";
|
||||
right = "|";
|
||||
};
|
||||
section_separators = {
|
||||
left = "";
|
||||
right = "";
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
# Dashboard (alpha)
|
||||
alpha = {
|
||||
enable = true;
|
||||
theme = "dashboard";
|
||||
layout.dashboard = {
|
||||
section.header.val = [
|
||||
"⣿⣿⣿⣿⣿⣿⣿⣿⣿⢿⣯⣿⠿⣟⣷⣯⣛⢿⣿⣿⣾⣟⣿⣿⣿⣿⣿⣿⣿⣿⣿"
|
||||
"⣿⣿⣿⣿⣿⣿⣿⡿⣵⣿⡿⣴⣽⡟⣳⢿⢽⣽⣕⣽⢿⡿⣿⣟⣿⣿⣿⣿⣿⣿⣿"
|
||||
"⣿⣿⣿⣷⣿⣿⢟⣫⣿⢟⢟⣾⣾⣿⣿⣞⢳⣻⢞⣎⠿⢞⣊⣿⣞⣿⣿⣿⣿⣿⢽"
|
||||
"⣿⣿⣿⣿⣿⣏⢯⣿⣏⣏⠔⢇⣿⢢⢆⢀⢆⣧⣼⢻⢰⡧⢻⣝⣏⡸⣧⣾⣿⣿⣿"
|
||||
"⣿⣿⣿⣿⡟⣻⣿⣿⡾⡿⡼⢸⡝⣝⡳⢢⣧⢳⣳⢷⡇⣗⢺⡺⣿⡧⣿⣿⣿⢿⢿"
|
||||
"⣿⡿⣿⣼⡼⣿⣿⡗⡧⣧⠁⡝⣧⣳⠅⡾⠈⣎⢮⣧⣿⣿⣗⣷⣻⢷⣏⣼⢏⣺⣿"
|
||||
"⣿⣿⣿⣻⣿⣿⣿⢧⣿⢹⠉⢷⢿⣧⣲⡏⡀⡈⢆⠳⣿⡿⢿⣿⣱⢿⢫⣷⣝⣿⣿"
|
||||
"⣿⣿⣿⡯⡟⣿⣿⢽⣡⠟⢿⣮⠁⠙⠛⠈⡴⢿⣿⡷⣬⣽⢽⠧⣷⡏⣿⡇⣧⣽⣿"
|
||||
"⣿⠟⢻⡧⡇⣿⡇⣇⣆⢄⡜⢃⡀⡀⡀⡀⡀⢎⣁⠁⣸⣗⣸⣿⣧⣼⡿⢹⢿⢾⣿"
|
||||
"⣿⣷⣾⣿⢻⣿⢧⢻⣽⡀⡀⡀⡀⢄⡀⡀⡀⡀⡀⢀⣷⡸⡟⣿⣶⣻⣧⡛⡱⢝⣿"
|
||||
"⣿⣿⣿⣿⢸⡿⢚⡜⣿⣇⡀⡀⡀⡀⡀⡀⡀⡀⠚⢁⢣⣜⡿⣿⡇⢼⣿⠨⣸⣿⣿"
|
||||
"⣿⣄⣿⣗⢾⢻⣧⢿⣾⣿⣦⡀⡀⠑⠚⠉⡀⡀⣤⣿⢨⣿⠗⣻⢣⣿⢹⢈⣽⣿⣿"
|
||||
"⣿⣿⣿⣿⢎⡄⢿⣞⡇⣿⠹⣿⣶⣀⡀⣀⡴⡩⢸⢏⣿⣿⣶⢻⣾⢏⡞⠡⢽⣇⣾"
|
||||
"⣿⣿⣿⣮⣼⢬⣦⢿⣳⣌⠧⡉⠈⣇⣛⣁⣈⣼⣿⡸⠫⠛⠐⠛⠕⣙⣻⣬⣼⣿⣿"
|
||||
"⢟⢿⣿⣿⣿⡢⣃⣪⣭⣡⣤⣶⠟⡿⠿⠿⠿⠛⢁⣿⣿⢩⠉⡀⠈⠓⡝⣿⣿⣿⣿"
|
||||
"⣾⣿⣿⣿⣿⠞⢔⡣⡴⣾⣿⠓⣤⢧⡼⣉⠠⢤⣿⣿⠇⠃⡀⡀⡀⡀⡸⢿⣾⣿⣿"
|
||||
"⣿⣿⣿⡿⣺⡸⢗⢠⣇⣿⣿⠊⠃⡀⠉⡀⢠⣿⣿⠟⡸⡀⡀⡀⡀⡀⣃⣬⠽⠿⣿"
|
||||
"⣿⣿⣿⣿⡇⡏⢸⣿⠟⣽⡇⡀⡀⡀⡀⣴⣟⢭⣾⣿⡇⠎⣠⠒⠉⠈⢀⡀⢨⡋⣿"
|
||||
"⠛⠛⠛⠋⠃⠓⠚⠛⠘⠛⠃⡀⠊⡀⠛⠛⠛⠂⠛⠛⠓⠁⠚⡀⠂⠒⠒⠐⠒⠋⠛"
|
||||
];
|
||||
section.buttons.val = [
|
||||
{
|
||||
shortcut = "e";
|
||||
text = "[+] New file";
|
||||
command = ":ene <BAR> startinsert <CR>";
|
||||
}
|
||||
{
|
||||
shortcut = "f";
|
||||
text = "[?] Find file";
|
||||
command = ":Telescope find_files <CR>";
|
||||
}
|
||||
{
|
||||
shortcut = "r";
|
||||
text = "[~] Recent files";
|
||||
command = ":Telescope oldfiles <CR>";
|
||||
}
|
||||
{
|
||||
shortcut = "y";
|
||||
text = "[Y] Yazi";
|
||||
command = ":Yazi<CR>";
|
||||
}
|
||||
{
|
||||
shortcut = "m";
|
||||
text = "[M] Mason";
|
||||
command = ":Mason<CR>";
|
||||
}
|
||||
{
|
||||
shortcut = "q";
|
||||
text = "[X] Quit";
|
||||
command = ":qa<CR>";
|
||||
}
|
||||
];
|
||||
section.footer.val = "Circuits hum in anticipation of your will.";
|
||||
};
|
||||
};
|
||||
|
||||
# Colorscheme
|
||||
catppuccin = {
|
||||
enable = true;
|
||||
flavour = "mocha";
|
||||
transparentBackground = true;
|
||||
integrations = {
|
||||
treesitter = true;
|
||||
mason = true;
|
||||
cmp = true;
|
||||
telescope = true;
|
||||
toggleterm = true;
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
# ===================
|
||||
# Plugins not in nixvim
|
||||
# ===================
|
||||
extraPlugins = with pkgs.vimPlugins; [
|
||||
yazi-nvim
|
||||
cheatsheet-nvim
|
||||
avante-nvim
|
||||
plenary-nvim
|
||||
nui-nvim
|
||||
dressing-nvim
|
||||
nvim-web-devicons
|
||||
img-clip-nvim
|
||||
render-markdown-nvim
|
||||
(pkgs.vimUtils.buildVimPlugin {
|
||||
name = "conform-nvim";
|
||||
src = pkgs.fetchFromGitHub {
|
||||
owner = "stevearc";
|
||||
repo = "conform.nvim";
|
||||
rev = "stable";
|
||||
sha256 = "sha256-pUF9F5QoDzCZuVRcJEF91M8Qjkh/xosMkf9tRavkmJs=";
|
||||
};
|
||||
})
|
||||
];
|
||||
};
|
||||
|
||||
home.packages = with pkgs; [
|
||||
nixfmt-rfc-style
|
||||
stylua
|
||||
black
|
||||
nodePackages.prettier
|
||||
rustfmt
|
||||
nodejs
|
||||
prettierd
|
||||
stylelint-lsp
|
||||
lua-language-server
|
||||
nil
|
||||
rust-analyzer
|
||||
python3Packages.python-lsp-server
|
||||
curl
|
||||
cargo
|
||||
];
|
||||
}
|
19
programs/wm/common/notifier/mako.nix
Normal file
19
programs/wm/common/notifier/mako.nix
Normal file
@@ -0,0 +1,19 @@
|
||||
{ ... }:
|
||||
{
|
||||
services.mako = {
|
||||
enable = true;
|
||||
font = "FiraCodeNerdFontPropo 12";
|
||||
borderSize = 4;
|
||||
borderRadius = 8;
|
||||
defaultTimeout = 5000;
|
||||
|
||||
extraConfig = ''
|
||||
[app-name=Spotify]
|
||||
border-color=#a6e3a1
|
||||
|
||||
[app-name=Thunderbird]
|
||||
border-color=#94e2d5
|
||||
'';
|
||||
|
||||
};
|
||||
}
|
110
programs/wm/common/notifier/swaync.nix
Normal file
110
programs/wm/common/notifier/swaync.nix
Normal file
@@ -0,0 +1,110 @@
|
||||
{ ... }:
|
||||
{
|
||||
services.swaync = {
|
||||
enable = true;
|
||||
settings = {
|
||||
positionX = "center";
|
||||
positionY = "center";
|
||||
layer = "overlay";
|
||||
control-center-layer = "top";
|
||||
layer-shell = true;
|
||||
cssPriority = "user";
|
||||
control-center-margin-top = 100;
|
||||
control-center-margin-bottom = 200;
|
||||
control-center-margin-right = 0;
|
||||
control-center-margin-left = 0;
|
||||
notification-2fa-action = true;
|
||||
notification-inline-replies = false;
|
||||
notification-icon-size = 64;
|
||||
notification-body-image-height = 100;
|
||||
notification-body-image-width = 200;
|
||||
widgets = [
|
||||
"mpris"
|
||||
"volume"
|
||||
"inhibitors"
|
||||
"title"
|
||||
"dnd"
|
||||
"notifications"
|
||||
];
|
||||
widget-config = {
|
||||
|
||||
mpris = {
|
||||
blacklist = [ ];
|
||||
autohide = false;
|
||||
show-album-art = "always";
|
||||
loop-carousel = false;
|
||||
image-size = 96;
|
||||
image-radius = 12;
|
||||
};
|
||||
|
||||
volume = {
|
||||
label = "gain";
|
||||
show-per-app = false;
|
||||
empty-list-label = "Nothin' is playin'";
|
||||
expand-button-label = "⤢";
|
||||
collaps-button-label = "⤡";
|
||||
};
|
||||
|
||||
title = {
|
||||
text = "Hollerin'";
|
||||
clear-all-button = true;
|
||||
button-text = "Sheriff's Pardon";
|
||||
};
|
||||
|
||||
dnd = {
|
||||
text = "Let'er rest";
|
||||
};
|
||||
|
||||
menubar = {
|
||||
"menu#power" = {
|
||||
label = "Power";
|
||||
position = "right";
|
||||
animation-type = "slide_down";
|
||||
animation-duration = 250;
|
||||
actions = [
|
||||
{
|
||||
label = "Bolt It";
|
||||
command = "hyprlock";
|
||||
}
|
||||
{
|
||||
label = "Ride Out";
|
||||
command = "hyprctl dispatch exit";
|
||||
}
|
||||
{
|
||||
label = "Circle Back";
|
||||
command = "systemctl reboot";
|
||||
}
|
||||
{
|
||||
label = "Bet Down the Horses";
|
||||
command = "systemctl poweroff";
|
||||
}
|
||||
];
|
||||
};
|
||||
|
||||
"buttons#media" = {
|
||||
position = "left";
|
||||
actions = [
|
||||
{
|
||||
label = "Play/Pause";
|
||||
command = "playerctl play-pause";
|
||||
}
|
||||
{
|
||||
label = "Next";
|
||||
command = "playerctl next";
|
||||
}
|
||||
{
|
||||
label = "Previous";
|
||||
command = "playerctl previous";
|
||||
}
|
||||
];
|
||||
};
|
||||
};
|
||||
|
||||
notifications = {
|
||||
vexpand = true;
|
||||
};
|
||||
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
BIN
programs/wm/common/rofi/configs/background.png
Normal file
BIN
programs/wm/common/rofi/configs/background.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 9.2 MiB |
170
programs/wm/common/rofi/configs/catppuccin-default.rasi
Normal file
170
programs/wm/common/rofi/configs/catppuccin-default.rasi
Normal file
@@ -0,0 +1,170 @@
|
||||
@import "catppuccin-mocha"
|
||||
|
||||
* {
|
||||
selected-active-foreground: @background;
|
||||
lightfg: @text;
|
||||
separatorcolor: @foreground;
|
||||
urgent-foreground: @red;
|
||||
alternate-urgent-background: @lightbg;
|
||||
lightbg: @mantle;
|
||||
background-color: transparent;
|
||||
border-color: @foreground;
|
||||
normal-background: @background;
|
||||
selected-urgent-background: @red;
|
||||
alternate-active-background: @lightbg;
|
||||
spacing: 2;
|
||||
alternate-normal-foreground: @foreground;
|
||||
urgent-background: @background;
|
||||
selected-normal-foreground: @lightbg;
|
||||
active-foreground: @blue;
|
||||
background: @base;
|
||||
selected-active-background: @blue;
|
||||
active-background: @background;
|
||||
selected-normal-background: @lightfg;
|
||||
alternate-normal-background: @lightbg;
|
||||
foreground: @text;
|
||||
selected-urgent-foreground: @background;
|
||||
normal-foreground: @foreground;
|
||||
alternate-urgent-foreground: @red;
|
||||
alternate-active-foreground: @blue;
|
||||
|
||||
}
|
||||
element {
|
||||
padding: 1px ;
|
||||
cursor: pointer;
|
||||
spacing: 5px ;
|
||||
border: 0;
|
||||
}
|
||||
element normal.normal {
|
||||
background-color: @normal-background;
|
||||
text-color: @normal-foreground;
|
||||
}
|
||||
element normal.urgent {
|
||||
background-color: @urgent-background;
|
||||
text-color: @urgent-foreground;
|
||||
}
|
||||
element normal.active {
|
||||
background-color: @active-background;
|
||||
text-color: @active-foreground;
|
||||
}
|
||||
element selected.normal {
|
||||
background-color: @selected-normal-background;
|
||||
text-color: @selected-normal-foreground;
|
||||
}
|
||||
element selected.urgent {
|
||||
background-color: @selected-urgent-background;
|
||||
text-color: @selected-urgent-foreground;
|
||||
}
|
||||
element selected.active {
|
||||
background-color: @selected-active-background;
|
||||
text-color: @selected-active-foreground;
|
||||
}
|
||||
element alternate.normal {
|
||||
background-color: @alternate-normal-background;
|
||||
text-color: @alternate-normal-foreground;
|
||||
}
|
||||
element alternate.urgent {
|
||||
background-color: @alternate-urgent-background;
|
||||
text-color: @alternate-urgent-foreground;
|
||||
}
|
||||
element alternate.active {
|
||||
background-color: @alternate-active-background;
|
||||
text-color: @alternate-active-foreground;
|
||||
}
|
||||
element-text {
|
||||
background-color: transparent;
|
||||
cursor: inherit;
|
||||
highlight: inherit;
|
||||
text-color: inherit;
|
||||
}
|
||||
element-icon {
|
||||
background-color: transparent;
|
||||
size: 1.0000em ;
|
||||
cursor: inherit;
|
||||
text-color: inherit;
|
||||
}
|
||||
window {
|
||||
padding: 5;
|
||||
background-color: @background;
|
||||
border: 1;
|
||||
}
|
||||
mainbox {
|
||||
padding: 0;
|
||||
border: 0;
|
||||
}
|
||||
message {
|
||||
padding: 1px ;
|
||||
border-color: @separatorcolor;
|
||||
border: 2px dash 0px 0px ;
|
||||
}
|
||||
textbox {
|
||||
text-color: @foreground;
|
||||
}
|
||||
listview {
|
||||
padding: 2px 0px 0px ;
|
||||
scrollbar: true;
|
||||
border-color: @separatorcolor;
|
||||
spacing: 2px ;
|
||||
fixed-height: 0;
|
||||
border: 2px dash 0px 0px ;
|
||||
}
|
||||
scrollbar {
|
||||
width: 4px ;
|
||||
padding: 0;
|
||||
handle-width: 8px ;
|
||||
border: 0;
|
||||
handle-color: @normal-foreground;
|
||||
}
|
||||
sidebar {
|
||||
border-color: @separatorcolor;
|
||||
border: 2px dash 0px 0px ;
|
||||
}
|
||||
button {
|
||||
cursor: pointer;
|
||||
spacing: 0;
|
||||
text-color: @normal-foreground;
|
||||
}
|
||||
button selected {
|
||||
background-color: @selected-normal-background;
|
||||
text-color: @selected-normal-foreground;
|
||||
}
|
||||
num-filtered-rows {
|
||||
expand: false;
|
||||
text-color: Gray;
|
||||
}
|
||||
num-rows {
|
||||
expand: false;
|
||||
text-color: Gray;
|
||||
}
|
||||
textbox-num-sep {
|
||||
expand: false;
|
||||
str: "/";
|
||||
text-color: Gray;
|
||||
}
|
||||
inputbar {
|
||||
padding: 1px ;
|
||||
spacing: 0px ;
|
||||
text-color: @normal-foreground;
|
||||
children: [ "prompt","textbox-prompt-colon","entry","num-filtered-rows","textbox-num-sep","num-rows","case-indicator" ];
|
||||
}
|
||||
case-indicator {
|
||||
spacing: 0;
|
||||
text-color: @normal-foreground;
|
||||
}
|
||||
entry {
|
||||
text-color: @normal-foreground;
|
||||
cursor: text;
|
||||
spacing: 0;
|
||||
placeholder-color: Gray;
|
||||
placeholder: "Type to filter";
|
||||
}
|
||||
prompt {
|
||||
spacing: 0;
|
||||
text-color: @normal-foreground;
|
||||
}
|
||||
textbox-prompt-colon {
|
||||
margin: 0px 0.3000em 0.0000em 0.0000em ;
|
||||
expand: false;
|
||||
str: ":";
|
||||
text-color: inherit;
|
||||
}
|
29
programs/wm/common/rofi/configs/catppuccin-mocha.rasi
Normal file
29
programs/wm/common/rofi/configs/catppuccin-mocha.rasi
Normal file
@@ -0,0 +1,29 @@
|
||||
* {
|
||||
rosewater: #f5e0dc;
|
||||
flamingo: #f2cdcd;
|
||||
pink: #f5c2e7;
|
||||
mauve: #cba6f7;
|
||||
red: #f38ba8;
|
||||
maroon: #eba0ac;
|
||||
peach: #fab387;
|
||||
yellow: #f9e2af;
|
||||
green: #a6e3a1;
|
||||
teal: #94e2d5;
|
||||
sky: #89dceb;
|
||||
sapphire: #74c7ec;
|
||||
blue: #89b4fa;
|
||||
lavender: #b4befe;
|
||||
text: #cdd6f4;
|
||||
subtext1: #bac2de;
|
||||
subtext0: #a6adc8;
|
||||
overlay2: #9399b2;
|
||||
overlay1: #7f849c;
|
||||
overlay0: #6c7086;
|
||||
surface2: #585b70;
|
||||
surface1: #45475a;
|
||||
surface0: #313244;
|
||||
base: #1e1e2e;
|
||||
mantle: #181825;
|
||||
crust: #11111b;
|
||||
}
|
||||
|
232
programs/wm/common/rofi/configs/custom.rasi
Normal file
232
programs/wm/common/rofi/configs/custom.rasi
Normal file
@@ -0,0 +1,232 @@
|
||||
* {
|
||||
rosewater: #f5e0dc;
|
||||
flamingo: #f2cdcd;
|
||||
pink: #f5c2e7;
|
||||
mauve: #cba6f7;
|
||||
red: #f38ba8;
|
||||
maroon: #eba0ac;
|
||||
peach: #fab387;
|
||||
yellow: #f9e2af;
|
||||
green: #a6e3a1;
|
||||
teal: #94e2d5;
|
||||
sky: #89dceb;
|
||||
sapphire: #74c7ec;
|
||||
blue: #89b4fa;
|
||||
lavender: #b4befe;
|
||||
text: #cdd6f4;
|
||||
subtext1: #bac2de;
|
||||
subtext0: #a6adc8;
|
||||
overlay2: #9399b2;
|
||||
overlay1: #7f849c;
|
||||
overlay0: #6c7086;
|
||||
surface2: #585b70;
|
||||
surface1: #45475a;
|
||||
surface0: #313244;
|
||||
base: #1e1e2e;
|
||||
mantle: #181825;
|
||||
crust: #11111b;
|
||||
}
|
||||
|
||||
configuration {
|
||||
show-icons: true;
|
||||
modi: "window,drun,filebrowser";
|
||||
display-drun: "Apps";
|
||||
display-filebrowser: "Files";
|
||||
display-run: "RUN";
|
||||
display-window: "Active";
|
||||
drun-display-format: "{name}";
|
||||
window-format: "{w} · {c} · {t}";
|
||||
}
|
||||
|
||||
/* Main Window */
|
||||
window {
|
||||
/* properties for window widget */
|
||||
transparency: "real";
|
||||
location: center;
|
||||
anchor: center;
|
||||
fullscreen: false;
|
||||
width: 50%;
|
||||
height: 90%;
|
||||
x-offset: 0px;
|
||||
y-offset: 0px;
|
||||
|
||||
/* properties for all widgets */
|
||||
enabled: true;
|
||||
border-radius: 1px;
|
||||
cursor: "default";
|
||||
background-color: @base;
|
||||
|
||||
border: 4px;
|
||||
border-color: @yellow;
|
||||
}
|
||||
|
||||
/* Main Box */
|
||||
|
||||
mainbox {
|
||||
enabled: true;
|
||||
spacing: 0px;
|
||||
background-color: transparent;
|
||||
orientation: horizontal;
|
||||
children: [ "imagebox", "listbox" ];
|
||||
}
|
||||
|
||||
imagebox {
|
||||
padding: 20px;
|
||||
background-color: transparent;
|
||||
background-image: url("~/.config/rofi/background.png", height);
|
||||
orientation: vertical;
|
||||
children: [ "inputbar", "weatherelement", "dummy", "mode-switcher" ];
|
||||
}
|
||||
|
||||
listbox {
|
||||
spacing: 20px;
|
||||
padding: 20px;
|
||||
background-color: transparent;
|
||||
orientation: vertical;
|
||||
children: [ "message", "listview" ];
|
||||
}
|
||||
|
||||
weatherelement {
|
||||
border-radius: 20px;
|
||||
background-color: transparent;
|
||||
text-color: @peach;
|
||||
str: "Hello This is text";
|
||||
}
|
||||
|
||||
dummy {
|
||||
background-color: transparent;
|
||||
}
|
||||
|
||||
/* Input */
|
||||
inputbar {
|
||||
enabled: true;
|
||||
spacing: 10px;
|
||||
padding: 15px;
|
||||
border-radius: 10px;
|
||||
background-color: @crust;
|
||||
text-color: @text;
|
||||
children: [ "textbox-prompt-colon", "entry" ];
|
||||
}
|
||||
textbox-prompt-colon {
|
||||
enabled: true;
|
||||
expand: false;
|
||||
str: "";
|
||||
background-color: inherit;
|
||||
text-color: inherit;
|
||||
}
|
||||
entry {
|
||||
enabled: true;
|
||||
background-color: inherit;
|
||||
text-color: inherit;
|
||||
cursor: text;
|
||||
placeholder: "Search";
|
||||
placeholder-color: inherit;
|
||||
}
|
||||
|
||||
/* Mode Switcher */
|
||||
mode-switcher{
|
||||
enabled: true;
|
||||
spacing: 20px;
|
||||
background-color: transparent;
|
||||
text-color: @text;
|
||||
}
|
||||
button {
|
||||
padding: 15px;
|
||||
border-radius: 10px;
|
||||
background-color: @base;
|
||||
text-color: inherit;
|
||||
cursor: pointer;
|
||||
}
|
||||
button selected {
|
||||
background-color: @base;
|
||||
text-color: @pink;
|
||||
}
|
||||
|
||||
/* Listview */
|
||||
listview {
|
||||
enabled: true;
|
||||
columns: 1;
|
||||
lines: 8;
|
||||
cycle: true;
|
||||
dynamic: true;
|
||||
scrollbar: false;
|
||||
layout: vertical;
|
||||
reverse: false;
|
||||
fixed-height: true;
|
||||
fixed-columns: true;
|
||||
|
||||
spacing: 10px;
|
||||
background-color: transparent;
|
||||
text-color: @text;
|
||||
cursor: "default";
|
||||
}
|
||||
|
||||
/* Elements */
|
||||
element {
|
||||
enabled: true;
|
||||
spacing: 15px;
|
||||
padding: 8px;
|
||||
border-radius: 10px;
|
||||
background-color: transparent;
|
||||
text-color: @mauve;
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
element normal.normal {
|
||||
background-color: inherit;
|
||||
text-color: inherit;
|
||||
}
|
||||
element normal.urgent {
|
||||
background-color: inherit;
|
||||
text-color: @red;
|
||||
}
|
||||
element normal.active {
|
||||
background-color: inherit;
|
||||
text-color: @blue;
|
||||
}
|
||||
|
||||
element selected.normal {
|
||||
background-color: @crust;
|
||||
text-color: @pink;
|
||||
}
|
||||
element selected.urgent {
|
||||
background-color: @crust;
|
||||
text-color: @maroon;
|
||||
}
|
||||
element selected.active {
|
||||
background-color: @crust;
|
||||
text-color: @sky;
|
||||
}
|
||||
element-icon {
|
||||
background-color: transparent;
|
||||
text-color: inherit;
|
||||
size: 32px;
|
||||
cursor: inherit;
|
||||
}
|
||||
element-text {
|
||||
background-color: transparent;
|
||||
text-color: inherit;
|
||||
cursor: inherit;
|
||||
vertical-align: 0.5;
|
||||
horizontal-align: 0.0;
|
||||
}
|
||||
|
||||
/* Message */
|
||||
message {
|
||||
background-color: transparent;
|
||||
}
|
||||
textbox {
|
||||
padding: 15px;
|
||||
border-radius: 10px;
|
||||
background-color: @overlay0;
|
||||
text-color: @peach;
|
||||
vertical-align: 0.5;
|
||||
horizontal-align: 0.0;
|
||||
}
|
||||
|
||||
error-message {
|
||||
padding: 15px;
|
||||
border-radius: 20px;
|
||||
background-color: @surface0;
|
||||
text-color: @red;
|
||||
}
|
BIN
programs/wm/common/rofi/configs/power.jpg
Normal file
BIN
programs/wm/common/rofi/configs/power.jpg
Normal file
Binary file not shown.
After Width: | Height: | Size: 447 KiB |
163
programs/wm/common/rofi/configs/power.rasi
Normal file
163
programs/wm/common/rofi/configs/power.rasi
Normal file
@@ -0,0 +1,163 @@
|
||||
* {
|
||||
rosewater: #f5e0dc;
|
||||
flamingo: #f2cdcd;
|
||||
pink: #f5c2e7;
|
||||
mauve: #cba6f7;
|
||||
red: #f38ba8;
|
||||
maroon: #eba0ac;
|
||||
peach: #fab387;
|
||||
yellow: #f9e2af;
|
||||
green: #a6e3a1;
|
||||
teal: #94e2d5;
|
||||
sky: #89dceb;
|
||||
sapphire: #74c7ec;
|
||||
blue: #89b4fa;
|
||||
lavender: #b4befe;
|
||||
text: #cdd6f4;
|
||||
subtext1: #bac2de;
|
||||
subtext0: #a6adc8;
|
||||
overlay2: #9399b2;
|
||||
overlay1: #7f849c;
|
||||
overlay0: #6c7086;
|
||||
surface2: #585b70;
|
||||
surface1: #45475a;
|
||||
surface0: #313244;
|
||||
base: #1e1e2e;
|
||||
mantle: #181825;
|
||||
crust: #11111b;
|
||||
}
|
||||
|
||||
configuration {
|
||||
font: "Fira Code Bold 20px";
|
||||
show-icons: true;
|
||||
}
|
||||
|
||||
/*
|
||||
USE_BUTTONS=YES
|
||||
*/
|
||||
|
||||
/*****----- Main Window -----*****/
|
||||
window {
|
||||
transparency: "real";
|
||||
location: center;
|
||||
anchor: center;
|
||||
fullscreen: false;
|
||||
width: 1000px;
|
||||
x-offset: 0px;
|
||||
y-offset: 0px;
|
||||
|
||||
padding: 0px;
|
||||
border: 4px solid;
|
||||
border-radius: 2px;
|
||||
border-color: @blue;
|
||||
cursor: "default";
|
||||
background-color: @base;
|
||||
}
|
||||
|
||||
/*****----- Main Box -----*****/
|
||||
mainbox {
|
||||
enabled: true;
|
||||
spacing: 0px;
|
||||
margin: 0px;
|
||||
padding: 0px;
|
||||
border: 0px solid;
|
||||
border-radius: 0px;
|
||||
border-color: @blue;
|
||||
background-color: transparent;
|
||||
children: [ "inputbar", "listview", "message" ];
|
||||
}
|
||||
|
||||
|
||||
/*****----- Inputbar -----*****/
|
||||
inputbar {
|
||||
enabled: true;
|
||||
spacing: 20px;
|
||||
padding: 100px 40px;
|
||||
background-color: transparent;
|
||||
background-image: url("~/.config/rofi/power.jpg", width);
|
||||
children: [ "textbox-prompt-colon", "prompt"];
|
||||
}
|
||||
|
||||
dummy {
|
||||
background-color: transparent;
|
||||
}
|
||||
|
||||
textbox-prompt-colon {
|
||||
enabled: true;
|
||||
expand: false;
|
||||
str: " System";
|
||||
padding: 15px;
|
||||
border: 0px 0px 0px 10px;
|
||||
border-radius: 100% 100% 0px 100%;
|
||||
border-color: @blue;
|
||||
background-color: @crust;
|
||||
text-color: @text;
|
||||
}
|
||||
prompt {
|
||||
enabled: true;
|
||||
padding: 15px;
|
||||
border: 0px;
|
||||
border-radius: 0px 100% 100% 100%;
|
||||
border-color: @blue;
|
||||
background-color: @crust;
|
||||
text-color: @text;
|
||||
}
|
||||
|
||||
/*****----- Listview -----*****/
|
||||
listview {
|
||||
enabled: true;
|
||||
columns: 6;
|
||||
lines: 1;
|
||||
cycle: true;
|
||||
dynamic: true;
|
||||
scrollbar: false;
|
||||
layout: vertical;
|
||||
reverse: false;
|
||||
fixed-height: true;
|
||||
fixed-columns: true;
|
||||
|
||||
spacing: 30px;
|
||||
margin: 10px;
|
||||
background-color: transparent;
|
||||
cursor: "default";
|
||||
}
|
||||
|
||||
/*****----- Elements -----*****/
|
||||
element {
|
||||
enabled: true;
|
||||
padding: 10px;
|
||||
border-radius: 1%;
|
||||
background-color: @crust;
|
||||
text-color: @text;
|
||||
cursor: pointer;
|
||||
children: [ element-text ];
|
||||
}
|
||||
element-text {
|
||||
background-color: transparent;
|
||||
text-color: inherit;
|
||||
cursor: inherit;
|
||||
vertical-align: 0.5;
|
||||
horizontal-align: 0.5;
|
||||
}
|
||||
element selected.normal {
|
||||
background-color: @crust;
|
||||
text-color: @yellow;
|
||||
}
|
||||
|
||||
/*****----- Message -----*****/
|
||||
message {
|
||||
enabled: true;
|
||||
margin: 0px;
|
||||
padding: 15px;
|
||||
border-radius: 0px;
|
||||
background-color: @crust;
|
||||
text-color: @yellow;
|
||||
}
|
||||
textbox {
|
||||
background-color: inherit;
|
||||
text-color: inherit;
|
||||
vertical-align: 0.5;
|
||||
horizontal-align: 0.5;
|
||||
}
|
||||
|
||||
|
28
programs/wm/common/rofi/default.nix
Normal file
28
programs/wm/common/rofi/default.nix
Normal file
@@ -0,0 +1,28 @@
|
||||
{
|
||||
pkgs,
|
||||
...
|
||||
}:
|
||||
{
|
||||
|
||||
home.packages = with pkgs; [
|
||||
rofi-power-menu
|
||||
rofi-calc
|
||||
];
|
||||
|
||||
programs.rofi = {
|
||||
enable = true;
|
||||
cycle = false;
|
||||
package = pkgs.rofi-wayland;
|
||||
font = "FiraCode Nerd Font Mono 12";
|
||||
|
||||
location = "center";
|
||||
terminal = "${pkgs.kitty}/bin/kitty";
|
||||
|
||||
};
|
||||
|
||||
home.file.".config/rofi" = {
|
||||
source = ./configs;
|
||||
# copy the scripts directory recursively
|
||||
recursive = true;
|
||||
};
|
||||
}
|
25
programs/wm/common/wallpaper/hyprpaper.nix
Normal file
25
programs/wm/common/wallpaper/hyprpaper.nix
Normal file
@@ -0,0 +1,25 @@
|
||||
{ pkgs, ... }:
|
||||
{
|
||||
home.packages = with pkgs; [
|
||||
hyprpaper
|
||||
];
|
||||
|
||||
home.file = {
|
||||
"Pictures/Wallpapers" = {
|
||||
source = ../../wallpapers;
|
||||
recursive = true;
|
||||
};
|
||||
};
|
||||
|
||||
# Hyprpaper configuration
|
||||
services.hyprpaper = {
|
||||
enable = true;
|
||||
settings = {
|
||||
preload = [
|
||||
"Pictures/Wallpapers/tokio.png"
|
||||
];
|
||||
wallpaper = ", Pictures/Wallpapers/tokio.png";
|
||||
};
|
||||
};
|
||||
|
||||
}
|
11
programs/wm/common/wallpaper/swww.nix
Normal file
11
programs/wm/common/wallpaper/swww.nix
Normal file
@@ -0,0 +1,11 @@
|
||||
{ pkgs, ... }:
|
||||
{
|
||||
home.file = {
|
||||
"Pictures/Wallpapers" = {
|
||||
source = ../../wallpapers;
|
||||
recursive = true;
|
||||
};
|
||||
};
|
||||
|
||||
home.packages = with pkgs; [ swww ];
|
||||
}
|
26
programs/wm/common/wallpaper/wpaperd.nix
Normal file
26
programs/wm/common/wallpaper/wpaperd.nix
Normal file
@@ -0,0 +1,26 @@
|
||||
{ ... }:
|
||||
{
|
||||
home.file = {
|
||||
"Pictures/Wallpapers" = {
|
||||
source = ../../wallpapers;
|
||||
recursive = true;
|
||||
};
|
||||
};
|
||||
|
||||
services.wpaperd = {
|
||||
enable = true;
|
||||
settings = {
|
||||
default = {
|
||||
duration = "30m";
|
||||
mode = "center";
|
||||
sorting = "ascending";
|
||||
};
|
||||
|
||||
any = {
|
||||
path = "/home/phil/Pictures/Wallpapers/girl.png";
|
||||
};
|
||||
|
||||
};
|
||||
};
|
||||
|
||||
}
|
185
programs/wm/common/waybar/common.nix
Normal file
185
programs/wm/common/waybar/common.nix
Normal file
@@ -0,0 +1,185 @@
|
||||
{
|
||||
widgets = {
|
||||
"group/media" = {
|
||||
orientation = "horizontal";
|
||||
|
||||
modules = [
|
||||
"mpris"
|
||||
"custom/cava"
|
||||
"wireplumber"
|
||||
];
|
||||
};
|
||||
|
||||
mpris = {
|
||||
format = "{player_icon}";
|
||||
format-paused = "{status_icon}";
|
||||
max-length = 100;
|
||||
player-icons = {
|
||||
default = "||";
|
||||
mpv = "||";
|
||||
};
|
||||
status-icons = {
|
||||
paused = "▶";
|
||||
};
|
||||
};
|
||||
|
||||
"custom/cava" = {
|
||||
exec = "sh ~/.config/waybar/cava.sh";
|
||||
format = "{} ♪";
|
||||
};
|
||||
|
||||
wireplumber = {
|
||||
format = "{volume}%";
|
||||
format-muted = "";
|
||||
max-volume = 110;
|
||||
scroll-step = 0.2;
|
||||
};
|
||||
|
||||
"group/hardware" = {
|
||||
orientation = "horizontal";
|
||||
modules = [
|
||||
"cpu"
|
||||
"network"
|
||||
"memory"
|
||||
"disk"
|
||||
"temperature"
|
||||
];
|
||||
};
|
||||
|
||||
network = {
|
||||
# Wifi
|
||||
tooltip = true;
|
||||
format-wifi = "{icon} ";
|
||||
format-icons = [
|
||||
""
|
||||
""
|
||||
""
|
||||
];
|
||||
rotate = 0;
|
||||
|
||||
# Ethernet
|
||||
format-ethernet = "ᯤ";
|
||||
tooltip-format = "Network: <big><b>{essid}</b></big>\nSignal strength: <b>{signaldBm}dBm ({signalStrength}%)</b>\nFrequency: <b>{frequency}MHz</b>\nInterface: <b>{ifname}</b>\nIP: <b>{ipaddr}/{cidr}</b>\nGateway: <b>{gwaddr}</b>\nNetmask: <b>{netmask}</b>\nCurrent : <b>{bandwidthTotalBits}</b>\nUp : <b>{bandwidthUpBits}</b>\nDown : <b>{bandwidthDownBits}</b>";
|
||||
format-linked = " {ifname} (No IP)";
|
||||
format-disconnected = " ";
|
||||
tooltip-format-disconnected = "Disconnected";
|
||||
on-click = "/usr/local/bin/ags -t ControlPanel";
|
||||
interval = 2;
|
||||
};
|
||||
|
||||
memory = {
|
||||
interval = 1;
|
||||
rotate = 270;
|
||||
format = "{icon}";
|
||||
format-icons = [
|
||||
""
|
||||
""
|
||||
""
|
||||
""
|
||||
""
|
||||
""
|
||||
""
|
||||
""
|
||||
""
|
||||
];
|
||||
max-length = 10;
|
||||
};
|
||||
|
||||
cpu = {
|
||||
interval = 1;
|
||||
format = "{icon}";
|
||||
rotate = 270;
|
||||
format-icons = [
|
||||
""
|
||||
""
|
||||
""
|
||||
""
|
||||
""
|
||||
""
|
||||
""
|
||||
""
|
||||
""
|
||||
];
|
||||
};
|
||||
|
||||
temperature = {
|
||||
format = "{temperatureC}°C ";
|
||||
thermal-zone = 0;
|
||||
hwmon-path = "/sys/class/hwmon/hwmon0/temp1_input";
|
||||
critical-threshold = 80;
|
||||
};
|
||||
|
||||
disk = {
|
||||
format = "{percentage_free}% ";
|
||||
tooltip = true;
|
||||
tooltip-format = "{free} / {total} ({percentage_free})";
|
||||
};
|
||||
|
||||
clock = {
|
||||
format = "{:%a %b %d, %I:%M %p}";
|
||||
rotate = 0;
|
||||
on-click = " ";
|
||||
tooltip-format = "<tt>{calendar}</tt>";
|
||||
calendar = {
|
||||
mode = "month";
|
||||
mode-mon-col = 3;
|
||||
on-scroll = 1;
|
||||
on-click-right = "mode";
|
||||
format = {
|
||||
months = "<span color='#cba6f7'><b>{}</b></span>";
|
||||
weekdays = "<span color='#74c7ec'><b>{}</b></span>";
|
||||
today = "<span color='#f38ba8'><b>{}</b></span>";
|
||||
};
|
||||
};
|
||||
actions = {
|
||||
on-click-right = "mode";
|
||||
on-click-forward = "tz_up";
|
||||
on-click-backward = "tz_down";
|
||||
on-scroll-up = "shift_up";
|
||||
on-scroll-down = "shift_down";
|
||||
};
|
||||
};
|
||||
|
||||
"custom/nixicon" = {
|
||||
format = "";
|
||||
on-click = "rofi -show drun -theme $HOME/.config/rofi/custom.rasi";
|
||||
tooltip = false;
|
||||
};
|
||||
|
||||
"custom/weather" = {
|
||||
format = "{}";
|
||||
exec = "curl -s 'wttr.in/52.281311,10.527029?format=2'";
|
||||
interval = 60;
|
||||
tooltip = false;
|
||||
};
|
||||
|
||||
"custom/weather-side" = {
|
||||
format = "{}";
|
||||
exec = "curl -s 'wttr.in/52.281311,10.527029?format=1'";
|
||||
interval = 60;
|
||||
tooltip = false;
|
||||
};
|
||||
|
||||
"custom/notification" = {
|
||||
tooltip = false;
|
||||
format = "{icon}";
|
||||
format-icons = {
|
||||
notification = "<span foreground='red'><sup></sup></span>";
|
||||
none = " ";
|
||||
dnd-notification = "<span foreground='red'><sup></sup></span>";
|
||||
dnd-none = " ";
|
||||
inhibited-notification = "<span foreground='red'><sup></sup></span>";
|
||||
inhibited-none = " ";
|
||||
dnd-inhibited-notification = "<span foreground='red'><sup></sup></span>";
|
||||
dnd-inhibited-none = " ";
|
||||
};
|
||||
return-type = "json";
|
||||
exec-if = "which swaync-client";
|
||||
exec = "swaync-client -swb";
|
||||
on-click = "swaync-client -t -sw";
|
||||
on-click-right = "swaync-client -d -sw";
|
||||
escape = true;
|
||||
};
|
||||
};
|
||||
|
||||
}
|
42
programs/wm/common/waybar/configs/cava.sh
Normal file
42
programs/wm/common/waybar/configs/cava.sh
Normal file
@@ -0,0 +1,42 @@
|
||||
#!/bin/bash
|
||||
|
||||
# Not my own work. Credit to original author
|
||||
|
||||
#----- Optimized bars animation without much CPU usage increase --------
|
||||
bar="▁▂▃▄▅▆▇█"
|
||||
dict="s/;//g"
|
||||
|
||||
# Calculate the length of the bar outside the loop
|
||||
bar_length=${#bar}
|
||||
|
||||
# Create dictionary to replace char with bar
|
||||
for ((i = 0; i < bar_length; i++)); do
|
||||
dict+=";s/$i/${bar:$i:1}/g"
|
||||
done
|
||||
|
||||
# Create cava config
|
||||
config_file="/tmp/bar_cava_config"
|
||||
cat >"$config_file" <<EOF
|
||||
[general]
|
||||
# Older systems show significant CPU use with default framerate
|
||||
# Setting maximum framerate to 30
|
||||
# You can increase the value if you wish
|
||||
framerate = 60
|
||||
bars = 14
|
||||
|
||||
[input]
|
||||
method = pulse
|
||||
source = auto
|
||||
|
||||
[output]
|
||||
method = raw
|
||||
raw_target = /dev/stdout
|
||||
data_format = ascii
|
||||
ascii_max_range = 7
|
||||
EOF
|
||||
|
||||
# Kill cava if it's already running
|
||||
pkill -f "cava -p $config_file"
|
||||
|
||||
# Read stdout from cava and perform substitution in a single sed command
|
||||
cava -p "$config_file" | sed -u "$dict"
|
26
programs/wm/common/waybar/configs/mocha.css
Normal file
26
programs/wm/common/waybar/configs/mocha.css
Normal file
@@ -0,0 +1,26 @@
|
||||
@define-color rosewater #f5e0dc;
|
||||
@define-color flamingo #f2cdcd;
|
||||
@define-color pink #f5c2e7;
|
||||
@define-color mauve #cba6f7;
|
||||
@define-color red #f38ba8;
|
||||
@define-color maroon #eba0ac;
|
||||
@define-color peach #fab387;
|
||||
@define-color yellow #f9e2af;
|
||||
@define-color green #a6e3a1;
|
||||
@define-color teal #94e2d5;
|
||||
@define-color sky #89dceb;
|
||||
@define-color sapphire #74c7ec;
|
||||
@define-color blue #89b4fa;
|
||||
@define-color lavender #b4befe;
|
||||
@define-color text #cdd6f4;
|
||||
@define-color subtext1 #bac2de;
|
||||
@define-color subtext0 #a6adc8;
|
||||
@define-color overlay2 #9399b2;
|
||||
@define-color overlay1 #7f849c;
|
||||
@define-color overlay0 #6c7086;
|
||||
@define-color surface2 #585b70;
|
||||
@define-color surface1 #45475a;
|
||||
@define-color surface0 #313244;
|
||||
@define-color base #1e1e2e;
|
||||
@define-color mantle #181825;
|
||||
@define-color crust #11111b;
|
17
programs/wm/common/waybar/configs/side.css
Normal file
17
programs/wm/common/waybar/configs/side.css
Normal file
@@ -0,0 +1,17 @@
|
||||
@import "mocha.css";
|
||||
|
||||
/* -- Global rules -- */
|
||||
* {
|
||||
border: none;
|
||||
font-family: "JetbrainsMono Nerd Font";
|
||||
font-size: 15px;
|
||||
min-height: 10px;
|
||||
}
|
||||
|
||||
window#waybar {
|
||||
background: @crust;
|
||||
}
|
||||
|
||||
window#waybar.hidden {
|
||||
opacity: 0.2;
|
||||
}
|
160
programs/wm/common/waybar/configs/style.css
Normal file
160
programs/wm/common/waybar/configs/style.css
Normal file
@@ -0,0 +1,160 @@
|
||||
@import "mocha.css";
|
||||
|
||||
/* -- Global rules -- */
|
||||
* {
|
||||
border: none;
|
||||
font-family: "JetbrainsMono Nerd Font";
|
||||
font-size: 15px;
|
||||
min-height: 10px;
|
||||
}
|
||||
|
||||
window#waybar {
|
||||
background: @crust;
|
||||
}
|
||||
|
||||
window#waybar.hidden {
|
||||
opacity: 0.2;
|
||||
}
|
||||
|
||||
/* - Genera rules for visible modules -- */
|
||||
#media,
|
||||
#clock,
|
||||
#cpu,
|
||||
#memory,
|
||||
#disk,
|
||||
#temperature,
|
||||
#network {
|
||||
color: @crust;
|
||||
margin-top: 6px;
|
||||
margin-bottom: 6px;
|
||||
padding-left: 10px;
|
||||
padding-right: 10px;
|
||||
transition: none;
|
||||
}
|
||||
|
||||
/* Separation to the left */
|
||||
#custom-nixicon,
|
||||
#cpu {
|
||||
margin-left: 5px;
|
||||
border-top-left-radius: 10px;
|
||||
border-bottom-left-radius: 10px;
|
||||
}
|
||||
|
||||
/* Separation to the rigth */
|
||||
#clock,
|
||||
#temperature {
|
||||
margin-right: 20px;
|
||||
border-top-right-radius: 10px;
|
||||
border-bottom-right-radius: 10px;
|
||||
}
|
||||
|
||||
/* -- Specific styles -- */
|
||||
|
||||
#custom-nixicon {
|
||||
font-size: 20px;
|
||||
color: @sapphire;
|
||||
background: @overlay1;
|
||||
padding: 0px;
|
||||
padding-right: 15px;
|
||||
padding-left: 10px;
|
||||
margin-top: 6px;
|
||||
margin-bottom: 6px;
|
||||
margin-left: 15px;
|
||||
}
|
||||
|
||||
/* Hardware Group */
|
||||
#clock {
|
||||
background: @yellow;
|
||||
}
|
||||
|
||||
#cpu {
|
||||
background: @blue;
|
||||
}
|
||||
|
||||
#memory {
|
||||
background: @red;
|
||||
}
|
||||
|
||||
#disk {
|
||||
background: @peach;
|
||||
}
|
||||
|
||||
#temperature {
|
||||
background: @sky;
|
||||
}
|
||||
|
||||
#network {
|
||||
background: @lavender;
|
||||
padding-right: 13px;
|
||||
}
|
||||
|
||||
/* Workspace */
|
||||
#workspaces {
|
||||
border-radius: 10px;
|
||||
margin: 6px 5px;
|
||||
padding: 0px 6px;
|
||||
}
|
||||
|
||||
#workspaces button {
|
||||
color: @text;
|
||||
background: transparent;
|
||||
padding: 4px 4px;
|
||||
transition: color 0.3s ease, text-shadow 0.3s ease, transform 0.3s ease;
|
||||
border: none;
|
||||
}
|
||||
|
||||
#workspaces button.occupied {
|
||||
color: @red;
|
||||
}
|
||||
|
||||
#workspaces button.active {
|
||||
color: @green;
|
||||
text-shadow: 0 0 4px @green;
|
||||
}
|
||||
|
||||
#workspaces button:hover {
|
||||
color: @teal;
|
||||
border: none;
|
||||
}
|
||||
|
||||
#workspaces button.active:hover {}
|
||||
|
||||
|
||||
|
||||
/* Media Group */
|
||||
#media {
|
||||
background: @overlay2;
|
||||
border-radius: 10px;
|
||||
margin: 5px;
|
||||
}
|
||||
|
||||
#custom-cava {
|
||||
color: @green;
|
||||
}
|
||||
|
||||
#wireplumber, #custom-cava, #mpris {
|
||||
margin-left: 10px;
|
||||
margin-right: 5px;
|
||||
}
|
||||
|
||||
#wireplumber {
|
||||
margin-right: 5px;
|
||||
}
|
||||
|
||||
|
||||
/* Weather */
|
||||
#custom-weather {
|
||||
background: @overlay2;
|
||||
border-radius: 10px;
|
||||
margin: 5px 20px;
|
||||
padding: 0px 10px;
|
||||
}
|
||||
|
||||
/* SwayNC */
|
||||
#custom-notification {
|
||||
font-family: "NotoSansMono Nerd Font";
|
||||
background: @green;
|
||||
border-radius: 10px;
|
||||
padding-left: 10px;
|
||||
padding-right: 5px;
|
||||
}
|
32
programs/wm/common/waybar/default.nix
Normal file
32
programs/wm/common/waybar/default.nix
Normal file
@@ -0,0 +1,32 @@
|
||||
{
|
||||
pkgs,
|
||||
monitorSetup,
|
||||
...
|
||||
}:
|
||||
{
|
||||
programs.waybar =
|
||||
{
|
||||
enable = true;
|
||||
package = pkgs.waybar;
|
||||
}
|
||||
// (
|
||||
if monitorSetup == "single" then
|
||||
import ./single.nix
|
||||
else if monitorSetup == "dual" then
|
||||
import ./dual.nix
|
||||
else if monitorSetup == "side" then
|
||||
import ./side.nix
|
||||
else
|
||||
{ }
|
||||
);
|
||||
|
||||
home.file.".config/waybar/cava.sh".source = ./configs/cava.sh;
|
||||
home.file.".config/waybar/mocha.css".source = ./configs/mocha.css;
|
||||
|
||||
home.file.".config/waybar" = {
|
||||
source = ./configs;
|
||||
# copy the scripts directory recursively
|
||||
recursive = true;
|
||||
};
|
||||
|
||||
}
|
47
programs/wm/common/waybar/dual.nix
Normal file
47
programs/wm/common/waybar/dual.nix
Normal file
@@ -0,0 +1,47 @@
|
||||
let
|
||||
common = import ./common.nix;
|
||||
wm = import ./wm.nix;
|
||||
in
|
||||
{
|
||||
enable = true;
|
||||
settings = {
|
||||
mainBar =
|
||||
{
|
||||
layer = "top";
|
||||
position = "top";
|
||||
height = 30;
|
||||
output = [ "DP-1" ];
|
||||
modules-left = [
|
||||
"custom/nixicon"
|
||||
"clock"
|
||||
];
|
||||
modules-center = [
|
||||
"hyprland/workspaces"
|
||||
"niri/workspaces"
|
||||
"custom/notification"
|
||||
];
|
||||
modules-right = [
|
||||
"group/hardware"
|
||||
];
|
||||
}
|
||||
// common.widgets
|
||||
// wm.widgets;
|
||||
|
||||
secondBar =
|
||||
{
|
||||
layer = "top";
|
||||
position = "top";
|
||||
height = 30;
|
||||
output = [ "HDMI-A-2" ];
|
||||
modules-left = [ "group/media" ];
|
||||
modules-center = [
|
||||
"hyprland/workspaces"
|
||||
"niri/workspaces"
|
||||
];
|
||||
modules-right = [ "custom/weather" ];
|
||||
}
|
||||
// common.widgets
|
||||
// wm.widgets;
|
||||
};
|
||||
|
||||
}
|
36
programs/wm/common/waybar/side.nix
Normal file
36
programs/wm/common/waybar/side.nix
Normal file
@@ -0,0 +1,36 @@
|
||||
let
|
||||
common = import ./common.nix;
|
||||
wm = import ./wm.nix;
|
||||
in
|
||||
{
|
||||
enable = true;
|
||||
settings = {
|
||||
mainBar =
|
||||
{
|
||||
layer = "top";
|
||||
position = "left";
|
||||
#height = 30;
|
||||
modules-left = [
|
||||
"custom/nixicon"
|
||||
"clock"
|
||||
"custom/cava"
|
||||
"mpris"
|
||||
"wireplumber"
|
||||
];
|
||||
modules-center = [
|
||||
"hyprland/workspaces"
|
||||
"niri/workspaces"
|
||||
];
|
||||
modules-right = [
|
||||
"custom/weather-side"
|
||||
"cpu"
|
||||
"network"
|
||||
"memory"
|
||||
"disk"
|
||||
"temperature"
|
||||
];
|
||||
}
|
||||
// common.widgets
|
||||
// wm.widgets;
|
||||
};
|
||||
}
|
30
programs/wm/common/waybar/single.nix
Normal file
30
programs/wm/common/waybar/single.nix
Normal file
@@ -0,0 +1,30 @@
|
||||
let
|
||||
common = import ./common.nix;
|
||||
wm = import ./wm.nix;
|
||||
in
|
||||
{
|
||||
enable = true;
|
||||
settings = {
|
||||
mainBar =
|
||||
{
|
||||
layer = "top";
|
||||
position = "top";
|
||||
height = 30;
|
||||
modules-left = [
|
||||
"custom/nixicon"
|
||||
"clock"
|
||||
"group/media"
|
||||
];
|
||||
modules-center = [
|
||||
"hyprland/workspaces"
|
||||
"niri/workspaces"
|
||||
];
|
||||
modules-right = [
|
||||
"custom/weather"
|
||||
"group/hardware"
|
||||
];
|
||||
}
|
||||
// common.widgets
|
||||
// wm.widgets;
|
||||
};
|
||||
}
|
19
programs/wm/common/waybar/wm.nix
Normal file
19
programs/wm/common/waybar/wm.nix
Normal file
@@ -0,0 +1,19 @@
|
||||
{
|
||||
widgets = {
|
||||
"hyprland/workspaces" = {
|
||||
format = "{icon}";
|
||||
format-icons = {
|
||||
default = "";
|
||||
active = "";
|
||||
};
|
||||
};
|
||||
|
||||
"niri/workspaces" = {
|
||||
format = "{icon}";
|
||||
format-icons = {
|
||||
default = "";
|
||||
active = "";
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
31
programs/wm/default.nix
Normal file
31
programs/wm/default.nix
Normal file
@@ -0,0 +1,31 @@
|
||||
{ pkgs, ... }:
|
||||
{
|
||||
imports = [
|
||||
./common/kitty.nix
|
||||
./common/waybar
|
||||
./common/cava.nix
|
||||
./common/rofi
|
||||
./xdg.nix
|
||||
./common/neovim
|
||||
./common/audio.nix
|
||||
];
|
||||
|
||||
gtk = {
|
||||
enable = true;
|
||||
|
||||
theme = {
|
||||
package = pkgs.flat-remix-gtk;
|
||||
name = "Flat-Remix-GTK-Grey-Darkest";
|
||||
};
|
||||
|
||||
iconTheme = {
|
||||
package = pkgs.adwaita-icon-theme;
|
||||
name = "Adwaita";
|
||||
};
|
||||
|
||||
font = {
|
||||
name = "Sans";
|
||||
size = 12;
|
||||
};
|
||||
};
|
||||
}
|
78
programs/wm/hyprland/configs/mocha.conf
Normal file
78
programs/wm/hyprland/configs/mocha.conf
Normal file
@@ -0,0 +1,78 @@
|
||||
|
||||
$rosewater = rgb(f5e0dc)
|
||||
$rosewaterAlpha = f5e0dc
|
||||
|
||||
$flamingo = rgb(f2cdcd)
|
||||
$flamingoAlpha = f2cdcd
|
||||
|
||||
$pink = rgb(f5c2e7)
|
||||
$pinkAlpha = f5c2e7
|
||||
|
||||
$mauve = rgb(cba6f7)
|
||||
$mauveAlpha = cba6f7
|
||||
|
||||
$red = rgb(f38ba8)
|
||||
$redAlpha = f38ba8
|
||||
|
||||
$maroon = rgb(eba0ac)
|
||||
$maroonAlpha = eba0ac
|
||||
|
||||
$peach = rgb(fab387)
|
||||
$peachAlpha = fab387
|
||||
|
||||
$yellow = rgb(f9e2af)
|
||||
$yellowAlpha = f9e2af
|
||||
|
||||
$green = rgb(a6e3a1)
|
||||
$greenAlpha = a6e3a1
|
||||
|
||||
$teal = rgb(94e2d5)
|
||||
$tealAlpha = 94e2d5
|
||||
|
||||
$sky = rgb(89dceb)
|
||||
$skyAlpha = 89dceb
|
||||
|
||||
$sapphire = rgb(74c7ec)
|
||||
$sapphireAlpha = 74c7ec
|
||||
|
||||
$blue = rgb(89b4fa)
|
||||
$blueAlpha = 89b4fa
|
||||
|
||||
$lavender = rgb(b4befe)
|
||||
$lavenderAlpha = b4befe
|
||||
|
||||
$text = rgb(cdd6f4)
|
||||
$textAlpha = cdd6f4
|
||||
|
||||
$subtext1 = rgb(bac2de)
|
||||
$subtext1Alpha = bac2de
|
||||
|
||||
$subtext0 = rgb(a6adc8)
|
||||
$subtext0Alpha = a6adc8
|
||||
|
||||
$overlay2 = rgb(9399b2)
|
||||
$overlay2Alpha = 9399b2
|
||||
|
||||
$overlay1 = rgb(7f849c)
|
||||
$overlay1Alpha = 7f849c
|
||||
|
||||
$overlay0 = rgb(6c7086)
|
||||
$overlay0Alpha = 6c7086
|
||||
|
||||
$surface2 = rgb(585b70)
|
||||
$surface2Alpha = 585b70
|
||||
|
||||
$surface1 = rgb(45475a)
|
||||
$surface1Alpha = 45475a
|
||||
|
||||
$surface0 = rgb(313244)
|
||||
$surface0Alpha = 313244
|
||||
|
||||
$base = rgb(1e1e2e)
|
||||
$baseAlpha = 1e1e2e
|
||||
|
||||
$mantle = rgb(181825)
|
||||
$mantleAlpha = 181825
|
||||
|
||||
$crust = rgb(11111b)
|
||||
$crustAlpha = 11111b
|
50
programs/wm/hyprland/default.nix
Normal file
50
programs/wm/hyprland/default.nix
Normal file
@@ -0,0 +1,50 @@
|
||||
{
|
||||
pkgs,
|
||||
...
|
||||
}:
|
||||
{
|
||||
imports = [
|
||||
./hyprland.nix
|
||||
./hypridle.nix
|
||||
./hyprlock.nix
|
||||
];
|
||||
home.packages = with pkgs; [
|
||||
grim
|
||||
slurp
|
||||
wl-clipboard
|
||||
];
|
||||
|
||||
home.file.".config/hypr" = {
|
||||
source = ./configs;
|
||||
# copy the scripts directory recursively
|
||||
recursive = true;
|
||||
};
|
||||
|
||||
home.file.".config/hypr/avatar" = {
|
||||
source = ../../../avatar;
|
||||
recursive = true;
|
||||
};
|
||||
|
||||
home.file = {
|
||||
"Pictures/Avatar" = {
|
||||
source = ../../../avatar;
|
||||
recursive = true;
|
||||
};
|
||||
};
|
||||
|
||||
home.pointerCursor = {
|
||||
gtk.enable = true;
|
||||
package = pkgs.bibata-cursors;
|
||||
name = "Bibata-Modern-Classic";
|
||||
size = 16;
|
||||
};
|
||||
|
||||
home.file.".config/hypr/hyprland.conf".enable = false;
|
||||
|
||||
# NOTE: this executable is used by greetd to start a wayland session when system boot up
|
||||
# with such a vendor-no-locking script, we can switch to another wayland compositor without modifying greetd's config in NixOS module
|
||||
home.file.".wayland-session" = {
|
||||
source = "${pkgs.hyprland}/bin/Hyprland";
|
||||
executable = true;
|
||||
};
|
||||
}
|
35
programs/wm/hyprland/hypridle.nix
Normal file
35
programs/wm/hyprland/hypridle.nix
Normal file
@@ -0,0 +1,35 @@
|
||||
{ pkgs, ... }:
|
||||
|
||||
{
|
||||
# Hyprland and related packages
|
||||
home.packages = with pkgs; [
|
||||
hypridle
|
||||
];
|
||||
|
||||
# Hypridle configuration
|
||||
services.hypridle = {
|
||||
enable = true;
|
||||
settings = {
|
||||
general = {
|
||||
after_sleep_cmd = "hyprctl dispatch dpms on";
|
||||
ignore_dbus_inhibit = false;
|
||||
lock_cmd = "hyprlock";
|
||||
before_sleep_cmd = ''
|
||||
notify-send -u critical "Hey master, I’m getting sleepy… I’ll see you in my code dreams 💖" --icon
|
||||
="$HOME/.config/hypr/avatar.png" --app-name="Hyprlock"'';
|
||||
};
|
||||
|
||||
listener = [
|
||||
{
|
||||
timeout = 300;
|
||||
on-timeout = "hyprlock";
|
||||
}
|
||||
{
|
||||
timeout = 600;
|
||||
on-timeout = "hyprctl dispatch dpms off";
|
||||
on-resume = "hyprctl dispatch dpms on";
|
||||
}
|
||||
];
|
||||
};
|
||||
};
|
||||
}
|
269
programs/wm/hyprland/hyprland.nix
Normal file
269
programs/wm/hyprland/hyprland.nix
Normal file
@@ -0,0 +1,269 @@
|
||||
{ pkgs, ... }:
|
||||
let
|
||||
package = pkgs.hyprland;
|
||||
super = "SUPER";
|
||||
terminal = "kitty";
|
||||
fileManager = "yazi";
|
||||
theme = "-theme $HOME/.config/rofi/custom.rasi";
|
||||
menu = "rofi -show drun ${theme}";
|
||||
filebrowser = "rofi -show filebrowser ${theme}";
|
||||
power = "rofi -show p -modi p:rofi-power-menu -theme $HOME/.config/rofi/power.rasi";
|
||||
apps = "rofi -show window ${theme}";
|
||||
in
|
||||
{
|
||||
|
||||
systemd.user.targets.hyprland-sessionn.Unit.Wants = [
|
||||
"xdg-desktop-autostart.target"
|
||||
];
|
||||
|
||||
wayland.windowManager.hyprland = {
|
||||
inherit package;
|
||||
enable = true;
|
||||
|
||||
xwayland.enable = true;
|
||||
|
||||
systemd = {
|
||||
enable = true;
|
||||
variables = [ "--all" ];
|
||||
enableXdgAutostart = true;
|
||||
};
|
||||
|
||||
plugins = [
|
||||
#inputs.hyprland-plugins.packages.${pkgs.stdenv.hostPlatform.system}.hyprbars
|
||||
];
|
||||
};
|
||||
|
||||
wayland.windowManager.hyprland.settings = {
|
||||
source = [
|
||||
"~/.config/hypr/mocha.conf"
|
||||
];
|
||||
|
||||
env = [
|
||||
"NIXOS_OZONE_WL,1"
|
||||
"MOZ_ENABLE_WAYLAND,1"
|
||||
"MOZ_WEBRENDER,1"
|
||||
"_JAVA_AWT_WM_NONREPARENTING,1"
|
||||
"QT_WAYLAND_DISABLE_WINDOWDECORATION,1"
|
||||
"QT_QPA_PLATFORM,wayland"
|
||||
"SDL_VIDEODRIVER,wayland"
|
||||
"GDK_BACKEND,wayland,x11"
|
||||
"XCURSOR_SIZE,24"
|
||||
"EDITOR,nvim"
|
||||
];
|
||||
|
||||
monitor = [
|
||||
"DP-1, 1920x1080@60, 1920x0, 1"
|
||||
"HDMI-A-2, 1920x1080@60, 0x0, 1"
|
||||
];
|
||||
|
||||
input = {
|
||||
kb_layout = "de";
|
||||
kb_variant = "mac";
|
||||
repeat_rate = 50;
|
||||
repeat_delay = 300;
|
||||
|
||||
accel_profile = "flat";
|
||||
follow_mouse = 1;
|
||||
mouse_refocus = false;
|
||||
sensitivity = 0; # -1.0 to 1.0, 0 means no modification.
|
||||
|
||||
numlock_by_default = 1;
|
||||
touchpad = {
|
||||
natural_scroll = true;
|
||||
};
|
||||
|
||||
};
|
||||
|
||||
general = {
|
||||
# See https://wiki.hyprland.org/Configuring/Variables/ for more
|
||||
gaps_in = 4;
|
||||
gaps_out = 0;
|
||||
border_size = 4;
|
||||
|
||||
"col.active_border" = "$green";
|
||||
"col.inactive_border" = "$red";
|
||||
|
||||
layout = "dwindle";
|
||||
|
||||
# Please see https://wiki.hyprland.org/Configuring/Tearing/ before you turn this on
|
||||
allow_tearing = false;
|
||||
};
|
||||
|
||||
decoration = {
|
||||
rounding = 1;
|
||||
|
||||
shadow = {
|
||||
enabled = false;
|
||||
range = 16;
|
||||
render_power = 4;
|
||||
ignore_window = true;
|
||||
color = "$green";
|
||||
color_inactive = "$red";
|
||||
};
|
||||
|
||||
blur = {
|
||||
enabled = true;
|
||||
size = 1;
|
||||
passes = 3;
|
||||
new_optimizations = 1;
|
||||
noise = 0.04;
|
||||
};
|
||||
};
|
||||
|
||||
animations = {
|
||||
enabled = "yes";
|
||||
bezier = "myBezier, 0.05, 0.9, 0.1, 1.05";
|
||||
animation = [
|
||||
"windows, 1, 7, myBezier"
|
||||
"windowsOut, 1, 7, default, popin 80%"
|
||||
"border, 1, 10, default"
|
||||
"borderangle, 1, 8, default"
|
||||
"fade, 1, 7, default"
|
||||
"workspaces, 1, 6, default"
|
||||
];
|
||||
};
|
||||
|
||||
layerrule = [
|
||||
"blur,gtk-layer-shell"
|
||||
"ignorezero,gtk-layer-shell"
|
||||
"blur,notifications"
|
||||
"ignorezero,notifications"
|
||||
"blur,rofi"
|
||||
"ignorezero,rofi"
|
||||
];
|
||||
|
||||
dwindle = {
|
||||
# See https://wiki.hyprland.org/Configuring/Dwindle-Layout/ for more
|
||||
pseudotile = "yes"; # master switch for pseudotiling. Enabling is bound to mainMod + P in the keybinds section below
|
||||
preserve_split = "yes"; # you probably want this
|
||||
};
|
||||
|
||||
gestures = {
|
||||
# See https://wiki.hyprland.org/Configuring/Variables/ for more
|
||||
workspace_swipe = "off";
|
||||
};
|
||||
|
||||
misc = {
|
||||
# See https://wiki.hyprland.org/Configuring/Variables/ for more
|
||||
force_default_wallpaper = 0; # Set to 0 or 1 to disable the anime mascot wallpapers
|
||||
};
|
||||
|
||||
# Example per-device config
|
||||
# See https://wiki.hyprland.org/Configuring/Keywords/#per-device-input-configs for more
|
||||
device = {
|
||||
name = "epic-mouse-v1";
|
||||
sensitivity = -0.5;
|
||||
};
|
||||
|
||||
windowrulev2 = "suppressevent maximize, class:.*";
|
||||
|
||||
windowrule = [
|
||||
"opacity 0.0 override, class:^(xwaylandvideobridge)$"
|
||||
"noanim, class:^(xwaylandvideobridge)$"
|
||||
"noinitialfocus, class:^(xwaylandvideobridge)$"
|
||||
"maxsize 1 1, class:^(xwaylandvideobridge)$"
|
||||
"noblur, class:^(xwaylandvideobridge)$"
|
||||
"nofocus, class:^(xwaylandvideobridge)$"
|
||||
];
|
||||
|
||||
# See further https://wiki.hypr.land/Configuring/Workspace-Rules/
|
||||
exec-once = [
|
||||
"waybar &"
|
||||
#"hyprpaper &"
|
||||
#"wpaperd -d"
|
||||
"swww-daemon & disown"
|
||||
];
|
||||
|
||||
# Keybindings
|
||||
bind = [
|
||||
|
||||
# Application Bindings
|
||||
"${super}, Q, exec, ${terminal}"
|
||||
"${super}, E, exec, ${fileManager}"
|
||||
"${super}, O, exec, obsidian"
|
||||
"${super}, I, exec, floorp"
|
||||
"${super}, G, exec, thunderbird"
|
||||
|
||||
# Lock Screen
|
||||
"${super}, M, exit, "
|
||||
|
||||
# swaync
|
||||
"${super}, Y, exec, swaync-client -t -sw"
|
||||
|
||||
# Rofi bindings
|
||||
"${super}, F, exec, ${filebrowser}"
|
||||
"${super}, A, exec, ${apps}"
|
||||
"${super}, R, exec, ${menu}"
|
||||
"${super}, S, exec, ${power}"
|
||||
|
||||
# Move focus with mainMod + arrow keys
|
||||
"${super}, left, movefocus, l"
|
||||
"${super}, right, movefocus, r"
|
||||
"${super}, up, movefocus, u"
|
||||
"${super}, down, movefocus, d"
|
||||
|
||||
# Window Modifiers
|
||||
"${super}, P, pseudo, " # dwindle
|
||||
"${super}, J, togglesplit, " # dwindle
|
||||
"${super}, V, togglefloating, " # dwindle
|
||||
"${super}, C, killactive, "
|
||||
|
||||
# Switch workspaces with mainMod + [0-9]
|
||||
"${super}, 1, workspace, 1"
|
||||
"${super}, 2, workspace, 2"
|
||||
"${super}, 3, workspace, 3"
|
||||
"${super}, 4, workspace, 4"
|
||||
"${super}, 5, workspace, 5"
|
||||
"${super}, 6, workspace, 6"
|
||||
"${super}, 7, workspace, 7"
|
||||
"${super}, 8, workspace, 8"
|
||||
"${super}, 9, workspace, 9"
|
||||
"${super}, 0, workspace, 10"
|
||||
|
||||
# Move active window to a workspace with mainMod + SHIFT + [0-9]
|
||||
"${super} SHIFT, 1, movetoworkspace, 1"
|
||||
"${super} SHIFT, 2, movetoworkspace, 2"
|
||||
"${super} SHIFT, 3, movetoworkspace, 3"
|
||||
"${super} SHIFT, 4, movetoworkspace, 4"
|
||||
"${super} SHIFT, 5, movetoworkspace, 5"
|
||||
"${super} SHIFT, 6, movetoworkspace, 6"
|
||||
"${super} SHIFT, 7, movetoworkspace, 7"
|
||||
"${super} SHIFT, 8, movetoworkspace, 8"
|
||||
"${super} SHIFT, 9, movetoworkspace, 9"
|
||||
"${super} SHIFT, 0, movetoworkspace, 10"
|
||||
|
||||
# Example special workspace (scratchpad)
|
||||
#"${super}, S, togglespecialworkspace, magic"
|
||||
"${super} SHIFT, S, movetoworkspace, special:magic"
|
||||
|
||||
# Scroll through existing workspaces with mainMod + scroll
|
||||
"${super}, mouse_down, workspace, e+1"
|
||||
"${super}, mouse_up, workspace, e-1"
|
||||
|
||||
# Screenshot
|
||||
''${super}, Z, exec, grim -g "$(slurp)" $HOME/Pictures/Screenshots/$(date +'%s_grim.png')''
|
||||
''${super}, U, exec, grim $HOME/Pictures/Screenshots/$(date +'%s_grim.png')''
|
||||
];
|
||||
|
||||
bindl = [
|
||||
#", XF86AudioMute, exec, amixer set Master toggle
|
||||
", XF86AudioMute, exec, pamixer -t"
|
||||
", XF86AudioPlay, exec, playerctl play-pause" # the stupid key is called play , but it toggles
|
||||
", XF86AudioNext, exec, playerctl next"
|
||||
", XF86AudioPrev, exec, playerctl previous"
|
||||
];
|
||||
|
||||
bindle = [
|
||||
# Multi Media Control
|
||||
", XF86AudioRaiseVolume, exec, pamixer -i 5"
|
||||
", XF86AudioLowerVolume, exec, pamixer -d 5"
|
||||
", XF86MonBrightnessUp, exec, brightnessctl set +5%"
|
||||
", XF86MonBrightnessDown, exec, brightnessctl set 5%-"
|
||||
];
|
||||
|
||||
bindm = [
|
||||
"${super}, mouse:272, movewindow"
|
||||
"${super}, mouse:273, resizewindow"
|
||||
];
|
||||
};
|
||||
}
|
120
programs/wm/hyprland/hyprlock.nix
Normal file
120
programs/wm/hyprland/hyprlock.nix
Normal file
@@ -0,0 +1,120 @@
|
||||
{ pkgs, catppuccin, ... }:
|
||||
|
||||
{
|
||||
# Hyprland and related packages
|
||||
home.packages = with pkgs; [
|
||||
hyprlock
|
||||
];
|
||||
|
||||
catppuccin.hyprlock.enable = false;
|
||||
|
||||
# Hyprlock configuration
|
||||
programs.hyprlock = {
|
||||
enable = true;
|
||||
settings = {
|
||||
|
||||
source = "$HOME/.config/hypr/mocha.conf";
|
||||
|
||||
"$accent" = "$mauve";
|
||||
"$accentAlpha" = "$mauveAlpha";
|
||||
"$font" = "JetBrainsMono Nerd Font";
|
||||
|
||||
general = {
|
||||
disable_loading_bar = true;
|
||||
hide_cursor = true;
|
||||
};
|
||||
|
||||
background = [
|
||||
{
|
||||
path = "~/Pictures/Wallpapers/lucy_with_cat.png";
|
||||
blur_passes = 1;
|
||||
blur_size = 5;
|
||||
}
|
||||
];
|
||||
|
||||
label = [
|
||||
# TIME
|
||||
{
|
||||
monitor = "";
|
||||
text = "$TIME";
|
||||
color = "$peach";
|
||||
font_size = 90;
|
||||
font_family = "$font";
|
||||
position = "0, -100";
|
||||
halign = "center";
|
||||
valign = "top";
|
||||
}
|
||||
|
||||
# DATE
|
||||
{
|
||||
monitor = "";
|
||||
text = ''cmd[update:43200000] date +"%A, %d %B %Y"'';
|
||||
color = "$peach";
|
||||
font_size = 25;
|
||||
font_family = "$font";
|
||||
position = "0, 100";
|
||||
halign = "center";
|
||||
valign = "bottom";
|
||||
}
|
||||
|
||||
# Message
|
||||
{
|
||||
monitor = "";
|
||||
text = "Waiting for you...";
|
||||
color = "$peach";
|
||||
font_size = 20;
|
||||
font_family = "$font";
|
||||
position = "0, 200";
|
||||
halign = "center";
|
||||
valign = "bottom";
|
||||
}
|
||||
|
||||
# Weather
|
||||
{
|
||||
monitor = "";
|
||||
text = ''cmd[update:60000] curl -s "wttr.in/52.281311,10.527029?format=1"'';
|
||||
color = "$peach";
|
||||
font_size = 20;
|
||||
font_family = "$font";
|
||||
position = "0, 50";
|
||||
halign = "center";
|
||||
valign = "bottom";
|
||||
}
|
||||
];
|
||||
|
||||
# INPUT FIELD
|
||||
input-field = {
|
||||
monitor = "";
|
||||
size = "300, 60";
|
||||
outline_thickness = 4;
|
||||
dots_size = 0.2;
|
||||
dots_spacing = 0.2;
|
||||
dots_center = "true";
|
||||
outer_color = "$red";
|
||||
inner_color = "$surface0";
|
||||
font_color = "$text";
|
||||
fade_on_empty = false;
|
||||
placeholder_text = ''<span foreground="##$textAlpha"><i> Logged in as </i><span foreground="##$accentAlpha">$USER</span></span>'';
|
||||
hide_input = false;
|
||||
check_color = "$accent";
|
||||
fail_color = "$red";
|
||||
fail_text = "<i>$FAIL <b>($ATTEMPTS)</b></i>";
|
||||
capslock_color = "$yellow";
|
||||
position = "0, -150";
|
||||
halign = "center";
|
||||
valign = "center";
|
||||
};
|
||||
|
||||
image = {
|
||||
monitor = "";
|
||||
path = "~/.config/hypr/avatar/avatar.png";
|
||||
size = 300;
|
||||
border_color = "$teal";
|
||||
position = "0, 75";
|
||||
halign = "center";
|
||||
valign = "center";
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
}
|
110
programs/wm/niri/config.kdl
Normal file
110
programs/wm/niri/config.kdl
Normal file
@@ -0,0 +1,110 @@
|
||||
input {
|
||||
keyboard {
|
||||
xkb {
|
||||
layout "de"
|
||||
}
|
||||
}
|
||||
|
||||
touchpad {
|
||||
tap
|
||||
natural-scroll
|
||||
}
|
||||
}
|
||||
|
||||
output "DP-1" {
|
||||
position x=1920 y=0
|
||||
}
|
||||
|
||||
output "HDMI-A-2" {
|
||||
position x=0 y=0
|
||||
}
|
||||
|
||||
layout {
|
||||
gaps 16
|
||||
center-focused-column "always"
|
||||
|
||||
focus-ring {
|
||||
//off
|
||||
width 2
|
||||
active-color "#1e1e2e55"
|
||||
inactive-color "#11111b55"
|
||||
|
||||
}
|
||||
|
||||
border {
|
||||
off
|
||||
width 2
|
||||
active-color "#a6e3a1"
|
||||
inactive-color "#f38ba8"
|
||||
|
||||
}
|
||||
|
||||
shadow {
|
||||
//on
|
||||
softness 30
|
||||
spread 5
|
||||
offset x=0 y=5
|
||||
color "0007"
|
||||
}
|
||||
}
|
||||
|
||||
spawn-at-startup "waybar"
|
||||
spawn-at-startup "swaync"
|
||||
spawn-at-startup "while true; do sleep 300; $HOME/.config/hypr/rotate-wallpaper.sh"
|
||||
screenshot-path "~/Pictures/Screenshots/%Y-%m-%d_%H-%M-%S.png"
|
||||
|
||||
binds {
|
||||
// Special Keys
|
||||
XF86AudioMute { spawn "pamixer" "-t"; }
|
||||
XF86AudioPlay { spawn "playerctl" "play-pause"; }
|
||||
XF86AudioNext { spawn "playerctl" "next"; }
|
||||
XF86AudioPrev { spawn "playerctl" "previous"; }
|
||||
XF86AudioRaiseVolume { spawn "pamixer" "-i" "5"; }
|
||||
XF86AudioLowerVolume { spawn "pamixer" "-d" "5"; }
|
||||
XF86MonBrightnessUp { spawn "brightnessctl" "set" "+5%"; }
|
||||
XF86MonBrightnessDown { spawn "brightnessctl" "set" "5%-"; }
|
||||
|
||||
// Application Bindings
|
||||
Super+Q { spawn "kitty"; }
|
||||
Super+E { spawn "yazi"; }
|
||||
Super+O { spawn "obsidian"; }
|
||||
Super+I { spawn "floorp"; }
|
||||
Super+G { spawn "thunderbird"; }
|
||||
|
||||
// Lock Screen
|
||||
Super+M { quit; }
|
||||
|
||||
// Rofi Bindings
|
||||
Super+F { spawn "rofi" "-show" "filebrowser" "-theme" ".config/rofi/custom.rasi"; }
|
||||
Super+A { spawn "rofi" "-show" "window" "-theme" ".config/rofi/custom.rasi"; }
|
||||
Super+R { spawn "rofi" "-show" "drun" "-theme" ".config/rofi/custom.rasi"; }
|
||||
Super+S { spawn "rofi" "-show" "p" "-modi" "p:rofi-power-menu" "-theme" ".config/rofi/power.rasi"; }
|
||||
|
||||
// Screenshot
|
||||
Super+Z { screenshot-screen; }
|
||||
Super+U { screenshot-window; }
|
||||
|
||||
|
||||
// Window Keys
|
||||
Super+V { toggle-window-floating; }
|
||||
Super+Plus { set-column-width "+10%"; }
|
||||
Super+Minus { set-column-width "-10%"; }
|
||||
Super+Shift+Plus { set-window-height "+10%"; }
|
||||
Super+Shift+Minus { set-window-height "-10%"; }
|
||||
Super+C { close-window; }
|
||||
|
||||
// Switch Workspaces
|
||||
Super+1 { focus-workspace 1; }
|
||||
Super+2 { focus-workspace 2; }
|
||||
Super+3 { focus-workspace 3; }
|
||||
Super+4 { focus-workspace 4; }
|
||||
Super+5 { focus-workspace 5; }
|
||||
Super+6 { focus-workspace 6; }
|
||||
Super+7 { focus-workspace 7; }
|
||||
Super+8 { focus-workspace 8; }
|
||||
Super+9 { focus-workspace 9; }
|
||||
|
||||
// Focus Window
|
||||
Super+Shift+Left { focus-column-left; }
|
||||
Super+Shift+Right { focus-column-right; }
|
||||
}
|
14
programs/wm/niri/default.nix
Normal file
14
programs/wm/niri/default.nix
Normal file
@@ -0,0 +1,14 @@
|
||||
{
|
||||
pkgs,
|
||||
...
|
||||
}:
|
||||
{
|
||||
# imports = [ ./niri-switcher.nix ];
|
||||
|
||||
home.packages = with pkgs; [
|
||||
niri
|
||||
xwayland-satellite
|
||||
];
|
||||
|
||||
xdg.configFile."niri/config.kdl".source = ./config.kdl;
|
||||
}
|
6
programs/wm/niri/niri-switcher.nix
Normal file
6
programs/wm/niri/niri-switcher.nix
Normal file
@@ -0,0 +1,6 @@
|
||||
{ ... }:
|
||||
{
|
||||
programs.niriswitcher = {
|
||||
enable = true;
|
||||
};
|
||||
}
|
92
programs/wm/xdg.nix
Normal file
92
programs/wm/xdg.nix
Normal file
@@ -0,0 +1,92 @@
|
||||
{ pkgs, config, ... }:
|
||||
let
|
||||
browser = [ "floorp.desktop" ];
|
||||
|
||||
# XDG MIME types
|
||||
associations = {
|
||||
"application/x-extension-htm" = browser;
|
||||
"application/x-extension-html" = browser;
|
||||
"application/x-extension-shtml" = browser;
|
||||
"application/x-extension-xht" = browser;
|
||||
"application/x-extension-xhtml" = browser;
|
||||
"application/xhtml+xml" = browser;
|
||||
"text/html" = browser;
|
||||
"x-scheme-handler/about" = browser;
|
||||
"x-scheme-handler/chrome" = [ "chromium-browser.desktop" ];
|
||||
"x-scheme-handler/ftp" = browser;
|
||||
"x-scheme-handler/http" = browser;
|
||||
"x-scheme-handler/https" = browser;
|
||||
"x-scheme-handler/unknown" = browser;
|
||||
|
||||
"audio/*" = [ "mpv.desktop" ];
|
||||
"video/*" = [ "mpv.dekstop" ];
|
||||
"image/*" = [ "kitty-icat.desktop" ];
|
||||
"application/json" = browser;
|
||||
"application/pdf" = [ "kitty-tdf.desktop" ];
|
||||
"x-scheme-handler/discord" = [ "discordcanary.desktop" ];
|
||||
"x-scheme-handler/spotify" = [ "spotify.desktop" ];
|
||||
"x-scheme-handler/tg" = [ "telegramdesktop.desktop" ];
|
||||
};
|
||||
in
|
||||
{
|
||||
xdg = {
|
||||
enable = true;
|
||||
cacheHome = config.home.homeDirectory + "/.local/cache";
|
||||
|
||||
mimeApps = {
|
||||
enable = true;
|
||||
defaultApplications = associations;
|
||||
};
|
||||
|
||||
desktopEntries = {
|
||||
kitty-icat = {
|
||||
name = "Kitty Icat";
|
||||
exec = "kitty +kitten icat %F";
|
||||
terminal = true;
|
||||
type = "Application";
|
||||
mimeType = [ "image/*" ];
|
||||
categories = [
|
||||
"Viewer"
|
||||
"Graphics"
|
||||
];
|
||||
};
|
||||
|
||||
kitty-tdf = {
|
||||
name = "TDF PDF Viewer";
|
||||
exec = "kitty -e tdf %F";
|
||||
terminal = false; # Set to false since we're explicitly calling kitty
|
||||
type = "Application";
|
||||
mimeType = [ "application/pdf" ];
|
||||
categories = [
|
||||
"Viewer"
|
||||
"Office"
|
||||
];
|
||||
};
|
||||
};
|
||||
|
||||
userDirs = {
|
||||
enable = true;
|
||||
createDirectories = true;
|
||||
extraConfig = {
|
||||
XDG_SCREENSHOTS_DIR = "${config.xdg.userDirs.pictures}/Screenshots";
|
||||
};
|
||||
};
|
||||
|
||||
portal = {
|
||||
enable = true;
|
||||
xdgOpenUsePortal = true;
|
||||
config = {
|
||||
common.default = [ "gtk" ];
|
||||
hyprland.default = [
|
||||
"gtk"
|
||||
"hyprland"
|
||||
];
|
||||
};
|
||||
|
||||
extraPortals = [
|
||||
pkgs.xdg-desktop-portal-gtk
|
||||
pkgs.xdg-desktop-portal-hyprland
|
||||
];
|
||||
};
|
||||
};
|
||||
}
|
Reference in New Issue
Block a user