summaryrefslogtreecommitdiff
path: root/xplr/plugins/dragon/README.md
blob: 8a74a12a50ca94193433a6139536e10654c9916e (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
[![xplr-dragon.gif](https://s6.gifyu.com/images/xplr-dragon.gif)](https://gifyu.com/image/A8N1)

Drag and drop files using [dragon](https://github.com/mwh/dragon).


Requirements
------------

- [dragon](https://github.com/mwh/dragon)
- [curl](https://github.com/curl/curl)


Installation
------------

### Install manually

- Add the following line in `~/.config/xplr/init.lua`

  ```lua
  package.path = os.getenv("HOME") .. '/.config/xplr/plugins/?/src/init.lua'
  ```

- Clone the plugin

  ```bash
  mkdir -p ~/.config/xplr/plugins

  git clone https://github.com/sayanarijit/dragon.xplr ~/.config/xplr/plugins/dragon
  ```

- Require the module in `~/.config/xplr/init.lua`

  ```lua
  require("dragon").setup()
  
  -- Or
  
  require("dragon").setup{
    mode = "selection_ops",
    key = "D",
    drag_args = "",
    drop_args = "",
    keep_selection = false,
  }

  -- Select files and type `:sD` to drag
  -- Type `:sD` without selecting anything to drop
  ```