Use ghostty, starship and remove powerlevel 10k
This commit is contained in:
1723
config/zsh/.p10k.zsh
1723
config/zsh/.p10k.zsh
File diff suppressed because it is too large
Load Diff
44
modules/app/ghostty.nix
Normal file
44
modules/app/ghostty.nix
Normal file
@@ -0,0 +1,44 @@
|
|||||||
|
{ config, lib, pkgs, ... }:
|
||||||
|
|
||||||
|
let
|
||||||
|
cfg = config.samfelag.modules.app.ghostty;
|
||||||
|
i3Cfg = config.samfelag.modules.desktop.wm.i3;
|
||||||
|
hyprCfg = config.samfelag.modules.desktop.wm.hyprland;
|
||||||
|
in
|
||||||
|
{
|
||||||
|
options.samfelag.modules.app.ghostty = {
|
||||||
|
enable = lib.mkEnableOption "ghostty";
|
||||||
|
};
|
||||||
|
config = lib.mkIf cfg.enable {
|
||||||
|
hm.home.packages = with pkgs; [
|
||||||
|
ghostty
|
||||||
|
];
|
||||||
|
|
||||||
|
fonts.fontconfig.enable = true;
|
||||||
|
|
||||||
|
fonts.packages = with pkgs; [
|
||||||
|
iosevka
|
||||||
|
pkgs.nerd-fonts.iosevka
|
||||||
|
];
|
||||||
|
|
||||||
|
hm.xdg.configFile."ghostty/config".text = ''
|
||||||
|
background = "${config.colorScheme.palette.base00}"
|
||||||
|
foreground = "${config.colorScheme.palette.base05}"
|
||||||
|
|
||||||
|
font-family = "Iosevka Nerd Font"
|
||||||
|
background-opacity = 0.85
|
||||||
|
background-blur = true
|
||||||
|
'';
|
||||||
|
|
||||||
|
samfelag.modules.desktop.wm.i3.extraKeybindings = lib.mkIf i3Cfg.enable {
|
||||||
|
"${i3Cfg.mod}+Return" = "exec ${pkgs.ghostty}/bin/ghostty";
|
||||||
|
# "${i3Cfg.mod}+Shift+Return" = "exec ${pkgs.ghostty}/bin/ghostty -t floating-term";
|
||||||
|
};
|
||||||
|
|
||||||
|
samfelag.modules.desktop.wm.hyprland.extraKeybindings = lib.mkIf hyprCfg.enable [
|
||||||
|
"${hyprCfg.mod}, Return, exec, ${pkgs.ghostty}/bin/ghostty"
|
||||||
|
"${hyprCfg.mod} SHIFT, Return, exec, [float] ${pkgs.ghostty}/bin/ghostty"
|
||||||
|
];
|
||||||
|
|
||||||
|
};
|
||||||
|
}
|
||||||
@@ -117,7 +117,7 @@ in
|
|||||||
};
|
};
|
||||||
|
|
||||||
app = {
|
app = {
|
||||||
alacritty.enable = true;
|
ghostty.enable = true;
|
||||||
zen-browser.enable = true;
|
zen-browser.enable = true;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
25
modules/shell/starship.nix
Normal file
25
modules/shell/starship.nix
Normal file
@@ -0,0 +1,25 @@
|
|||||||
|
{ config, lib, pkgs, ... }:
|
||||||
|
|
||||||
|
let
|
||||||
|
cfg = config.samfelag.modules.shell.starship;
|
||||||
|
in
|
||||||
|
{
|
||||||
|
options.samfelag.modules.shell.starship = {
|
||||||
|
enable = lib.mkEnableOption "A prompt for any shell";
|
||||||
|
};
|
||||||
|
config = lib.mkIf cfg.enable {
|
||||||
|
hm.programs.starship = {
|
||||||
|
enable = true;
|
||||||
|
settings = {
|
||||||
|
add_newline = false;
|
||||||
|
|
||||||
|
# character = {
|
||||||
|
# success_symbol = "[➜](bold green)";
|
||||||
|
# error_symbol = "[➜](bold red)";
|
||||||
|
# };
|
||||||
|
|
||||||
|
# package.disabled = true;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
||||||
@@ -11,7 +11,6 @@ in
|
|||||||
config = lib.mkIf cfg.enable {
|
config = lib.mkIf cfg.enable {
|
||||||
environment.systemPackages = with pkgs; [
|
environment.systemPackages = with pkgs; [
|
||||||
zsh
|
zsh
|
||||||
zsh-powerlevel10k
|
|
||||||
];
|
];
|
||||||
|
|
||||||
programs.zsh.enable = true;
|
programs.zsh.enable = true;
|
||||||
@@ -24,11 +23,6 @@ in
|
|||||||
syntaxHighlighting.enable = true;
|
syntaxHighlighting.enable = true;
|
||||||
|
|
||||||
initContent = let
|
initContent = let
|
||||||
zshConfigBeforeCompInit = lib.mkOrder 550 ''
|
|
||||||
# p10k instant prompt
|
|
||||||
P10K_INSTANT_PROMPT="$XDG_CACHE_HOME/p10k-instant-prompt-''${(%):-%n}.zsh"
|
|
||||||
[[ ! -r "$P10K_INSTANT_PROMPT" ]] || source "$P10K_INSTANT_PROMPT"
|
|
||||||
'';
|
|
||||||
zshConfig = lib.mkOrder 1000 ''
|
zshConfig = lib.mkOrder 1000 ''
|
||||||
# Source generic (bash) configuration
|
# Source generic (bash) configuration
|
||||||
if [ -d $HOME/.config/shell/sh ]; then
|
if [ -d $HOME/.config/shell/sh ]; then
|
||||||
@@ -46,7 +40,6 @@ in
|
|||||||
'';
|
'';
|
||||||
in
|
in
|
||||||
lib.mkMerge [
|
lib.mkMerge [
|
||||||
zshConfigBeforeCompInit
|
|
||||||
zshConfig
|
zshConfig
|
||||||
];
|
];
|
||||||
|
|
||||||
@@ -59,11 +52,6 @@ in
|
|||||||
};
|
};
|
||||||
|
|
||||||
plugins = [
|
plugins = [
|
||||||
{
|
|
||||||
file = "powerlevel10k.zsh-theme";
|
|
||||||
name = "powerlevel10k";
|
|
||||||
src = "${pkgs.zsh-powerlevel10k}/share/zsh-powerlevel10k";
|
|
||||||
}
|
|
||||||
{
|
{
|
||||||
name = "zsh-nix-shell";
|
name = "zsh-nix-shell";
|
||||||
file = "nix-shell.plugin.zsh";
|
file = "nix-shell.plugin.zsh";
|
||||||
@@ -74,10 +62,14 @@ in
|
|||||||
sha256 = "0za4aiwwrlawnia4f29msk822rj9bgcygw6a8a6iikiwzjjz0g91";
|
sha256 = "0za4aiwwrlawnia4f29msk822rj9bgcygw6a8a6iikiwzjjz0g91";
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
{
|
||||||
|
name = "vi-mode";
|
||||||
|
src = pkgs.zsh-vi-mode;
|
||||||
|
file = "share/zsh-vi-mode/zsh-vi-mode.plugin.zsh";
|
||||||
|
}
|
||||||
];
|
];
|
||||||
};
|
};
|
||||||
|
|
||||||
hm.xdg.configFile."zsh/.p10k.zsh".source = ../../config/zsh/.p10k.zsh;
|
samfelag.modules.shell.starship.enable = true;
|
||||||
|
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user