File tree Expand file tree Collapse file tree 2 files changed +12
-11
lines changed
Expand file tree Collapse file tree 2 files changed +12
-11
lines changed Original file line number Diff line number Diff line change 7878 # "${mainMod}, p, exec, swaync-client -t"
7979
8080 ", F7, exec, hyprshot -m region --clipboard-only"
81- ", F6 , exec, nix run github:micartey/viro"
81+ ", F8 , exec, nix run github:micartey/viro"
8282
8383 "${ mainMod } , T, exec, kitty"
8484
Original file line number Diff line number Diff line change 5656 fi
5757
5858 cdn() {
59- # Upload the file
60- curl --interface tailscale0 -X PUT -F "file=@$1" http://kvm-large:7080/api/v1/upload/blob &&
59+ # Upload file
60+ curl --interface tailscale0 -X PUT -F "file=@$1" http://kvm-large:7080/api/v1/upload/blob || return 1
6161
62- # Download link
63- local url="https://cdn.micartey.dev/api/v1/download/blob/$1"
64- echo -e "\n\n$url"
62+ echo -e "\n\n"
6563
66- # Video Preview
67- if [[ "$filename " == *.mp4 ]]; then
68- local encoded_url=$(echo -n "$url" | base64 | tr -d '\n')
69- echo -e "\nVideo Preview:"
70- echo "https://cdn.micartey.dev/preview/video/$encoded_url"
64+ local url="https://cdn.micartey.dev/api/v1/download/blob/$1"
65+ if [[ "$1 " == *.mp4 ]]; then
66+ url="https://cdn.micartey.dev/api/v1/stream/blob/$1"
67+ local encoded_url=$( echo -n "$url" | base64 -w 0)
68+ url= "https://cdn.micartey.dev/preview/video/$encoded_url"
7169 fi
70+
71+ echo "$url"
72+ wl-copy "$url"
7273 }
7374
7475 bindkey "^[[1;5C" forward-word
You can’t perform that action at this time.
0 commit comments