Re: [dev] Introducing the imagefile-format
On Mon, Jul 28, 2014 at 6:55 PM, FRIGN wrote: > fread(hdr, 1, 17, fd); > width = ntohl((hdr[9] << 0) | (hdr[10] << 8) | (hdr[11] << 16) | > (hdr[12] << 24)); > height = ntohl((hdr[13] << 0) | (hdr[14] << 8) | (hdr[15] << 16) | > (hdr[16] << 24)); Isn't ntohl superfluous here? In fact, wouldn't this break on a big-endian architecture? If I'm reading this right, we're storing the value in memory in reverse (of native) byte order, assume it's now big-endian and convert it to native byte order. Wouldn't this suffice? width = (hdr[9] << 24) | (hdr[10] << 16) | (hdr[11] << 8) | hdr[12] height = (hdr[13] << 24) | (hdr[14] << 16) | (hdr[15] << 8) | hdr[16]
Re: [dev] Introducing the imagefile-format
On Tue, Jul 29, 2014 at 1:59 AM, FRIGN wrote: > Be careful: the n in ntohl does not stand for native, but network. > More or less by convention, the Network Byte Order today is BE. What > ntohl makes sure is that in case we are on a LE-system, it's arranged > properly. > ntohl is only superfluous here when we are on a BE-machine. [...] That's what I was assuming. That on a BE machine, ntohl will be a no-op. Maybe I should spell out my reasoning here. The bytes in hdr are in Big Endian order. Unless I have my understanding of bit shifts backwards, this expression: (hdr[9] << 0) | (hdr[10] << 8) | (hdr[11] << 16) | (hdr[12] << 24) will result in a BE-ordered (network-ordered) value on LE machines, and a LE-ordered value on BE machines. Then, running it through ntohl: reverses the byte order on LE machines, which gives us an LE-ordered value (correct) or does nothing on BE machines, which gives us an LE-ordered value (wrong!). In any case, I feel like I'm making mountains out of molehills here, and this example code isn't used anywhere as far as I can see, so I'm not gonna bother you with this anymore.
Re: [dev] Object-Oriented C for interface safety?
On Wed, Nov 26, 2014 at 01:38:58PM -0800, Charles Thorley wrote: > THIS IS NOT A TROLL That's exactly what a troll would say!
Re: [dev] sbase echo.c is incorrect
On Fri, Apr 03, 2015 at 08:17:29AM -0300, Prog Rider wrote: > it doesnt print shit that loons like cmdline arg > This is the best bug report.
Re: [dev] slock for dual displays
I've had to set set the standby timeout before starting slock. This is the script I use. #! /bin/sh xset dpms 10 0 0 /usr/local/bin/slock xset s off xset -dpms
Re: [dev] Re: [hackers] [dwm] Patch to confirm Shift-Alt-Q
On Sat, Aug 08, 2015 at 11:16:25PM +0200, Quolick wrote: > Sometimes I made typos. "Fat finger", as they say. > It's a pity to have all windows closed just because of that. You must have some really damn fat fingers to accidentally press Mod+Shift+Q. Now, trying to close a window and accidentally closing the WM instead, that happened to me an embarassing number of times. You could try binding quit to some even more exotic key combo, like Mod+Shift+BackSpace. Now that I think about it, that would probably have saved me a lot of frustration in the past. Huh.
Re: [dev] Re: [hackers] [dwm] Patch to confirm Shift-Alt-Q
On Sun, Aug 09, 2015 at 08:32:51PM +0200, Anselm R Garbe wrote: > Or in other words, where is the mental connection between q and c? The mind is a labirynth, a puzzle. And while the paths of the brain are plainly visible, its ways deceptively apparent, its destinations are unkown. Its secret still secret. Honestly, for me the connection is that both these keys close things. So I guess I might be beyond help here.
Re: [dev] Re: [hackers] [dwm] Patch to confirm Shift-Alt-Q
On Sun, Aug 09, 2015 at 09:12:25PM +0200, Quolick wrote: > It's not easy to memorize, which shortcut is for close the current window > (quit or close?) > and quit window manager (quit or close?) You know something went horribly wrong when you have to quit a window.
Re: [dev] [dmenu] Handle invalid font names
On Mon, Oct 19, 2015 at 12:53:50PM +0300, Ilias Tsitsimpis wrote: > so I am guessing this is a bug and not the intended behavior. > > Keep up the good work! Jeez. No need to go all sarcastic just because of one little bug.
Re: [dev] dwm: force fullscreen to tile
On Fri, Nov 20, 2015 at 10:47:54AM -0300, Draco Metallium(Rodrigo S. Cañibano) wrote: > Good day. > > I was wondering, is there some way to force fullscreen apps to a tile? > > For example, in i3wm I could put a youtube video in full screen, then > turn i3wm full screen off, and the video would continue in 'full > screen' but inside a tile. > > Can it be done? > > Thanks! And sorry for the wroken English. I don't know about forcing fullscreen windows to tile, but if you just want to watch YT videos, you could try mpv (https://mpv.io/). It supports playing YouTube (and other video sites) via youtube-dl and it's not too terrible from the suckless perspective, in my opinion.
Re: [dev] Announcement: Backporting the fun into C
Too Long; Died Reading
Re: [dev] dwm: Poor performance of some games.
On Thu, Dec 03, 2015 at 03:32:59PM -0300, Draco Metallium(Rodrigo S. Cañibano) wrote: > It was dbus-launch all along! > > Or better the lack of it. Wait, how does launching dbus make anything run faster?
Re: [dev] How to unsubscribe
Do you think maybe all these people come to suckless thinking it's some kind of porn thing?
Re: [dev] Lag in when changing view to a OpenGL window
On Fri, Dec 04, 2015 at 08:09:58PM +0100, ACE wrote: > Maybe someone here has a recommended compositor which works well. Not running a compositor works pretty well for me. Maybe you could try that?
Re: [dev] [dwm] 6.1 release
On Mon, Dec 07, 2015 at 10:51:25AM -0500, Matthew of Boswell wrote: > There is no end-user support here. Most of us don't want to spend our > free time on it, and we don't want "help vampires" to feel welcome. "help vampires" nice
Re: [dev] [dwm] improved maximize patch
On Wed, Dec 30, 2015 at 02:41:52AM +1000, Jonathen Russell wrote: > Minor changes to this patch while applying it to latest git tonight. > > Changes: > > * change boolean values to integers > * remove redundant window size saving (resizeclient() does this already) > > jgr Wouldn't it make more sense to just send a new patch, instead of a patch to a patch?
Re: [dev] Fmask [c posix]
> What's next? Linking interesting tweets? That can't happen, since there's no such thing.
Re: [dev] unsubscribe
On Sun, Feb 28, 2016 at 04:29:22PM +1300, Mytchel Hammond wrote: > unsubscribe > I don't want to. :<
Re: [dev] Re: [slock] red color on control keys?
On Mon, Apr 04, 2016 at 11:50:38PM -0600, Frostyfrog wrote: > So, I understand that the red background color is supposed to signify > that someone tried to log into the machine, but does it really need to > turn the screen red when I press a no-op key? I generally press the > control key to wake up my monitors, but that has the side-effect of > going into "Someone tried to guess you're password/login" mode. So, > yeah... the red screen is a moot point if it doesn't really show me > anything. :/ Don't you have a mouse you can wiggle? I mean, mad props and all that, if you don't...
Re: [dev] [dwm] bad line in config.mk?
On Fri, Apr 08, 2016 at 08:07:35PM +0100, Dimitris Papastamos wrote: > On Sat, Apr 09, 2016 at 12:13:44AM +0545, Neeraj Adhikari wrote: > > Hi, > > > > I downloaded the dwm-6.1 tarball and tried to compile but it failed > > with the error message that ft2build.h was not found. When I looked at > > config.mk, The line below immediately below "# OpenBSD (uncomment)" > > that changes the include path for freetype2 was not commented by > > default, causing the build to break. Commented that line, and dwm > > compilled fine. Can this be called a bug? > > It was an oversight when the tarball was created. We cannot go back > in time and fix this. > > It is already fixed in HEAD. It's a shame you didn't keep it in, as an entry test of sorts...
Re: [dev] [question] Does bash suck?
On Sat, Apr 23, 2016 at 03:38:54PM +0200, Kamil Cholewiński wrote: > I don't like rc since there are two incompatible implementations, one is > the real thing and the other is actually usable for interactive use. rc is perfectly allright for interactive use, as long as you run it in a Plan9-compatible terminal.
Re: [dev] opportunities for dwm docs to suck even less
On Tue, May 17, 2016 at 04:12:31PM -0800, Britton Kerin wrote: > The into page that did get me going was: > http://rhunter.org/blog/2012/04/17/dwm-a-tutorial-for-beginners/ I was always under the impression that dwm was simply not meant for the sort of people who don't know what a "terminal emulator" is, or how to comment a line.
Re: [dev] pledge(2) patches
On Mon, Jun 06, 2016 at 02:39:04PM +0200, FRIGN wrote: > What it all brings up is the issue of IPC. Can you people suggest > your favourite approach to IPC? If not, maybe we could look into > writing a very simple library (name-suggestion "sippy" :P) which > builds on top of UDS and implements a very simple messaging > protocol. You should reserve "sippy" for a suckless CUPS replacement.
Re: [dev] libzahl paper
On Mon, Jun 13, 2016 at 11:32:11PM +0200, Mattias Andrée wrote: > Too energy efficient to open the PDF and > read the abstract? No worries, here it is: You're a good person.
Re: [dev] JIT & VM discussion
On Sat, Jun 18, 2016 at 10:33:23AM +0100, Connor Lane Smith wrote: > Hi all, > > I was wondering if others had an opinion on JIT. Suppose we don't need > anything fancy like adaptive optimisation, but just wanted to compile > a program at runtime. Why?
Re: [dev] [dwm] Avoid requesting MotionNotify events
On Sat, Jul 16, 2016 at 02:33:18PM +0300, Alexander Monakov wrote: > This causes lots of useless communication between the X server and dwm every > time the mouse pointer is moved, even when nothing could possibly change as > a result (e.g. if Xinerama is not compiled in, or only one monitor is > present). > On my system, the resulting syscalls-per-second count in dwm is about 490, if > the mouse if moved continuously. Why is this a problem? I mean, I just found out that I wiggle my cursor really hard, dwm CPU usage goes up to 3%. Is that why?
Re: [dev] Proper window type for dwm and dmenu
Shadows... with a tiling window manager? How does that work?
Re: [dev] New Suckless computer language?
On Sun, Jul 24, 2016 at 11:18:11AM +1100, Sylvain BERTRAND wrote: > Go compiler/sdk is that c++ dependent (language and runtime) kludge which is > gcc now (go is google and gcc becoming hard dependent on a c++98 > compiler/runtime is google mistake too), and rust compiler/sdk has similar > issues. I'm not sure what you meant to say here, on account of your grammar being inside-out, but before the Go compiler was rewritten in Go, it used to be written in C. I'm not sure if anybody ever tried to compile it with anything except GCC. If you're talking about the GCC Go frontend, I'm still not sure why it exists, but it's hardly mandatory to use it.
Re: [dev][patch] Proper window type for dwm and dmenu
On Sun, Jul 24, 2016 at 11:10:48PM +0200, hiro wrote: > hahahahaha. shadows. > They're useful for vampire detection.
Re: [dev] Wayland vs X11
On Tue, Aug 02, 2016 at 06:04:20PM +0200, patrick295767 patrick295767 wrote: > Quote: > Display server expert Daniel Stone explains what is really happening Display server expert.
Re: [dev] JWM on website
On Tue, Aug 02, 2016 at 10:47:31PM +0200, Martin Kühne wrote: > libXmu for rounded corners. kill me
Re: [dev] Allow secure access to Web site suckless.org
On Wed, Aug 03, 2016 at 01:21:46PM +0200, Anselm R Garbe wrote: > Do you trust your network adapter telling you the truth? > > Nevertheless I doubt you don't use online banking and stuff like that, > hence you definitely trust some CA to some extent ;) I always wear a tinfoil hat and double up on condoms before I open the web browser. Safety first.
Re: [dev] [st] most suckless way to scroll & multiplex
On Thu, Aug 11, 2016 at 10:15:02PM +0100, Joseph Graham wrote: > I am accustomed to having scrolling and multiplexing (in xfce4-terminal). To > get these the suckless way should I: > a. use tmux/screen > b. use tabbed and the st scrollback patch > c. something else I'm not sure about "the suckless way" (or why you'd care), but... I use dvtm for scrolling. I think. If you set it right, you'll never notice it's there. Except when you try to scroll, and it works, instead of not not working. Yeah. For multiplexing, dwm.
Re: [dev] st lack of scrollback
On Thu, Aug 11, 2016 at 10:36:21AM -0800, Britton Kerin wrote: > On Thu, Aug 11, 2016 at 9:42 AM, Christoph Lohmann <2...@r-36.net> wrote: > > Greetings. > > > > On Thu, 11 Aug 2016 19:42:13 +0200 Britton Kerin > > wrote: > >> I realize it's a non-goal > > > > Then why do you send this useless mail? > > Because I care enough to call bs on stupid stuff, you should be grateful I know I'm grateful for the giggle. Cheers.
Re: [dev] [dwm] resize cursor
On Tue, Aug 23, 2016 at 01:27:23PM +0300, Cág wrote: > Since dwm resize cursor appears exclusively on the bottom right corner, I recall some people having patches that make it possible to resize from other corners. I don't know if anybody should care about that. > what about changing XC_sizing to XC_bottom_right_corner in dwm.c[0]? > It will change the "ugly" X cursor to the current theme. Ugly X cursor? Can you give an example?
Re: [dev] [sbase] [paste.c] misleading indentation?
On Thu, Sep 01, 2016 at 11:28:03AM -0300, Marc Collin wrote: > Hey guys. > > I was warned by the compiler about a misleading indentation and I > think its right. Which compiler warns you about indentation?
Re: [dev] [sbase] [paste.c] misleading indentation?
On Tue, Sep 06, 2016 at 09:37:09AM +0200, Kevin Michael Frick wrote: > GCC, probably. Which sucks, but if Hitler warns you not to step of a > cliff, you don't ignore his warning because he is Hitler. I never said it's a bad thing. Please don't put words in my mouth. I only let very close friends put things in my mouth
Re: [dev] [announce] wjt-0.1 - slider widget
On Mon, Dec 12, 2016 at 07:42:15PM -0600, Ian Remmler wrote: > I recently switched to dwm, and I've been using the systray patch > because I liked having a drop down volume control. But I decided to go > patchless, so I made a slider app to provide something similar: > Hey, that's pretty neat. I hope you're going to write a man page?
Re: [dev] [surf] Webkit2 with proxy server
On Sat, Dec 17, 2016 at 01:32:55PM +0100, Sylvain BERTRAND wrote: > Is there anybody who dared to think that webkit-anything or geecko-anything is > in no way suckless due to their c++ implementation? > > -- > Sylvain > I don't think anybody's ever claimed otherwise. I think the point of surf is that we don't live in the perfect world of our dreams, and sometimes you have to compromise to get the job done. So are you saying we shouldn't make compromises, or do you know a better compromise than webkit?
Re: [dev] [surf] Webkit2 with proxy server
On Sat, Dec 17, 2016 at 06:51:25PM +0100, Sylvain BERTRAND wrote: > I'm about to sue some french administrations over their www sites and my > french > bank www sites for their lack of interop with light www browsers. I wish you luck with that endeavor. My bank won't even let me log in if their server doesn't recognize my User-Agent string as the latest version of a popular web browser.