Theming
This commit is contained in:
parent
408ae8df77
commit
d702e2cb24
5 changed files with 2066 additions and 1403 deletions
51
flake.lock
51
flake.lock
|
@ -19,22 +19,6 @@
|
|||
"url": "ssh://gitea@git.lyte.dev/lytedev/api.lyte.dev.git"
|
||||
}
|
||||
},
|
||||
"base16-schemes": {
|
||||
"flake": false,
|
||||
"locked": {
|
||||
"lastModified": 1689473676,
|
||||
"narHash": "sha256-L0RhUr9+W5EPWBpLcmkKpUeCEWRs/kLzVMF3Vao2ZU0=",
|
||||
"owner": "tinted-theming",
|
||||
"repo": "base16-schemes",
|
||||
"rev": "d95123ca6377cd849cfdce92c0a24406b0c6a789",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "tinted-theming",
|
||||
"repo": "base16-schemes",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"crane": {
|
||||
"inputs": {
|
||||
"flake-compat": "flake-compat",
|
||||
|
@ -239,25 +223,6 @@
|
|||
"type": "github"
|
||||
}
|
||||
},
|
||||
"nix-colors": {
|
||||
"inputs": {
|
||||
"base16-schemes": "base16-schemes",
|
||||
"nixpkgs-lib": "nixpkgs-lib"
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1695388192,
|
||||
"narHash": "sha256-2jelpE7xK+4M7jZNyWL7QYOYegQLYBDQS5bvdo8XRUQ=",
|
||||
"owner": "misterio77",
|
||||
"repo": "nix-colors",
|
||||
"rev": "37227f274b34a3b51649166deb94ce7fec2c6a4c",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "misterio77",
|
||||
"repo": "nix-colors",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"nixpkgs": {
|
||||
"locked": {
|
||||
"lastModified": 1690026219,
|
||||
|
@ -274,21 +239,6 @@
|
|||
"type": "github"
|
||||
}
|
||||
},
|
||||
"nixpkgs-lib": {
|
||||
"locked": {
|
||||
"lastModified": 1694911725,
|
||||
"narHash": "sha256-8YqI+YU1DGclEjHsnrrGfqsQg3Wyga1DfTbJrN3Ud0c=",
|
||||
"owner": "nix-community",
|
||||
"repo": "nixpkgs.lib",
|
||||
"rev": "819180647f428a3826bfc917a54449da1e532ce0",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "nix-community",
|
||||
"repo": "nixpkgs.lib",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"nixpkgs-stable": {
|
||||
"locked": {
|
||||
"lastModified": 1696039360,
|
||||
|
@ -425,7 +375,6 @@
|
|||
"helix": "helix",
|
||||
"home-manager": "home-manager",
|
||||
"hyprland": "hyprland",
|
||||
"nix-colors": "nix-colors",
|
||||
"nixpkgs-stable": "nixpkgs-stable",
|
||||
"nixpkgs-unstable": "nixpkgs-unstable",
|
||||
"sops-nix": "sops-nix"
|
||||
|
|
126
flake.nix
126
flake.nix
|
@ -8,7 +8,6 @@
|
|||
sops-nix.url = "github:Mic92/sops-nix";
|
||||
hardware.url = "github:nixos/nixos-hardware";
|
||||
hyprland.url = "github:hyprwm/Hyprland";
|
||||
nix-colors.url = "github:misterio77/nix-colors";
|
||||
|
||||
api-lyte-dev.url = "git+ssh://gitea@git.lyte.dev/lytedev/api.lyte.dev.git";
|
||||
|
||||
|
@ -25,7 +24,6 @@
|
|||
nixpkgs-stable,
|
||||
nixpkgs-unstable,
|
||||
home-manager,
|
||||
nix-colors,
|
||||
...
|
||||
} @ inputs: let
|
||||
inherit (self) outputs;
|
||||
|
@ -38,8 +36,120 @@
|
|||
"x86_64-darwin"
|
||||
];
|
||||
|
||||
color-schemes = let
|
||||
mkColorScheme = scheme @ {
|
||||
scheme-name,
|
||||
bg,
|
||||
bg2,
|
||||
bg3,
|
||||
bg4,
|
||||
bg5,
|
||||
fg,
|
||||
fg2,
|
||||
fg3,
|
||||
fgdim,
|
||||
# pink,
|
||||
purple,
|
||||
red,
|
||||
# orange,
|
||||
yellow,
|
||||
green,
|
||||
teal,
|
||||
blue,
|
||||
...
|
||||
}: let
|
||||
base =
|
||||
{
|
||||
# aliases?
|
||||
text = fg;
|
||||
primary = blue;
|
||||
urgent = red;
|
||||
|
||||
# blacks
|
||||
"0" = bg4;
|
||||
"8" = bg5;
|
||||
|
||||
"1" = red;
|
||||
"9" = red;
|
||||
"2" = green;
|
||||
"10" = green;
|
||||
"3" = yellow;
|
||||
"11" = yellow;
|
||||
"4" = blue;
|
||||
"12" = blue;
|
||||
"5" = purple;
|
||||
"13" = purple;
|
||||
"6" = teal;
|
||||
"14" = teal;
|
||||
|
||||
# whites
|
||||
"7" = fg2;
|
||||
"15" = fg3;
|
||||
}
|
||||
// scheme;
|
||||
in
|
||||
{
|
||||
withHashPrefix = inputs.nixpkgs-unstable.lib.mapAttrs (_: value: "#${value}") base;
|
||||
}
|
||||
// base;
|
||||
in {
|
||||
donokai = mkColorScheme {
|
||||
scheme-name = "donokai";
|
||||
bg = "111111";
|
||||
bg2 = "181818";
|
||||
bg3 = "222222";
|
||||
bg4 = "292929";
|
||||
bg5 = "333333";
|
||||
|
||||
fg = "f8f8f8";
|
||||
fg2 = "d8d8d8";
|
||||
fg3 = "c8c8c8";
|
||||
fgdim = "666666";
|
||||
|
||||
red = "f92672";
|
||||
green = "a6e22e";
|
||||
yellow = "f4bf75";
|
||||
blue = "66d9ef";
|
||||
purple = "ae81ff";
|
||||
teal = "a1efe4";
|
||||
# orange = "fab387";
|
||||
};
|
||||
catppuccin-mocha-sapphire = mkColorScheme {
|
||||
scheme-name = "catppuccin-mocha-sapphire";
|
||||
bg = "1e1e2e";
|
||||
bg2 = "181825";
|
||||
bg3 = "313244";
|
||||
bg4 = "45475a";
|
||||
bg5 = "585b70";
|
||||
|
||||
fg = "cdd6f4";
|
||||
fg2 = "bac2de";
|
||||
fg3 = "a6adc8";
|
||||
fgdim = "6c7086";
|
||||
|
||||
# pink = "f5e0dc";
|
||||
purple = "cba6f7";
|
||||
red = "f38ba8";
|
||||
# orange = "fab387";
|
||||
# yellow = "f9e2af";
|
||||
yellow = "fab387";
|
||||
green = "a6e3a1";
|
||||
teal = "94e2d5";
|
||||
blue = "74c7ec";
|
||||
};
|
||||
};
|
||||
|
||||
colors = color-schemes.catppuccin-mocha-sapphire;
|
||||
font = {
|
||||
name = "IosevkaLyteTerm";
|
||||
size = 12;
|
||||
};
|
||||
|
||||
linuxHomeManagerModules = [./home ./home/linux.nix];
|
||||
|
||||
forAllSystems = nixpkgs-stable.lib.genAttrs systems;
|
||||
in {
|
||||
# TODO: nix-color integration?
|
||||
# Your custom packages
|
||||
# Acessible through 'nix build', 'nix shell', etc
|
||||
packages = forAllSystems (system: import ./pkgs nixpkgs-stable.legacyPackages.${system});
|
||||
|
@ -66,7 +176,7 @@
|
|||
cb {
|
||||
system = system;
|
||||
specialArgs = {
|
||||
inherit inputs outputs system nix-colors;
|
||||
inherit inputs outputs system colors font;
|
||||
flake = self;
|
||||
};
|
||||
modules =
|
||||
|
@ -76,14 +186,12 @@
|
|||
]
|
||||
++ modules
|
||||
++ [
|
||||
# all nixos hosts should use our home manager config
|
||||
# TODO: unify with the module list in outputs.homeConfigurations.daniel
|
||||
inputs.home-manager.nixosModules.home-manager
|
||||
{
|
||||
home-manager = {
|
||||
extraSpecialArgs = {inherit inputs outputs system nix-colors;};
|
||||
extraSpecialArgs = {inherit inputs outputs system colors font;};
|
||||
users.daniel = {
|
||||
imports = [./home ./home/linux.nix];
|
||||
imports = linuxHomeManagerModules;
|
||||
};
|
||||
};
|
||||
}
|
||||
|
@ -108,11 +216,11 @@
|
|||
mkHome = system: modules:
|
||||
home-manager.lib.homeManagerConfiguration {
|
||||
pkgs = nixpkgs-unstable.legacyPackages.${system};
|
||||
extraSpecialArgs = {inherit inputs outputs system nix-colors;};
|
||||
extraSpecialArgs = {inherit inputs outputs system colors font;};
|
||||
modules = modules;
|
||||
};
|
||||
in {
|
||||
"daniel" = mkHome "x86_64-linux" [./home ./home/linux.nix];
|
||||
"daniel" = mkHome "x86_64-linux" linuxHomeManagerModules;
|
||||
"daniel.flanagan" = mkHome "aarch64-darwin" [./home];
|
||||
};
|
||||
|
||||
|
|
611
home/default.nix
611
home/default.nix
|
@ -1,48 +1,52 @@
|
|||
{
|
||||
font,
|
||||
pkgs,
|
||||
lib,
|
||||
system,
|
||||
inputs,
|
||||
nix-colors,
|
||||
colors,
|
||||
...
|
||||
}: let
|
||||
email = "daniel@lyte.dev";
|
||||
name = "Daniel Flanagan";
|
||||
in {
|
||||
# TODO: email access?
|
||||
# accounts.email.accounts = {
|
||||
# google = {
|
||||
# address = "wraithx2@gmail.com";
|
||||
# };
|
||||
# };
|
||||
/*
|
||||
accounts.email.accounts = {
|
||||
google = {
|
||||
address = "wraithx2@gmail.com";
|
||||
};
|
||||
};
|
||||
*/
|
||||
|
||||
# TODO: fonts? right now they are only handled at the nixos-level (desktop-usage module)
|
||||
# TODO: wallpaper?
|
||||
|
||||
imports = [
|
||||
nix-colors.homeManagerModules.default
|
||||
# nix-colors.homeManagerModules.default
|
||||
];
|
||||
|
||||
colorScheme = nix-colors.colorSchemes.catppuccin-mocha;
|
||||
# copied here for easy lookups:
|
||||
# https://github.com/tinted-theming/base16-schemes/blob/main/catppuccin-mocha.yaml
|
||||
|
||||
# base00: "1e1e2e" # base
|
||||
# base01: "181825" # mantle
|
||||
# base02: "313244" # surface0
|
||||
# base03: "45475a" # surface1
|
||||
# base04: "585b70" # surface2
|
||||
# base05: "cdd6f4" # text
|
||||
# base06: "f5e0dc" # rosewater
|
||||
# base07: "b4befe" # lavender
|
||||
# base08: "f38ba8" # red
|
||||
# base09: "fab387" # peach
|
||||
# base0A: "f9e2af" # yellow
|
||||
# base0B: "a6e3a1" # green
|
||||
# base0C: "94e2d5" # teal
|
||||
# base0D: "89b4fa" # blue
|
||||
# base0E: "cba6f7" # mauve
|
||||
# base0F: "f2cdcd" # flamingo
|
||||
/*
|
||||
base00: "1e1e2e" # base
|
||||
base01: "181825" # mantle
|
||||
base02: "313244" # surface0
|
||||
base03: "45475a" # surface1
|
||||
base04: "585b70" # surface2
|
||||
base05: "cdd6f4" # text
|
||||
base06: "f5e0dc" # rosewater
|
||||
base07: "b4befe" # lavender
|
||||
base08: "f38ba8" # red
|
||||
base09: "fab387" # peach
|
||||
base0A: "f9e2af" # yellow
|
||||
base0B: "a6e3a1" # green
|
||||
base0C: "94e2d5" # teal
|
||||
base0D: "89b4fa" # blue
|
||||
base0E: "cba6f7" # mauve
|
||||
base0F: "f2cdcd" # flamingo
|
||||
*/
|
||||
|
||||
home = {
|
||||
username = lib.mkDefault "daniel";
|
||||
|
@ -64,9 +68,9 @@ in {
|
|||
paths = [./scripts/common];
|
||||
})
|
||||
];
|
||||
};
|
||||
|
||||
file = {
|
||||
".iex.exs" = {
|
||||
home.file.".iex.exs" = {
|
||||
enable = true;
|
||||
text = ''
|
||||
Application.put_env(:elixir, :ansi_enabled, true)
|
||||
|
@ -99,16 +103,13 @@ in {
|
|||
)
|
||||
'';
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
programs = {
|
||||
password-store = {
|
||||
programs.password-store = {
|
||||
enable = true;
|
||||
package = pkgs.pass.withExtensions (exts: [exts.pass-otp]);
|
||||
};
|
||||
|
||||
git = {
|
||||
programs.git = {
|
||||
enable = true;
|
||||
|
||||
userEmail = email;
|
||||
|
@ -176,11 +177,11 @@ in {
|
|||
};
|
||||
};
|
||||
|
||||
gitui = {
|
||||
programs.gitui = {
|
||||
enable = true;
|
||||
};
|
||||
|
||||
helix = {
|
||||
programs.helix = {
|
||||
enable = true;
|
||||
package = inputs.helix.packages.${system}.helix;
|
||||
languages = {
|
||||
|
@ -293,43 +294,45 @@ in {
|
|||
auto-format = true;
|
||||
}
|
||||
|
||||
# [[language]]
|
||||
# name = "jsx"
|
||||
# scope = "source.jsx"
|
||||
# injection-regex = "jsx"
|
||||
# file-types = ["jsx"]
|
||||
# shebangs = ["deno", "node"]
|
||||
# roots = ["deno.jsonc", "deno.json", "package.json", "tsconfig.json"]
|
||||
# comment-token = "//"
|
||||
# config = { enable = true, lint = true, unstable = true }
|
||||
# language-server = { command = "deno", args = ["lsp"], language-id = "javascriptreact" }
|
||||
# indent = { tab-width = 2, unit = " " }
|
||||
# grammar = "javascript"
|
||||
# auto-format = true
|
||||
/*
|
||||
[[language]]
|
||||
name = "jsx"
|
||||
scope = "source.jsx"
|
||||
injection-regex = "jsx"
|
||||
file-types = ["jsx"]
|
||||
shebangs = ["deno", "node"]
|
||||
roots = ["deno.jsonc", "deno.json", "package.json", "tsconfig.json"]
|
||||
comment-token = "//"
|
||||
config = { enable = true, lint = true, unstable = true }
|
||||
language-server = { command = "deno", args = ["lsp"], language-id = "javascriptreact" }
|
||||
indent = { tab-width = 2, unit = " " }
|
||||
grammar = "javascript"
|
||||
auto-format = true
|
||||
|
||||
# [[language]]
|
||||
# name = "tsx"
|
||||
# scope = "source.tsx"
|
||||
# injection-regex = "^(tsx)$" # |typescript
|
||||
# file-types = ["tsx"]
|
||||
# shebangs = ["deno", "node"]
|
||||
# roots = ["deno.jsonc", "deno.json", "package.json", "tsconfig.json"]
|
||||
# config = { enable = true, lint = true, unstable = true }
|
||||
# language-server = { command = "deno", args = ["lsp"], language-id = "typescriptreact" }
|
||||
# indent = { tab-width = 2, unit = " " }
|
||||
# auto-format = true
|
||||
[[language]]
|
||||
name = "tsx"
|
||||
scope = "source.tsx"
|
||||
injection-regex = "^(tsx)$" # |typescript
|
||||
file-types = ["tsx"]
|
||||
shebangs = ["deno", "node"]
|
||||
roots = ["deno.jsonc", "deno.json", "package.json", "tsconfig.json"]
|
||||
config = { enable = true, lint = true, unstable = true }
|
||||
language-server = { command = "deno", args = ["lsp"], language-id = "typescriptreact" }
|
||||
indent = { tab-width = 2, unit = " " }
|
||||
auto-format = true
|
||||
|
||||
# [[language]]
|
||||
# name = "jsonc"
|
||||
# scope = "source.jsonc"
|
||||
# injection-regex = "^(jsonc)$"
|
||||
# file-types = ["jsonc"]
|
||||
# shebangs = ["deno", "node"]
|
||||
# roots = ["deno.jsonc", "deno.json", "package.json", "tsconfig.json"]
|
||||
# config = { enable = true, lint = true, unstable = true }
|
||||
# language-server = { command = "deno", args = ["lsp"], language-id = "jsonc" }
|
||||
# indent = { tab-width = 2, unit = " " }
|
||||
# auto-format = true
|
||||
[[language]]
|
||||
name = "jsonc"
|
||||
scope = "source.jsonc"
|
||||
injection-regex = "^(jsonc)$"
|
||||
file-types = ["jsonc"]
|
||||
shebangs = ["deno", "node"]
|
||||
roots = ["deno.jsonc", "deno.json", "package.json", "tsconfig.json"]
|
||||
config = { enable = true, lint = true, unstable = true }
|
||||
language-server = { command = "deno", args = ["lsp"], language-id = "jsonc" }
|
||||
indent = { tab-width = 2, unit = " " }
|
||||
auto-format = true
|
||||
*/
|
||||
];
|
||||
};
|
||||
|
||||
|
@ -408,11 +411,233 @@ in {
|
|||
};
|
||||
};
|
||||
|
||||
themes = {
|
||||
themes = with colors.withHashPrefix; {
|
||||
custom = {
|
||||
"inherits" = "catppuccin_mocha";
|
||||
"type" = yellow;
|
||||
|
||||
"ui.background" = "default";
|
||||
"constructor" = blue;
|
||||
|
||||
"constant" = yellow;
|
||||
"constant.builtin" = yellow;
|
||||
"constant.character" = teal;
|
||||
"constant.character.escape" = yellow;
|
||||
|
||||
"string" = green;
|
||||
"string.regexp" = yellow;
|
||||
"string.special" = blue;
|
||||
|
||||
"comment" = {
|
||||
fg = fgdim;
|
||||
modifiers = ["italic"];
|
||||
};
|
||||
|
||||
"variable" = text;
|
||||
"variable.parameter" = {
|
||||
fg = red;
|
||||
modifiers = ["italic"];
|
||||
};
|
||||
"variable.builtin" = red;
|
||||
"variable.other.member" = text;
|
||||
|
||||
"label" = blue;
|
||||
|
||||
"punctuation" = fgdim;
|
||||
"punctuation.special" = blue;
|
||||
|
||||
"keyword" = purple;
|
||||
"keyword.storage.modifier.ref" = teal;
|
||||
"keyword.control.conditional" = {
|
||||
fg = purple;
|
||||
modifiers = ["italic"];
|
||||
};
|
||||
|
||||
"operator" = blue;
|
||||
|
||||
"function" = blue;
|
||||
"function.macro" = purple;
|
||||
|
||||
"tag" = purple;
|
||||
"attribute" = blue;
|
||||
|
||||
"namespace" = {
|
||||
fg = blue;
|
||||
modifiers = ["italic"];
|
||||
};
|
||||
|
||||
"special" = blue;
|
||||
|
||||
"markup.heading.marker" = {
|
||||
fg = yellow;
|
||||
modifiers = ["bold"];
|
||||
};
|
||||
"markup.heading.1" = blue;
|
||||
"markup.heading.2" = teal;
|
||||
"markup.heading.3" = green;
|
||||
"markup.heading.4" = yellow;
|
||||
"markup.heading.5" = red;
|
||||
"markup.heading.6" = fg3;
|
||||
"markup.list" = purple;
|
||||
"markup.bold" = {modifiers = ["bold"];};
|
||||
"markup.italic" = {modifiers = ["italic"];};
|
||||
"markup.strikethrough" = {modifiers = ["crossed_out"];};
|
||||
"markup.link.url" = {
|
||||
fg = red;
|
||||
modifiers = ["underlined"];
|
||||
};
|
||||
"markup.link.text" = blue;
|
||||
"markup.raw" = red;
|
||||
|
||||
"diff.plus" = green;
|
||||
"diff.minus" = red;
|
||||
"diff.delta" = blue;
|
||||
|
||||
"ui.linenr" = {fg = fgdim;};
|
||||
"ui.linenr.selected" = {fg = fg2;};
|
||||
|
||||
"ui.statusline" = {
|
||||
fg = fg2;
|
||||
bg = bg2;
|
||||
};
|
||||
"ui.statusline.inactive" = {
|
||||
fg = fg3;
|
||||
bg = bg;
|
||||
};
|
||||
"ui.statusline.normal" = {
|
||||
fg = bg;
|
||||
bg = purple;
|
||||
modifiers = ["bold"];
|
||||
};
|
||||
"ui.statusline.insert" = {
|
||||
fg = bg;
|
||||
bg = green;
|
||||
modifiers = ["bold"];
|
||||
};
|
||||
"ui.statusline.select" = {
|
||||
fg = bg;
|
||||
bg = red;
|
||||
modifiers = ["bold"];
|
||||
};
|
||||
|
||||
"ui.popup" = {
|
||||
fg = text;
|
||||
bg = bg2;
|
||||
};
|
||||
"ui.window" = {fg = fg3;};
|
||||
"ui.help" = {
|
||||
fg = fg2;
|
||||
bg = bg2;
|
||||
};
|
||||
|
||||
"ui.bufferline" = {
|
||||
fg = fgdim;
|
||||
bg = bg2;
|
||||
};
|
||||
"ui.bufferline.background" = {bg = bg2;};
|
||||
|
||||
"ui.text" = text;
|
||||
"ui.text.focus" = {
|
||||
fg = "text";
|
||||
bg = "surface0";
|
||||
modifiers = ["bold"];
|
||||
};
|
||||
"ui.text.inactive" = {fg = fg2;};
|
||||
|
||||
"ui.virtual" = fg2;
|
||||
"ui.virtual.ruler" = {bg = bg2;};
|
||||
"ui.virtual.indent-guide" = bg3;
|
||||
"ui.virtual.inlay-hint" = {
|
||||
fg = bg3;
|
||||
bg = bg;
|
||||
};
|
||||
|
||||
"ui.selection" = {bg = bg5;};
|
||||
|
||||
"ui.cursor" = {
|
||||
fg = bg;
|
||||
bg = text;
|
||||
};
|
||||
"ui.cursor.primary" = {
|
||||
fg = bg;
|
||||
bg = red;
|
||||
};
|
||||
"ui.cursor.match" = {
|
||||
fg = yellow;
|
||||
modifiers = ["bold"];
|
||||
};
|
||||
|
||||
"ui.cursor.primary.normal" = {
|
||||
fg = bg;
|
||||
bg = text;
|
||||
};
|
||||
"ui.cursor.primary.insert" = {
|
||||
fg = bg;
|
||||
bg = text;
|
||||
};
|
||||
"ui.cursor.primary.select" = {
|
||||
fg = bg;
|
||||
bg = text;
|
||||
};
|
||||
|
||||
"ui.cursor.normal" = {
|
||||
fg = bg;
|
||||
bg = fg;
|
||||
};
|
||||
"ui.cursor.insert" = {
|
||||
fg = bg;
|
||||
bg = fg;
|
||||
};
|
||||
"ui.cursor.select" = {
|
||||
fg = bg;
|
||||
bg = fg;
|
||||
};
|
||||
|
||||
"ui.cursorline.primary" = {bg = bg3;};
|
||||
|
||||
"ui.highlight" = {
|
||||
bg = fg2;
|
||||
modifiers = ["bold"];
|
||||
};
|
||||
|
||||
"ui.menu" = {
|
||||
fg = fg3;
|
||||
bg = bg2;
|
||||
};
|
||||
"ui.menu.selected" = {
|
||||
fg = text;
|
||||
bg = bg4;
|
||||
modifiers = ["bold"];
|
||||
};
|
||||
|
||||
"diagnostic.error" = {
|
||||
underline = {
|
||||
color = red;
|
||||
style = "curl";
|
||||
};
|
||||
};
|
||||
"diagnostic.warning" = {
|
||||
underline = {
|
||||
color = yellow;
|
||||
style = "curl";
|
||||
};
|
||||
};
|
||||
"diagnostic.info" = {
|
||||
underline = {
|
||||
color = blue;
|
||||
style = "curl";
|
||||
};
|
||||
};
|
||||
"diagnostic.hint" = {
|
||||
underline = {
|
||||
color = blue;
|
||||
style = "curl";
|
||||
};
|
||||
};
|
||||
|
||||
error = red;
|
||||
warning = yellow;
|
||||
info = blue;
|
||||
hint = teal;
|
||||
"ui.background" = bg;
|
||||
|
||||
# "ui.cursorline.primary" = { bg = "default" }
|
||||
# "ui.cursorline.secondary" = { bg = "default" }
|
||||
|
@ -421,10 +646,10 @@ in {
|
|||
# "ui.virtual.ruler" = { bg = "default" }
|
||||
|
||||
"ui.bufferline.active" = {
|
||||
fg = "sapphire";
|
||||
bg = "base";
|
||||
fg = primary;
|
||||
bg = bg3;
|
||||
underline = {
|
||||
color = "sapphire";
|
||||
color = primary;
|
||||
style = "";
|
||||
};
|
||||
};
|
||||
|
@ -432,7 +657,7 @@ in {
|
|||
};
|
||||
};
|
||||
|
||||
bat = {
|
||||
programs.bat = {
|
||||
enable = true;
|
||||
config = {
|
||||
theme = "Catppuccin-mocha";
|
||||
|
@ -449,18 +674,148 @@ in {
|
|||
};
|
||||
};
|
||||
|
||||
kitty = {
|
||||
programs.wezterm = {
|
||||
enable = true;
|
||||
extraConfig = ''
|
||||
local wezterm = require'wezterm'
|
||||
|
||||
local config = {}
|
||||
|
||||
-- TODO: integrate nix colors
|
||||
|
||||
if wezterm.config_builder then
|
||||
config = wezterm.config_builder()
|
||||
end
|
||||
|
||||
local hostname = io.popen("/bin/hostname"):read("*a"):gsub("%s", "")
|
||||
local font_spec = { family = '${font.name}', weight = 'Medium', italic = false }
|
||||
local font_size = ${toString font.size}.0
|
||||
|
||||
if hostname == "laptop" then
|
||||
font_size = 13
|
||||
end
|
||||
|
||||
local font = wezterm.font_with_fallback{
|
||||
font_spec,
|
||||
{ family = 'Symbols Nerd Font Mono', weight = 'Regular', italic = false },
|
||||
'Noto Color Emoji',
|
||||
}
|
||||
|
||||
if hostname == "laptop" then
|
||||
config.font_rules = {
|
||||
-- no italics
|
||||
{
|
||||
font = font
|
||||
},
|
||||
}
|
||||
end
|
||||
|
||||
config.default_cursor_style = 'BlinkingBar'
|
||||
|
||||
config.font = font
|
||||
config.font_size = font_size
|
||||
|
||||
config.hide_tab_bar_if_only_one_tab = true
|
||||
config.use_fancy_tab_bar = false
|
||||
config.tab_bar_at_bottom = false
|
||||
config.window_background_opacity = 1.0
|
||||
|
||||
config.color_scheme = "Catppuccin Mocha"
|
||||
|
||||
config.window_frame.font = config.font
|
||||
config.window_frame.font_size = font_size
|
||||
|
||||
config.inactive_pane_hsb = {
|
||||
saturation = 0.8,
|
||||
brightness = 0.7,
|
||||
}
|
||||
|
||||
config.keys = {
|
||||
{
|
||||
key = 'j',
|
||||
mods = 'CTRL',
|
||||
action = wezterm.action.ActivatePaneDirection'Down'
|
||||
},
|
||||
{
|
||||
key = 'Insert',
|
||||
mods = 'SHIFT',
|
||||
action = wezterm.action.PasteFrom'Clipboard'
|
||||
},
|
||||
{
|
||||
key = 'v',
|
||||
mods = 'CTRL|SHIFT',
|
||||
action = wezterm.action.PasteFrom'PrimarySelection'
|
||||
},
|
||||
{
|
||||
key = 'h',
|
||||
mods = 'CTRL',
|
||||
action = wezterm.action.ActivatePaneDirection'Left'
|
||||
},
|
||||
{
|
||||
key = 'l',
|
||||
mods = 'CTRL',
|
||||
action = wezterm.action.ActivatePaneDirection'Right'
|
||||
},
|
||||
{
|
||||
key = 'k',
|
||||
mods = 'CTRL',
|
||||
action = wezterm.action.ActivatePaneDirection'Up'
|
||||
},
|
||||
{
|
||||
key = 'j',
|
||||
mods = 'CTRL|SHIFT',
|
||||
action = wezterm.action.SplitVertical{domain='CurrentPaneDomain'}
|
||||
},
|
||||
{
|
||||
key = 'l',
|
||||
mods = 'CTRL|SHIFT',
|
||||
action = wezterm.action.SplitHorizontal{domain='CurrentPaneDomain'}
|
||||
},
|
||||
{
|
||||
key = 'l',
|
||||
mods = 'CTRL|SHIFT|ALT',
|
||||
action = wezterm.action.ShowDebugOverlay
|
||||
},
|
||||
{
|
||||
key = 'r',
|
||||
mods = 'CTRL|SHIFT|ALT',
|
||||
action = wezterm.action.RotatePanes'Clockwise'
|
||||
},
|
||||
}
|
||||
|
||||
config.unix_domains = {
|
||||
{
|
||||
name = 'unix',
|
||||
local_echo_threshold_ms = 10,
|
||||
},
|
||||
}
|
||||
|
||||
-- config.default_gui_startup_args = { 'connect', 'unix' }
|
||||
-- config.default_domain = 'unix'
|
||||
|
||||
config.window_padding = {
|
||||
top = '0.5cell',
|
||||
bottom = '0.5cell',
|
||||
left = '1cell',
|
||||
right = '1cell',
|
||||
}
|
||||
|
||||
return config
|
||||
'';
|
||||
};
|
||||
|
||||
programs.kitty = {
|
||||
enable = true;
|
||||
darwinLaunchOptions = ["--single-instance"];
|
||||
shellIntegration = {
|
||||
enableFishIntegration = true;
|
||||
};
|
||||
settings = {
|
||||
"font_family" = "IosevkaLyteTerm";
|
||||
"bold_font" = "IosevkaLyteTerm Heavy";
|
||||
"italic_font" = "IosevkaLyteTerm Italic";
|
||||
"bold_italic_font" = "IosevkaLyteTerm Heavy Italic";
|
||||
"font_size" = "12.5";
|
||||
settings = with colors.withHashPrefix; {
|
||||
"font_family" = font.name;
|
||||
"bold_font" = "${font.name} Heavy";
|
||||
"italic_font" = "${font.name} Italic";
|
||||
"bold_italic_font" = "${font.name} Heavy Italic";
|
||||
"font_size" = toString font.size;
|
||||
"inactive_text_alpha" = "0.5";
|
||||
"copy_on_select" = true;
|
||||
|
||||
|
@ -488,7 +843,7 @@ in {
|
|||
|
||||
"enable_audio_bell" = true;
|
||||
"visual_bell_duration" = "0.25";
|
||||
"visual_bell_color" = "#333033";
|
||||
"visual_bell_color" = yellow;
|
||||
|
||||
"url_style" = "single";
|
||||
|
||||
|
@ -510,75 +865,75 @@ in {
|
|||
## blurb: Soothing pastel theme for the high-spirited!
|
||||
|
||||
# The basic colors
|
||||
"foreground" = "#CDD6F4";
|
||||
"background" = "#1E1E2E";
|
||||
"selection_foreground" = "#1E1E2E";
|
||||
"selection_background" = "#F5E0DC";
|
||||
"foreground" = text;
|
||||
"background" = bg;
|
||||
"selection_foreground" = bg;
|
||||
"selection_background" = text;
|
||||
|
||||
# Cursor colors
|
||||
"cursor" = "#F5E0DC";
|
||||
"cursor_text_color" = "#1E1E2E";
|
||||
"cursor" = text;
|
||||
"cursor_text_color" = bg;
|
||||
|
||||
# URL underline color when hovering with mouse
|
||||
"url_color" = "#F5E0DC";
|
||||
"url_color" = primary;
|
||||
|
||||
# Kitty window border colors
|
||||
"active_border_color" = "#74c7ec";
|
||||
"inactive_border_color" = "#313244";
|
||||
"bell_border_color" = "#F9E2AF";
|
||||
"active_border_color" = primary;
|
||||
"inactive_border_color" = bg3;
|
||||
"bell_border_color" = urgent;
|
||||
|
||||
# OS Window titlebar colors
|
||||
"wayland_titlebar_color" = "system";
|
||||
"macos_titlebar_color" = "system";
|
||||
|
||||
# Tab bar colors
|
||||
"active_tab_foreground" = "#11111B";
|
||||
"active_tab_background" = "#74c7ec";
|
||||
"inactive_tab_foreground" = "#CDD6F4";
|
||||
"inactive_tab_background" = "#181825";
|
||||
"tab_bar_background" = "#11111B";
|
||||
"active_tab_foreground" = bg;
|
||||
"active_tab_background" = primary;
|
||||
"inactive_tab_foreground" = fgdim;
|
||||
"inactive_tab_background" = bg2;
|
||||
"tab_bar_background" = bg;
|
||||
|
||||
# Colors for marks (marked text in the terminal)
|
||||
"mark1_foreground" = "#1E1E2E";
|
||||
"mark1_background" = "#B4BEFE";
|
||||
"mark2_foreground" = "#1E1E2E";
|
||||
"mark2_background" = "#74c7ec";
|
||||
"mark3_foreground" = "#1E1E2E";
|
||||
"mark3_background" = "#74C7EC";
|
||||
"mark1_foreground" = bg;
|
||||
"mark1_background" = blue;
|
||||
"mark2_foreground" = bg;
|
||||
"mark2_background" = purple;
|
||||
"mark3_foreground" = bg;
|
||||
"mark3_background" = blue;
|
||||
|
||||
# The 16 terminal colors
|
||||
|
||||
# black
|
||||
"color0" = "#45475A";
|
||||
"color8" = "#585B70";
|
||||
"color0" = colors.withHashPrefix."0";
|
||||
"color8" = colors.withHashPrefix."8";
|
||||
|
||||
# red
|
||||
"color1" = "#F38BA8";
|
||||
"color9" = "#F38BA8";
|
||||
"color1" = colors.withHashPrefix."1";
|
||||
"color9" = colors.withHashPrefix."9";
|
||||
|
||||
# green
|
||||
"color2" = "#A6E3A1";
|
||||
"color10" = "#A6E3A1";
|
||||
"color2" = colors.withHashPrefix."2";
|
||||
"color10" = colors.withHashPrefix."10";
|
||||
|
||||
# yellow
|
||||
"color3" = "#F9E2AF";
|
||||
"color11" = "#F9E2AF";
|
||||
"color3" = colors.withHashPrefix."3";
|
||||
"color11" = colors.withHashPrefix."11";
|
||||
|
||||
# blue
|
||||
"color4" = "#89B4FA";
|
||||
"color12" = "#89B4FA";
|
||||
"color4" = colors.withHashPrefix."4";
|
||||
"color12" = colors.withHashPrefix."12";
|
||||
|
||||
# magenta
|
||||
"color5" = "#F5C2E7";
|
||||
"color13" = "#F5C2E7";
|
||||
"color5" = colors.withHashPrefix."5";
|
||||
"color13" = colors.withHashPrefix."13";
|
||||
|
||||
# cyan
|
||||
"color6" = "#94E2D5";
|
||||
"color14" = "#94E2D5";
|
||||
"color6" = colors.withHashPrefix."6";
|
||||
"color14" = colors.withHashPrefix."14";
|
||||
|
||||
# white
|
||||
"color7" = "#BAC2DE";
|
||||
"color15" = "#A6ADC8";
|
||||
"color7" = colors.withHashPrefix."7";
|
||||
"color15" = colors.withHashPrefix."15";
|
||||
};
|
||||
keybindings = {
|
||||
"ctrl+shift+1" = "change_font_size all 12.5";
|
||||
|
@ -620,7 +975,7 @@ in {
|
|||
};
|
||||
};
|
||||
|
||||
zellij = {
|
||||
programs.zellij = {
|
||||
# TODO: enable after port config
|
||||
enable = false;
|
||||
enableFishIntegration = true;
|
||||
|
@ -629,7 +984,7 @@ in {
|
|||
};
|
||||
};
|
||||
|
||||
broot = {
|
||||
programs.broot = {
|
||||
enable = true;
|
||||
enableFishIntegration = true;
|
||||
settings = {
|
||||
|
@ -737,12 +1092,12 @@ in {
|
|||
};
|
||||
};
|
||||
|
||||
direnv = {
|
||||
programs.direnv = {
|
||||
enable = true;
|
||||
nix-direnv.enable = true;
|
||||
};
|
||||
|
||||
fish = {
|
||||
programs.fish = {
|
||||
enable = true;
|
||||
# I load long scripts from files for a better editing experience
|
||||
shellInit = builtins.readFile ./fish/shellInit.fish;
|
||||
|
@ -819,6 +1174,7 @@ in {
|
|||
cat = "bat";
|
||||
p = "ping";
|
||||
dc = "docker compose";
|
||||
pc = "podman-compose";
|
||||
k = "kubectl";
|
||||
kg = "kubectl get";
|
||||
v = "$EDITOR";
|
||||
|
@ -827,21 +1183,20 @@ in {
|
|||
};
|
||||
};
|
||||
|
||||
eza = {
|
||||
programs.eza = {
|
||||
enable = true;
|
||||
package = inputs.nixpkgs-unstable.legacyPackages.${system}.eza;
|
||||
};
|
||||
|
||||
skim = {
|
||||
programs.skim = {
|
||||
enable = true;
|
||||
enableFishIntegration = true;
|
||||
};
|
||||
|
||||
nix-index = {
|
||||
programs.nix-index = {
|
||||
enable = true;
|
||||
enableFishIntegration = true;
|
||||
};
|
||||
};
|
||||
|
||||
# maybe we can share somehow so things for nix-y systems and non-nix-y systems alike
|
||||
# am I going to _have_ non-nix systems anymore?
|
||||
|
|
601
home/linux.nix
601
home/linux.nix
|
@ -2,6 +2,8 @@
|
|||
config,
|
||||
pkgs,
|
||||
lib,
|
||||
colors,
|
||||
font,
|
||||
...
|
||||
}: {
|
||||
home.pointerCursor = {
|
||||
|
@ -11,101 +13,415 @@
|
|||
# some icons are also missing (hand2?)
|
||||
};
|
||||
|
||||
services = {
|
||||
mako = with config.colorScheme.colors; {
|
||||
programs.foot = {
|
||||
enable = true;
|
||||
};
|
||||
|
||||
# programs.eww = {
|
||||
# enable = true;
|
||||
# };
|
||||
|
||||
/*
|
||||
home.file.".config/eww/eww.yuck" = {
|
||||
enable = true;
|
||||
text = ''
|
||||
(defwidget bar []
|
||||
(centerbox :orientation "h"
|
||||
(sidestuff)
|
||||
(box)
|
||||
(music)))
|
||||
|
||||
(defwindow bar
|
||||
:monitor 0
|
||||
:stacking "fg"
|
||||
:exclusive true
|
||||
:geometry
|
||||
(geometry
|
||||
:x "0%"
|
||||
:y "0%"
|
||||
:width "100%"
|
||||
:height "31px"
|
||||
:anchor "bottom center")
|
||||
(bar))
|
||||
|
||||
(defwidget sidestuff []
|
||||
(box :class "sidestuff" :orientation "h" :space-evenly false :halign "start" :spacing 20
|
||||
time
|
||||
; TODO: idle inhibitor?
|
||||
; TODO: get these to align properly?
|
||||
(box :class "mic" (
|
||||
box :class {micMuted == "false" ? "live" : "muted"} {micMuted == "false" ? " " : " "}
|
||||
) {micVolume + "%"}
|
||||
)
|
||||
(box :class "vol" (
|
||||
box :class {muted == "false" ? "live" : "muted"} {muted == "false" ? " " : " "}
|
||||
) {volume + "%"}
|
||||
)
|
||||
{" " + round(EWW_CPU["avg"], 0) + "%"}
|
||||
{" " + round(EWW_RAM["used_mem_perc"], 0) + "%"}
|
||||
{isDesktop == "true" ? "" : " " + brightness + "%"}
|
||||
{isDesktop == "true" ? "" : " " + EWW_BATTERY["BAT0"]["capacity"] + "%/" + EWW_BATTERY["BAT1"]["capacity"] + "%"}
|
||||
))
|
||||
|
||||
(defwidget music []
|
||||
(box :class "music"
|
||||
:orientation "h"
|
||||
:halign "end"
|
||||
:space-evenly false
|
||||
{music != "" ? "''${music}" : ""}))
|
||||
|
||||
(deflisten music :initial ""
|
||||
"playerctl --follow metadata --format '{{ title }} by {{ artist }}' || true")
|
||||
|
||||
(deflisten volume :initial "0"
|
||||
"pamixer --get-volume; pactl subscribe | grep sink --line-buffered | while read i; do pamixer --get-volume; done")
|
||||
|
||||
(deflisten muted :initial "false"
|
||||
"pamixer --get-mute; pactl subscribe | grep sink --line-buffered | while read i; do pamixer --get-mute; done")
|
||||
|
||||
(deflisten micVolume :initial "0"
|
||||
"pamixer --default-source --get-volume; pactl subscribe | grep source --line-buffered | while read i; do pamixer --default-source --get-volume; done")
|
||||
|
||||
(deflisten micMuted :initial "false"
|
||||
"pamixer --default-source --get-mute; pactl subscribe | grep source --line-buffered | while read i; do pamixer --default-source --get-mute; done")
|
||||
|
||||
(defpoll time :interval "1s"
|
||||
"date '+%a %b %d %H:%M:%S'")
|
||||
|
||||
(defpoll isDesktop :interval "24h"
|
||||
"if [ -d \"$HOME/.config/lytedev-env/host-desktop\" ]; then echo true; else echo false; fi")
|
||||
|
||||
(defpoll brightness :interval "10s"
|
||||
"echo $(((100 * $(brightnessctl get)) / $(brightnessctl max)))")
|
||||
'';
|
||||
};
|
||||
*/
|
||||
|
||||
programs.fish = {
|
||||
shellAliases = {
|
||||
sctl = "sudo systemctl";
|
||||
sctlu = "systemctl --user";
|
||||
};
|
||||
};
|
||||
|
||||
services.mako = with colors.withHashPrefix; {
|
||||
enable = true;
|
||||
borderSize = 1;
|
||||
maxVisible = 5;
|
||||
defaultTimeout = 15000;
|
||||
font = "Symbols Nerd Font 12,IosevkaLyteTerm 12";
|
||||
font = "Symbols Nerd Font ${toString font.size},${font.name} ${toString font.size}";
|
||||
# TODO: config
|
||||
|
||||
backgroundColor = "#${base01}";
|
||||
textColor = "#${base05}";
|
||||
borderColor = "#${base0C}";
|
||||
progressColor = "#${base0A}";
|
||||
backgroundColor = bg;
|
||||
textColor = text;
|
||||
borderColor = primary;
|
||||
progressColor = primary;
|
||||
|
||||
extraConfig = ''
|
||||
[urgency=high]
|
||||
border-color=#${base0F}
|
||||
border-color=${urgent}
|
||||
[urgency=high]
|
||||
background-color=#${base03}
|
||||
background-color=${urgent}
|
||||
'';
|
||||
};
|
||||
|
||||
# this doesn't work due to weird quoting bugs AFAICT
|
||||
# swayidle = let
|
||||
# bins = rec {
|
||||
# swaylock = builtins.trace "${pkgs.swaylock}/bin/swaylock" "${pkgs.swaylock}/bin/swaylock";
|
||||
# swaymsg = "${pkgs.sway}/bin/swaymsg";
|
||||
# notify-send = "${swaymsg} exec -- ${pkgs.libnotify}/bin/notify-send";
|
||||
# };
|
||||
# in (with bins; {
|
||||
# enable = true;
|
||||
/*
|
||||
services.swayidle = let
|
||||
bins = rec {
|
||||
swaylock = builtins.trace "${pkgs.swaylock}/bin/swaylock" "${pkgs.swaylock}/bin/swaylock";
|
||||
swaymsg = "${pkgs.sway}/bin/swaymsg";
|
||||
notify-send = "${swaymsg} exec -- ${pkgs.libnotify}/bin/notify-send";
|
||||
};
|
||||
in (with bins; {
|
||||
enable = true;
|
||||
|
||||
# events = [
|
||||
# {
|
||||
# event = "before-sleep";
|
||||
# command = swaylock;
|
||||
# }
|
||||
# ];
|
||||
events = [
|
||||
{
|
||||
event = "before-sleep";
|
||||
command = swaylock;
|
||||
}
|
||||
];
|
||||
|
||||
# timeouts = [
|
||||
# {
|
||||
# timeout = 5;
|
||||
# command = "${notify-send} \\\"Idling in 300 seconds\\\"";
|
||||
# resumeCommand = "${notify-send} \\\"Idling cancelled.\\\"";
|
||||
timeouts = [
|
||||
{
|
||||
timeout = 5;
|
||||
command = "${notify-send} \\\"Idling in 300 seconds\\\"";
|
||||
resumeCommand = "${notify-send} \\\"Idling cancelled.\\\"";
|
||||
}
|
||||
{
|
||||
# timeout = 540;
|
||||
timeout = 6;
|
||||
command = "${notify-send} 'Idling in 90 seconds'";
|
||||
}
|
||||
{
|
||||
# timeout = 570;
|
||||
timeout = 7;
|
||||
command = "${notify-send} 'Idling in 60 seconds'";
|
||||
}
|
||||
{
|
||||
# timeout = 600;
|
||||
timeout = 8;
|
||||
command = "${notify-send} 'Idling in 30 seconds...'";
|
||||
}
|
||||
{
|
||||
# timeout = 630;
|
||||
timeout = 9;
|
||||
command = "${swaylock} -f";
|
||||
}
|
||||
{
|
||||
# timeout = 660;
|
||||
timeout = 10;
|
||||
command = "${swaymsg} 'output * dpms off'";
|
||||
resumeCommand = "${swaymsg} 'output * dpms on' & ${swaymsg} exec -- maybe-good-morning &";
|
||||
}
|
||||
];
|
||||
});
|
||||
*/
|
||||
|
||||
wayland.windowManager.hyprland = {
|
||||
enable = true;
|
||||
extraConfig = ''
|
||||
# See https://wiki.hyprland.org/Configuring/Monitors/
|
||||
monitor=,preferred,auto,auto
|
||||
monitor=desc:LG Display 0x0521,preferred,auto,1
|
||||
|
||||
# See https://wiki.hyprland.org/Configuring/Keywords/ for more
|
||||
|
||||
# Execute your favorite apps at launch
|
||||
exec-once = firefox & kitty --single-instance & hyprpaper & mako & /usr/lib/polkit-kde-authentication-agent-1
|
||||
exec-once = swayidle -w timeout 600 'notify-send "Locking in 30 seconds..."' timeout 630 'swaylock -f' timeout 660 'hyprctl dispatch dpms off' resume 'hyprctl dispatch dpms on && maybe-good-morning' before-sleep 'swaylock -f'
|
||||
exec-once = dbus-update-activation-environment --systemd WAYLAND_DISPLAY XDG_CURRENT_DESKTOP
|
||||
|
||||
env = XCURSOR_SIZE,24
|
||||
|
||||
input {
|
||||
kb_layout = us
|
||||
kb_options = ctrl:nocaps
|
||||
touchpad {
|
||||
natural_scroll = yes
|
||||
}
|
||||
# kb_variant =
|
||||
# kb_model =
|
||||
# kb_rules =
|
||||
|
||||
follow_mouse = 2
|
||||
|
||||
repeat_delay = 200
|
||||
repeat_rate = 60
|
||||
|
||||
touchpad {
|
||||
natural_scroll = yes
|
||||
tap-to-click = true
|
||||
middle_button_emulation = true
|
||||
}
|
||||
|
||||
force_no_accel = true
|
||||
sensitivity = 1 # -1.0 - 1.0, 0 means no modification.
|
||||
}
|
||||
|
||||
misc {
|
||||
disable_hyprland_logo = true
|
||||
disable_splash_rendering = true
|
||||
}
|
||||
|
||||
binds {
|
||||
allow_workspace_cycles = true
|
||||
}
|
||||
|
||||
general {
|
||||
# See https://wiki.hyprland.org/Configuring/Variables/ for more
|
||||
|
||||
gaps_in = 3
|
||||
gaps_out = 6
|
||||
border_size = 1
|
||||
no_cursor_warps = true
|
||||
resize_on_border = true
|
||||
|
||||
col.active_border = rgba(74c7ecff) 45deg
|
||||
col.inactive_border = rgba(59595988)
|
||||
|
||||
layout = dwindle
|
||||
}
|
||||
|
||||
decoration {
|
||||
# See https://wiki.hyprland.org/Configuring/Variables/ for more
|
||||
|
||||
rounding = 3
|
||||
# blur = yes
|
||||
# blur_size = 3
|
||||
# blur_passes = 1
|
||||
# blur_new_optimizations = on
|
||||
|
||||
drop_shadow = yes
|
||||
shadow_range = 4
|
||||
shadow_render_power = 3
|
||||
col.shadow = rgba(1a1a1aee)
|
||||
|
||||
dim_inactive = 0.5
|
||||
}
|
||||
|
||||
animations {
|
||||
enabled = yes
|
||||
|
||||
# Some default animations, see https://wiki.hyprland.org/Configuring/Animations/ for more
|
||||
|
||||
bezier = myBezier, 0.05, 0.9, 0.1, 1.05
|
||||
bezier=overshot,0.05,0.9,0.1,1.1
|
||||
|
||||
animation = windows, 1, 2, default
|
||||
animation = windowsOut, 1, 2, default, popin 80%
|
||||
animation = border, 1, 2, default
|
||||
animation = borderangle, 1, 2, default
|
||||
animation = fade, 1, 2, default
|
||||
animation = workspaces, 1, 2, default
|
||||
}
|
||||
|
||||
dwindle {
|
||||
# See https://wiki.hyprland.org/Configuring/Dwindle-Layout/ for more
|
||||
# master switch for pseudotiling. Enabling is bound to mainMod + P in the keybinds section below
|
||||
pseudotile = yes
|
||||
preserve_split = 1
|
||||
no_gaps_when_only = true
|
||||
}
|
||||
|
||||
master {
|
||||
# See https://wiki.hyprland.org/Configuring/Master-Layout/ for more
|
||||
new_is_master = true
|
||||
}
|
||||
|
||||
gestures {
|
||||
# See https://wiki.hyprland.org/Configuring/Variables/ for more
|
||||
workspace_swipe = on
|
||||
}
|
||||
|
||||
# Example per-device config
|
||||
# See https://wiki.hyprland.org/Configuring/Keywords/#executing for more
|
||||
# device:epic-mouse-v1 {
|
||||
# sensitivity = -0.5
|
||||
# }
|
||||
# {
|
||||
# # timeout = 540;
|
||||
# timeout = 6;
|
||||
# command = "${notify-send} 'Idling in 90 seconds'";
|
||||
# }
|
||||
# {
|
||||
# # timeout = 570;
|
||||
# timeout = 7;
|
||||
# command = "${notify-send} 'Idling in 60 seconds'";
|
||||
# }
|
||||
# {
|
||||
# # timeout = 600;
|
||||
# timeout = 8;
|
||||
# command = "${notify-send} 'Idling in 30 seconds...'";
|
||||
# }
|
||||
# {
|
||||
# # timeout = 630;
|
||||
# timeout = 9;
|
||||
# command = "${swaylock} -f";
|
||||
# }
|
||||
# {
|
||||
# # timeout = 660;
|
||||
# timeout = 10;
|
||||
# command = "${swaymsg} 'output * dpms off'";
|
||||
# resumeCommand = "${swaymsg} 'output * dpms on' & ${swaymsg} exec -- maybe-good-morning &";
|
||||
# }
|
||||
# ];
|
||||
# });
|
||||
|
||||
# Example windowrule v1
|
||||
# windowrule = float, ^(kitty)$
|
||||
# Example windowrule v2
|
||||
# windowrulev2 = float,class:^(kitty)$,title:^(kitty)$
|
||||
# See https://wiki.hyprland.org/Configuring/Window-Rules/ for more
|
||||
|
||||
# See https://wiki.hyprland.org/Configuring/Keywords/ for more
|
||||
$mainMod = SUPER
|
||||
|
||||
# Example binds, see https://wiki.hyprland.org/Configuring/Binds/ for more
|
||||
bind = $mainMod, return, exec, kitty --single-instance
|
||||
bind = $mainMod SHIFT, return, exec, kitty
|
||||
bind = $mainMod, U, exec, firefox
|
||||
bind = $mainMod, space, exec, wofi --show drun
|
||||
bind = $mainMod, C, killactive,
|
||||
bind = $mainMod, M, exit,
|
||||
bind = $mainMod, E, exec, dolphin
|
||||
bind = $mainMod, F, togglefloating,
|
||||
bind = $mainMod SHIFT, F, fullscreen,
|
||||
bind = $mainMod, R, exec, anyrun
|
||||
bind = $mainMod, S, pseudo, # dwindle
|
||||
bind = $mainMod, P, togglesplit, # dwindle
|
||||
|
||||
# Move focus with mainMod + arrow keys
|
||||
bind = $mainMod, left, movefocus, l
|
||||
bind = $mainMod, right, movefocus, r
|
||||
bind = $mainMod, up, movefocus, u
|
||||
bind = $mainMod, down, movefocus, d
|
||||
bind = $mainMod, h, movefocus, l
|
||||
bind = $mainMod, l, movefocus, r
|
||||
bind = $mainMod, k, movefocus, u
|
||||
bind = $mainMod, j, movefocus, d
|
||||
|
||||
bind = $mainMod SHIFT, H, swapwindow, l
|
||||
bind = $mainMod SHIFT, L, swapwindow, r
|
||||
bind = $mainMod SHIFT, K, swapwindow, u
|
||||
bind = $mainMod SHIFT, J, swapwindow, d
|
||||
|
||||
bind = $mainMod SHIFT, V, exec, pamixer --default-source --toggle-mute
|
||||
bind = , XF86AudioMicMute, exec, pamixer --default-source --toggle-mute
|
||||
bind = , XF86AudioMute, exec, pamixer --toggle-mute
|
||||
bind = , XF86AudioRaiseVolume, exec, pamixer --increase 5
|
||||
bind = , XF86AudioLowerVolume, exec, pamixer --decrease 5
|
||||
bind = CTRL, XF86AudioRaiseVolume, exec, pamixer --increase 1
|
||||
bind = CTRL, XF86AudioLowerVolume, exec, pamixer --decrease 1
|
||||
|
||||
bind = , XF86AudioPlay, exec, playerctl play-pause
|
||||
bind = , XF86AudioNext, exec, playerctl next
|
||||
bind = , XF86AudioPrev, exec, playerctl previous
|
||||
|
||||
bind = $mainMod, tab, workspace, previous
|
||||
|
||||
# Switch workspaces with mainMod + [0-9]
|
||||
bind = $mainMod, 1, workspace, 1
|
||||
bind = $mainMod, 2, workspace, 2
|
||||
bind = $mainMod, 3, workspace, 3
|
||||
bind = $mainMod, 4, workspace, 4
|
||||
bind = $mainMod, 5, workspace, 5
|
||||
bind = $mainMod, 6, workspace, 6
|
||||
bind = $mainMod, 7, workspace, 7
|
||||
bind = $mainMod, 8, workspace, 8
|
||||
bind = $mainMod, 9, workspace, 9
|
||||
bind = $mainMod, 0, workspace, 10
|
||||
|
||||
# Move active window to a workspace with mainMod + SHIFT + [0-9]
|
||||
bind = $mainMod SHIFT, 1, movetoworkspace, 1
|
||||
bind = $mainMod SHIFT, 2, movetoworkspace, 2
|
||||
bind = $mainMod SHIFT, 3, movetoworkspace, 3
|
||||
bind = $mainMod SHIFT, 4, movetoworkspace, 4
|
||||
bind = $mainMod SHIFT, 5, movetoworkspace, 5
|
||||
bind = $mainMod SHIFT, 6, movetoworkspace, 6
|
||||
bind = $mainMod SHIFT, 7, movetoworkspace, 7
|
||||
bind = $mainMod SHIFT, 8, movetoworkspace, 8
|
||||
bind = $mainMod SHIFT, 9, movetoworkspace, 9
|
||||
bind = $mainMod SHIFT, 0, movetoworkspace, 10
|
||||
|
||||
bind = , XF86MonBrightnessDown, exec, brightnessctl set 10%-
|
||||
bind = , XF86MonBrightnessUp, exec, brightnessctl set +10%
|
||||
bind = SHIFT, XF86MonBrightnessDown, exec, brightnessctl set 1%
|
||||
bind = SHIFT, XF86MonBrightnessUp, exec, brightnessctl set 100%
|
||||
bind = CTRL, XF86MonBrightnessDown, exec, brightnessctl set 1%-
|
||||
bind = CTRL, XF86MonBrightnessUp, exec, brightnessctl set +1%
|
||||
|
||||
bind = $mainMod SHIFT, S, exec, clipshot
|
||||
|
||||
# Scroll through existing workspaces with mainMod + scroll
|
||||
bind = $mainMod, mouse_down, workspace, e+1
|
||||
bind = $mainMod, mouse_up, workspace, e-1
|
||||
|
||||
bind = CTRL SHIFT $mainMod, L, exec, swaylock
|
||||
|
||||
# Move/resize windows with mainMod + LMB/RMB and dragging
|
||||
bindm = $mainMod, mouse:272, movewindow
|
||||
bindm = $mainMod, mouse:273, resizewindow
|
||||
|
||||
bind = $mainMod CTRL, space, exec, makoctl dismiss
|
||||
bind = $mainMod SHIFT CTRL, space, exec, makoctl restore
|
||||
bind = $mainMod SHIFT, space, exec, makoctl invoke
|
||||
|
||||
bind = $mainMod, E, exec, thunar
|
||||
'';
|
||||
};
|
||||
|
||||
wayland.windowManager.sway = {
|
||||
# TODO:
|
||||
# + Super+r should rotate the selected group of windows.
|
||||
# + Super+Control+{1-9} should control the size of the preselect space.
|
||||
# + Super+Shift+b should balance the size of all selected nodes.
|
||||
# set $tilers "(wezterm.*|kitty.*|firefox.*|slack.*|Slack.*|thunar.*|Alacritty.*|alacritty.*|Discord.*|discord.*)"
|
||||
# for_window [title=".*"] floating enable
|
||||
# for_window [app_id=$tilers] floating disable
|
||||
#
|
||||
# # for_window [title=".*"] opacity $opacity
|
||||
#
|
||||
# client.focused #74c7ec #74c7ec #74c7ec #74c7ec #74c7ec
|
||||
# client.focused_inactive #100814 #100814 #9b9ebf #100814 #100814
|
||||
# client.unfocused #100814 #100814 #9b9ebf #100814 #100814
|
||||
#
|
||||
# # TODO: I forget why I needed this - could google it I expect?
|
||||
# exec /usr/lib/polkit-kde-authentication-agent-1
|
||||
#
|
||||
# # prevent all windows from stealing focus
|
||||
# no_focus [class=".*"]
|
||||
/*
|
||||
TODO:
|
||||
+ Super+r should rotate the selected group of windows.
|
||||
+ Super+Control+{1-9} should control the size of the preselect space.
|
||||
+ Super+Shift+b should balance the size of all selected nodes.
|
||||
set $tilers "(wezterm.*|kitty.*|firefox.*|slack.*|Slack.*|thunar.*|Alacritty.*|alacritty.*|Discord.*|discord.*)"
|
||||
for_window [title=".*"] floating enable
|
||||
for_window [app_id=$tilers] floating disable
|
||||
|
||||
# for_window [title=".*"] opacity $opacity
|
||||
|
||||
# TODO: I forget why I needed this - could google it I expect?
|
||||
exec /usr/lib/polkit-kde-authentication-agent-1
|
||||
|
||||
# prevent all windows from stealing focus
|
||||
no_focus [class=".*"]
|
||||
*/
|
||||
|
||||
enable = true;
|
||||
|
||||
|
@ -323,42 +639,42 @@
|
|||
};
|
||||
assigns = {};
|
||||
bars = [];
|
||||
colors = with config.colorScheme.colors; {
|
||||
background = "#1e1e2e";
|
||||
colors = with colors; {
|
||||
background = bg;
|
||||
focused = {
|
||||
background = base03;
|
||||
border = base0C;
|
||||
childBorder = base0C;
|
||||
indicator = base0C;
|
||||
text = base05;
|
||||
background = bg;
|
||||
border = primary;
|
||||
childBorder = primary;
|
||||
indicator = primary;
|
||||
text = bg;
|
||||
};
|
||||
focusedInactive = {
|
||||
background = base03;
|
||||
border = base0D;
|
||||
childBorder = base0D;
|
||||
indicator = base0D;
|
||||
text = base05;
|
||||
background = bg;
|
||||
border = primary;
|
||||
childBorder = primary;
|
||||
indicator = primary;
|
||||
text = bg;
|
||||
};
|
||||
placeholder = {
|
||||
background = base03;
|
||||
border = base0D;
|
||||
childBorder = base0D;
|
||||
indicator = base0D;
|
||||
text = base05;
|
||||
background = bg;
|
||||
border = primary;
|
||||
childBorder = primary;
|
||||
indicator = primary;
|
||||
text = text;
|
||||
};
|
||||
unfocused = {
|
||||
background = base03;
|
||||
border = base03;
|
||||
childBorder = base03;
|
||||
indicator = base03;
|
||||
text = base05;
|
||||
background = bg;
|
||||
border = bg;
|
||||
childBorder = bg;
|
||||
indicator = bg;
|
||||
text = text;
|
||||
};
|
||||
urgent = {
|
||||
background = base03;
|
||||
border = base0F;
|
||||
childBorder = base0F;
|
||||
indicator = base0F;
|
||||
text = base05;
|
||||
background = urgent;
|
||||
border = urgent;
|
||||
childBorder = urgent;
|
||||
indicator = urgent;
|
||||
text = bg;
|
||||
};
|
||||
};
|
||||
};
|
||||
|
@ -384,12 +700,7 @@
|
|||
})
|
||||
];
|
||||
|
||||
programs = {
|
||||
# TODO: hyprland = {
|
||||
# enable = true;
|
||||
# };
|
||||
|
||||
waybar = {
|
||||
programs.waybar = {
|
||||
enable = true;
|
||||
settings = {
|
||||
mainBar = {
|
||||
|
@ -529,49 +840,18 @@
|
|||
};
|
||||
};
|
||||
};
|
||||
style = ''
|
||||
@define-color base #1e1e2e;
|
||||
@define-color mantle #181825;
|
||||
@define-color crust #11111b;
|
||||
|
||||
@define-color text #cdd6f4;
|
||||
@define-color subtext0 #a6adc8;
|
||||
@define-color subtext1 #bac2de;
|
||||
|
||||
@define-color surface0 #313244;
|
||||
@define-color surface1 #45475a;
|
||||
@define-color surface2 #585b70;
|
||||
|
||||
@define-color overlay0 #6c7086;
|
||||
@define-color overlay1 #7f849c;
|
||||
@define-color overlay2 #9399b2;
|
||||
|
||||
@define-color blue #89b4fa;
|
||||
@define-color lavender #b4befe;
|
||||
@define-color sapphire #74c7ec;
|
||||
@define-color sky #89dceb;
|
||||
@define-color teal #94e2d5;
|
||||
@define-color green #a6e3a1;
|
||||
@define-color yellow #f9e2af;
|
||||
@define-color peach #fab387;
|
||||
@define-color maroon #eba0ac;
|
||||
@define-color red #f38ba8;
|
||||
@define-color mauve #cba6f7;
|
||||
@define-color pink #f5c2e7;
|
||||
@define-color flamingo #f2cdcd;
|
||||
@define-color rosewater #f5e0dc;
|
||||
|
||||
style = with colors.withHashPrefix; ''
|
||||
* {
|
||||
border-radius: 0;
|
||||
font-family: "IosevkaLyteTerm", "Symbols Nerd Font Mono", sans-serif;
|
||||
font-family: "${font.name}", "Symbols Nerd Font Mono", sans-serif;
|
||||
font-size: 16px;
|
||||
}
|
||||
|
||||
window#waybar {
|
||||
min-height: 32px;
|
||||
background-color: @base;
|
||||
color: @crust;
|
||||
border-top: solid @sapphire 1px;
|
||||
background-color: ${bg};
|
||||
color: ${text};
|
||||
border-top: solid ${blue} 1px;
|
||||
transition: none;
|
||||
}
|
||||
|
||||
|
@ -586,7 +866,7 @@
|
|||
#workspaces button {
|
||||
padding: 0 0.75em;
|
||||
background-color: transparent;
|
||||
border-top: solid @sapphire 1px;
|
||||
border-top: solid ${primary} 1px;
|
||||
transition: none;
|
||||
}
|
||||
|
||||
|
@ -598,22 +878,22 @@
|
|||
}
|
||||
|
||||
#workspaces button.visible {
|
||||
background-color: @base;
|
||||
background-color: ${bg};
|
||||
}
|
||||
|
||||
#workspaces button.focused {
|
||||
color: @base;
|
||||
background-color: @sapphire;
|
||||
color: ${bg};
|
||||
background-color: ${blue};
|
||||
}
|
||||
|
||||
#workspaces button.persistent {
|
||||
color: @surface2;
|
||||
color: ${text};
|
||||
}
|
||||
|
||||
#workspaces button.urgent {
|
||||
color: @base;
|
||||
background-color: @red;
|
||||
border-top: solid @red 1px;
|
||||
background-color: ${urgent};
|
||||
color: ${bg};
|
||||
border-top: solid ${urgent} 1px;
|
||||
}
|
||||
|
||||
#mode {
|
||||
|
@ -638,7 +918,7 @@
|
|||
margin-top: 1px;
|
||||
padding: 0 0.75em;
|
||||
background-color: inherit;
|
||||
color: @text;
|
||||
color: ${text};
|
||||
}
|
||||
|
||||
#clock {}
|
||||
|
@ -661,7 +941,7 @@
|
|||
}
|
||||
|
||||
#battery.critical:not(.charging) {
|
||||
background-color: @red;
|
||||
background-color: ${red};
|
||||
animation-name: blink;
|
||||
animation-duration: 0.5s;
|
||||
animation-timing-function: linear;
|
||||
|
@ -673,7 +953,7 @@
|
|||
#bluetooth.connected-battery,
|
||||
#bluetooth.connected.battery,
|
||||
#bluetooth.connected {
|
||||
color: @text;
|
||||
color: ${text};
|
||||
}
|
||||
|
||||
label:focus {
|
||||
|
@ -702,14 +982,14 @@
|
|||
}
|
||||
|
||||
#pulseaudio {
|
||||
color: @red;
|
||||
color: ${red};
|
||||
/* background-color: #f1c40f; */
|
||||
/* color: #000000; */
|
||||
}
|
||||
|
||||
#pulseaudio.source-muted {
|
||||
/* background-color: #90b1b1; */
|
||||
color: @text;
|
||||
color: ${text};
|
||||
}
|
||||
|
||||
#custom-media {
|
||||
|
@ -769,7 +1049,7 @@
|
|||
};
|
||||
};
|
||||
|
||||
firefox = {
|
||||
programs.firefox = {
|
||||
# TODO: this should be able to work on macos, no?
|
||||
# TODO: enable dark theme by default
|
||||
enable = true;
|
||||
|
@ -823,12 +1103,12 @@
|
|||
};
|
||||
};
|
||||
|
||||
swaylock = {
|
||||
programs.swaylock = {
|
||||
enable = true;
|
||||
settings = {
|
||||
color = "ffffffff";
|
||||
image = "~/.wallpaper";
|
||||
font = "IosevkaLyteTerm";
|
||||
font = font.name;
|
||||
show-failed-attempts = true;
|
||||
ignore-empty-password = true;
|
||||
|
||||
|
@ -852,5 +1132,4 @@
|
|||
ring-wrong-color = "f92672";
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
|
|
|
@ -1,32 +1,4 @@
|
|||
{pkgs, ...}: let
|
||||
# this is unused because it's referenced by my sway config
|
||||
dbus-sway-environment = pkgs.writeTextFile {
|
||||
name = "dbus-sway-environment";
|
||||
destination = "/bin/dbus-sway-environment";
|
||||
executable = true;
|
||||
|
||||
text = ''
|
||||
dbus-update-activation-environment --systemd WAYLAND_DISPLAY XDG_CURRENT_DESKTOP=sway
|
||||
systemctl --user stop wireplumber xdg-desktop-portal xdg-desktop-portal-wlr
|
||||
systemctl --user start wireplumber xdg-desktop-portal xdg-desktop-portal-wlr
|
||||
'';
|
||||
};
|
||||
|
||||
# this is unused because it's referenced by my sway config
|
||||
configure-gtk = pkgs.writeTextFile {
|
||||
name = "configure-gtk";
|
||||
destination = "/bin/configure-gtk";
|
||||
executable = true;
|
||||
text = let
|
||||
schema = pkgs.gsettings-desktop-schemas;
|
||||
datadir = "${schema}/share/gsettings-schemas/${schema.name}";
|
||||
in ''
|
||||
export XDG_DATA_DIRS="${datadir}:$XDG_DATA_DIRS
|
||||
gnome_schema = org.gnome.desktop.interface
|
||||
gsettings set $gnome_schema gtk-theme 'Catppuccin-Mocha'
|
||||
'';
|
||||
};
|
||||
in {
|
||||
{pkgs, ...}: {
|
||||
imports = [./pipewire.nix];
|
||||
|
||||
# services.xserver.libinput.enable = true;
|
||||
|
|
Loading…
Reference in a new issue