[dev] [st/dwm] Alt-Shift-C and Mod1-Shift-C

2017-01-12 Thread Patrick Bucher
Hi there,

I'm using st and dwm at the same time, and today I discovered a little problem
when using the default config of both programs. st uses Alt-Shift-C to copy text
into the clipboard, dwm uses Mod1-Shift-C for closing the selected window,
whereas Mod1 is Alt by default, at least on my machine. (Maybe some of you use
Super_L, vulgo "the Windows key".)

So guess what happened when I was trying to copy some code into the clipboard
today ;-)

How do you deal with that?

Thanks for suggestions,
Patrick

PS: Anybody using Arch Linux here? Since the fontconfig update today st no
longer works with my font of choice Terminus. Just in case somebody has the same
problem... here's my font[] definition:

static char font[] = 
"Terminus:pixelsize=24:antialias=true:autohint=true:lang=ru";



Re: [dev] [st/dwm] Alt-Shift-C and Mod1-Shift-C

2017-01-13 Thread Patrick Bucher
On Fri, Jan 13, 2017 at 11:23:28PM +0800, Ivan Tham wrote:
> On Thu, Jan 12, 2017 at 07:25:06PM +0100, Patrick Bucher wrote:
> > I'm using st and dwm at the same time, and today I discovered a little 
> > problem
> > when using the default config of both programs. st uses Alt-Shift-C to copy 
> > text
> > into the clipboard, dwm uses Mod1-Shift-C for closing the selected window,
> > whereas Mod1 is Alt by default, at least on my machine. (Maybe some of you 
> > use
> > Super_L, vulgo "the Windows key".)
> 
> Windows key is a better choice most of the time since it's unused except
> in qemu where windows uses super key so it clashes. Alt would be bad
> since most applications uses Alt like Alt+1 in firefox, Alt+f in
> terminal.
> 
As you and many others suggested, I am now using the Windows key as well. It's a
bit strange at the beginning, for my thumb has to move a bit more to the left,
but at the same time I can use a lot more key combinations that require Alt,
such as the one mentioned in st, but also some emacs-style readline commands.

> > So guess what happened when I was trying to copy some code into the 
> > clipboard
> > today ;-)
> 
> Try using the primary clipboard, I use that most of the time. I only use
> the clipboard when it comes to Google drive stuff since they clipboard
> sucks and don't support primary keyboard.
> 
Now Alt also works here, but I also started using autocutsel, as an other user
suggested; thank you, it's working fine.

> > PS: Anybody using Arch Linux here? Since the fontconfig update today st no
> > longer works with my font of choice Terminus. Just in case somebody has the 
> > same
> > problem... here's my font[] definition:
> > 
> > static char font[] = 
> > "Terminus:pixelsize=24:antialias=true:autohint=true:lang=ru";
> 
> I use Arch here with Void (Musl is broken with locale so no Chinese
> LC_DATETIME), I heard that there is some issues with the latest update
> where my friend can't use Inifinity but I am still be able to use
> ttf-mononoki here fine.
> 
> I don't know how to solve that but still hope you good luck!
> 
As somebody else already pointed out, the freetype library has a different
behaviour, requiring "xos4 Terminus" instead of "Terminus" to find the font. It
works for me, but there is still a discussion going on:

https://bugs.gentoo.org/show_bug.cgi?id=605168

Thank you for all your help!

Patrick



Re: [dev] Font problems in st, dwm, dmenu

2017-06-25 Thread Patrick Bucher
On Fri, Jun 23, 2017 at 07:52:28AM -0400, cinde...@hushmail.com wrote:
> Now, I'm having problems getting st, dwm, and dmenu to render fonts. 
> Specifically, I am trying to
> use terminus fonts, which I have used with suckless software for years. On my 
> new machine,
> though, these fonts (and all other fonts) dont render well. Instead, some 
> default font is displayed
> with spacing/kerning messed up so that letters overlap one another.

I had a similar problem, but was able to fix it with the following
configuration:

char font[] = "xos4 Terminus:pixelsize=16:antialias=true:autohint=true:lang=ru";

The important part is to use "xos4 Terminus" instead of just "Terminus".
It's related to a fontconfig update a couple of months ago. Maybe that's
your problem.

Patrick



[dev] Sane GPIO library (esp. for Raspi)

2017-10-30 Thread Patrick Bucher
Dear suckless community,

which do you consider the GPIO libary for C that least sucks? I need it
especially for a Raspberry Pi project. Wiring Pi (http://wiringpi.com/)
looks easy and sane, but I wasn't able to try it out yet (still waiting
for a hardware shipment, but I don't want to sit around idle in the
meantime...).

Thanks,
Patrick



Re: [dev] ASCII Delimited Text

2018-05-16 Thread Patrick Bucher
On Wed, May 16, 2018 at 03:46:52PM +0100, Martin Tournoij wrote:
> On Wed, May 16, 2018, at 15:05, Adrian Grigore wrote: In a perfect
> world it would deal well with it, but Notepad still can't handle Unix
> newlines...

It actually does:
https://hackaday.com/2018/05/08/windows-notepad-now-supports-unix-line-endings/

Patrick



Re: [dev] suckless too to minify CSS, JS and html

2018-05-18 Thread Patrick Bucher
On Fri, May 18, 2018 at 07:38:36PM +0200, Hiltjo Posthuma wrote:
> On Fri, May 18, 2018 at 05:22:43PM +0100, Martin Tournoij wrote:
> 
> Don't create pages with 3MB of Javascript, that's insane.
> 
True
>
> I think concatenation/bundling in one file is fine, but not minification,
> because it makes the source unreadable. Carefully evaluate what you actually
> use in the site. Don't use bloated Javascript (such as jQuery) and CSS 
> frameworks
> (such as Bootstrap).
> 
jQuery looks almost reasonable nowadays, compared to the shitpile that
comes out of a Angular «Web App».
>
> Make sure to "gracefully fallback" so Javascript is not required.
> 
> One of the latest trends in Javascript bundle compilation. For example have a
> look at the new Reddit layout. There all the CSS classnames are randomized.
> 
Must reduce the HTTP payload big time, especially when gzipped M-(
>
> Stop this madness.
> 
Yes, please!

Patrick



Re: [dev] (academic) reading suggestions associated to the minimalist/suckless design philosophy?

2018-07-01 Thread Patrick Bucher
On Fri, Jun 29, 2018 at 11:42:36AM +0200, Jens Staal wrote:

> Dear all,
> 
> Do you have any reading suggestions (preferably academic papers, but
> books might also work) in alignment with the "suckless philosophy" (or
> "minimalism").

Paul Graham: Taste for Makers (http://www.paulgraham.com/taste.html) --
an essay about good design.

Felix von Leitner: Writing Small And Fast Software
(https://www.fefe.de/dietlibc/diet.pdf) -- slides for his talk where he
introduces his lobowfat. The emphasis is on small software, but also on
API design.

In general, I suggest you browse through Dijkstra's writings:
http://www.cs.utexas.edu/users/EWD/

> It does not have to be specifically programming, it could also be
> engineering and design in general (art might be a stretch, but if you
> know some good litterature in that field I am open to that too).

In literature, Čechov was the ultimate champion of simplicity:

> On Sept. 3, 1899, Chekhov gave his most prescriptive advice to Gorki,
> a tip that influenced many 20th century writers like George Orwell and
> teachers of the craft such as Strunk and White.
> 
> "Here is more advice; when you read proof, [galley proofs publishers
> provide authors for corrections, deletions and other changes] take out
> adjectives and adverbs whenever you can. You use so many of them that
> the reader finds it hard to concentrate and he gets tired. You
> understand what I mean when I say, 'The man sat on the grass.' You
> understand because the sentence is clear and there is nothing to
> distract your attention. Conversely, the brain has trouble
> understanding me if I say, 'A tall, narrow-chested man of medium
> height with a red beard sat on green grass trampled by passers-by, sat
> mutely, looking about timidly and fearfully.' This doesn't get its
> meaning through to the brain immediately, which is what good writing
> must do, and fast."

https://www.poynter.org/news/writing-lessons-master-chekhov-writing-coach
(Source)

In music, take Bach's E-Major Fugue from the second volume of the Well
Tempered Clavier. Here's Glenn Gould's commented interpretation:
https://www.youtube.com/watch?v=iFOqX3JGERo

This is just a random collection of things that spontaneously came to my
mind on a sunday morning.

Patrick