mirror of
https://github.com/hyprwm/hyprpicker.git
synced 2024-11-16 16:15:58 +01:00
parent
5ba3268694
commit
7e1765f9f3
1 changed files with 4 additions and 3 deletions
|
@ -3,8 +3,8 @@
|
||||||
#include "../includes.hpp"
|
#include "../includes.hpp"
|
||||||
|
|
||||||
void Clipboard::copy(const char* fmt, ...) {
|
void Clipboard::copy(const char* fmt, ...) {
|
||||||
char buf[CLIPBOARDMESSAGESIZE] = "";
|
char buf[CLIPBOARDMESSAGESIZE] = "";
|
||||||
char* outputStr;
|
char* outputStr;
|
||||||
|
|
||||||
va_list args;
|
va_list args;
|
||||||
va_start(args, fmt);
|
va_start(args, fmt);
|
||||||
|
@ -13,7 +13,8 @@ void Clipboard::copy(const char* fmt, ...) {
|
||||||
|
|
||||||
outputStr = strdup(buf);
|
outputStr = strdup(buf);
|
||||||
|
|
||||||
execlp("wl-copy", "wl-copy", outputStr, NULL);
|
if (fork() == 0)
|
||||||
|
execlp("wl-copy", "wl-copy", outputStr, NULL);
|
||||||
|
|
||||||
free(outputStr);
|
free(outputStr);
|
||||||
}
|
}
|
Loading…
Reference in a new issue