home-manager/shell: add cosmic-term and change ls colors

This commit is contained in:
xinyangli 2024-08-24 13:43:37 +08:00
parent 553622ac66
commit a2422d1f4e
Signed by: xin
SSH key fingerprint: SHA256:qZ/tzd8lYRtUFSrfBDBMcUqV4GHKxqeqRA3huItgvbk
5 changed files with 36 additions and 16 deletions

View file

@ -1,4 +1,4 @@
{ config, pkgs, lib, ... }:
{ config, lib, ... }:
with lib;
let

View file

@ -0,0 +1,16 @@
{ config, pkgs, lib, ... }:
let
inherit (lib) mkEnableOption mkIf;
cfg = config.custom-hm.cosmic-term;
in
{
options.custom-hm.cosmic-term = {
enable = mkEnableOption "cosmic-term";
};
config = mkIf cfg.enable {
home.packages = [ pkgs.cosmic-term ];
};
}

View file

@ -1,6 +1,7 @@
{
imports = [
./alacritty.nix
./cosmic-term.nix
./direnv.nix
./fish.nix
./git.nix

View file

@ -60,9 +60,10 @@ in
function fish_command_not_found
${pkgs.comma}/bin/comma $argv
end
set -gx LS_COLORS (${lib.getExe pkgs.vivid} generate catppuccin-mocha)
'' else "";
in ''
fish_config prompt choose arrow
fish_config prompt choose default
'' + extraInit;
functions = mkIf cfg.functions.enable {
gitignore = "curl -sL https://www.gitignore.io/api/$argv";

View file

@ -1,4 +1,4 @@
{ config, pkgs, lib, ... }:
{ config, lib, ... }:
with lib;
@ -14,20 +14,22 @@ in
enable = true;
settings = {
default_shell = "fish";
keybinds = {
unbind = [
"Ctrl p"
"Ctrl n"
];
shared_except = {
_args = [ "pane" "locked" ];
bind = {
_args = [ "Ctrl b"];
SwitchToMode = "Pane";
};
};
};
};
};
xdg.configFile."zellij/config.kdl".text = ''
keybinds {
shared_except "pane" "locked" {
bind "Ctrl b" { SwitchToMode "Pane"; }
}
shared_except "locked" {
bind "Ctrl h" { MoveFocusOrTab "Left"; }
bind "Ctrl l" { MoveFocusOrTab "Right"; }
bind "Ctrl j" { MoveFocus "Down"; }
bind "Ctrl k" { MoveFocus "Up"; }
unbind "Alt h" "Alt l" "Alt j" "Alt k"
}
unbind "Ctrl p" "Ctrl n"
}
'';
};
}