diff --git a/CHANGELOG.md b/CHANGELOG.md index aa17cb3..c0c0e1b 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,9 @@ # Next +**New features** + +- add support for bemenu selector, a multi backend dmenu clone + # 1.2.0 **New features** diff --git a/README.md b/README.md index 8ada7cb..cc79224 100644 --- a/README.md +++ b/README.md @@ -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. diff --git a/main.go b/main.go index a95c16f..ad800a9 100644 --- a/main.go +++ b/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() diff --git a/selector.go b/selector.go index 6c450d8..45805f0 100644 --- a/selector.go +++ b/selector.go @@ -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",