]> Sergey Matveev's repositories - nnn.git/commitdiff
Check for alternative name for drag/drop exec (#354)
author0xACE <0xACE@users.noreply.github.com>
Sat, 12 Oct 2019 19:18:50 +0000 (21:18 +0200)
committerMischievous Meerkat <engineerarun@gmail.com>
Sat, 12 Oct 2019 19:18:50 +0000 (00:48 +0530)
KDE dragon player collides with the name of the drag/drop dependency. On
archlinux the binary is renamed to `dragon-drag-and-drop`.

This change tries `dragon-drag-and-drop` before defaulting to `dragon`.

plugins/drag-file
plugins/drop-file

index c44acf9d4f370bd61ac8511b57c12f9555931238..4bf57baf8f84afd370d04fb572ba1e2976ad8db2 100755 (executable)
@@ -12,7 +12,11 @@ all=
 
 dnd()
 {
-    dragon "$@"
+    if which dragon-drag-and-drop; then
+       dragon-drag-and-drop "$@"
+    else
+       dragon "$@"
+    fi
 }
 
 function use_all()
index d824c3010625dedd4831d6a800a41d1da4f1bb66..f43cde14dc1b3e96fcd99c11948e03c1877c35eb 100755 (executable)
@@ -16,7 +16,11 @@ selection=${XDG_CONFIG_HOME:-$HOME/.config}/nnn/.selection
 
 dnd()
 {
-    dragon "$@"
+    if which dragon-drag-and-drop; then
+       dragon-drag-and-drop "$@"
+    else
+       dragon "$@"
+    fi
 }
 
 function add_file() {