🧹 restructure layout

This commit is contained in:
Moritz Böhme 2022-07-15 13:11:54 +02:00
parent 40c2a5fb29
commit 268374ad58
No known key found for this signature in database
GPG key ID: 970C6E89EB0547A9
115 changed files with 2641 additions and 2085 deletions

View file

@ -0,0 +1,22 @@
{ pkgs }:
pkgs.writeShellApplication {
name = "share";
runtimeInputs = with pkgs; [ curl coreutils rofi p7zip xclip ];
text = ''
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
args=""
else
args="-p""$password"""
fi
7z a "$zipname" "$files" "$args" -mx9 > /dev/null
link="$(curl -s -F"file=@$zipname" 0x0.st)"
echo "$link"
echo "$link" | xclip -sel c
rm "$zipname"
'';
}