chore: zsh stuff

This commit is contained in:
xyno (Philipp Hochkamp) 2023-05-31 15:29:51 +02:00
parent 13d38caa18
commit b41df72bdb
4 changed files with 1673 additions and 30 deletions

View file

@ -3,31 +3,34 @@ let
cfg = config.ragon.cli; cfg = config.ragon.cli;
in in
{ {
programs.zsh = { programs.zsh = {
enable = true; enable = true;
enableCompletion = true; enableCompletion = true;
initExtra = initExtra =
let let
zshrc = builtins.readFile ./zshrc; zshrc = builtins.readFile ./zshrc;
p10k = builtins.readFile ./p10k.zsh;
sources = [ sources = [
"${inputs.agkozak-zsh-prompt}/agkozak-zsh-prompt.plugin.zsh" "${pkgs.zsh-powerlevel10k}/share/zsh-powerlevel10k/powerlevel10k.zsh-theme"
"${pkgs.oh-my-zsh}/share/oh-my-zsh/plugins/git/git.plugin.zsh" # "${inputs.agkozak-zsh-prompt}/agkozak-zsh-prompt.plugin.zsh"
"${pkgs.oh-my-zsh}/share/oh-my-zsh/plugins/globalias/globalias.plugin.zsh" "${pkgs.oh-my-zsh}/share/oh-my-zsh/plugins/git/git.plugin.zsh"
"${inputs.zsh-vim-mode}/zsh-vim-mode.plugin.zsh" "${pkgs.oh-my-zsh}/share/oh-my-zsh/plugins/globalias/globalias.plugin.zsh"
"${inputs.zsh-syntax-highlighting}/zsh-syntax-highlighting.plugin.zsh" "${inputs.zsh-vim-mode}/zsh-vim-mode.plugin.zsh"
"${inputs.zsh-completions}/zsh-completions.plugin.zsh" "${inputs.zsh-syntax-highlighting}/zsh-syntax-highlighting.plugin.zsh"
]; "${inputs.zsh-completions}/zsh-completions.plugin.zsh"
];
source = map (x: "source " + x) sources; source = map (x: "source " + x) sources;
plugins = builtins.concatStringsSep "\n" (source); plugins = builtins.concatStringsSep "\n" (source);
in in
'' ''
${zshrc} ${p10k}
${plugins} ${zshrc}
''; ${plugins}
}; '';
};
} }

1644
hm-imports/zsh/p10k.zsh Normal file

File diff suppressed because it is too large Load diff

View file

@ -1,5 +1,5 @@
AGKOZAK_MULTILINE=0 # AGKOZAK_MULTILINE=0
AGKOZAK_PROMPT_CHAR=( "%F{red}N%f") # AGKOZAK_PROMPT_CHAR=( "%F{red}N%f")
autoload -Uz history-search-end autoload -Uz history-search-end
zle -N history-beginning-search-backward-end history-search-end zle -N history-beginning-search-backward-end history-search-end
@ -49,8 +49,4 @@ n ()
fi fi
} }
export ORIGTMPDIR=${TMPDIR:-$(mktemp -d)} # nix-shell overrides tmpdir, but we want to save it
emacsclient ()
{
command emacsclient -s $ORIGTMPDIR/emacs$(id -u)/server "$@"
}

View file

@ -1,5 +1,5 @@
module.exports = { module.exports = {
defaultBrowser: "Orion", defaultBrowser: "Firefox.app",
handlers: [ handlers: [
{ {
match: /^https?:\/\/gitlab\.com\/.*$/, match: /^https?:\/\/gitlab\.com\/.*$/,