mirror of
https://github.com/nmasur/dotfiles
synced 2025-08-23 16:04:40 +00:00
Compare commits
3 Commits
2ff9254a0e
...
4755a27089
Author | SHA1 | Date | |
---|---|---|---|
|
4755a27089 | ||
|
57303d61e9 | ||
|
b67c90dae0 |
@@ -169,6 +169,9 @@ in
|
|||||||
":set mouse true"
|
":set mouse true"
|
||||||
];
|
];
|
||||||
|
|
||||||
|
# Open git blame in github
|
||||||
|
space.B = ":sh git blame -L %{cursor_line},%{cursor_line} %{buffer_name}";
|
||||||
|
|
||||||
# Open yazi
|
# Open yazi
|
||||||
# https://github.com/sxyazi/yazi/pull/2461
|
# https://github.com/sxyazi/yazi/pull/2461
|
||||||
# Won't work until next Helix release
|
# Won't work until next Helix release
|
||||||
@@ -196,13 +199,26 @@ in
|
|||||||
"paste_before"
|
"paste_before"
|
||||||
];
|
];
|
||||||
|
|
||||||
|
A-S-ret = [
|
||||||
|
"open_above"
|
||||||
|
"normal_mode"
|
||||||
|
];
|
||||||
|
A-ret = [
|
||||||
|
"open_below"
|
||||||
|
"normal_mode"
|
||||||
|
];
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
keys.insert = {
|
keys.insert = {
|
||||||
# Allows not continuing the comment
|
# Allows not continuing the comment
|
||||||
"A-ret" = [
|
"A-ret" = [
|
||||||
"insert_newline"
|
"insert_newline"
|
||||||
"delete_word_backward"
|
"extend_to_line_bounds"
|
||||||
|
"delete_selection"
|
||||||
|
"insert_newline"
|
||||||
|
"move_line_up"
|
||||||
|
"insert_mode"
|
||||||
];
|
];
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@@ -7,6 +7,15 @@
|
|||||||
|
|
||||||
let
|
let
|
||||||
cfg = config.nmasur.presets.programs.zellij;
|
cfg = config.nmasur.presets.programs.zellij;
|
||||||
|
|
||||||
|
zellij-switch-to-last = pkgs.writeShellScriptBin "zellij-switch-to-last" ''
|
||||||
|
TARGET_SESSION=$(cat ~/.local/state/zellij-last-session)
|
||||||
|
if [ -z "$TARGET_SESSION" ]; then
|
||||||
|
return 1
|
||||||
|
fi
|
||||||
|
echo "$ZELLIJ_SESSION_NAME" > ~/.local/state/zellij-last-session
|
||||||
|
zellij pipe --plugin file:$(which zellij-switch.wasm) -- "--session $TARGET_SESSION"
|
||||||
|
'';
|
||||||
in
|
in
|
||||||
|
|
||||||
{
|
{
|
||||||
@@ -31,6 +40,7 @@ in
|
|||||||
if test "$TARGET_DIR" = $(pwd)
|
if test "$TARGET_DIR" = $(pwd)
|
||||||
return 1
|
return 1
|
||||||
end
|
end
|
||||||
|
echo "$ZELLIJ_SESSION_NAME" > ~/.local/state/zellij-last-session
|
||||||
zellij pipe --plugin file:$(which zellij-switch.wasm) -- "--cwd $TARGET_DIR --layout default --session $(basename $TARGET_DIR)"
|
zellij pipe --plugin file:$(which zellij-switch.wasm) -- "--cwd $TARGET_DIR --layout default --session $(basename $TARGET_DIR)"
|
||||||
'';
|
'';
|
||||||
};
|
};
|
||||||
@@ -69,13 +79,13 @@ in
|
|||||||
programs.zellij = {
|
programs.zellij = {
|
||||||
|
|
||||||
enable = true;
|
enable = true;
|
||||||
enableBashIntegration = true;
|
|
||||||
enableFishIntegration = true;
|
|
||||||
enableZshIntegration = true;
|
|
||||||
|
|
||||||
# Not yet available in unstable
|
# Auto start on shell init
|
||||||
# attachExistingSession = true;
|
enableBashIntegration = false;
|
||||||
# exitShellOnExit = true;
|
enableFishIntegration = false;
|
||||||
|
enableZshIntegration = false;
|
||||||
|
attachExistingSession = false;
|
||||||
|
exitShellOnExit = false;
|
||||||
|
|
||||||
settings = {
|
settings = {
|
||||||
default_mode = "locked";
|
default_mode = "locked";
|
||||||
@@ -109,6 +119,14 @@ in
|
|||||||
};
|
};
|
||||||
};
|
};
|
||||||
shared = {
|
shared = {
|
||||||
|
"bind \"Alt Shift s\"" = {
|
||||||
|
Run = {
|
||||||
|
_args = [
|
||||||
|
(lib.getExe zellij-switch-to-last)
|
||||||
|
];
|
||||||
|
close_on_exit = true;
|
||||||
|
};
|
||||||
|
};
|
||||||
"bind \"Alt Shift p\"" = {
|
"bind \"Alt Shift p\"" = {
|
||||||
Run = {
|
Run = {
|
||||||
_args = [
|
_args = [
|
||||||
|
Reference in New Issue
Block a user