fix(demon): stop logging no selection
This commit is contained in:
parent
12255a8341
commit
112f478070
2 changed files with 3 additions and 5 deletions
2
demon.go
2
demon.go
|
@ -50,7 +50,7 @@ func listen(history []string, histfile string, persist bool, max int) error {
|
|||
t, err := exec.Command("wl-paste", []string{"-n", "-t", "text"}...).CombinedOutput()
|
||||
if err != nil {
|
||||
// wl-paste exits 1 if there's no selection (e.g., when running it at OS startup)
|
||||
if string(t) != "No selection" {
|
||||
if string(t) != "No selection\n" {
|
||||
log.Printf("Error running wl-paste (demon.52): %s", t)
|
||||
}
|
||||
time.Sleep(1 * time.Second)
|
||||
|
|
|
@ -20,11 +20,9 @@ func selector(history []string, max int) error {
|
|||
}
|
||||
|
||||
// serve selection to the OS
|
||||
if err := exec.Command("wl-copy", []string{"--", selected}...).Run(); err != nil {
|
||||
return err
|
||||
}
|
||||
err = exec.Command("wl-copy", []string{"--", selected}...).Run()
|
||||
|
||||
return nil
|
||||
return err
|
||||
}
|
||||
|
||||
func dmenu(list []string, max int) (string, error) {
|
||||
|
|
Loading…
Reference in a new issue