Skip to content

Commit dbf7f83

Browse files
committed
smaller fixes
1 parent 7972664 commit dbf7f83

File tree

2 files changed

+12
-11
lines changed

2 files changed

+12
-11
lines changed

home-manager/desktop/hyprland.nix

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,7 @@ in
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

home-manager/development/shell.nix

Lines changed: 11 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -56,19 +56,20 @@ in
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

0 commit comments

Comments
 (0)