notedux 1.0.11 → 1.0.12
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/notedux +24 -13
- package/package.json +1 -1
package/notedux
CHANGED
|
@@ -60,13 +60,21 @@ check_compatibility() {
|
|
|
60
60
|
CLIPBOARD_CMD="pbcopy"
|
|
61
61
|
fi
|
|
62
62
|
else
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
63
|
+
# Linux: proveri da li X11 radi
|
|
64
|
+
if [ -n "$DISPLAY" ] && [ "$DISPLAY" != ":0" ]; then
|
|
65
|
+
# X11 je aktivan
|
|
66
|
+
if command -v xclip &>/dev/null; then
|
|
67
|
+
CLIPBOARD_CMD="xclip -selection clipboard"
|
|
68
|
+
elif command -v xsel &>/dev/null; then
|
|
69
|
+
CLIPBOARD_CMD="xsel --clipboard --input"
|
|
70
|
+
elif command -v wl-copy &>/dev/null; then
|
|
71
|
+
CLIPBOARD_CMD="wl-copy"
|
|
72
|
+
fi
|
|
73
|
+
elif command -v wl-copy &>/dev/null && [ -n "$WAYLAND_DISPLAY" ]; then
|
|
74
|
+
# Wayland
|
|
68
75
|
CLIPBOARD_CMD="wl-copy"
|
|
69
76
|
fi
|
|
77
|
+
# Ako nema X11 ili Wayland, CLIPBOARD_CMD ostaje prazan
|
|
70
78
|
fi
|
|
71
79
|
|
|
72
80
|
# No clipboard tool found - warn once, don't block usage.
|
|
@@ -75,16 +83,19 @@ check_compatibility() {
|
|
|
75
83
|
if [ "$PLATFORM" = "mac" ]; then
|
|
76
84
|
echo "Warning: 'pbcopy' not found. Links will not be copied to clipboard."
|
|
77
85
|
else
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
86
|
+
if [ -z "$DISPLAY" ]; then
|
|
87
|
+
echo "Info: No X11 display detected. Clipboard disabled."
|
|
88
|
+
else
|
|
89
|
+
echo "Warning: no clipboard tool found (xclip, xsel, or wl-copy)."
|
|
90
|
+
echo "Links will not be copied to clipboard. Install one with, e.g.:"
|
|
91
|
+
echo " sudo apt install xclip (Debian/Ubuntu, X11)"
|
|
92
|
+
echo " sudo dnf install xclip (Fedora, X11)"
|
|
93
|
+
echo " sudo pacman -S xclip (Arch, X11)"
|
|
94
|
+
echo " sudo apt install wl-clipboard (Wayland)"
|
|
95
|
+
fi
|
|
84
96
|
fi
|
|
85
97
|
fi
|
|
86
98
|
}
|
|
87
|
-
|
|
88
99
|
# Copies stdin to the clipboard using whatever tool was detected.
|
|
89
100
|
# Silently does nothing if no clipboard tool is available.
|
|
90
101
|
copy_to_clipboard() {
|
|
@@ -100,7 +111,7 @@ show_help() {
|
|
|
100
111
|
cat <<EOF
|
|
101
112
|
|
|
102
113
|
Notedux CLI - Command-line client for the Notedux service (notedux.com).
|
|
103
|
-
Version 1.0.
|
|
114
|
+
Version 1.0.12
|
|
104
115
|
Copyright (C) 2026 Dejan Sabados
|
|
105
116
|
Licensed under the GNU GPL v3 or later.
|
|
106
117
|
This program comes with ABSOLUTELY NO WARRANTY.
|