screenshot to clip
This commit is contained in:
@@ -68,7 +68,6 @@ static const Layout layouts[] = {
|
|||||||
// static const char* dmenucmd[] = { "dmenu_run", "-fn", dmenufont, "-nb", col_gray1, "-nf", col_gray3, "-sb", col_cyan, "-sf", col_gray4, NULL };
|
// static const char* dmenucmd[] = { "dmenu_run", "-fn", dmenufont, "-nb", col_gray1, "-nf", col_gray3, "-sb", col_cyan, "-sf", col_gray4, NULL };
|
||||||
static const char* dmenucmd[] = { "dmenu_run", NULL };
|
static const char* dmenucmd[] = { "dmenu_run", NULL };
|
||||||
static const char* termcmd[] = { "st", NULL };
|
static const char* termcmd[] = { "st", NULL };
|
||||||
static const char* screenshot [] = { "scrot", "-s", SCREEN_CAPS_DIR, NULL };
|
|
||||||
#if HAS_SW_BACKLIGHT
|
#if HAS_SW_BACKLIGHT
|
||||||
static const char* bright_up[] = { "brightnessctl", "s", "-q", "3%+", NULL };
|
static const char* bright_up[] = { "brightnessctl", "s", "-q", "3%+", NULL };
|
||||||
static const char* bright_down[] = { "brightnessctl", "s", "-q", "3%-", NULL };
|
static const char* bright_down[] = { "brightnessctl", "s", "-q", "3%-", NULL };
|
||||||
@@ -80,7 +79,7 @@ static void webbookmark(const Arg* unused){
|
|||||||
|
|
||||||
static const Key keys[] = {
|
static const Key keys[] = {
|
||||||
/* modifier key function argument */
|
/* modifier key function argument */
|
||||||
{ MODKEY|ShiftMask, XK_s, spawn, {.v = screenshot } }, //Take a screenshot
|
{ MODKEY|ShiftMask, XK_s, vene_screenshot, {0} }, // Take a screenshot, located in ~/screenshots and in clipboard
|
||||||
{ MODKEY|ShiftMask, XK_b, webbookmark, {0} }, // Open a web bookmark
|
{ MODKEY|ShiftMask, XK_b, webbookmark, {0} }, // Open a web bookmark
|
||||||
{ 0, XF86XK_AudioRaiseVolume, vene_inc_vol, {0} },
|
{ 0, XF86XK_AudioRaiseVolume, vene_inc_vol, {0} },
|
||||||
{ 0, XF86XK_AudioLowerVolume, vene_dec_vol, {0} },
|
{ 0, XF86XK_AudioLowerVolume, vene_dec_vol, {0} },
|
||||||
|
|||||||
@@ -248,6 +248,14 @@ extern "C"
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void vene_screenshot(const Arg*)
|
||||||
|
{
|
||||||
|
Cmd scrot("scrot", "-s");
|
||||||
|
Cmd tee("tee", SCREEN_CAPS_DIR);
|
||||||
|
Cmd xclip("xclip", "-selection", "clipboard", "-t", "image/png");
|
||||||
|
scrot | tee | xclip; // todo: cppipe < string
|
||||||
|
}
|
||||||
|
|
||||||
void vene_browser(const Arg* browser_tag)
|
void vene_browser(const Arg* browser_tag)
|
||||||
{
|
{
|
||||||
bool browser_tag_used = false;
|
bool browser_tag_used = false;
|
||||||
|
|||||||
@@ -15,6 +15,7 @@ void vene_setup();
|
|||||||
void vene_updatestatus(char status[]);
|
void vene_updatestatus(char status[]);
|
||||||
void vene_run();
|
void vene_run();
|
||||||
|
|
||||||
|
void vene_screenshot(const Arg*);
|
||||||
void vene_browser(const Arg*);
|
void vene_browser(const Arg*);
|
||||||
void vene_webbookmark();
|
void vene_webbookmark();
|
||||||
void vene_inc_vol(const Arg*);
|
void vene_inc_vol(const Arg*);
|
||||||
|
|||||||
Reference in New Issue
Block a user