feat: Add support for bemenu (#34)
This commit is contained in:
parent
38ccca1a92
commit
ddfea6b831
4 changed files with 9 additions and 3 deletions
|
@ -1,5 +1,9 @@
|
|||
# Next
|
||||
|
||||
**New features**
|
||||
|
||||
- add support for bemenu selector, a multi backend dmenu clone
|
||||
|
||||
# 1.2.0
|
||||
|
||||
**New features**
|
||||
|
|
|
@ -8,7 +8,7 @@ Requirements:
|
|||
|
||||
- a windows manager that uses `wlr-data-control`, like Sway and other wlroots-based WMs.
|
||||
- wl-clipboard >= 2.0
|
||||
- dmenu, rofi or wofi
|
||||
- dmenu, bemenu, rofi or wofi
|
||||
|
||||
[Install go](https://golang.org/doc/install), add `$GOPATH/bin` to your path, then run `go get github.com/yory8/clipman` OR run `go install` inside this folder.
|
||||
|
||||
|
|
4
main.go
4
main.go
|
@ -25,12 +25,12 @@ var (
|
|||
|
||||
picker = app.Command("pick", "Pick an item from clipboard history")
|
||||
maxPicker = picker.Flag("max-items", "scrollview length").Default("15").Int()
|
||||
pickTool = picker.Flag("tool", "Which selector to use: dmenu/rofi/wofi/STDOUT").Short('t').Default("dmenu").String()
|
||||
pickTool = picker.Flag("tool", "Which selector to use: dmenu/bemenu/rofi/wofi/STDOUT").Short('t').Default("dmenu").String()
|
||||
pickToolArgs = picker.Flag("tool-args", "Extra arguments to pass to the --tool").Short('T').Default("").String()
|
||||
|
||||
clearer = app.Command("clear", "Remove item(s) from history")
|
||||
maxClearer = clearer.Flag("max-items", "scrollview length").Default("15").Int()
|
||||
clearTool = clearer.Flag("tool", "Which selector to use: dmenu/rofi/wofi/STDOUT").Short('t').Default("dmenu").String()
|
||||
clearTool = clearer.Flag("tool", "Which selector to use: dmenu/bemenu/rofi/wofi/STDOUT").Short('t').Default("dmenu").String()
|
||||
clearToolArgs = clearer.Flag("tool-args", "Extra arguments to pass to the --tool").Short('T').Default("").String()
|
||||
clearAll = clearer.Flag("all", "Remove all items").Short('a').Default("false").Bool()
|
||||
|
||||
|
|
|
@ -34,6 +34,8 @@ func selector(data []string, max int, tool string, prompt string, toolsArgs stri
|
|||
"-misc-dejavu sans mono-medium-r-normal--17-120-100-100-m-0-iso8859-16",
|
||||
"-l",
|
||||
strconv.Itoa(max)}
|
||||
case "bemenu":
|
||||
args = []string{"bemenu", "--bottom", "--prompt", prompt, "--list", strconv.Itoa(max)}
|
||||
case "rofi":
|
||||
args = []string{"rofi", "-p", prompt, "-dmenu",
|
||||
"-lines",
|
||||
|
|
Loading…
Reference in a new issue