fix: only accept text content (revert 2d7d64c
)
This commit is contained in:
parent
7f5078bfdb
commit
1930514efb
1 changed files with 1 additions and 1 deletions
2
demon.go
2
demon.go
|
@ -44,7 +44,7 @@ func filter(history []string, text string) []string {
|
||||||
func listen(history []string, histfile string, persist bool, max int) {
|
func listen(history []string, histfile string, persist bool, max int) {
|
||||||
for {
|
for {
|
||||||
|
|
||||||
t, err := exec.Command("wl-paste", "-n").CombinedOutput()
|
t, err := exec.Command("wl-paste", "-n", "-t", "text").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" {
|
||||||
|
|
Loading…
Reference in a new issue