home: zsh: migrate to 'initContent'
All checks were successful
ci/woodpecker/push/check Pipeline was successful
All checks were successful
ci/woodpecker/push/check Pipeline was successful
This also fixes a small ordering issue: my alias definitions used to be defined at the very end of the file, they're now slotted _before_ the `zshrc.local` import.
This commit is contained in:
parent
9156a8211d
commit
6fc81e45e9
1 changed files with 19 additions and 21 deletions
|
|
@ -87,28 +87,26 @@ in
|
||||||
# Modal editing is life, but CLI benefits from emacs gymnastics
|
# Modal editing is life, but CLI benefits from emacs gymnastics
|
||||||
defaultKeymap = "emacs";
|
defaultKeymap = "emacs";
|
||||||
|
|
||||||
# Make those happen early to avoid doing double the work
|
initContent = lib.mkMerge [
|
||||||
initExtraFirst = lib.mkBefore ''
|
# Make those happen early to avoid doing double the work
|
||||||
${
|
(lib.mkBefore (lib.optionalString cfg.launchTmux ''
|
||||||
lib.optionalString cfg.launchTmux ''
|
# Launch tmux unless already inside one
|
||||||
# Launch tmux unless already inside one
|
if [ -z "$TMUX" ]; then
|
||||||
if [ -z "$TMUX" ]; then
|
exec tmux new-session
|
||||||
exec tmux new-session
|
fi
|
||||||
fi
|
''))
|
||||||
''
|
|
||||||
}
|
|
||||||
'';
|
|
||||||
|
|
||||||
initExtra = lib.mkAfter ''
|
(lib.mkAfter ''
|
||||||
source ${./completion-styles.zsh}
|
source ${./completion-styles.zsh}
|
||||||
source ${./extra-mappings.zsh}
|
source ${./extra-mappings.zsh}
|
||||||
source ${./options.zsh}
|
source ${./options.zsh}
|
||||||
|
|
||||||
# Source local configuration
|
# Source local configuration
|
||||||
if [ -f "$ZDOTDIR/zshrc.local" ]; then
|
if [ -f "$ZDOTDIR/zshrc.local" ]; then
|
||||||
source "$ZDOTDIR/zshrc.local"
|
source "$ZDOTDIR/zshrc.local"
|
||||||
fi
|
fi
|
||||||
'';
|
'')
|
||||||
|
];
|
||||||
|
|
||||||
localVariables = {
|
localVariables = {
|
||||||
# I like having the full path
|
# I like having the full path
|
||||||
|
|
@ -151,7 +149,7 @@ in
|
||||||
};
|
};
|
||||||
|
|
||||||
# Use OSC-777 to send the notification through SSH
|
# Use OSC-777 to send the notification through SSH
|
||||||
initExtra = lib.mkIf cfg.notify.ssh.useOsc777 ''
|
initContent = lib.mkIf cfg.notify.ssh.useOsc777 ''
|
||||||
done_send_notification() {
|
done_send_notification() {
|
||||||
local exit_status="$1"
|
local exit_status="$1"
|
||||||
local title="$2"
|
local title="$2"
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue