From 493954c1e39f22775952262ac9e7ca67a5113d2f Mon Sep 17 00:00:00 2001 From: Matei Adriel Date: Sun, 22 Jan 2023 01:22:38 +0100 Subject: [PATCH] Rosepine theme! --- dotfiles/neovim/ftplugin/tex.lua | 60 ++- dotfiles/neovim/lazy-lock.json | 3 +- dotfiles/neovim/lua/my/helpers/env.lua | 2 +- dotfiles/neovim/lua/my/plugins/catppuccin.lua | 18 - dotfiles/neovim/lua/my/plugins/lspconfig.lua | 12 +- dotfiles/neovim/lua/my/plugins/lualine.lua | 2 +- .../lua/my/plugins/themes/catppuccin.lua | 25 ++ .../neovim/lua/my/plugins/themes/helpers.lua | 14 + .../neovim/lua/my/plugins/themes/init.lua | 4 + .../neovim/lua/my/plugins/themes/rosepine.lua | 31 ++ flake.lock | 19 +- flake.nix | 6 +- .../features/desktop/common/discord.nix | 2 +- .../desktop/common/polybar/polybar.ini | 11 +- home/adrielus/features/neovim/default.nix | 28 +- home/adrielus/global/default.nix | 3 +- hosts/nixos/common/optional/quietboot.nix | 26 ++ hosts/nixos/common/optional/xmonad/Main.hs | 4 +- hosts/nixos/tethys/boot.nix | 2 +- modules/home-manager/discord.nix | 418 +++++++++--------- pkgs/default.nix | 2 + pkgs/plymouth-themes.nix | 31 ++ stylua.toml | 3 + 23 files changed, 464 insertions(+), 262 deletions(-) delete mode 100644 dotfiles/neovim/lua/my/plugins/catppuccin.lua create mode 100644 dotfiles/neovim/lua/my/plugins/themes/catppuccin.lua create mode 100644 dotfiles/neovim/lua/my/plugins/themes/helpers.lua create mode 100644 dotfiles/neovim/lua/my/plugins/themes/init.lua create mode 100644 dotfiles/neovim/lua/my/plugins/themes/rosepine.lua create mode 100644 hosts/nixos/common/optional/quietboot.nix create mode 100644 pkgs/plymouth-themes.nix create mode 100644 stylua.toml diff --git a/dotfiles/neovim/ftplugin/tex.lua b/dotfiles/neovim/ftplugin/tex.lua index 8a24551..1104f84 100644 --- a/dotfiles/neovim/ftplugin/tex.lua +++ b/dotfiles/neovim/ftplugin/tex.lua @@ -86,7 +86,7 @@ local abbreviations = { { "ndiv", "\\not\\|\\:" }, -- words - { "rref", "reduced row echalon form" } + { "rref", "reduced row echalon form" }, } ---@type ExpansionOptions @@ -100,7 +100,13 @@ local abolishAbbreviations = { { "thrf", "therefore" }, { "bcla", "by contradiction let's assume" }, { "wlg", "without loss of generality" }, + { "tits", "that is to say," }, + { "wpbd", "we will prove the statement in both directions." }, { "stam{,s}", "statement{}" }, + { "nb{,h}{,s}", "neighbour{,hood}{}" }, + { "{ww,tt}{m,i}", "{which,this} {means,implies}" }, + { "cex{,s}", "counterexample{}" }, + { "er{t,s,r}", "{transitivity,symmetry,reflexivity}" }, -- Calculus { "ib{p,s}", "integration by {parts,substitution}" }, @@ -112,6 +118,37 @@ local abolishAbbreviations = { { "ort{n,g}", "orto{normal,gonal}" }, { "l{in,de}", "linearly {independent,dependent}" }, + -- Graph theory + { "vx{,s}", "vert{ex,ices}" }, + { "eg{,s}", "edge{}" }, + + -- Graph theory function syntax: + -- gt[function]{graph}{modifier} + -- - function: + -- - basic functions: e/E/v/G/L + -- - k => connectivity + -- - a => size of the biggest stable set + -- - w => size of the biggest clique + -- - d => biggest degree + -- - c{target}{kind} => {target} {kind} chromatic number + -- - target: + -- - vertices by default + -- - e => edges + -- - kind: + -- - normal by default + -- - l => list + -- - graph: + -- - G by default + -- - s/x/y/h => S/X/Y/H + -- - modifier: + -- - a => ' + -- - 1/2 => _k + { + "gt{{e,E,v,V,L},k,a,w,d,md{,e},c{,e}{,l}}{,s,h,x,y}{,a,1,2}", + "{{},\\kappa,\\alpha,\\omega,\\Delta,\\delta{,'},\\chi{,'}{,_l}}({G,S,H,X,Y}{,',_1,_2})", + options = no_capitalization, + }, + -- My own operator syntax: -- - Any operator can be prefixed with "a" to -- align in aligned mode @@ -120,7 +157,7 @@ local abolishAbbreviations = { { "{cr,a,}{eq,neq,leq,geq,lt,gt}", "{\\\\\\&,&,}{=,\\neq,\\leq,\\geq,<,>}", - options = no_capitalization + options = no_capitalization, }, -- Exponents and subscripts: @@ -135,7 +172,7 @@ local abolishAbbreviations = { { "{e,s}{{0,1,2,3,4,5,6,7,8,9,n,i,t,k},t{i,m,p}}", "{^,_}{{},{\\{-1\\},-,+}}", - options = no_capitalization + options = no_capitalization, }, -- Set symbols @@ -150,7 +187,7 @@ local abolishAbbreviations = { { "{nats,ints,rats,irats,rrea,comp,ppri,ffie}", "\\mathbb\\{{N,Z,Q,I,R,C,P,F}\\}", - options = no_capitalization + options = no_capitalization, }, -- Function calls: @@ -165,7 +202,10 @@ local abolishAbbreviations = { -- - argument = x/y/z/a/t/i/n/k -- - argument-modifier: -- - n => subscript n - { "{f,g,h,P}{d,2,3,i,}{x,y,z,a,t,i,n,k}{n,}", "{}{',^2,^3,^\\{-1\\},}({}{_n,})" }, + { + "{f,g,h,P}{d,2,3,i,}{x,y,z,a,t,i,n,k}{n,}", + "{}{',^2,^3,^\\{-1\\},}({}{_n,})", + }, } local expanded = scrap.expand_many(abolishAbbreviations) @@ -174,5 +214,11 @@ local expanded = scrap.expand_many(abolishAbbreviations) A.manyLocalAbbr(abbreviations) A.manyLocalAbbr(expanded) -vim.keymap.set("n", "lc", "VimtexCompile", - { desc = "Compile current buffer using vimtex", buffer = true }) +print(#expanded .. " abbreviations") + +vim.keymap.set( + "n", + "lc", + "VimtexCompile", + { desc = "Compile current buffer using vimtex", buffer = true } +) diff --git a/dotfiles/neovim/lazy-lock.json b/dotfiles/neovim/lazy-lock.json index 4d4af27..4d9f8fe 100644 --- a/dotfiles/neovim/lazy-lock.json +++ b/dotfiles/neovim/lazy-lock.json @@ -2,7 +2,6 @@ "LuaSnip": { "branch": "master", "commit": "5570fd797eae0790affb54ea669a150cad76db5d" }, "abbreinder.nvim": { "branch": "main", "commit": "5b2b5ff08a9ada42238d733aeebc6d3d96314d77" }, "abbremand.nvim": { "branch": "main", "commit": "d633341f632b0b2666dfc6dfe6b9842ba1610a1d" }, - "catppuccin": { "branch": "main", "commit": "3020af75aae098a77737d91ee37c7147c8450d99" }, "clipboard-image.nvim": { "branch": "main", "commit": "d1550dc26729b7954f95269952e90471b838fa25" }, "cmp-buffer": { "branch": "main", "commit": "3022dbc9166796b644a841a02de8dd1cc1d311fa" }, "cmp-cmdline": { "branch": "main", "commit": "23c51b2a3c00f6abc4e922dbd7c3b9aca6992063" }, @@ -47,6 +46,8 @@ "plenary.nvim": { "branch": "master", "commit": "4b7e52044bbb84242158d977a50c4cbcd85070c7" }, "presence.nvim": { "branch": "main", "commit": "c1c54758824cbecd4e18065d37191f7666fdd097" }, "purescript-vim": { "branch": "main", "commit": "7af25a840d38dc6767c85edd1f35c1f835618071" }, + "rasi.vim": { "branch": "main", "commit": "a3c5eaf37f2f778f4d62dad2f1e3dbb4596ac6eb" }, + "rose-pine": { "branch": "main", "commit": "845a6ad5443e3559dde42910c4523a5835c9233b" }, "scrap.nvim": { "branch": "main", "commit": "16db44ae9403ec9c4b140394f294475d1af80a18" }, "smart-splits.nvim": { "branch": "master", "commit": "fdd158ce7554dc830fb86e0fe952cd9476cdf726" }, "telescope-file-browser.nvim": { "branch": "master", "commit": "304508fb7bea78e3c0eeddd88c4837501e403ae8" }, diff --git a/dotfiles/neovim/lua/my/helpers/env.lua b/dotfiles/neovim/lua/my/helpers/env.lua index 5c6d32a..56e58d7 100644 --- a/dotfiles/neovim/lua/my/helpers/env.lua +++ b/dotfiles/neovim/lua/my/helpers/env.lua @@ -22,7 +22,7 @@ return { return vim.g.vscode ~= nil end), neovide = makeEnv(function() - return vim.g.neovide ~= nil or os.getenv("INSIDE_NEOVIDE") == "1" + return vim.g.neovide ~= nil or require("nix.env") == "neovide" end), firenvim = makeEnv(function() return vim.g.started_by_firenvim ~= nil diff --git a/dotfiles/neovim/lua/my/plugins/catppuccin.lua b/dotfiles/neovim/lua/my/plugins/catppuccin.lua deleted file mode 100644 index ffec862..0000000 --- a/dotfiles/neovim/lua/my/plugins/catppuccin.lua +++ /dev/null @@ -1,18 +0,0 @@ -local M = { - "catppuccin/nvim", name = "catppuccin", - lazy = false -} - -function M.config() - local catppuccin = require("catppuccin") - vim.g.catppuccin_flavour = os.getenv("CATPPUCCIN_FLAVOUR") or "latte" - - catppuccin.setup({ transparent_background = false, integrations = { nvimtree = true } }) - - vim.cmd [[highlight NotifyINFOIcon guifg=#d6b20f]] - vim.cmd [[highlight NotifyINFOTitle guifg=#d6b20f]] - - vim.cmd [[colorscheme catppuccin]] -end - -return M diff --git a/dotfiles/neovim/lua/my/plugins/lspconfig.lua b/dotfiles/neovim/lua/my/plugins/lspconfig.lua index 9aa95fe..e8428ae 100644 --- a/dotfiles/neovim/lua/my/plugins/lspconfig.lua +++ b/dotfiles/neovim/lua/my/plugins/lspconfig.lua @@ -188,12 +188,12 @@ end -- {{{ Main config function function lspconfig.config() diagnostics_icons() - -- {{{ Change on-hover borders - vim.lsp.handlers["textDocument/hover"] = - vim.lsp.with(vim.lsp.handlers.hover, { border = "single" }) - vim.lsp.handlers["textDocument/signatureHelp"] = - vim.lsp.with(vim.lsp.handlers.signature_help, { border = "single" }) - -- }}} + -- -- {{{ Change on-hover borders + -- vim.lsp.handlers["textDocument/hover"] = + -- vim.lsp.with(vim.lsp.handlers.hover, { border = "single" }) + -- vim.lsp.handlers["textDocument/signatureHelp"] = + -- vim.lsp.with(vim.lsp.handlers.signature_help, { border = "single" }) + -- -- }}} local capabilities = M.capabilities() -- Setup basic language servers diff --git a/dotfiles/neovim/lua/my/plugins/lualine.lua b/dotfiles/neovim/lua/my/plugins/lualine.lua index 5e6d6cd..f56246e 100644 --- a/dotfiles/neovim/lua/my/plugins/lualine.lua +++ b/dotfiles/neovim/lua/my/plugins/lualine.lua @@ -11,7 +11,7 @@ function M.config() options = { component_separators = { left = "", right = "" }, section_separators = { left = "", right = "" }, - theme = "catppuccin", + theme = "auto", }, sections = { lualine_a = { "branch" }, diff --git a/dotfiles/neovim/lua/my/plugins/themes/catppuccin.lua b/dotfiles/neovim/lua/my/plugins/themes/catppuccin.lua new file mode 100644 index 0000000..cd620ea --- /dev/null +++ b/dotfiles/neovim/lua/my/plugins/themes/catppuccin.lua @@ -0,0 +1,25 @@ +local H = require("my.plugins.themes.helpers") + +local M = { + "catppuccin/nvim", + name = "catppuccin", + lazy = false, + enabled = H.theme_contains("Catppuccin"), +} + +function M.config() + local catppuccin = require("catppuccin") + vim.g.catppuccin_flavour = H.variant("Catppuccin") + + catppuccin.setup({ + transparent_background = false, + integrations = { nvimtree = true }, + }) + + vim.cmd([[highlight NotifyINFOIcon guifg=#d6b20f]]) + vim.cmd([[highlight NotifyINFOTitle guifg=#d6b20f]]) + + vim.cmd("colorscheme catppuccin") +end + +return M diff --git a/dotfiles/neovim/lua/my/plugins/themes/helpers.lua b/dotfiles/neovim/lua/my/plugins/themes/helpers.lua new file mode 100644 index 0000000..01b65a5 --- /dev/null +++ b/dotfiles/neovim/lua/my/plugins/themes/helpers.lua @@ -0,0 +1,14 @@ +local theme = require("nix.theme").name + +local M = {} + +function M.theme_contains(name) + return string.find(theme, name) ~= nil +end + +function M.variant(name) + -- +1 for 1-indexed strings and +1 for the space between name and variant + return string.lower(string.sub(theme, string.len(name) + 2)) +end + +return M diff --git a/dotfiles/neovim/lua/my/plugins/themes/init.lua b/dotfiles/neovim/lua/my/plugins/themes/init.lua new file mode 100644 index 0000000..aac5930 --- /dev/null +++ b/dotfiles/neovim/lua/my/plugins/themes/init.lua @@ -0,0 +1,4 @@ +return { + require("my.plugins.themes.catppuccin"), + require("my.plugins.themes.rosepine"), +} diff --git a/dotfiles/neovim/lua/my/plugins/themes/rosepine.lua b/dotfiles/neovim/lua/my/plugins/themes/rosepine.lua new file mode 100644 index 0000000..a2b9d00 --- /dev/null +++ b/dotfiles/neovim/lua/my/plugins/themes/rosepine.lua @@ -0,0 +1,31 @@ +local H = require("my.plugins.themes.helpers") + +local M = { + "rose-pine/neovim", + name = "rose-pine", + lazy = false, + enabled = H.theme_contains("Rosé Pine"), +} + +function M.config() + local variant = H.variant("Rosé Pine") + + if variant == "dawn" then + vim.o.background = "light" + else + vim.o.background = "dark" + end + + local dark_variants = { + [""] = "main", + moon = "moon", + } + + require("rose-pine").setup({ + dark_variant = dark_variants[variant], + }) + + vim.cmd("colorscheme rose-pine") +end + +return M diff --git a/flake.lock b/flake.lock index 43d5140..79ea965 100644 --- a/flake.lock +++ b/flake.lock @@ -214,7 +214,24 @@ "homeage": "homeage", "impermanence": "impermanence", "neovim-nightly-overlay": "neovim-nightly-overlay", - "nixpkgs": "nixpkgs" + "nixpkgs": "nixpkgs", + "rosepine-base16": "rosepine-base16" + } + }, + "rosepine-base16": { + "flake": false, + "locked": { + "lastModified": 1669049843, + "narHash": "sha256-4+U8llaqsztHrmR7OYBplz2Ez7Txbi8z/r9AQjKJEBk=", + "owner": "edunfelt", + "repo": "base16-rose-pine-scheme", + "rev": "424c0327b8251e4662e6cbc62518273c8800f507", + "type": "github" + }, + "original": { + "owner": "edunfelt", + "repo": "base16-rose-pine-scheme", + "type": "github" } }, "utils": { diff --git a/flake.nix b/flake.nix index 66f9093..308c376 100644 --- a/flake.nix +++ b/flake.nix @@ -25,6 +25,10 @@ catppuccin-base16.url = github:catppuccin/base16; catppuccin-base16.flake = false; + # Rosepine base16 color schemes + rosepine-base16.url = github:edunfelt/base16-rose-pine-scheme; + rosepine-base16.flake = false; + # Impermanence impermanence.url = "github:nix-community/impermanence"; @@ -46,7 +50,7 @@ specialArgs = { inherit inputs outputs; - paths.dotfiles = "~/Projects/satellite/dotfiles"; + paths.dotfiles = "/home/adrielus/Projects/satellite/dotfiles"; }; in rec { diff --git a/home/adrielus/features/desktop/common/discord.nix b/home/adrielus/features/desktop/common/discord.nix index 85bfc92..9c7283c 100644 --- a/home/adrielus/features/desktop/common/discord.nix +++ b/home/adrielus/features/desktop/common/discord.nix @@ -2,6 +2,6 @@ programs.discord = { enable = true; disableUpdateCheck = true; - base16Styles.enable = true; + base16Styles.enable = false; }; } diff --git a/home/adrielus/features/desktop/common/polybar/polybar.ini b/home/adrielus/features/desktop/common/polybar/polybar.ini index 6c19ff6..0d48fc8 100644 --- a/home/adrielus/features/desktop/common/polybar/polybar.ini +++ b/home/adrielus/features/desktop/common/polybar/polybar.ini @@ -56,9 +56,10 @@ label-disconnected = 睊 label-packetloss = %essid% animation-packetloss-0 = ⚠ -animation-packetloss-0-foreground = #ffa64c + +animation-packetloss-0-foreground = ${colors.base08} animation-packetloss-1 = 📶 -animation-packetloss-1-foreground = #000000 +animation-packetloss-1-foreground = ${colors.base00} animation-packetloss-framerate = 500 [module/ewmh] @@ -73,7 +74,7 @@ icon-default =  format = label-active = %icon% -label-active-background = ${colors.base05} +label-active-background = ${colors.base0A} label-active-foreground = ${colors.base00} label-active-padding = 2 @@ -102,9 +103,9 @@ module-margin = 2 height=4% border-top-size = 1 -border-top-color= ${colors.base05} +border-top-color= ${colors.base0A} background = ${colors.base00} -foreground = ${colors.base05} +foreground = ${colors.base0A} bottom = true diff --git a/home/adrielus/features/neovim/default.nix b/home/adrielus/features/neovim/default.nix index b1d20e3..63e390c 100644 --- a/home/adrielus/features/neovim/default.nix +++ b/home/adrielus/features/neovim/default.nix @@ -1,6 +1,6 @@ { pkgs, lib, config, paths, ... }: let - devMode = false; + devMode = true; extraPackages = with pkgs; [ # Language servers nodePackages.typescript-language-server # typescript @@ -41,19 +41,32 @@ in let symlink = config.lib.file.mkOutOfStoreSymlink; - extraRuntime = [ + extraRuntime = env: [ + # Snippets (if devMode then symlink "${paths.dotfiles}/vscode-snippets" else ../../../../dotfiles/vscode-snippets) + + # Base16 theme + (pkgs.writeTextDir + "lua/nix/theme.lua" + '' + return { + name = "${config.scheme.scheme}" + } + '') + + # Provide hints as to what app we are in + # (Useful because neovide does not provide the info itself right away) + (pkgs.writeTextDir + "lua/nix/env.lua" + "return '${env}'" + ) ]; # Wraps a neovim client, providing the dependencies # and setting some flags: # - # TODO: change this to a more general thing like "NVIM_CLIENT_NAME" - # - INSIDE_NEOVIDE is used to detect when running inside neovide, - # before the in-client flag gets set (this was causing me problems in the past) - # # - NVIM_EXTRA_RUNTIME provides extra directories to add to the runtimepath. # I cannot just install those dirs using the builtin package support because # my package manager (lazy.nvim) disables those. @@ -65,8 +78,7 @@ let postBuild = '' wrapProgram $out/bin/${name} \ --prefix PATH : ${lib.makeBinPath extraPackages} \ - --set INSIDE_NEOVIDE ${if name == "neovide" then "1" else "0"} \ - --set NVIM_EXTRA_RUNTIME ${lib.strings.concatStringsSep "," extraRuntime} \ + --set NVIM_EXTRA_RUNTIME ${lib.strings.concatStringsSep "," (extraRuntime name)} \ ${extraArgs} ''; }; diff --git a/home/adrielus/global/default.nix b/home/adrielus/global/default.nix index 08ea537..a0a7404 100644 --- a/home/adrielus/global/default.nix +++ b/home/adrielus/global/default.nix @@ -40,7 +40,8 @@ in }; # Set default theme - scheme = lib.mkDefault "${inputs.catppuccin-base16}/base16/latte.yaml"; + # scheme = lib.mkDefault "${inputs.catppuccin-base16}/base16/latte.yaml"; + scheme = lib.mkDefault "${inputs.rosepine-base16}/rose-pine-dawn.yaml"; # Set reasonable defaults for some settings home = { diff --git a/hosts/nixos/common/optional/quietboot.nix b/hosts/nixos/common/optional/quietboot.nix new file mode 100644 index 0000000..527c919 --- /dev/null +++ b/hosts/nixos/common/optional/quietboot.nix @@ -0,0 +1,26 @@ +{ pkgs, ... }: +{ + boot.plymouth = { + enable = true; + themePackages = [ pkgs.plymouthThemes.cuts_alt ]; + theme = "cuts_alt"; + }; + + boot = { + # See https://search.nixos.org/options?show=boot.initrd.verbose&query=boot.initrd.verbose + kernelParams = [ + "quiet" + "splash" + "boot.shell_on_fail" + "i915.fastboot=1" + "loglevel=3" + "rd.systemd.show_status=false" + "rd.udev.log_level=3" + "udev.log_priority=3" + "vt.global_cursor_default=0" + "udev.log_level=3" + ]; + consoleLogLevel = 0; + initrd.verbose = false; + }; +} diff --git a/hosts/nixos/common/optional/xmonad/Main.hs b/hosts/nixos/common/optional/xmonad/Main.hs index 19f35cb..441c756 100644 --- a/hosts/nixos/common/optional/xmonad/Main.hs +++ b/hosts/nixos/common/optional/xmonad/Main.hs @@ -24,8 +24,8 @@ main = terminal = myTerminal, workspaces = myWorkspaces, borderWidth = 5, - focusedBorderColor = "#4c4f69", - normalBorderColor = "#4c4f69", + focusedBorderColor = "#d7827e", + normalBorderColor = "#d7827e", startupHook = startup, layoutHook = avoidStruts myLayoutHook, manageHook = manageDocks <+> manageSpawn <+> manageHook def, diff --git a/hosts/nixos/tethys/boot.nix b/hosts/nixos/tethys/boot.nix index 83d5ad3..d455409 100644 --- a/hosts/nixos/tethys/boot.nix +++ b/hosts/nixos/tethys/boot.nix @@ -1,6 +1,6 @@ # This file contains arcane configurations copied from a random old wiki entry # One day I shall revisit this and see what's needed and what isn't -{...}: { +{ boot.loader = { efi = { canTouchEfiVariables = true; diff --git a/modules/home-manager/discord.nix b/modules/home-manager/discord.nix index 73ba6ae..7980433 100644 --- a/modules/home-manager/discord.nix +++ b/modules/home-manager/discord.nix @@ -35,217 +35,219 @@ in }; # Taken from [here](https://github.com/Misterio77/nix-config/blob/main/home/misterio/features/desktop/common/discord.nix) - xdg.configFile."discocss/custom.css".text = lib.mkIf cfg.base16Styles.enable - '' - .theme-light { - --header-primary: #${colors.base05}; - --header-secondary: #${colors.base04}; - --text-normal: #${colors.base05}; - --text-muted: #${colors.base04}; - --text-link: #${colors.base08}; - --channels-default: #${colors.base05}; - --interactive-normal: #${colors.base04}; - --interactive-hover: #${colors.base05}; - --interactive-active: #${colors.base05}; - --interactive-muted: #${colors.base03}; - --background-primary: #${colors.base00}; - --background-secondary: #${colors.base01}; - --background-secondary-alt: #${colors.base02}; - --background-tertiary: #${colors.base01}; - --background-accent: #${colors.base01}; - --background-floating: #${colors.base00}; - --background-mobile-primary: var(--background-primary); - --background-mobile-secondary: var(--background-secondary); - --background-modifier-selected: var(--background-secondary); - --scrollbar-thin-thumb: #${colors.base02}; - --scrollbar-auto-thumb: #${colors.base02}; - --scrollbar-auto-track: #${colors.base01}; - --scrollbar-auto-scrollbar-color-thumb: #${colors.base02}; - --scrollbar-auto-scrollbar-color-track: #${colors.base01}; - --focus-primary: #${colors.base08}; - --channeltextarea-background: #${colors.base01}; - --deprecated-card-bg: #${colors.base01}; - --deprecated-quickswitcher-input-background: #${colors.base01}; - --deprecated-quickswitcher-input-placeholder: #${colors.base05}; - --background-modifier-hover: var(--background-secondary); - --background-modifier-active: var(--background-secondary-alt); - --activity-card-background: var(--background-secondary); - } - body { - font-family: ${config.fontProfiles.regular.family}, sans serif; - } + xdg.configFile."discocss/custom.css" = lib.mkIf cfg.base16Styles.enable { + text = + '' + .theme-light { + --header-primary: #${colors.base05}; + --header-secondary: #${colors.base04}; + --text-normal: #${colors.base05}; + --text-muted: #${colors.base04}; + --text-link: #${colors.base08}; + --channels-default: #${colors.base05}; + --interactive-normal: #${colors.base04}; + --interactive-hover: #${colors.base05}; + --interactive-active: #${colors.base05}; + --interactive-muted: #${colors.base03}; + --background-primary: #${colors.base00}; + --background-secondary: #${colors.base01}; + --background-secondary-alt: #${colors.base02}; + --background-tertiary: #${colors.base01}; + --background-accent: #${colors.base01}; + --background-floating: #${colors.base00}; + --background-mobile-primary: var(--background-primary); + --background-mobile-secondary: var(--background-secondary); + --background-modifier-selected: var(--background-secondary); + --scrollbar-thin-thumb: #${colors.base02}; + --scrollbar-auto-thumb: #${colors.base02}; + --scrollbar-auto-track: #${colors.base01}; + --scrollbar-auto-scrollbar-color-thumb: #${colors.base02}; + --scrollbar-auto-scrollbar-color-track: #${colors.base01}; + --focus-primary: #${colors.base08}; + --channeltextarea-background: #${colors.base01}; + --deprecated-card-bg: #${colors.base01}; + --deprecated-quickswitcher-input-background: #${colors.base01}; + --deprecated-quickswitcher-input-placeholder: #${colors.base05}; + --background-modifier-hover: var(--background-secondary); + --background-modifier-active: var(--background-secondary-alt); + --activity-card-background: var(--background-secondary); + } + body { + font-family: ${config.fontProfiles.regular.family}, sans serif; + } - .scroller-1Bvpku { - background-color: var(--background-primary); - } - .scroller-2FKFPG { - background-color: var(--background-primary); - } - .headerPlaying-j0WQBV, .headerStreaming-2FjmGz { - background: var(--background-secondary-alt); - } - .theme-light .headerNormal-T_seeN { - background-color: var(--background-primary); - } - .theme-light .body-3iLsc4, .theme-light .footer-1fjuF6 { - background-color: var(--background-primary); - color: var(--header-secondary); - } - .theme-light .quickMessage-1yeL4E { - background-color: var(--background-secondary); - border-color: var(--background-secondary); - } - .theme-light .inset-3sAvek { - background-color: var(--background-secondary); - } - .theme-light .userSettingsAccount-2eMFVR .viewBody-2Qz-jg { - color: var(--header-primary); - } - .theme-light .modal-yWgWj- { - background-color: var(--background-primary); - } - .theme-light .footer-2gL1pp { - background-color: var(--background-primary); - } - .theme-light .lookLink-9FtZy-.colorPrimary-3b3xI6 { - color: var(--header-primary); - } - .theme-light .notDetected-33MY4s, .theme-light .notDetected-33MY4s { - background-color: var(--background-primary); - } - .theme-light .notDetected-33MY4s .gameName-1RiWHm, .theme-light .notDetected-33MY4s .gameName-1RiWHm { - color: var(--header-primary); - } - .theme-light .gameName-1RiWHm { - color: var(--header-primary); - } - .theme-light .notDetected-33MY4s .lastPlayed-3bQ7Bo, .theme-light .notDetected-33MY4s .lastPlayed-3bQ7Bo { - color: var(--header-primary); - } - .theme-light .nowPlayingAdd-1Kdmh_, .theme-light .nowPlayingAdd-1Kdmh_ { - color: var(--header-primary); - } - .css-1k00wn6-singleValue { - color: var(--header-primary); - } - .theme-light .codeRedemptionRedirect-1wVR4b { - color: var(--header-primary); - background-color: var(--background-primary); - border-color: var(--background-primary); - } - .theme-light .emptyStateHeader-248f_b { - color: var(--header-primary); - } - .theme-light .emptyStateSubtext-2hdA9c { - color: var(--header-primary); - } - .theme-light .root-1gCeng { - background-color: var(--background-primary); - } - .theme-light .date-EErlv4 { - color: var(--header-primary); - } - .theme-light .content-8bidB ol, .theme-light .content-8biNdB p, .theme-light .content-8biNdB ul li { - color: var(--header-primary); - } - .headerName-fajvi9, .headerTagUsernameNoNickname-2_H881 { - color: var(--header-primary); - } - .headerTag-2pZJzA { - color: var(--header-secondary); - } - .theme-light .activityProfile-2bJRaP .headerText-1HLrL7, .theme-light .activityUserPopout-2yItg2 .headerText-1HLrL7, .theme-light .activityProfile-2bJRaP .headerText-1HLrL7, .theme-light .activityUserPopout-2yItg2 .headerText-1HLrL7 { - color: var(--header-secondary); - } - .activityName-1IaRLn, .nameNormal-2lqVQK, .nameWrap-3Z4G_9 { - color: var(--header-secondary); - } - .theme-light .activityProfile-2bJRaP .content-3JfFJh, .theme-light .activityProfile-2bJRaP .details-38sfDr, .theme-light .activityProfile-2bJRaP .name-29ETJS, .theme-light .activityUserPopout-2yItg2 .content-3JfFJh, .theme-light .activityUserPopout-2yItg2 .details-38sfDr, .theme-light .activityUserPopout-2yItg2 .name-29ETJS, .theme-light .activityProfile-2bJRaP .content-3JfFJh, .theme-light .activityProfile-2bJRaP .details-38sfDr, .theme-light .activityProfile-2bJRaP .name-29ETJS, .theme-light .activityUserPopout-2yItg2 .content-3JfFJh, .theme-light .activityUserPopout-2yItg2 .details-38sfDr, .theme-light .activityUserPopout-2yItg2 .name-29ETJS { - color: var(--header-secondary); - } - .topSectionPlaying-1J5E4n { - background: var(--background-secondary-alt); - } - .username-3gJmXY { - color: var(--header-primary); - } - .discriminator-xUhQkU { - color: var(--header-secondary); - } - .tabBarItem-1b8RUP.item-PXvHYJ { - color: var(--header-secondary) !important; - border-color: transparent !important; - } - .theme-light .keybind-KpFkfr { - color: var(--header-primary); - } - .theme-light .closeButton-1tv5uR { - border-color: var(--header-primary); - } - .barFill-23-gu- { - background: var(--text-link); - } - .focused-3afm-j { - background-color: var(--background-secondary) !important; - color: var(--text-link) !important; - } - .colorDefault-2K3EoJ .checkbox-3s5GYZ, .colorDefault-2K3EoJ .radioSelection-1HmrQS { - color: var(--text-link); - } - .colorDefault-2K3EoJ .checkbox-3s5GYZ { - color: var(--text-link); - } - .colorDefault-2K3EoJ .check-1JyqgN { - color: var(--background-primary); - } - .colorDefault-2K3EoJ.focused-3afm-j .checkbox-3s5GYZ { - color: var(--background-primary) !important; - } - .colorDefault-2K3EoJ.focused-3afm-j .check-1JyqgN { - color: var(--text-link); - } - .wrapper-1BJsBx.selected-bZ3Lue .childWrapper-anI2G9, .wrapper-1BJsBx:hover .childWrapper-anI2G9 { - color: var(--background-primary); - background-color: var(--header-secondary); - } - .panels-j1Uci_ { - background-color: var(--background-primary); - } - .navButton-2gQCx- { - color: var(--interactive-normal); - } - .navButtonActive-1MkytQ { - color: var(--header-primary); - } - .input-3Xdcic { - color: var(--header-primary); - } - .clickable-2ap7je .header-2o-2hj { - background-color: var(--background-primary); - } - .peopleColumn-29fq28 { - background-color: var(--background-tertiary); - } - .theme-light .outer-1AjyKL.active-1xchHY, .theme-light .outer-1AjyKL.interactive-3B9GmY:hover { - background-color: var(--background-primary); - } + .scroller-1Bvpku { + background-color: var(--background-primary); + } + .scroller-2FKFPG { + background-color: var(--background-primary); + } + .headerPlaying-j0WQBV, .headerStreaming-2FjmGz { + background: var(--background-secondary-alt); + } + .theme-light .headerNormal-T_seeN { + background-color: var(--background-primary); + } + .theme-light .body-3iLsc4, .theme-light .footer-1fjuF6 { + background-color: var(--background-primary); + color: var(--header-secondary); + } + .theme-light .quickMessage-1yeL4E { + background-color: var(--background-secondary); + border-color: var(--background-secondary); + } + .theme-light .inset-3sAvek { + background-color: var(--background-secondary); + } + .theme-light .userSettingsAccount-2eMFVR .viewBody-2Qz-jg { + color: var(--header-primary); + } + .theme-light .modal-yWgWj- { + background-color: var(--background-primary); + } + .theme-light .footer-2gL1pp { + background-color: var(--background-primary); + } + .theme-light .lookLink-9FtZy-.colorPrimary-3b3xI6 { + color: var(--header-primary); + } + .theme-light .notDetected-33MY4s, .theme-light .notDetected-33MY4s { + background-color: var(--background-primary); + } + .theme-light .notDetected-33MY4s .gameName-1RiWHm, .theme-light .notDetected-33MY4s .gameName-1RiWHm { + color: var(--header-primary); + } + .theme-light .gameName-1RiWHm { + color: var(--header-primary); + } + .theme-light .notDetected-33MY4s .lastPlayed-3bQ7Bo, .theme-light .notDetected-33MY4s .lastPlayed-3bQ7Bo { + color: var(--header-primary); + } + .theme-light .nowPlayingAdd-1Kdmh_, .theme-light .nowPlayingAdd-1Kdmh_ { + color: var(--header-primary); + } + .css-1k00wn6-singleValue { + color: var(--header-primary); + } + .theme-light .codeRedemptionRedirect-1wVR4b { + color: var(--header-primary); + background-color: var(--background-primary); + border-color: var(--background-primary); + } + .theme-light .emptyStateHeader-248f_b { + color: var(--header-primary); + } + .theme-light .emptyStateSubtext-2hdA9c { + color: var(--header-primary); + } + .theme-light .root-1gCeng { + background-color: var(--background-primary); + } + .theme-light .date-EErlv4 { + color: var(--header-primary); + } + .theme-light .content-8bidB ol, .theme-light .content-8biNdB p, .theme-light .content-8biNdB ul li { + color: var(--header-primary); + } + .headerName-fajvi9, .headerTagUsernameNoNickname-2_H881 { + color: var(--header-primary); + } + .headerTag-2pZJzA { + color: var(--header-secondary); + } + .theme-light .activityProfile-2bJRaP .headerText-1HLrL7, .theme-light .activityUserPopout-2yItg2 .headerText-1HLrL7, .theme-light .activityProfile-2bJRaP .headerText-1HLrL7, .theme-light .activityUserPopout-2yItg2 .headerText-1HLrL7 { + color: var(--header-secondary); + } + .activityName-1IaRLn, .nameNormal-2lqVQK, .nameWrap-3Z4G_9 { + color: var(--header-secondary); + } + .theme-light .activityProfile-2bJRaP .content-3JfFJh, .theme-light .activityProfile-2bJRaP .details-38sfDr, .theme-light .activityProfile-2bJRaP .name-29ETJS, .theme-light .activityUserPopout-2yItg2 .content-3JfFJh, .theme-light .activityUserPopout-2yItg2 .details-38sfDr, .theme-light .activityUserPopout-2yItg2 .name-29ETJS, .theme-light .activityProfile-2bJRaP .content-3JfFJh, .theme-light .activityProfile-2bJRaP .details-38sfDr, .theme-light .activityProfile-2bJRaP .name-29ETJS, .theme-light .activityUserPopout-2yItg2 .content-3JfFJh, .theme-light .activityUserPopout-2yItg2 .details-38sfDr, .theme-light .activityUserPopout-2yItg2 .name-29ETJS { + color: var(--header-secondary); + } + .topSectionPlaying-1J5E4n { + background: var(--background-secondary-alt); + } + .username-3gJmXY { + color: var(--header-primary); + } + .discriminator-xUhQkU { + color: var(--header-secondary); + } + .tabBarItem-1b8RUP.item-PXvHYJ { + color: var(--header-secondary) !important; + border-color: transparent !important; + } + .theme-light .keybind-KpFkfr { + color: var(--header-primary); + } + .theme-light .closeButton-1tv5uR { + border-color: var(--header-primary); + } + .barFill-23-gu- { + background: var(--text-link); + } + .focused-3afm-j { + background-color: var(--background-secondary) !important; + color: var(--text-link) !important; + } + .colorDefault-2K3EoJ .checkbox-3s5GYZ, .colorDefault-2K3EoJ .radioSelection-1HmrQS { + color: var(--text-link); + } + .colorDefault-2K3EoJ .checkbox-3s5GYZ { + color: var(--text-link); + } + .colorDefault-2K3EoJ .check-1JyqgN { + color: var(--background-primary); + } + .colorDefault-2K3EoJ.focused-3afm-j .checkbox-3s5GYZ { + color: var(--background-primary) !important; + } + .colorDefault-2K3EoJ.focused-3afm-j .check-1JyqgN { + color: var(--text-link); + } + .wrapper-1BJsBx.selected-bZ3Lue .childWrapper-anI2G9, .wrapper-1BJsBx:hover .childWrapper-anI2G9 { + color: var(--background-primary); + background-color: var(--header-secondary); + } + .panels-j1Uci_ { + background-color: var(--background-primary); + } + .navButton-2gQCx- { + color: var(--interactive-normal); + } + .navButtonActive-1MkytQ { + color: var(--header-primary); + } + .input-3Xdcic { + color: var(--header-primary); + } + .clickable-2ap7je .header-2o-2hj { + background-color: var(--background-primary); + } + .peopleColumn-29fq28 { + background-color: var(--background-tertiary); + } + .theme-light .outer-1AjyKL.active-1xchHY, .theme-light .outer-1AjyKL.interactive-3B9GmY:hover { + background-color: var(--background-primary); + } - .theme-light .popout-38lTFE { - background-color: var(--background-primary); - } + .theme-light .popout-38lTFE { + background-color: var(--background-primary); + } - .theme-light .scrollerThemed-2oenus.themedWithTrack-q8E3vB>.scroller-2FKFPG::-webkit-scrollbar-track-piece { - background-color: var(--background-primary); - border: 4px solid var(--background-secondary); - } + .theme-light .scrollerThemed-2oenus.themedWithTrack-q8E3vB>.scroller-2FKFPG::-webkit-scrollbar-track-piece { + background-color: var(--background-primary); + border: 4px solid var(--background-secondary); + } - .theme-light .scrollerThemed-2oenus.themedWithTrack-q8E3vB>.scroller-2FKFPG::-webkit-scrollbar-thumb { - background-color: var(--background-secondary); - border-color: var(--background-secondary); - } - .theme-light .header-sJd8D7 { - color: var(--text-normal) - } - ''; + .theme-light .scrollerThemed-2oenus.themedWithTrack-q8E3vB>.scroller-2FKFPG::-webkit-scrollbar-thumb { + background-color: var(--background-secondary); + border-color: var(--background-secondary); + } + .theme-light .header-sJd8D7 { + color: var(--text-normal) + } + ''; + }; }; } diff --git a/pkgs/default.nix b/pkgs/default.nix index 1379724..4ddc912 100644 --- a/pkgs/default.nix +++ b/pkgs/default.nix @@ -4,4 +4,6 @@ { pkgs ? (import ../nixpkgs.nix) { } }: { # example = pkgs.callPackage (import ./example.nix) {}; vimclip = pkgs.callPackage (import ./vimclip.nix) {}; + + plymouthThemes = pkgs.callPackage (import ./plymouth-themes.nix) {}; } diff --git a/pkgs/plymouth-themes.nix b/pkgs/plymouth-themes.nix new file mode 100644 index 0000000..444948a --- /dev/null +++ b/pkgs/plymouth-themes.nix @@ -0,0 +1,31 @@ +{ pkgs ? import { } +}: +# See [this blog post](http://blog.sidhartharya.com/using-custom-plymouth-theme-on-nixos/) +let mkTheme = { themeName, pack }: pkgs.stdenv.mkDerivation rec { + pname = "adi1090x-plymouth-${themeName}"; + version = "0.0.1"; + + src = pkgs.fetchFromGitHub { + owner = "adi1090x"; + repo = "plymouth-themes"; + rev = "bf2f570bee8e84c5c20caac353cbe1d811a4745f"; + sha256 = "0scgba00f6by08hb14wrz26qcbcysym69mdlv913mhm3rc1szlal"; + }; + + configurePhase = '' + mkdir -p $out/share/plymouth/themes/ + ''; + + installPhase = + let path = "pack_${pack}/${themeName}"; + in + '' + cp -r ${path} $out/share/plymouth/themes + cat ${path}/${themeName}.plymouth \ + | sed "s@\/usr\/@$out\/@" \ + > $out/share/plymouth/themes/${themeName}/${themeName}.plymouth + ''; +}; in +{ + cuts_alt = mkTheme { themeName = "cuts_alt"; pack = "1"; }; +} diff --git a/stylua.toml b/stylua.toml new file mode 100644 index 0000000..03d2f90 --- /dev/null +++ b/stylua.toml @@ -0,0 +1,3 @@ +column_width = 80 +indent_width = 2 +indent_type = "Spaces"