fix(demon): close issue #6

This commit is contained in:
yory8 2019-06-16 16:20:56 +02:00
parent ef2160074d
commit 2d7d64c80d

View file

@ -45,7 +45,7 @@ func filter(history []string, text string) []string {
func listen(history []string, histfile string, persist bool, max int) error { func listen(history []string, histfile string, persist bool, max int) error {
for { for {
t, err := exec.Command("wl-paste", []string{"-n", "-t", "text"}...).CombinedOutput() t, err := exec.Command("wl-paste", "-n").CombinedOutput()
if err != nil { if err != nil {
// wl-paste exits 1 if there's no selection (e.g., when running it at OS startup) // wl-paste exits 1 if there's no selection (e.g., when running it at OS startup)
if string(t) != "No selection\n" { if string(t) != "No selection\n" {