Compare commits
No commits in common. "390831788d814e06425fd570b4b89d9b21db8ae1" and "c923756ff7c56da935ffa27aa055aeaa41d63681" have entirely different histories.
390831788d
...
c923756ff7
Before Width: | Height: | Size: 2.4 MiB After Width: | Height: | Size: 2.4 MiB |
1
home.nix
1
home.nix
@ -58,7 +58,6 @@
|
||||
executable = true;
|
||||
source = "${./git-identity.sh}";
|
||||
};
|
||||
home.file.".background-image".source = "${./background-image.jpg}";
|
||||
home.sessionPath = [
|
||||
"$HOME/.local/bin"
|
||||
];
|
||||
|
@ -32,7 +32,6 @@
|
||||
wl-clipboard
|
||||
zotero
|
||||
signal-desktop
|
||||
freetube
|
||||
];
|
||||
|
||||
dconf.settings = {
|
||||
@ -85,4 +84,6 @@
|
||||
"picture-uri" = "${config.home.homeDirectory}/.background-image";
|
||||
};
|
||||
};
|
||||
|
||||
home.file.".background-image".source = "${./.}/Morskie Oko.jpg";
|
||||
}
|
@ -1,7 +1,6 @@
|
||||
{config, lib, pkgs, inputs, os, ...} : {
|
||||
programs.bash.enable = true;
|
||||
programs.bash.bashrcExtra = lib.concatStrings [
|
||||
''
|
||||
programs.bash.bashrcExtra = ''
|
||||
if [ -n "$PS1" ]; then
|
||||
NEW_PROMPT_COMMAND='
|
||||
MY_PWD="$PWD"
|
||||
@ -18,7 +17,7 @@
|
||||
'
|
||||
if [ -n "''${PROMPT_COMMAND// /}" ]; then
|
||||
PROMPT_COMMAND="$PROMPT_COMMAND
|
||||
$NEW_PROMPT_COMMAND"
|
||||
$NEW_PROMPT_COMMAND"
|
||||
else
|
||||
PROMPT_COMMAND="$NEW_PROMPT_COMMAND"
|
||||
fi
|
||||
@ -26,16 +25,9 @@
|
||||
|
||||
export PS1="[\t \[\e[32m\]\u\[\e[m\]\[\e[32m\]@\[\e[m\]\[\e[32m\]\h\[\e[m\]]"'$SHELL_PREFIX'" \[\e[36m\]"'$TRIMMED_PWD'"\[\e[m\] \$ "
|
||||
fi
|
||||
''
|
||||
|
||||
# On mac we have to import brew
|
||||
(if (os == "darwin") then ''
|
||||
eval "$(/opt/homebrew/bin/brew shellenv)"
|
||||
'' else ''
|
||||
|
||||
'')
|
||||
];
|
||||
|
||||
'';
|
||||
programs.bash.shellAliases = {
|
||||
chmod = "chmod --preserve-root";
|
||||
chown = "chown --preserve-root";
|
||||
|
@ -28,40 +28,4 @@
|
||||
} ;
|
||||
} ;
|
||||
};
|
||||
|
||||
home.packages = let
|
||||
edit = (pkgs.writeShellApplication {
|
||||
name = "edit";
|
||||
text = ''
|
||||
CMND=$(cat <<'END'
|
||||
BUFFER_NAME=''$(echo -n "''$PWD" | xxd -ps -c 200 | tr -d '\n' | shasum | head -c -4)
|
||||
|
||||
tmux -L "$BUFFER_NAME" has-session -t "$BUFFER_NAME" || {
|
||||
tmux -L "$BUFFER_NAME" new-session -d -s "$BUFFER_NAME" "BUFFER_NAME=$BUFFER_NAME EDITOR=wraphx lf"
|
||||
tmux -L "$BUFFER_NAME" set -g status off
|
||||
tmux -L "$BUFFER_NAME" set -g pane-border-style fg=#0c0c0c
|
||||
tmux -L "$BUFFER_NAME" set -g pane-active-border-style "bg=default fg=#0c0c0c"
|
||||
}
|
||||
|
||||
tmux -L "$BUFFER_NAME" attach -t "$BUFFER_NAME"
|
||||
END
|
||||
)
|
||||
|
||||
if [ -f "shell.nix" ] && [ -z ''${IN_NIX_SHELL+x} ]; then
|
||||
nix-shell --command "$CMND"
|
||||
else
|
||||
eval "$CMND"
|
||||
fi
|
||||
'';
|
||||
});
|
||||
wraphx = (pkgs.writeShellApplication {
|
||||
name = "wraphx";
|
||||
text = ''
|
||||
test "$(tmux -L "$BUFFER_NAME" list-panes | wc -l)" -eq 1 && {
|
||||
tmux -L "$BUFFER_NAME" split-window -h hx "$1"
|
||||
}
|
||||
'';
|
||||
});
|
||||
in [ edit wraphx ];
|
||||
|
||||
}
|
@ -189,7 +189,7 @@ let
|
||||
});
|
||||
});
|
||||
kak-wrap = (writeShellApplication {
|
||||
name = "edit-kak";
|
||||
name = "edit";
|
||||
runtimeInputs = [ myKakoune ];
|
||||
text = ''
|
||||
CMND=$(cat <<'END'
|
||||
|
Loading…
Reference in New Issue
Block a user