🚀 use pwd as path and print link
parent
14c3b823a3
commit
e811fb0c73
|
@ -6,7 +6,7 @@ pkgs.writeShellApplication {
|
|||
runtimeInputs = with pkgs; [ curl coreutils rofi p7zip xclip ];
|
||||
|
||||
text = ''
|
||||
files="$(find "$HOME" -maxdepth 10 -type 'f' -not -path '*/.*' | rofi -dmenu -d 15 -p 'Files to share')"
|
||||
files="$(find "$PWD" -maxdepth 10 -type 'f' -not -path '*/.*' | rofi -dmenu -d 15 -p 'File to share')"
|
||||
password="$(rofi -dmenu -p 'Password for encryption')"
|
||||
zipname="$HOME/Downloads/share-$(date +"%Y-%m-%d").zip"
|
||||
if [[ $password == "" ]]; then
|
||||
|
@ -15,7 +15,9 @@ pkgs.writeShellApplication {
|
|||
args="-p""$password"""
|
||||
fi
|
||||
7z a "$zipname" "$files" "$args" -mx9 > /dev/null
|
||||
curl -s -F"file=@$zipname" 0x0.st | xclip -sel c
|
||||
link="$(curl -s -F"file=@$zipname" 0x0.st)"
|
||||
echo "$link"
|
||||
echo "$link" | xclip -sel c
|
||||
rm "$zipname"
|
||||
'';
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue