lkjdsalkjlkjsa

This commit is contained in:
2026-04-12 01:29:33 +02:00
parent 8e4e251ba2
commit 3ea8a7ade9
5 changed files with 51 additions and 8 deletions

View File

@@ -1,4 +1,4 @@
#!/usb/bin/env python3
#!/usb/bin/env -S python3 -i
#run with:
#gnome-terminal --hide-menubar --window-with-profile=manjaro -x python -i $HOME/.local/opt/python-interactive-imports.py

View File

@@ -1,4 +1,4 @@
#!/usb/bin/env python3
#!/usb/bin/env -S python3 -i
#run with:
#gnome-terminal --hide-menubar --window-with-profile=manjaro -x python -i $HOME/.local/opt/sympy-interactive-imports.py

View File

@@ -142,7 +142,7 @@ with lib.hm.gvariant;
"org/gnome/settings-daemon/plugins/media-keys/custom-keybindings/custom12" = {
binding = "";
command = "ghostty -e \"python3 -i $HOME/.local/opt/sympy-interactive-imports.py\"";
command = "ghostty -e \"$(command -v ptpython || echo python3)\" -i \"$HOME/.local/opt/sympy-interactive-imports.py\"";
name = "Open SymPy terminal";
};
@@ -178,7 +178,7 @@ with lib.hm.gvariant;
"org/gnome/settings-daemon/plugins/media-keys/custom-keybindings/custom5" = {
binding = "<Primary><Alt>space";
command = "ghostty -e \"`command -v ptpython || echo python3` -i $HOME/.local/opt/python-interactive-imports.py\"";
command = "ghostty -e \"$(command -v ptpython || echo python3)\" -i \"$HOME/.local/opt/python-interactive-imports.py\"";
name = "Open Python Terminal";
};

View File

@@ -6,12 +6,11 @@
home.shellAliases.atom = lib.mkDefault "pulsar";
home.packages = with pkgs; [
#atom
pulsar
#pkgs.atom
pkgs.pulsar
nodePackages.bash-language-server
(pkgs.bash-language-server or pkgs.nodePackages.bash-language-server)
# TODO: ensure python-lsp-server?
];
home.file.".pulsar/config.cson".source = ./config.cson;

View File

@@ -0,0 +1,44 @@
nix-store-from-here() (
paths=("$@")
if [[ "${#paths[@]}" -le 0 ]]; then
echo >&2 "ERROR: no paths provided!"
return 0
fi
# nix_store=$(nix config show TODO)
nix_store="/nix/store"
store_paths=()
# set -x
for path in "${paths[@]}"; do
if [[ ! -e "$path" ]]; then
echo >&2 "WARNING: not found: '$path'"
continue
fi
resolved="$( realpath --no-symlinks "$path" )" # we prefer the originally referenced file and not the path it points to if a in-store symlink
if [[ ! "$resolved" =~ ^"$nix_store"/*/ ]]; then
resolved="$( realpath "$path" )" # to resolve files in "result" symlinks
if [[ ! "$resolved" =~ ^"$nix_store"/*/ ]]; then
echo >&2 "WARNING: not in store: '$path'"
continue
fi
fi
# simple
# store_paths+=("$resolved")
# only reference top-level store path
resolved_base="${resolved#"$nix_store/"}"
resolved_base="${resolved_base%%+(/*)}"
store_paths+=("$nix_store/$resolved_base")
done
if [[ "${#store_paths[@]}" -gt 0 ]]; then
{
for fqdn in $(printf "%q\n" $(hostname -f) $(hostname -A) | sort -u); do
printf "nix copy --from ssh://%q %s --out-link result\n" "${fqdn}" "$(printf " %q" "${store_paths[@]}")"
done
} | column -t -s' ' -o' '
fi
)