shift+ins paste

This commit is contained in:
Venelin Dechkov
2026-07-30 11:54:49 +03:00
parent 47306a4169
commit f20804a589
3 changed files with 12 additions and 8 deletions
+2 -1
View File
@@ -66,7 +66,7 @@ static const Layout layouts[] = {
/* commands */
// 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", "-fn", "monospace:size=14", NULL };
static const char* termcmd[] = { "st", NULL };
#if HAS_SW_BACKLIGHT
static const char* bright_up[] = { "brightnessctl", "s", "-q", "3%+", NULL };
@@ -80,6 +80,7 @@ static void webbookmark(const Arg* unused){
static const Key keys[] = {
/* modifier key function argument */
{ MODKEY|ShiftMask, XK_s, vene_screenshot, {0} }, // Take a screenshot, located in ~/screenshots and in clipboard
{ ShiftMask, XK_Insert, vene_paste_sel, {0} }, // Paste what the mouse selection
{ MODKEY|ShiftMask, XK_b, webbookmark, {0} }, // Open a web bookmark
{ 0, XF86XK_AudioRaiseVolume, vene_inc_vol, {0} },
{ 0, XF86XK_AudioLowerVolume, vene_dec_vol, {0} },
+9 -7
View File
@@ -97,12 +97,6 @@ extern "C"
// strcpy(BOOKMARK_DIR, HOME);
// strcat(BOOKMARK_DIR, "/notes/bookmarks/web");
// sprintf(OPEN_BOOKMARK_CMD, "xdg-open $(dmenumap ~/notes/bookmarks/web/$(ls %s | dmenu "DMENU_OPTS") "DMENU_OPTS")", BOOKMARK_DIR);
// strcpy(OPEN_BOOKMARK_CMD, "xdg-open $(dmenumap "DMENU_OPTS" ~/notes/bookmarks/web/$(ls ");
// strcat(OPEN_BOOKMARK_CMD, BOOKMARK_DIR);
// strcat(OPEN_BOOKMARK_CMD, " | dmenu "DMENU_OPTS);
}
void vene_updatestatus(char status[])
@@ -256,6 +250,14 @@ extern "C"
scrot | tee | xclip; // todo: cppipe < string
}
void vene_paste_sel(const Arg*)
{
Cmd xclip("xclip", "-selection", "primary", "-o");
Cmd xdotool("xdotool", "click", "--delay", "0", "--clearmodifiers", "2");
xclip | xdotool;
}
void vene_browser(const Arg* browser_tag)
{
bool browser_tag_used = false;
@@ -278,7 +280,7 @@ extern "C"
void vene_webbookmark() // todo: cppipe exceptions
{
Cmd dmenu( "dmenu", "-b", "-f", "-i", "-l", "30");
Cmd dmenu( "dmenu", "-b", "-f", "-i", "-l", "30", "-fn", "monospace:size=14");
string bm_root (HOME);
bm_root += "/sync/bookmarks/web/";
+1
View File
@@ -16,6 +16,7 @@ void vene_updatestatus(char status[]);
void vene_run();
void vene_screenshot(const Arg*);
void vene_paste_sel(const Arg*);
void vene_browser(const Arg*);
void vene_webbookmark();
void vene_inc_vol(const Arg*);