added paster (ctrl+shift+alt+v) for typing out the clipboard

This commit is contained in:
Audy 2025-02-17 08:12:23 -07:00
parent 556687376b
commit 3df987712d
6 changed files with 4 additions and 0 deletions

View File

@ -62,12 +62,14 @@ static const char *dmenucmd[] = { "dmenu_run", "-m", dmenumon, "-fn", dmenufont,
static const char *termcmd[] = { "st", NULL }; static const char *termcmd[] = { "st", NULL };
static const char *scrot1[] = { "scrot", "'%+.png' -q 100 -z -e 'mv $f ~/screenshots/'", NULL }; // $(date).png, quality 100 (best), dont beep, move the file into ~/screenshots/ static const char *scrot1[] = { "scrot", "'%+.png' -q 100 -z -e 'mv $f ~/screenshots/'", NULL }; // $(date).png, quality 100 (best), dont beep, move the file into ~/screenshots/
static const char *scrot2[] = { "scrot", "'%+.png' -q 100 -s -z -e 'mv $f ~/screenshots/'", NULL }; // $(date).png, quality 100 (best), select area for screenschot, dont beep, move the file into ~/screenshots/ static const char *scrot2[] = { "scrot", "'%+.png' -q 100 -s -z -e 'mv $f ~/screenshots/'", NULL }; // $(date).png, quality 100 (best), select area for screenschot, dont beep, move the file into ~/screenshots/
static const char *paster[] = { "paster", NULL }; // https://gist.github.com/ethack/110f7f46272447828352768e6cd1c4cb
static Key keys[] = { static Key keys[] = {
/* modifier key function argument */ /* modifier key function argument */
{ 0, XK_Super_L, spawn, {.v = dmenucmd } }, //super opens dmenu { 0, XK_Super_L, spawn, {.v = dmenucmd } }, //super opens dmenu
{ 0, XK_Print, spawn, {.v = scrot1 } }, //print screen takes screenshot of whole screen with scrot { 0, XK_Print, spawn, {.v = scrot1 } }, //print screen takes screenshot of whole screen with scrot
{ MODKEY, XK_Print, spawn, {.v = scrot2 } }, //alt+print screen takes screenshot of area with scrot { MODKEY, XK_Print, spawn, {.v = scrot2 } }, //alt+print screen takes screenshot of area with scrot
{ MODKEY|ControlMask|ShiftMask, XK_v, spawn, {.v = paster } },
{ MODKEY|ShiftMask, XK_Return, spawn, {.v = termcmd } }, { MODKEY|ShiftMask, XK_Return, spawn, {.v = termcmd } },
{ MODKEY, XK_b, togglebar, {0} }, { MODKEY, XK_b, togglebar, {0} },
{ MODKEY, XK_j, focusstack, {.i = +1 } }, { MODKEY, XK_j, focusstack, {.i = +1 } },

BIN
dwm/drw.o

Binary file not shown.

BIN
dwm/dwm

Binary file not shown.

BIN
dwm/dwm.o

Binary file not shown.

Binary file not shown.

2
paster Executable file
View File

@ -0,0 +1,2 @@
xclip -selection clipboard -out | tr \\n \\r | xdotool type --clearmodifiers --delay 25 --file -
xdotool keyup Control_L Control_R Shift_L Shift_R Meta_L Meta_R