mirror of
https://github.com/rwinkhart/libmutton.git
synced 2026-09-02 15:17:28 -04:00
Do not infer MIME type when copying data on UNIX-like systems
This commit is contained in:
+1
-1
@@ -9,7 +9,7 @@ var (
|
|||||||
)
|
)
|
||||||
|
|
||||||
const (
|
const (
|
||||||
LibmuttonVersion = "0.2.3" // untagged releases feature a letter suffix corresponding to the eventual release version, e.g "0.2.A" -> "0.2.0", "0.2.B" -> "0.2.1"
|
LibmuttonVersion = "0.2.E" // untagged releases feature a letter suffix corresponding to the eventual release version, e.g "0.2.A" -> "0.2.0", "0.2.B" -> "0.2.1"
|
||||||
|
|
||||||
FSSpace = "\u259d" // ▝ space/list separator
|
FSSpace = "\u259d" // ▝ space/list separator
|
||||||
FSPath = "\u259e" // ▞ path separator
|
FSPath = "\u259e" // ▞ path separator
|
||||||
|
|||||||
@@ -16,9 +16,9 @@ func copyField(executableName, copySubject string) {
|
|||||||
var cmd *exec.Cmd
|
var cmd *exec.Cmd
|
||||||
// determine whether to use wl-copy (Wayland) or xclip (X11)
|
// determine whether to use wl-copy (Wayland) or xclip (X11)
|
||||||
if _, envSet = os.LookupEnv("WAYLAND_DISPLAY"); envSet {
|
if _, envSet = os.LookupEnv("WAYLAND_DISPLAY"); envSet {
|
||||||
cmd = exec.Command("wl-copy")
|
cmd = exec.Command("wl-copy", "-t", "text/plain")
|
||||||
} else if _, envSet = os.LookupEnv("DISPLAY"); envSet {
|
} else if _, envSet = os.LookupEnv("DISPLAY"); envSet {
|
||||||
cmd = exec.Command("xclip", "-sel", "c")
|
cmd = exec.Command("xclip", "-sel", "c", "-t", "text/plain")
|
||||||
} else {
|
} else {
|
||||||
fmt.Println(AnsiError + "Clipboard platform could not be determined - Note that the clipboard does not function in a raw TTY" + AnsiReset)
|
fmt.Println(AnsiError + "Clipboard platform could not be determined - Note that the clipboard does not function in a raw TTY" + AnsiReset)
|
||||||
os.Exit(ErrorClipboard)
|
os.Exit(ErrorClipboard)
|
||||||
|
|||||||
Reference in New Issue
Block a user