From 7d8e9fb07acffd20463e68cf0fc775de43168a19 Mon Sep 17 00:00:00 2001 From: Danilo Reyes Date: Fri, 10 Jan 2025 15:58:56 -0600 Subject: [PATCH] run updated to use ghostty, and packaged so dependencies can be overlayed --- pkgs/run.nix | 26 ++++++++++++++++++++++++ src/{scripts => packaged_scripts}/run.sh | 12 +++-------- 2 files changed, 29 insertions(+), 9 deletions(-) create mode 100644 pkgs/run.nix rename src/{scripts => packaged_scripts}/run.sh (73%) diff --git a/pkgs/run.nix b/pkgs/run.nix new file mode 100644 index 0000000..3fb1f50 --- /dev/null +++ b/pkgs/run.nix @@ -0,0 +1,26 @@ +{ + writeShellApplication, + bash, + zenity, + rmlint, + git, + gum, + xclip, + ghostty, + ... +}: +writeShellApplication { + name = "run"; + + runtimeInputs = [ + bash + zenity + rmlint + git + gum + xclip + ghostty + ]; + + text = builtins.readFile ../src/packaged_scripts/run.sh; +} diff --git a/src/scripts/run.sh b/src/packaged_scripts/run.sh similarity index 73% rename from src/scripts/run.sh rename to src/packaged_scripts/run.sh index 8765af7..c290a05 100644 --- a/src/scripts/run.sh +++ b/src/packaged_scripts/run.sh @@ -1,11 +1,6 @@ -#! /usr/bin/env nix-shell -#! nix-shell -i bash -p bash zenity rmlint git gum xclip +#! /usr/bin/env bash -if [ -n "$1" ]; then - operation=$1 -else - operation=$(gum choose rmlint download git) -fi +operation=${1:-$(gum choose rmlint download git)} case $operation in rmlint) @@ -18,8 +13,7 @@ download) --text="Verify the following entry is correct" \ --add-entry="Clipboard:" --entry-text "$(xclip -o -sel clip)") if [ -n "$ENTRY" ]; then - # kgx -e "download -u jawz -i '$ENTRY'" - kgx -e "ssh miniserver ""download -u jawz -i ""$ENTRY"" "" " + ghostty -e "ssh miniserver ""download -u jawz -i ""$ENTRY"" "" " else zenity --error --width=250 \ --text "Please verify and try again"