mirror of
https://github.com/gensokyo-zone/infrastructure.git
synced 2026-02-09 12:29:19 -08:00
users/kat/gui: wezterm + foot
This commit is contained in:
parent
587e5dd7b7
commit
0351d2c447
9 changed files with 105 additions and 5 deletions
|
|
@ -68,6 +68,8 @@ let
|
|||
|
||||
kat-glauca-dns = self.callPackage ./kat-glauca-dns { };
|
||||
|
||||
wezterm-terminfo = self.callPackage ./wezterm-terminfo { inherit (self) ncurses; };
|
||||
|
||||
kat-website = self.callPackage ./kat-website { };
|
||||
|
||||
kat-weather = self.callPackage ./kat-weather { };
|
||||
|
|
|
|||
33
pkgs/wezterm-terminfo/default.nix
Normal file
33
pkgs/wezterm-terminfo/default.nix
Normal file
|
|
@ -0,0 +1,33 @@
|
|||
{ stdenv, fetchFromGitHub, lib, ncurses }:
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
pname = "wezterm-terminfo";
|
||||
version = "20210502-154244-3f7122cb";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "wez";
|
||||
repo = pname;
|
||||
rev = version;
|
||||
sha256 = "9HPhb7Vyy5DwBW1xeA6sEIBmmOXlky9lPShu6ZoixPw=";
|
||||
fetchSubmodules = true;
|
||||
};
|
||||
|
||||
nativeBuildInputs = [
|
||||
ncurses
|
||||
];
|
||||
|
||||
buildPhase = "";
|
||||
installPhase = ''
|
||||
mkdir -p $out/share/terminfo/w
|
||||
${ncurses}/bin/tic -x -o $out/share/terminfo $src/termwiz/data/wezterm.terminfo
|
||||
mkdir -p $out/nix-support
|
||||
echo "$out" >> $out/nix-support/propagated-user-env-packages
|
||||
'';
|
||||
|
||||
meta = with lib; {
|
||||
license = lib.licenses.mit;
|
||||
maintainers = with maintainers; [ kittywitch ];
|
||||
platforms = with platforms; linux;
|
||||
};
|
||||
}
|
||||
|
||||
|
|
@ -7,6 +7,7 @@
|
|||
lm_sensors
|
||||
cachix
|
||||
pinentry-curses
|
||||
wezterm-terminfo
|
||||
kitty.terminfo
|
||||
gnupg
|
||||
];
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
{ config, pkgs, ... }:
|
||||
|
||||
{
|
||||
home.sessionVariables.TERMINFO_DIRS =
|
||||
"${pkgs.kitty.terminfo.outPath}/share/terminfo";
|
||||
# home.sessionVariables.TERMINFO_DIRS =
|
||||
# "${pkgs.kitty.terminfo.outPath}/share/terminfo";
|
||||
}
|
||||
|
|
|
|||
|
|
@ -17,7 +17,7 @@ in {
|
|||
nix run nixpkgs.openssl -c openssl rand -hex 6 | sed 's/\(..\)\(..\)\(..\)\(..\)\(..\)\(..\)/\1:\2:\3:\4:\5:\6/'
|
||||
'';
|
||||
nano = ''
|
||||
kitty +kitten icat ${./nano.png}
|
||||
${pkgs.wezterm}/bin/wezterm imgcat ${./nano.png}
|
||||
'';
|
||||
} // shellFunAliases {
|
||||
sed = "sd";
|
||||
|
|
|
|||
|
|
@ -3,7 +3,7 @@
|
|||
{
|
||||
deploy.profile.gui = true;
|
||||
|
||||
imports = [ ./firefox ./kitty.nix ./packages.nix ./gtk.nix ];
|
||||
imports = [ ./firefox ./kitty.nix ./packages.nix ./gtk.nix ./wezterm.nix ./foot.nix ];
|
||||
|
||||
fonts.fontconfig.enable = true;
|
||||
}
|
||||
|
|
|
|||
21
users/kat/gui/foot.nix
Normal file
21
users/kat/gui/foot.nix
Normal file
|
|
@ -0,0 +1,21 @@
|
|||
{ config, lib, pkgs, ... }:
|
||||
|
||||
with lib;
|
||||
|
||||
let
|
||||
witch.style.base16 = lib.mapAttrs' (k: v: lib.nameValuePair k "#${v.hex.rgb}")
|
||||
config.lib.arc.base16.schemeForAlias.default;
|
||||
colors.ansi = builtins.concatStringsSep ", " (map (c: ''"#${c.hex.rgb}"'') (sublist 0 8 config.lib.arc.base16.schemeForAlias.default.shell.colours));
|
||||
colors.brights = builtins.concatStringsSep ", " (map (c: ''"#${c.hex.rgb}"'') (sublist 8 8 config.lib.arc.base16.schemeForAlias.default.shell.colours));
|
||||
in {
|
||||
programs.foot = {
|
||||
enable = true;
|
||||
settings = {
|
||||
main = {
|
||||
term = "xterm-256color";
|
||||
font = "FantasqueSansMono Nerd Font:size=10";
|
||||
dpi-aware = "yes";
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
43
users/kat/gui/wezterm.nix
Normal file
43
users/kat/gui/wezterm.nix
Normal file
|
|
@ -0,0 +1,43 @@
|
|||
{ config, lib, pkgs, ... }:
|
||||
|
||||
with lib;
|
||||
|
||||
let
|
||||
witch.style.base16 = lib.mapAttrs' (k: v: lib.nameValuePair k "#${v.hex.rgb}")
|
||||
config.lib.arc.base16.schemeForAlias.default;
|
||||
colors.ansi = builtins.concatStringsSep ", " (map (c: ''"#${c.hex.rgb}"'') (sublist 0 8 config.lib.arc.base16.schemeForAlias.default.shell.colours));
|
||||
colors.brights = builtins.concatStringsSep ", " (map (c: ''"#${c.hex.rgb}"'') (sublist 8 8 config.lib.arc.base16.schemeForAlias.default.shell.colours));
|
||||
in {
|
||||
home.packages = [
|
||||
pkgs.wezterm
|
||||
];
|
||||
|
||||
xdg.configFile."wezterm/wezterm.lua".text = ''
|
||||
local wezterm = require 'wezterm';
|
||||
|
||||
return {
|
||||
term = "wezterm",
|
||||
font = wezterm.font_with_fallback({"FantasqueSansMono Nerd Font","Twitter Color Emoji"}),
|
||||
font_size = 10.0,
|
||||
window_background_opacity = 0.9,
|
||||
hide_tab_bar_if_only_one_tab = true,
|
||||
colors = {
|
||||
ansi = {${colors.ansi}},
|
||||
brights = {${colors.brights}},
|
||||
background = "${witch.style.base16.base00}",
|
||||
foreground = "${witch.style.base16.base05}",
|
||||
tab_bar = {
|
||||
background = "${witch.style.base16.base00}",
|
||||
active_tab = {
|
||||
bg_color = "${witch.style.base16.base0A}",
|
||||
fg_color = "${witch.style.base16.base05}",
|
||||
},
|
||||
inactive_tab = {
|
||||
bg_color = "${witch.style.base16.base01}",
|
||||
fg_color = "${witch.style.base16.base03}",
|
||||
},
|
||||
},
|
||||
},
|
||||
}
|
||||
'';
|
||||
}
|
||||
|
|
@ -98,7 +98,7 @@ in
|
|||
style = "Normal";
|
||||
size = font.size;
|
||||
};
|
||||
terminal = "${pkgs.kitty}/bin/kitty";
|
||||
terminal = "${pkgs.wezterm}/bin/wezterm";
|
||||
# TODO: replace with wofi
|
||||
menu =
|
||||
"${pkgs.j4-dmenu-desktop}/bin/j4-dmenu-desktop --dmenu=\"${dmenu}\" --term='${cfg.terminal}'";
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue