Finally sorting some long outstanding quirks with Suckless stuff

After spending almost all day trying to get a build of dwm exactly how I want it to work, I finally got there. Super happy.

I almost gave up, almost.

Another thing, thanks to Luke Smith I also managed to get a comfortable copy and paste sorted out with st.

5 Likes

Top again @Dobbie03

Looks like you re more patient than me on these matters !

Care to elaborate on this? I didn’t see anything out of the ordinary in your config.h.

Can’t wait to see your end result!!!
Speaking of which , do we have a DWM show us your hacks sorta thread?

Oh it is nothing out of the ordinary, just a script to assist with the copy/paste:

Script:

#!/bin/sh
# Using external pipe with st, give a dmenu prompt of recent commands,
# allowing the user to copy the output of one.
# xclip required for this script.
# By Jaywalker and Luke
tmpfile=$(mktemp /tmp/st-cmd-output.XXXXXX)
trap 'rm "$tmpfile"' 0 1 15
sed -n "w $tmpfile"
sed -i 's/\x0//g' "$tmpfile"
ps1="$(grep "\S" "$tmpfile" | tail -n 1 | sed 's/^\s*//' | cut -d' ' -f1)"
chosen="$(grep -F "$ps1" "$tmpfile" | sed '$ d' | tac | dmenu -p "Copy which command's output?" -i -l 10 | sed 's/[^^]/[&]/g; s/\^/\\^/g')"
eps1="$(echo "$ps1" | sed 's/[^^]/[&]/g; s/\^/\\^/g')"
awk "/^$chosen$/{p=1;print;next} p&&/$eps1/{p=0};p" "$tmpfile" | xclip -selection clipboard

Keybinds:

{ ControlMask,          XK_c,           clipcopy,       {.i =  0} },
	{ ShiftMask,            XK_Insert,      clippaste,      {.i =  0} },
	{ ControlMask,          XK_v,           clippaste,      {.i =  0} },

Sounds like a good idea, I shall put one together.

Soon my friend, soon.

The half a bottle of rum assisted.

My dots at the link in my signature require an update.

1 Like

I don’t like to use the clipboard:

Left-click & drag to select text for the PRIMARY buffer then middle-click to paste it. That avoids the above mentioned JS exploit.

EDIT: bloody Luke Smith… ヽ(ಠ_ಠ)ノ

3 Likes

Thx for sharing @Head_on_a_Stick . Wasn t aware of that.

1 Like

Interesting read. I also added the Copy Guard addon. :smiley:

He’s helpful for us learners. Though I’d like to think he is showing us how to do things correctly.

1 Like

Not if his completely un-maintained and now shamelessly incorrect Arch Linux installation “guide” is anything to go by.

But why use that when we have the official installation guide to follow?
:smiley:
He should actually remove that, because we all know there will be a lot of people who will follow that and get themselves stuck.

1 Like

I’m not a supporter of Luke’s nor will I dismiss what he knows/does but to be fair, and to your point, HoaS, his guide was useful at one point in time but it should be removed (if it is still there).

I myself don’t know enough to know if what he does now is right or wrong but I will say that because of him, I learned more about mutt then had I not tried his setup. That being said, I never got his mutt app to work so I ended up learning the good old fashion way (Google, trial n error) and I feel I’m the wiser for it.

If anything, I consider his work something to build on if you are a normie. I don’t believe he intends any of his stuff to be the end result that folks should be running. That’s the way I took it at least.

Of course, I have seen plenty of Luke-ites and that just cracks me up beyond belief since they will actually post on YouTube what they have done and obviously its a near clone of Luke’s.

But… We all need to start somewhere and I suppose imitation IS the best form of flattery, lol.

He may have been and still is really helpful for some, but
Reading through his essays on his website makes me want to vomit.
https://web.archive.org/web/20180523034549/http://old.lukesmith.xyz/gateway.html
One of many examples. Some are deleted, some not.

I don’t say and write more about him, everyone here can read.
Besides, every word about this person is too much.

But if you don’t know the background of this person and you are not interested in it, I can understand that you find him nice and helpful.
I don’t.

But… Each to his own.

Most of his scripts etc that he uses in his dwm build, especially dwmblocks just flat out won’t work as they should for me.

He’s a knowledgeable guy, I suppose the idea is to use his scripts, builds and advice as a base to build from.

Yeah I can’t say I really agree with him at that link. His writing reminds me of how Stephen King portrayed Harold Lauder in The Stand (the book). Big long words, grandiose passages.

Yes.

We have got a little off topic here so to get us back on track, it is such a good feeling to be sitting here to be using something like dwm that fits my workflow. “Designed” to suit me. I’m a happy chap.

1 Like

Yes and i know the feeling to build my “own” dwm thats fits the my workflow perfectly.
Thats the reason why i left sway and stuff. We are a happy family. :slight_smile: lol

I go to bed. Have a good night people.

1 Like

Yes we are.

I gave it a casual attempt about 3 years ago. Never really tried again.

See ya, sleep tight. Dream those Suckless dreams.

1 Like

I also don’t use clipboard much, primary selection is so much easier imo

2 Likes

I need to get the hang of it. It makes sense to, it’s years of Windows mind shaping that I need to reverse :smiley:

1 Like