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 = "";
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
Reference in New Issue
Block a user