Re: [dev] Lessons Learned from 30 Years of MINIX
* Anselm R Garbe 2016-03-06 15:56 > I agree, though this is not stricly a problem with monolithic approaches > either. > In the end you have to trust the process governor to limit the > privileges of a process (or thread) to its specification/requirement. > If the governor is only one SPOF (monolith) or if there are multiple > forks of such a SPOF (microkernel) makes no big difference in the end. > If the SPOF has a flaw, the flaw is everywhere, regardless the process > model. to my understanding, the governer (or whatever SPOF) is again yet another problem. I agree that it has the same impact in both designs. when you have as less as it gets in kernel space, however, you are exposed to less vulnerabilities inherent to the (governed) code (running user space), which the SPOF is not in control of. cheers --s
Re: [dev] Lessons Learned from 30 Years of MINIX
* Anselm R Garbe 2016-03-06 14:20 > On 6 March 2016 at 13:47, robin wrote: > > Microkernels defenitely resonates with the unix philosophy "do one thing and > > do it well". > > Having everything, except FUSE and such, in the kernel is doing more than > > one thing. > > IMHO the architectural decision for a monolith (==static linkage) > often reduces the management bloat of dynamic loading or similar > "extension" approaches that you end up with in a microkernel > architecture. you have dynamic vs static linkage problematic either way. that's orthogonal. microkernel is for me more about privileges and critical sections. generally speaking, it definitely sucks less to have by design less things that can badly go wrong. --s
Re: [dev] [surf] Why yank to primary instead of clipboard?
* Kamil Cholewiński 2016-02-03 10:05 > On Wed, 03 Feb 2016, robin wrote: > Middle click. > [...] > Yes, this is really confusing and frustrating, I have to reach for the > mouse when otherwise dealing with an almost keyboard-only environment. try Shift-Insert cheers --s
Re: [dev] Fmask [c posix]
meta-meta * Hiltjo Posthuma 2015-12-30 12:21 > What's next? Linking interesting tweets? https://twitter.com/ggreenwald/status/682187313644998656
Mailing lists suck less. (was Re: [dev] Mailing lists sucks.)
mailing lists rock as much as it gets in the field. and as a side note: http://www.wired.com/2015/09/sorry-ello-real-anti-facebook-good-old-email/ cheers --s
Re: [dev] [sbase] cal doesn't highlight current day
Hi * Manu Raster 2015-11-16 22:45 > Another really useful function would be an optional column in the > calendar displaying 'ISO week dates' (DIN ISO 8601). They are quite > common in business parlance but I haven't seen them in any cal command > yet. you might give ncal a try. (it comes from FreeBSD.) ncal prints weeks vertically, rather than horizontally, and with an optional row(s) for the week number. cheers --s
Re: [dev] [surf] Using more memory than firefox
* Ivan Tham 2015-06-02 16:37 > Extra: How do I open a link in surf using the keyboard in the current > window and in a new window? vanilla surf: when carret browsing is active, you may search for the link's text and press enter (opens in the current window). otherwise: look at the surf.suckless.org/files/. there was some javascript solution to follow links. --s
Re: [dev] [sbase][offtopic] sbase in the wild
* Vampyrah Broadcasting 2015-03-13 21:11 > My teacher is pregnant, so our class made a present for her: personally > painted rompers. I decided to put cat.c 20150303 from sbase on the romper truly brilliant, Dennis! --s
Re: [dev] st: selecting text affects both primary and clipbaord
* Alex Pilon 2015-03-12 15:17 > Also, do > most numpad-less laptop keyboards even have Insert all I've ever seen do. > or a middle mouse > button? some do have middle. all i've ever seen have at least 2 buttons. you can emulate middle button as simultaneous left+right. --s
Re: [dev] Suckless unit testing in C?
* FRIGN 2015-02-26 10:43 > M Farkas-Dyck wrote: > > Sanity is not a democracy. > > Exactly! But having unwrapped lines corresponds to anarchy. And anarchy is > for idiots. A. can diverge badly but also (surprisingly to many) converge to very much sane results. I'd rather consider the ~70-wrapping as the latter. --s (wrapping at whitespace <=72)
Re: [dev] st: selecting text affects both primary and clipbaord
* Greg Reagle 2015-02-20 20:07 > It is true that the only reason I select text in st is to copy it, but I > still don't want it clobbering my clipboard. does the current behaviour break some scripts or habits of yours and how?
Re: [dev] st: selecting text affects both primary and clipbaord
* k...@shike2.com 2015-02-20 17:39 > I agree here, it shouldn't modiy the CLIPBOARD seletction. Sometime > is good to have different things in both selections. If nobady claims > about it I will apply your patch. > I'd leave it as is, in order not to break scrips which expect to read something from CLIPBOARD. In other programms, you might have the choice to send something to selection or CLIPBOARD by different means. In st, however, you don't. Thus, the current behaviour seems to me more consistent and intuitive. --s
Re: [dev] keyboard layouts and shorcuts
> > shortcuts to stay on the same key +1
Re: [dev] [website] [proposal] Add suckless logo and minor style change
* FRIGN 2015-02-03 14:35 > The entire suckless-website has a horizontal approach with only one thin > dotted line separating the menu from the content. hm. apart from the ss discussion, an appealing variant would be to vertically align suckless.org with the content in the main area. (whether the dotted line continues on the header or not) (thanks for taking your time for this visual thingy) --s
Re: [dev] Found a bug in surf
* Vampyrah Broadcasting 2015-01-21 20:35 > I tried xclip -o -selection primary and that worked I'm not an expert, but there are these primary and secondary selection, the clipboard and a bunch of other buffers. They differ in how the content is requested and exchanged and who owns the content afaik. . . . in your case the other client doesn't use the primary selection. one option is to teach it to do so. . . . I bet your other client uses the clipboard (as you could do with xclip -o -selection clipboard). this means you have the option to bring surf to put the selected text to clipboard or to both primary and clipboard. Look for the clipboard() function in surf.c and there should be a code snippet like: gtk_clipboard_set_text( gtk_clipboard_get(GDK_SELECTION_PRIMARY), c->linkhover ? c->linkhover : geturi(c), -1); k add this just after it: gtk_clipboard_set_text( gtk_clipboard_get(GDK_SELECTION_CLIPBOARD), c->linkhover ? c->linkhover : geturi(c), -1); This is untested, but has fair chance to work. . . . the third option: copy between primary and clipboard as you like. xclip -o -selection primary | xclip -i -selection clipboard xclip -o -selection clipboard | xclip -i -selection primary cheers --s
Re: [dev] Found a bug in surf
* Vampyrah Broadcasting 2015-01-21 19:50 > Ctrl-y does nothing. how do you test? you try to paste, I guess. could be an issue of copy and paste addressing different selections. after yanking (i.e. ctrl-y) you might try xclip -o -selection primary xclip -o -selection secondary --s
Re: [dev] Found a bug in surf
* Vampyrah Broadcasting 2015-01-21 19:34 > I wanted to copy > the current URL. Is there any way to do this? Hi, Ctrl+y (mnemonic yank) The manpage describes the default keybindings. cheers --s
Re: [dev] [surf] [PATCH] add per-site user styles
* Christoph Lohmann 2015-01-07 21:46 > cope with two goals: > 1.) Make userstyles.org usable for surf. could you provide some examples of useful userstyles.org styles. All I've seen on userstyles.org is either for sites I don't visit regularly or is about setting a car (fire, skull) as background or both. That seemed to me as targeting people who have several layers of transparency on their desktop in the hope to see the cogs of their hard drives rolling perhaps. To explain where I look at it from, I use 4 styles currently: 0. default, 1. light-on-dark css for SimplyRead (simplyread bound to some key), 2. light-on-dark (night), which basically enforces max-width, font, color and background-color on everything (with small exceptions) 3. dark-on-light (day), which is inverted 2.) 2 and 3 only because simplyread can't always get what I want to read. I can imagine to add 2-3 more styles to better adjust to some sites I regularly visit, but can't see need for more. thanks --s
Re: [dev] surf vertical and horizontal same-origin policy patch
Hi sounds very interesting. thanks. will review, test and report when I get some spare time…
Re: [dev] [surf] tabs and clipboard
Hi, * Markus Teich 2015-01-04 13:03 > think). Since I also mostly use mono/fullscreen mode of dwm, opening single > Windows with no tabbing capability seems rather useless (more windows in the > view, more time spent finding the right one). how is searching in tabbed windows different from (better than) searching in monocle windows, could you please elaborate? thanks! --s
Re: [dev] Operating system choice
* koneu 2014-11-21 13:22 > + microkernel is inferior to monolithic in almost all aspects microkernel is beautiful --s
Re: [dev] tax on internet?
* FRIGN 2014-10-28 16:10 > I know of the high poverty in Hungary. However, if you can't afford 3 > potatoes, why do you worry about an Internet tax? wait, wait, this is misconception. we are far beyond the point that internet connection is luxury good and you only need it after you've payed all the rest. it should be thought of as water supply… --s
Re: [dev] golang: time.Tick() and ntp
* Simon Lieb 2014-10-09 16:10 > What about using the ClkStatusText click in dwm’s config.h buttons array > to send status bar content to X selections ? what about sending date directly to X selections? :o) I mean, I get your point. Let me try another formulation: apart from looking at it, for other tasks, the presence of time/date in the status bar is either not a solution, or leads to solutions more complex than using `date` directly --s
Re: [dev] golang: time.Tick() and ntp
* Markus Teich 2014-10-09 16:01 > I have no watch. They always break in the first year of wearing them. get an analogue, manual one, give it some love and it will love you for many years. > Also I > seldomly would like to copy the time to some place, so look-at-only is pretty > good for me. if I can't bring you to wearing a watch, I must agree. --s
Re: [dev] golang: time.Tick() and ntp
* Martti Kühne 2014-10-09 15:59 > ...sorry, but what about screenshots? sure, it is that simple: xwd | cut -d' ' -f6-11 | ocr | xclip -i ok, I admit, I should have written “for the most part” to be correct. --s
Re: [dev] golang: time.Tick() and ntp
* hiro 2014-10-09 15:10 > then buy a watch. very good point: does one need the time in the status if one has a a watch. the status bar is not selectable, or modifiable, it is not even read-only (you can't save it, colpy it etc.), it is look-at-only. think about this
Re: [dev] [PATCH] Reorder-and-extend-glyph-attributes
Hi, * Christoph Lohmann 2014-08-02 11:34 > As mentioned in my last e‐mail: The number of sucking e‐mail providers > is greater than two, which requires variable blinking definitions to im‐ > plement e‐mail awareness correctly. > > Thinking this further would allow a simple integration of a global suck‐ > iness index for e‐mail providers which are then scaled down to the human > perception and a psychological scale for showing the importance of keep‐ > ing distance to certain users of some e‐mail provider. Suckiness is theoretically bound by zero from below; it can get arbitrarily high, though. This observation reveals some problems with mapping suckiness to a perceivable scale. This is probably what you mean by “scale down”. Blinking doesn't seem to be the ideal cue for that (assuming proportional scaling), since both very fast blinking and very slow blinking are -- for practical purpose -- useless. One solution is to look for another cue which is perceivable well in its extrema. Another solution is to employ some saturating mapping (like logistic func) from suckiness to the well perceivable domain of the cue. Maybe this is worth a separate project with hand selected, well tested cues and mappings since other UIs will certainly jump on the waggon, once they see the benefits of easily recognising what sucks more. --s
Re: [dev] [PATCH] Reorder-and-extend-glyph-attributes
you're doing great job with st, guys, keep up! didn't want to distract you from the discussion but couldn't resist 20h's briliant irony. --s
Re: [dev] [PATCH] Reorder-and-extend-glyph-attributes
* Markus Teich 2014-07-31 12:39 > at suckless conf last year 20h mentioned, he originally implemented blinking > support to warn him about outlook and gmail users in mutt. epic! then he clearly needs at least two blinking modes: one for each. what about hotmail?
Re: [dev] xscreenshot(1) using suckless image format
> > Is there a reliable way to get the X id of a window in a shell script? This > xwininfo could help. that's very helful, thanks a lot, Marcus! cheers --s
Re: [dev] Graphics library that sucks the least?...
* Evan Gates 2014-07-10 19:54 > I like this idea with one qualification, when launched from a terminal > the new program takes the place of that terminal. Ah, that reminds me, I once thought that tabbed which I otherwise don't find use for might be forced to act as placeholder for all the windows spawned by programs started from the terminal. The shell should be made aware of tabbed in some way, I guess. --s.
Re: [dev] Misbehaving floating window in dwm
Similar issues arise with java windows when the wm name is not set. You might want to set it, e.g. by wmname LG3D http://tools.suckless.org/wmname --s.
Re: [dev] Why do you use tmux/screen?
* hiro 2014-07-01 13:45 > I'd rather have the window manager manage all those persistent shell sessions. > But tmux is such a beast that most people use is as their window > manager in a window manager as well. tmux (or dvtm, or tabbed, or other multiplexer) run locally inside wm make sense for logically (according to one's logic) or technically connected windows. For me, an irc session is such case -- runs in (what would be in dwm) bottom layout in dvtm+dtach: sic in one window, log tail in the other. The gain of persistent sessions as with tmux and dvtm+dtach is obvious but is another story. --s_
Re: [dev] Plain text editor that sucks less - an alternative to VIM?
* Dimitris Zervas 2014-06-30 11:35 > I am thinking of trying to implement vim key bindings one of these days (I > can't work otherwise). that'd be great. including modes? --s_
Re: [dev] [st] [PATCH] Explicit cast in CEIL macro
* FRIGN 2014-06-24 17:07 > Damn, you are right -.-. Back to the drawing board. FWIW CEILmy(x) ((int)(x) + ((x) - (int)(x) > 0)) the porblem with CEIL(3.01) remains, though. --s.
Re: [dev] C coded lightweight Linux vector graphics editor
* Džen 2014-06-23 13:09 > As a back-end and syntax. > TikZ actually is quite simple. The syntax is simple for simple things, true. But then you need to through it to pgf and tex and whether they as dependences make much sense… > A lot of people find it difficult to use, but practice makes perfect. I have used it several times for different purposes but not so often. Every time I get back to it, I find myself “relearning” things I had already knew last time. I don't always have time for practice a lot -- for these cases I feel a graphical front is useful. > To me it seems to be the most sophisticated front-end around for > drawing vector graphics. Well, the front end is your text editor. (See downsides of this below.) > > I guess it's a matter of taste, but I prefer to write some TikZ code > instead of using a fancy graphical front-end to manipulate (XML-based) > vector graphics. Me too, for some cases: it particularly pays off for well defined basic figures when you know their relative positions in beforehand and you don't need the visual feedback for; and for repeating modular drawings as well. However, for free form curves and prototyping, it becomes an ugly endless mess of adjust-compile-view cycles. cheers --s_
Re: [dev] C coded lightweight Linux vector graphics editor
* Džen 2014-06-23 11:14 > What about using pgf/tikz? do you mean as backend or as fileformat/syntax? tikz is quite powerful but I wouldn't call it simple. --s_
Re: [dev] Lightweight, non-bloated, fast image viewer?
* Charlie Murphy 2014-06-14 18:15 > If netpbm tools supported alpha, […] don't they? pam(5)'s _ALPHA extension --s.
Re: [dev] Microblogging?
hi, * Nick 2014-05-27 16:38 > That would be worth looking into, I'd have thought. Beyond that, > there's probably some IRC thing like bitlbee (maybe even bitlbee) > that can post to twitter et al, if that's your thing. yes, bitlbee implements some basic commands to interact with twitter. I have some more on my wish/TODO list) last time I looked, they had identi.ca support (never used it), and did *not* support pump.io. cheers --s_
Re: [dev] [GENERAL] License manifest
Hi, * Anthony J. Bentley 2014-05-13 04:31 > Summaries and general concepts are pointless because they are not what is > legally in effect. The only sensible license is one that is so simple that > it needs no summary. No. Every license, even two lines long, (and even the lack of a license) puts the work in the context of a legal system. To fully understand the implications of a license, you cannot only read it or its summary; you have to be aware of the laws it touches on. So, I do not see the point in arguing with word counts. The fact you even skim through the license means you care about licensing matter. Then you surely have spent the time to understand some basic notions around licenses or should do so. cheers --s_
Re: [dev][port] Porting sbase to Java
* Martti Kühne 2014-04-02 14:37 > Uh, you are aware that date this thread was from is over now, do you? you're kidding me, right? Sounds to me like April 2 fools joke. --s_
Re: [dev][port] Porting sbase to Java
If the suckless community agrees, we can hire a designer to make each part of the slogan in an appropriate font and make a gif and a flash version of it. Then we can install mailing list software with support for automatically adding multimedia content to messages, before delivering them to the recepient -- and add the flash to every mail. A step to corporate identity 4.0. Alternatively the subscribers should use only MUA which can do this job, but I am sceptical about whether this would work: never leave important decisions to the user! There are way too many irresponsible people out there. * Christoph Lohmann 2014-04-02 15:21 > Greetings. > > On Wed, 02 Apr 2014 14:58:12 +0200 sta...@cs.tu-berlin.de wrote: > > Think positive, be creative, innovate, top post! > > Our manifesto has to be changed to include this. > > > Sincerely, > > Christoph Lohmann > > --s_
Re: [dev][port] Porting sbase to Java
Thanks for bringing up that very important issue, I was annoyed too. Here is something else that bugs me a lot: PLEASE SPELL DWM HOW IT OUGHT BE DONE: IN CAPITALS. I suggest other suckless projects to do so either. And I would go so far to capitalize the executables, too. Though, that might be too radical. I'd like to hear how people feel about it. Look at that: /usr/bin/ST /usr/bin/SSELP /usr/bin/SURF /usr/bin/DWM Don't they look much more appealing to you. Admit it! It's only habit if you are not immediately euphoric about this idea! Think positive, be creative, innovate, top post! * Raphaël Proust 2014-04-02 12:16 > Can you please include the whole message you are replying to in your > answers guys? It's very difficult to follow this thread if I have to > go back and read the previous messages and it is a very important > thread for the suckless group. Making good software is nice but don't > forget to make good communications too. > > By the way, can the person in charge of > https://www.facebook.com/pages/dwm/103482239693985 be a bit more > active? I keep telling people to try dwm (which needs to be rewritten > in ruby) but once they see the facebook page they say it looks dead > and bad. > > On Wed, Apr 2, 2014 at 10:51 AM, FRIGN wrote: > > On Wed, 02 Apr 2014 09:11:34 +0200 > > Christoph Lohmann <2...@r-36.net> wrote: > > > >> This is great news. Now that suckless has reached the future we will see > >> a bright horizont of pleasure and commercial support. > > > > Most definitely! > > However, we need to build up your corporate identity. I suggest we make > > suckless a registered trademark and sue everyone who adopts our brand > > without permission. > > > > Cheers > > > > FRIGN > > > > -- > > FRIGN > > > --s_
Re: [dev] [proposal] Suckless Tox-Client as a Skype replacement
* Christoph Lohmann 2014-03-24 14:59 > I’m waiting for bitlbee implementing tox. We already have really good > IRC clients. +1 then you don't impose a particular interaction scheme on everyone. --s_
Re: [dev] [proposal] Suckless Tox-Client as a Skype replacement
* FRIGN 2014-03-24 14:42 > On topic, I would like to know how you would implement a chat client on > the terminal. Dmitrij D. Czarkoff is all for a ii-like interface, but > I'd be really glad to hear more opinions on that. Here you are: I'm fine with ii > We can definitely look at things only with the technical glasses, but > other than specialized tools, an instant messaging system stands and > falls with the amount of users actually using the system at the end of > the day. Yes. And, sadly, to win, you need social engineering of some sort. Either an incredibly charismatic person, or (like fb) fake accounts, fake figures, or probably both. --s_
Re: [dev] [proposal] Suckless Tox-Client as a Skype replacement
* FRIGN 2014-03-24 12:31 > > http://youtu.be/yBkbj_S3etY > Looks like your mail went through a meat grinder. why? something wrong with the link? but you got there if you are citing the video description? sorry, don't get it. It was as offtopic as it gets anyway. --s_
Re: [dev] [proposal] Suckless Tox-Client as a Skype replacement
Just to make two things clear: I'm not an expert in XMPP and SIP. The video came to my mind as I read the X argument: couldn't resist to post it. First time I saw it I spent quite some time to figure out whether it is fake. Ever since I love it. * FRIGN 2014-03-24 12:56 > On Mon, 24 Mar 2014 12:36:36 +0100 > Still, XMPP is a centralized protocol-system and that's what makes it > unusable for me. While I'd love to see a distributed system which comes with all benefits of decentralisation -- flexibility, dependability, hard to compromise, etc. --, I am not aware of any, so one such needs to be first implemented, then promoted, adopted. So, I'm looking for what I can use now. > Discussing these things we really need to put in regard the ordinary > user, who would have big troubles setting up XMPP+SIP Jitsi does that right: I have less troubles with it than with what I've tried before, e.g. linphone. > --- > To establish a new solution in an already saturated environment (i.e. > Skype), it has to bring in obvious advantages for the normal user, > or else it is deemed to fail. > --- Exactly. > XMPP+SIP brings the privacy we all want, but most people don't care > about privacy, they care about familiarity and comfort. Right now, people more and more care about privacy. I think this is the chance to push things like jitsi (and XMPP, SIP) because they indeed offer this obvious advantage not present in the saturated environment (Skype). I must admit, it became obvious to the masses only recently and not as obvious as I wish, but still something happens. I've converged to the policy to promote things which go in the right direction, although I'm aware they suck in some respect. You can always say “what sucks, sucks, period,” but also you can look at the gradients and admit that some suck less and try to improve. Skype sucks big time, inherently, by the fact it is owned by someone who does not share the public interest. Give up the hope that it can remotely suck less. > On the technical side, you don't need extensions for XMPP (libjingle) > or separate protocols (SIP) to build up VoIP- or MoIP-connections > (being integrated into one protocol), dramatically decreasing the > number of possible attack-vectors because tox-core's developers are > able to integrate such solutions very well knowing what's used in the > first place. Didn't get that. I need some reading about tox before feeling comfortable with technical discussions. cheers --s_
Re: [dev] [proposal] Suckless Tox-Client as a Skype replacement
* Nick 2014-03-24 00:01 > Indeed I'm using Jitsi at the moment, despite the fact that it's in > Java and has an interface that you'd expect for that. But it works, > and is quite secure over the wire, and that counts for a great deal. Same here. I managed to force the parties I have video chat on regular basis with to use jitsi. For common use cases it works fine. Behind company firewalls, still there is way to go: I didn't manage to get STUN work, and eventually gave up. Another annoying thing is the interface for which one need to be married to the mouse. Jitsi seems to get the security right -- you don't need tons of quirks to make it work, it's just built in and is default, and one gets reasonable feedback what goes wrong, how trustworthy the connection is, etc. In general, the XMPP + SIP solution makes sense to me. And since XMPP will be around for some time, I guess, it does not require people to get yet another account, i.e. it has the potential to be easily adopted cheers --s_
Re: [dev] [proposal] Suckless Tox-Client as a Skype replacement
* hiro 2014-03-24 11:39 > and SIP also has it's complexities which is clearly due to S http://youtu.be/yBkbj_S3etY (SCNR!) --s_
Re: [dev] What is bad with Python
* Szabolcs Nagy 2014-03-04 20:57 > […] thanks you cared to explain --s.
Re: [dev] [dwm] Why fullscreen at all?
* Michael Hauser 2014-02-24 02:04 > No, they do not float. If they did, I would be able to move or resize > them. Also they cannot be toggled to float, as long in fullscreen mode. > Try it and see. Don't have feh, ffx here; can't find how to go fullscreen in FBReader. I tried with midori, zathura, xpdf. They do fload. I can move them with themouse. I can toggle float. They can get managed. --s.
Re: [dev] [dwm] Why fullscreen at all?
* Michael Hauser 2014-02-24 01:13 > sta...@cs.tu-berlin.de writes: > > I may be missing something, but for most applications, unfloating them > > works just fine to "return control", in your terms, to the dwm: they get > > managed while they think they are full screen. (Here at least. I should > > admit I didn't try with a recent dwm) > > I am using dwm-git, version number says 6.1; and no, they do not become > floating clients. > > I tried it with feh, FBRreader and just fired up Firefox and hit F11 to > toggle it to fullscreen. After they get fullscreen, they float, I guess. If you now toggle floating (Mod-Shift-Space here) they should get managed, shouldn't they? My binding: { MODKEY|ShiftMask, XK_space, togglefloating, {0} }, > > If these few more keystrokes bug you, probably adding a rule which makes > > the fullscreen windows managed could do the job for you. > > Elaborate, please. How would you do this? In the Rule array in config.h, e.g. (untested): static Rule rules[] = { /* class instancetitle tags mask isfloating monitor */ {"fullscrean", NULL, NULL, NULL, False, -1}, [...] You need to figure out what class, title, etc. your windows have. --s.
Re: [dev] [dwm] Why fullscreen at all?
* Michael Hauser 2014-02-23 20:39 > Why let applications that have their own fullscreen settings take away > control from the window manager? > [...] I may be missing something, but for most applications, unfloating them works just fine to "return control", in your terms, to the dwm: they get managed while they think they are full screen. (Here at least. I should admit I didn't try with a recent dwm) If these few more keystrokes bug you, probably adding a rule which makes the fullscreen windows managed could do the job for you. --s.
Re: [dev] XML vs HTML (was: Article about suckless on root.cz)
* Charlie Kester 2014-02-21 23:54 > Or is the trend to create a separate, "mobile" version of the page, > which simply changes the assumption to some smaller screen size? > > Or are people just ignoring the problem altogether? When they don't do and build a mobile version, it is often more usable than the full one. (Unless they decide to split the content in small chunks to “better” fit one's screen, so that one need to click `next' all the time.) Printable versions are often more enjoyable than the normal ones, too. --s.
Re: [dev] XML vs HTML (was: Article about suckless on root.cz)
* Hadrian Węgrzynowski 2014-02-21 22:16 > Even if it would work, I think that web shouldn't be pixel-perfect, > because we could just use some glorified-PDFs. It's utter nonsense > that correct rendering of page is depending on some specific font and > specific font size. It's utter nonsense to not restrict paragraph > length (at 80 characters or something). It's utter nonsense to assume > that everyone is using maximised browser window at 1080p. > +1 and it's utter nonsense to force specific view on given content (in case you need this, the presentation IS the content and you probably need ps, pdf or whatever) --s.
Re: [dev] Re: Article about suckless on root.cz
Hi, Late reply, but surfing around reminded me you were about to write about surf. * Martin Kopta 2014-02-17 07:58 > Next, the forth article will be about surf, so if you have any suggestion on > what to include, please share. Looks like your audience has high technical pawareness. Still, I feel, one can't emphasize enough how insane the web has become. For example, consider the mere fact http is called http. The first /t/ in it is for text. Now it is used to embed and transfer whatnots. Worse: often, where could and should be text, the text is obfuscated in binary containers. That said, suckless web browser is an oxymoron: it sucks either at design or at the amount of content accessible. Surf is a particular trade-off of what is worth caring about and giving the user interface to. Uzbl is another one, w3m another one, dillo, netsurf, etc. Surf is a sane interface to a web and web-viewer that do inevitably suck big time. 2ct --s_
tabs (was [dev] Re: Article about suckless on root.cz)
Hi, This answer by Christoph reminds me of something I wanted to ask: * Christoph Lohmann 2014-02-17 17:47 > For surf you should mention the following points: > > * Integration with tabbed. I like the generality of the approach -- everithing should be embeddable the same way in a container with uniform bindings etc. Sounds great. But I've been entirely missing the point of tabbed ever since. I mean wmii (later dwm, tiling WMs in general) relieved me of thinking in terms of tabs because it managed what was unmanagable before. I've never touched anything with tabs for years now. Can you guys describe some life-changing use cases? (or point me to RTF*) thanks cheers --s_
Re: [dev] [surf] [PATCH] cookie policy
* Christoph Lohmann 2014-01-30 15:17 > About the modestring: The modestring is a given institution and > won’t be extended. If more than the alphabet is needed, something is re‐ > ally going wrong in the web. really really? how could that come! > Any comments? Regarding cookies: Vanilla surf implements currently 2 policies: Always and never (by having proper cookies.txt and by `ln -s /dev/null cookies.txt`) I've been using both, the latter for a year or so. Most places I visit work for me. Sometimes it is annoying to have to re-login in new surf instances, but that's all. I've learned to pay this, and not touch other browsers or allow All cookies. Same with modestring: javascript is on (to allow script.js stuff) and plugins are off and I don't mind much toggling plugins when on flash sites, or toggling javascript on annoying sites. Making things site-specific can be indeed quite useful. But if this comes at the cost of too quirky code for modefile management, I'd drop it. Upstream even more. This is my perspective as already surf user. If it comes to gaining popularity, making the world better by bringing people to use less-sucking browser -- this is another story, and all these features are a must. --s_
Re: [dev] portable photoshop-like lite application based on C?
Hi, I've been envisioning a *very simple* GUI for doing - pointing, - selection, - moving a slider, which can be linked genericaly with most netpbm tools (I prefer netpbm to imagemagick). The command window would be simple a terminal. Some tools mostly just don't need gui (e.g. pnmtojpeg). Launching a GUI would link it to a specific tool (say `pnmcrop', which needs selection; or `ppmdither' with slider ) and file(s). Besides the obvious need to interact with the image in order to do selection (of points or areas), for me a GUI can accelerate the process of doing a transformation and seeing result, so one can try out different parameters/tools. Clearly, this is far behind GIMP, but I don't need more. Most suckless interaction experience I've got is from macos' preview -- and I do ocasionally borrow my gf's box for cropping and simple color adjustments. Everithing else I've encountered so far is way too heavy on resources and dependencies or crashes every minute. I haven't written anything like that, obviously. But is my wishlist and TODO for quite some time. Probably I could rip off sth of your suckless GIMP replacement for my needs. I guess sth like this is how I imagine the workflow: $ jpegtopnm bla.jpg | gui pnmcrop | gui ppmbrighten \ | pamscale -xysize 512 512 \ | pnmtojpeg > bla-crop-bright-small.jpeg cheers --s.
Re: Tags as tags (Was: [dev] Desktop warping for DWM?)
* FRIGN 2013-11-17 13:51 > However, I already had gotten used to the workflow in a tiling > manager. Having to use the mouse to scale the windows and rely on those > few workspaces just showed me how much better it is to be able to > assign tags to specific windows. This flexibility is just impossible in > normal wm's, just for the reason, because tiling isn't the way to go > for beginners. huh. What's got tiling to do with tagging? It's not about noobs, beginners, experts whatsoever. It's about willingness to try out different workflows and paradigms and see what is efficient for you. And for each user the mileage varies. That said, a while ago I read the post with the key binding suggestions, gave them a try, and have lived with them happily ever since. 2ct --s.
Re: [dev] tmux export buffer to pastebin
* Kai Hendry 2013-07-13 07:50 > Since hopefully most of you are running http://st.suckless.org/ and > tmux, perhaps you'll find this bind interesting: > > bind-key p capture-pane -S -32768 \; save-buffer /tmp/tmux-buffer \; > run "cat /tmp/tmux-buffer | curl -F 'sprunge=<-' http://sprunge.us > | tmux load-buffer -; tmux show-buffer" not sure I find it useful as a binding in tmux -- never had this use case. But I have already piped some stuff to sprunge from a file since you posted it. It was very helpful. So, thank you for sharing. --s_
Re: [dev] lynx?
* Thorsten Glaser 2013-05-28 20:25 > Is there anyone on earth having figured out how to *use* that, > as in navigate? with sth like this in your ~/.w3m/keymap it feels for me like surf (to be precise, surf feels like w3m). > keymap C-u PREV_PAGE > keymap C-d NEXT_PAGE > keymap SPC NEXT_PAGE > keymap C-e DOWN > keymap C-y UP > keymap ^LINE_BEGIN > keymap $LINE_END > keymap DOWN MOVE_DOWN > keymap jMOVE_DOWN > keymap kMOVE_UP > keymap lMOVE_RIGHT > keymap hMOVE_LEFT1 > keymap Z CENTER_H > keymap z CENTER_V > keymap ESC-g GOTO_LINE > keymap gg BEGIN > keymap G END > keymap w NEXT_WORD > keymap b PREV_WORD > keymap [ LINK_BEGIN > keymap ] LINK_END > keymap TAB NEXT_LINK > keymap f MOVE_LIST_MENU > keymap C-o UNDO > keymap CTRL-i REDO > keymap C-m GOTO_LINK > keymap C-SHIFT-H BACK > keymap L NEXT > keymap H PREV > keymap s SELECT_MENU > keymap v VIEW --s.
Re: [dev] lynx?
* markus schnalke 2013-05-28 13:07 > these days, lynx was often mentioned when a text browser was meant. > Is there really someone (apart from mirabilos) who uses lynx? Don't > you rather use w3m? me. rarely intereactively, though. More with -dump. I do query dictionaries or similar which happen to have stable structure over time and one can do things like: $ lynx -dump foo.bla | sed -n "/^Your query/,/^Similar words/ p" Mostly I have this wrapped in a script or shell alias and often invoke it from within vim. For interactive browsing in the terminal, I indeed use w3m more often -- it renders often better. But, well not always, especially when menu and content are not sequential. compare $ w3m -dump -cols 60 \ "http://odict.leo.org/ende?lang=de&search=suck"; \ | sed -n "/[0-9]\s*Treffer/,/Suchfilter einstellen close/ p" $ lynx -dump -nonumbers -nolist -nolog "http://odict.leo.org/ende?lang=de&search=suck"; \ | sed -n "/[0-9]\s*Treffer/,/Suchfilter einstellen close/ p" $ lynx -dump -nonumbers -nolist -nolog "http://odict.leo.org/ende?lang=de&search=suck"; \ | sed -n "/[0-9]\s*Treffer/,/Suchfilter einstellen close/ { s/\[_\]\s*//; p}" In the end, it's a matter of taste, I guess. --s.
Re: [dev][surf]Some questions about surf.
* Hugues Moretto-Viry 2013-04-14 13:42 > - Is there a way to define a default font as we do with dwm or tabbed? > After looking the sources, I guess we can't for now. No. You probably are aware that you can put sth like this in .surf/style.css, but for the sake of completeness: * {font-family:Linux Libertine O;} --s.
Re: [dev][surf] [PATCH] Fixed keys handling for multilayout environments.
* Alexander Sedov 2013-03-15 16:13 > There is a bug in GTK+ that does not allow capturing shortcuts using > letter keys on layouts other than "us". The bug is there for ages and > there is probably no hope that it will get fixed. This patch switches > shortcut handling method to GtkAccelGroup, which handles this case > correctly. Enjoy! Does this mean that with cyrillic layout, mappings defined as GDK_r would work? If this is the case -- thank youvery much for hounding down and fixing! This has annoyed me for a long time. This will cause me to put some work in updating my ancient heavily patched surf in the next days. cheers --s_
Re: [dev] [surf] introduce .gitignore
Hi, * Alexander Huemer 2013-03-15 09:55 > On Fri, Mar 15, 2013 at 04:16:01AM +0800, Chris Down wrote: > > Not adding file to the index has nothing to do with git knowing what to > do. In a more complex directory structure like the following you want to > be able to do 'git add dir1' and then have .o files not in the index. > > dir1 > file1.c > file1.o > file2.c > file2.o > file3.c > file3.o Your point is good, in general, and I use .gitignore for some of my projects, where I indeed have similar directory structure. But do you expect surf to get that far that you need to add subdirectories and multiple obj files (and probably latex auxilary files of the pdf documentation?). I don't. And thus I consider .gitignore bloat. cheers --s.
Re: [dev] web browsers
* hiro 2013-03-10 17:20 > opera you can have usercss and userscripts on a per site basis. Does > someone have a good working system like that using surf? > -having to scroll horizontally because some stupid text doesn't fit in > fullscreen 1024x768 browser window I have 3 custom css bound to some keys. A per site solution would be implemented in script.js, right? Then, you have problem when js is turned off... --s.
Re: [dev] web browsers
* Nick 2013-03-10 16:56 > triggered, no popup blockers seem to work on them (I'd guess adblock > disables the appropriate .js, though privoxy doesn't out of the > box.) same frustration here. --s.
Re: [dev] web browsers
* hiro 2013-03-10 14:26 > default? is there a list of features not supported so I can check if > my issues are not covered? no, of course. this is an ill posed problem. it would take infinite time and space to write or read. but feel free to start one. It might turn out to be fun to see what people consider to be features. --s.
Re: [dev][surf] disable scrollbars patch
* Carlos Torres 2013-02-21 16:34 > Attached you'll find a patch that adds the -b flag to disable scroll_b_ars, > they can also be disabled with config.h Great. Currently I'm using a gtk hack to make bars less annoying and got accustomed to having a non-intrusive indication about the pane size and where I am, rather than not having one at all. $ cat .gtkrc-2.0 style "bla" { GtkRange::slider-width = 3 bg[NORMAL] = "#464646" fg[NORMAL] = "#99" } class "GtkWidget" style "bla" --s.
Re: [dev] Makefile/markdown based static site generator
* sta...@cs.tu-berlin.de 2013-02-21 10:16 > sed -n '/\s*^$//; > p; > q; > }' --s.
Re: [dev] Makefile/markdown based static site generator
* Sam Watkins 2013-02-21 06:21 > or other tools with simpler regexps: > > html_split | grep '^$//' Yeah, I find this more readable. I'd even get rid of grep, sed is perfect for the job sed -n '/\s*^$//; p; q; }' --s.
Re: [dev] [surf] patch for style toggling
* Christoph Lohmann 2013-02-16 16:30 > The toggling has a relevance, but your »code.txt« should be a patch on yeah, sorry for not sending proper patch, my surf is ancient. I have to update it next days. But still, I think it doesn't hurt to have the function as I do. Then, you can have a trivial toggle function to toggle, but you can bind it directly for setting more styles. Anyway, user style vs. page's own style switching is a must. Happy it is in tip. cheers --s.
Re: [dev] surf 0.6 issues
* Jens Nyberg 2013-02-17 16:14 > 2013/2/17 Donald Allen : > > 1. Attempting to play youtube videos frequently results in youtube > > reporting that "This video is currently unavailable." after briefly > Remove your cookie file. ~/.surf/cookies.txt probably. That will solve > that problem. Man, works indeed! Thanks. What is the reason? (I must admit, I considered this a feature to keep me on topic: Big Surf is watching you.) --s.
Re: [dev] [surf] patch for style toggling
* Nick 2013-02-16 15:12 > +static void > +togglestyle(Client *c, const Arg *arg) { > + WebKitWebSettings *settings; > + char *uri; > + > + settings = webkit_web_view_get_settings(c->view); > + g_object_get(G_OBJECT(settings), "user-stylesheet-uri", &uri, NULL); > + uri = uri[0] ? g_strdup("") : g_strconcat("file://", stylefile, NULL); > + g_object_set(G_OBJECT(settings), "user-stylesheet-uri", uri, NULL); > + > + update(c); > +} I use this all the time, slightly differently though. I have "text styles" for "day" and "night" since the light conditions make difference for convinient reading. You seem to ignore the Arg function argument, which I use for saying which stylw. In combination with a modified simplyread() Javascript heurisic someone posted here a while ago, browsing is ok. Attached the relevant code. cheers --s. {MODKEY, GDK_t, setstyle, { .v = "/home/stanio/.surf/text_style.css" } }, {MODKEY|GDK_SHIFT_MASK,GDK_t, setstyle, { .v = "/home/stanio/.surf/text_style_day.css" } }, {MODKEY, GDK_w, setstyle, { .v = (const char *)NULL} }, setstyle(Client *c, const Arg *arg){ WebKitWebSettings *settings; char *uri, *customstylefile; customstylefile = arg->v==NULL?stylefile:(char *)arg->v; settings = webkit_web_view_get_settings(c->view); uri = g_strconcat("file://", customstylefile, NULL); g_object_set(G_OBJECT(settings), "user-stylesheet-uri", uri, NULL); }
Re: [dev] Find window with dmenu
* markus schnalke 2013-02-12 16:39 > The following is NOT portable: > > > sed -E 's/\s\+// ; /"(vim|surf):"/d' > > http://pubs.opengroup.org/onlinepubs/9699919799/utilities/sed.html > > If you want sed with Extended Regular Expressions, take awk. :-) For the particular case of emulating these multiple grep pipes sed should work fine. Something along the lines of "if line doesn't match a, then if line doesn't match b, then if line doesn't match c then print line": sed -n "/a/ ! { /b/ ! { /c/ ! { p }}}" --s_
Re: [dev] [dwmstatus] Mail counter
* s...@alternametz.org 2012-12-21 19:20 > To me the less in suckless was nearer to the german suffix "los" than to > german "weniger" > but it's maybe a bit idealistic. It is. “suckless.org software that sucks less” http://suckless.org/philosophy best --s_
Re: [dev] I'm back
* Sam Watkins [2012-11-22 04:58]: > On Wed, Nov 21, 2012 at 12:45:35PM +0100, sta...@cs.tu-berlin.de wrote: > > - borders are useful means yes to borders > configuration > > border-width: 0 means no borders. > > problem solved how??? Either me or you misunderstood the other one. cheers --s_
Re: [dev] I'm back
- borders are useful - the information in the bar is quite useful, too. Don't mind if it is provided separately. But isn't it too much ofa hassle to interface it with dwm then? - never used mouse in the bar, and don't plan to. cheers --s_
Re: [dev] [surf] Disable javascript
* Nick [2012-11-15 15:47]: > Insert mode? Since when did surf become modal? Why is this needed > (except for people who like to pretend they're using vim)? I agree, insert mode is quite special and maybe is worth having it as a patch rather than in mainline surf. It makes character handling less readable. If you want it, you will know that and will know how to get it working. cheers --s_
Re: [dev] [surf] Disable javascript
* sta...@cs.tu-berlin.de [2012-11-15 14:34]: > * s...@alternametz.org [2012-11-15 12:56]: > > As a side note, I wonder how difficult would it be to create > > a generic toggle function for surf which could be called with > > look for 20120602113939.GA26438 in your mailbox or > http://permalink.gmane.org/gmane.comp.misc.suckless/9458 If you use that you might be interested in the following to keep track of the status. http://permalink.gmane.org/gmane.comp.misc.suckless/9461 --s_
Re: [dev] [surf] Disable javascript
* s...@alternametz.org [2012-11-15 12:56]: > As a side note, I wonder how difficult would it be to create > a generic toggle function for surf which could be called with > any WebKitWebSettings boolean parameter in config.h such as > "auto-load-images", "enable-scripts" and so on ... look for 20120602113939.GA26438 in your mailbox or http://permalink.gmane.org/gmane.comp.misc.suckless/9458 --s_
Re: [dev] [st] toggle font
Hi, * Stephen Paul Weber [2012-10-11 15:56]: > Somebody claiming to be sta...@cs.tu-berlin.de wrote: > >This patch (against tip) introduces an array of font names in the config > >instead FONT and allows to cycle through them with Ctrl-PgUp at runtime. > > I also need multiple fonts, but I find keeping several builds of st > around works fine for me. I have 5 of them. Works fine: they live in separate dirs with only Makefile an config.h not symlinked to the "master"-st dir. Some features are fun to implement, but then you use them a day or two and forget. But since some days ago, every day I like this font switching on the fly more and more. And it comes effectively at no cost -- neither conceptual, nor syntactical. cheers --s_
[dev] [st] toggle font
Hi, This patch (against tip) introduces an array of font names in the config instead FONT and allows to cycle through them with Ctrl-PgUp at runtime. I missed this feature a lot when light conditions and distance to display change, often so with a notebook, even more when different displays plugged. Of course, tmux helps -- kill, start new st, attach to the right session --, but I like this approach more. Someone might find it useful. cheers, --s_ diff -r ba208156a8af config.def.h --- a/config.def.h Tue Oct 09 19:40:37 2012 +0200 +++ b/config.def.h Tue Oct 09 22:33:55 2012 +0200 @@ -1,5 +1,9 @@ -#define FONT "Liberation Mono:pixelsize=12:antialias=false:autohint=false" +static char* fonts[] = { + "Liberation Mono:pixelsize=12:antialias=false:autohint=false", + "Liberation Mono:pixelsize=14:antialias=false:autohint=false", + "Liberation Mono:pixelsize=24:antialias=false:autohint=false" +}; /* Space in pixels around the terminal buffer */ #define BORDER 2 diff -r ba208156a8af st.c --- a/st.c Tue Oct 09 19:40:37 2012 +0200 +++ b/st.c Tue Oct 09 22:33:55 2012 +0200 @@ -73,6 +73,7 @@ #define Y2ROW(y) (((y) - BORDER)/xw.ch) #define VT102ID "\033[?6c" +#define FONT fonts[currfont] enum glyph_attribute { ATTR_NULL = 0, @@ -335,6 +336,8 @@ static void selpaste(void); static void selscroll(int, int); +static void togglefont(void); + static int utf8decode(char *, long *); static int utf8encode(long *, char *); static int utf8size(char *); @@ -378,6 +381,7 @@ static char *opt_embed = NULL; static char *opt_class = NULL; static char *opt_font = NULL; +static unsigned int currfont = 0; void * xmalloc(size_t len) { @@ -2566,6 +2570,20 @@ } void +togglefont(){ + int col, row; + + currfont = (++currfont) % LEN(fonts); + initfonts(FONT); + col = (xw.w - 2*BORDER) / xw.cw; + row = (xw.h - 2*BORDER) / xw.ch; + tresize(col, row); + xresize(col, row); + ttyresize(); + draw(); +} + +void kpress(XEvent *ev) { XKeyEvent *e = &ev->xkey; KeySym ksym; @@ -2574,11 +2592,13 @@ int len; int meta; int shift; + int ctrl; Status status; if (IS_SET(MODE_KBDLOCK)) return; + ctrl = e->state & ControlMask; meta = e->state & Mod1Mask; shift = e->state & ShiftMask; len = XmbLookupString(xw.xic, e, buf, sizeof(buf), &ksym, &status); @@ -2589,6 +2609,11 @@ /* 2. hardcoded (overrides X lookup) */ } else { switch(ksym) { + case XK_Prior: + case XK_Next: + if(ctrl) + togglefont(); + break; case XK_Up: case XK_Down: case XK_Left:
Re: [dev] [st] Removing timeouts in main loop
* Roberto E. Vargas Caballero [2012-09-16 09:48]: > The main loop waits until there is some data to read in file descriptors of > the X server or the pseudo tty. But it uses a timeout in select(), which > causes that st awake each 20 ms, even it doesn't have something to do. This > patch removes this problem removing the timeout, which is not needed. I think this was supposed to make st faster, since it doesn't need to draw things you'll never be able to read, i.e. anything faster than 20ms. --s_
Re: [dev] [surf] eval() not needed?
> { CTRL, GDK_c, eval, STRING("removeHints()") eval expects arg->v to be char**, so your STRING resolves to sth like { .v = (const char *[]){"simplyread(false, false)" } } right? cheers --s_
Re: [dev] [surf] eval() not needed?
* Troels Henriksen [2012-07-06 12:06]: > sta...@cs.tu-berlin.de writes: > > > * Troels Henriksen [2012-07-06 09:31]: > I'm not sure what you mean by insert mode. the insert mode patch would let you have 2 modes of ui: - in normal mode, keystrokes are interpreted as if you were holding MODKEY pressed, even if you don't, i.e. are not passed through, and you can't type in to text fields, for instance, but you can use j,k,l,h,p without MODKEY; - in insert mode, your keystrokes are passed through unless you explicitly hold MODKEY, i.e. for navigation you need to hold MODKEY before typing hjkl. > I use eval() for > Conkeror-style numbered link navigation. The actual logic is defined in > Javascript in my script.js, and I have the following bindings in my > config.h: > > { CTRL, GDK_f, eval, STRING("hintMode()") }, > { CTRL|SHIFT, GDK_f, eval, STRING("hintMode(true)") }, > { CTRL, GDK_c, eval, STRING("removeHints()") > }, That's great, thank you. --s_
Re: [dev] [surf] eval() not needed?
* Troels Henriksen [2012-07-06 09:31]: > eval() was never needed per se. I put it in because you need it if you > want robust keybindings to functions defined in script.js, and you need Ok. Didn't know. And still don't really get it... Can you give a hint? search of 'eval' within surf.suckless.org yields the Link hints page. The js code invokes eval. Is this the same eval? some time ago someone shared some js code to extract the important textual part of a page based on counting number of paragraphs, called simplyread. I use this quite often but to activate it I neeed to go into insert mode to let surf not eat the keys, then press the key which the script bound itself to (FWIW F3). I found myself binding some xdotool magic to a regular surf keybinding as in xdotool key -window $0 i key -window $0 F3 key -window $0 Esc which is sommewhat ugly. Is eval somehow related to that? --s_
[dev] [surf] eval() not needed?
Seems like eval() is not needed for some time now. The trivial patch against tip to remove it is attached. --s_ diff -r e59e78e072e1 surf.c --- a/surf.cFri Jul 06 00:59:17 2012 +0200 +++ b/surf.cFri Jul 06 01:04:04 2012 +0200 @@ -827,12 +827,6 @@ } void -eval(Client *c, const Arg *arg) { - WebKitWebFrame *frame = webkit_web_view_get_main_frame(c->view); - evalscript(webkit_web_frame_get_global_context(frame), ((char **)arg->v)[0], ""); -} - -void stop(Client *c, const Arg *arg) { webkit_web_view_stop_loading(c->view); }
Re: [dev] dwm tip changes
* Anselm R Garbe [2012-06-24 11:06]: > The problem with floating is that it toggles the client state. If > initially treated as floating window, it will toggle to the > tiled/monocle/.. layout. If then toggled back to floating, it won't be > resized to fullscreen mode. This sucks more imho. I see your point. Thanks for clarifying. >From your answer to Arian I see you mean mouse resize only. This doesn't bother me at all. I just want to be able to tile/monocle fullscreen windows, ant that seems to stay as is. thanks --s_
Re: [dev] dwm tip changes
* Arian Kuschki [2012-06-23 23:52]: > half/half editor/pdf file), it makes sense to put an app into full > screen and then make it smaller again. +1 fullscreen often just happens to be the window mode which provides the best view. It is helpful to be able to tile the window in this mode just as in any other. fullscreen windows *are* floating, aren't they? so the question is whether you allow to tile/monocle them, right? --s_
Re: [dev] [surf] crash when leaving a page containing java
* pancake [2012-06-15 18:07]: > it is possible to disable all plugins (flash/java..) in surf? That't how I browse around most of the time. I posted a toggle patch a week or two ago; search for message id 20120602113939.GA26438 or look here http://lists.suckless.org/dev/1206/11716.html the relevant webkit settings are called "enable-plugins" and "enable-scripts" g_object_set(G_OBJECT(settings), name, false, NULL); --s_
Re: [dev] [surf] patch to remove resizing if small
* pancake [2012-06-11 17:05]: > Anyway, i have noticed that META-h means go back and scroll left, which probably that originates from the snippet I posted and didn't post the proper patch. In that case META-l should have the same issue. I have MOD|SHIFT-l/h for history navigation while MOD-l/h scroll left/right as MOD-j/k do up/down. And that's my proposal. I like that MOD-j/k/l/h then behave the same way. It would be wired to have another modificator for different directions of spatial navigation. cheers --s_
Re: [dev] [surf] patch to remove resizing if small
> So, here is a patch to tip removing it. I think it should be applied > to tip by somebody with Power. +1 --s_
Re: [dev] [surf] status area patch
* Kurt Van Dijck [2012-06-02 19:48]: > Have you tought on indicating the normal/insert mode of your earlier patch? > Kurt yes. but then the patch depends on the insert mode patch. I would avoid dependencies where not needed. It is straightforward to add, though. togglestat[5] = '\0'; togglestat[4] = insert_mode?'+':'-'; --s_
[dev] [surf] zoom text patch
This patch enables zooming text only, i.e. increase/decrease font size and preserve other elements' sizes. --s_ diff -r 51a6d05c2c84 config.def.h --- a/config.def.h Mon Mar 26 09:33:42 2012 +0200 +++ b/config.def.h Thu May 31 19:30:14 2012 +0200 @@ -32,6 +32,9 @@ { MODKEY|GDK_SHIFT_MASK,GDK_j, zoom, { .i = -1 } }, { MODKEY|GDK_SHIFT_MASK,GDK_k, zoom, { .i = +1 } }, { MODKEY|GDK_SHIFT_MASK,GDK_i, zoom, { .i = 0 } }, +{ MODKEY, GDK_underscore, zoomtext, { .i = -1 } }, +{ MODKEY, GDK_plus,zoomtext, { .i = +1 } }, +{ MODKEY, GDK_parenright, zoomtext, { .i = 0 } }, { MODKEY, GDK_l, navigate, { .i = +1 } }, { MODKEY, GDK_h, navigate, { .i = -1 } }, { MODKEY, GDK_j, scroll, { .i = +1 } }, diff -r 51a6d05c2c84 surf.c --- a/surf.cMon Mar 26 09:33:42 2012 +0200 +++ b/surf.cThu May 31 19:30:14 2012 +0200 @@ -111,6 +111,7 @@ static void usage(void); static void windowobjectcleared(GtkWidget *w, WebKitWebFrame *frame, JSContextRef js, JSObjectRef win, Client *c); static void zoom(Client *c, const Arg *arg); +static void zoomtext(Client *c, const Arg *arg); /* configuration, allows nested code to access above variables */ #include "config.h" @@ -828,6 +829,19 @@ } void +zoomtext(Client *c, const Arg *arg) { + WebKitWebSettings *settings; + gint fontsize; + + settings = webkit_web_view_get_settings(c->view); + g_object_get(G_OBJECT(settings), "default-font-size", &fontsize, NULL); + //default size according to webkit docs is 12; + //FIXME: figure out how to get setting defaults + fontsize = (arg->i == 0 ? 12 : fontsize + arg->i); + g_object_set(G_OBJECT(settings), "default-font-size", fontsize, NULL); +} + +void zoom(Client *c, const Arg *arg) { c->zoomed = TRUE; if(arg->i < 0) /* zoom out */
[dev] [surf] status area patch
This patch writes several letters in the beginning of the title which represent the current status of boolean options: capital 'I' means 'showing images is enabled', while 'i' means it is disabled. Same for javascript, plugins, caret browsing,... I've had several implementations of this for a year or two; I quite like the idea to see compact representation of what is on/off in that window. In conjunction with the script/plugin toggle and alternate style style patches it gives me better control on browsing and makes the web a bit less broken. I've never been happy with the implementation, though. In particular, it is ugly to have redundant place to store and lookup the status of settings. --s_ diff -r 51a6d05c2c84 surf.c --- a/surf.cMon Mar 26 09:33:42 2012 +0200 +++ b/surf.cThu May 31 09:52:56 2012 +0200 @@ -63,6 +63,7 @@ static char winid[64]; static char *progname; static gboolean loadimage = 1, plugin = 1, script = 1; +static char toggstat[5]; static char *buildpath(const char *path); static void cleanup(void); @@ -795,16 +796,35 @@ update(c); } +gboolean +get_togglestat(Client *c){ + gboolean value; + WebKitWebSettings *settings + = webkit_web_view_get_settings(c->view); + + toggstat[4] = '\0'; + g_object_get(G_OBJECT(settings), "auto-load-images", &value, NULL); + toggstat[0] = value?'I':'i'; + g_object_get(G_OBJECT(settings), "enable-scripts", &value, NULL); + toggstat[1] = value?'S':'s'; + g_object_get(G_OBJECT(settings), "enable-plugins", &value, NULL); + toggstat[2] = value?'V':'v'; + g_object_get(G_OBJECT(settings), "enable-caret-browsing", &value, NULL); + toggstat[3] = value?'C':'c'; + +} + void update(Client *c) { char *t; + get_togglestat(c); if(c->linkhover) - t = g_strdup(c->linkhover); -else if(c->progress != 100) - t = g_strdup_printf("[%i%%] %s", c->progress, c->title); + t = g_strdup_printf("%s| %s", toggstat, c->linkhover); + else if(c->progress != 100) + t = g_strdup_printf("[%i%%] %s| %s", c->progress, toggstat, c->title); else - t = g_strdup(c->title); + t = g_strdup_printf("%s| %s", toggstat, c->title); drawindicator(c); gtk_window_set_title(GTK_WINDOW(c->win), t); g_free(t);
[dev] [surf] insert mode patch
Most of this code is certainly not by me, but I couldn't find such patch, and I tought it could be useful to have around. Surf starts in 'normal' mode, where all your keybindings have effect with and without pressing the modkey, e.g. both 'j' and '^j' scroll down a line. Pressing 'i' in 'normal mode' brings you to 'insert mode', where your keybindings take effect only when modkey is pressed. Without modkey, keypress come through and are being processed by the engine (by the website), so you can write to text elements or control an web application. 'Esc' brings you again to 'normal mode'. --s_ diff -r 51a6d05c2c84 config.def.h --- a/config.def.h Mon Mar 26 09:33:42 2012 +0200 +++ b/config.def.h Thu May 31 19:39:00 2012 +0200 @@ -42,4 +42,5 @@ { MODKEY, GDK_f, spawn, SETPROP("_SURF_FIND", "_SURF_FIND") }, { MODKEY, GDK_n, find, { .b = TRUE } }, { MODKEY|GDK_SHIFT_MASK,GDK_n, find, { .b = FALSE } }, +{ 0,GDK_i, insert, { 0 } }, }; diff -r 51a6d05c2c84 surf.c --- a/surf.cMon Mar 26 09:33:42 2012 +0200 +++ b/surf.cThu May 31 19:39:00 2012 +0200 @@ -63,7 +63,9 @@ static char winid[64]; static char *progname; static gboolean loadimage = 1, plugin = 1, script = 1; +static gboolean insert_mode = FALSE; +static void insert(Client *c, const Arg *arg); static char *buildpath(const char *path); static void cleanup(void); static void clipboard(Client *c, const Arg *arg); @@ -353,21 +355,49 @@ return FALSE; } +void +insert(Client *c, const Arg *arg) { + insert_mode = TRUE; + update(clients); +} + gboolean keypress(GtkWidget* w, GdkEventKey *ev, Client *c) { guint i; gboolean processed = FALSE; + guint state; updatewinid(c); + + /* turn off insert mode */ + if (insert_mode && (ev->keyval == GDK_Escape)) { + insert_mode = FALSE; + update(c); + return TRUE; + } + + if (insert_mode && ( ((ev->state & MODKEY) != MODKEY) || !MODKEY ) ) { + return FALSE; + } + + if (ev->keyval == GDK_Escape) { + webkit_web_view_set_highlight_text_matches(c->view, FALSE); + return TRUE; + } + for(i = 0; i < LENGTH(keys); i++) { - if(gdk_keyval_to_lower(ev->keyval) == keys[i].keyval - && (ev->state & keys[i].mod) == keys[i].mod - && keys[i].func) { - keys[i].func(c, &(keys[i].arg)); - processed = TRUE; - } + if(!insert_mode && (MODKEY & keys[i].mod) ) + state = ev->state | MODKEY; + else + state = ev->state; + + if(gdk_keyval_to_lower(ev->keyval) == keys[i].keyval && keys[i].func) + if(state == keys[i].mod){ + keys[i].func(c, &(keys[i].arg)); + processed = TRUE; + } } - return processed; + return processed; } void
[dev] [surf] alternate style patch
I use this as a simple heuristic to make some broken web pages more readable. It's proven very useful for reading news, docs, all sorts of long text, where the content is more important than what the author assumes is the best appearance. The patch just alternates the default and text_style css. For longer readings I prefer, as evident in text_style.css, reading light on dark with modest contrast --s_ diff -r 51a6d05c2c84 config.def.h --- a/config.def.h Mon Mar 26 09:33:42 2012 +0200 +++ b/config.def.h Thu May 31 19:18:35 2012 +0200 @@ -42,4 +42,6 @@ { MODKEY, GDK_f, spawn, SETPROP("_SURF_FIND", "_SURF_FIND") }, { MODKEY, GDK_n, find, { .b = TRUE } }, { MODKEY|GDK_SHIFT_MASK,GDK_n, find, { .b = FALSE } }, +{ MODKEY, GDK_t, setstyle, { .v = ".surf/text_style.css" } }, +{ MODKEY|GDK_SHIFT_MASK,GDK_t, setstyle, { .v = (const char *)NULL} }, }; diff -r 51a6d05c2c84 surf.c --- a/surf.cMon Mar 26 09:33:42 2012 +0200 +++ b/surf.cThu May 31 19:18:35 2012 +0200 @@ -99,6 +99,7 @@ static void scroll(Client *c, const Arg *arg); static void setatom(Client *c, int a, const char *v); static void setcookie(SoupCookie *c); +static void setstyle(Client *c, const Arg *v); static void setup(void); static void sigchld(int unused); static void source(Client *c, const Arg *arg); @@ -702,6 +703,17 @@ } void +setstyle(Client *c, const Arg *arg){ + WebKitWebSettings *settings; + char *uri, *customstylefile; + + customstylefile = arg->v==NULL?stylefile:(char *)arg->v; + settings = webkit_web_view_get_settings(c->view); + uri = g_strconcat("file://", customstylefile, NULL); + g_object_set(G_OBJECT(settings), "user-stylesheet-uri", uri, NULL); +} + +void setup(void) { char *proxy; char *new_proxy; body{ width:98% !important; } /* .navigation, .nav { display:none !important; } #navigation, #nav { display:none !important; } *8 */ * { max-width:100% !important; background-color:#3f3f3f !important; text:#acac8c !important; color:#acac8c !important; /*font-weight:bold !important;*/ /*font-family:Ubuntu, Calibri, Helvetica, sans-serif !important;*/ font-family:serif !important; text-align:justify; } code { font-family:monospace !important; } h1,h2,h3,h4 { text:#efefdf !important; color:#efefdf !important; } a { text:#bfbfdc !important; color:#bfbfdc !important; text-decoration:none !important; /*border-bottom:dashed 1px !important; */ } a:hover { text:#dcdcff !important; color:#dccdff !important; text-decoration:none !important; } /* fnally! color of highlighted search matches*/ *::selection { background:#56 !important; color:#343434 !important; }
[dev] [surf] generic toggle patch
Hi, Here is a simple patch to toggle binary webkit features by name. --s_ diff -r 51a6d05c2c84 config.def.h --- a/config.def.h Mon Mar 26 09:33:42 2012 +0200 +++ b/config.def.h Thu May 31 09:31:38 2012 +0200 @@ -42,4 +42,8 @@ { MODKEY, GDK_f, spawn, SETPROP("_SURF_FIND", "_SURF_FIND") }, { MODKEY, GDK_n, find, { .b = TRUE } }, { MODKEY|GDK_SHIFT_MASK,GDK_n, find, { .b = FALSE } }, +{ MODKEY, GDK_v, toggle, { .v = "enable-plugins" } }, +{ MODKEY|GDK_SHIFT_MASK,GDK_i, toggle, { .v = "auto-load-images" } }, +{ MODKEY, GDK_c, toggle, { .v = "enable-caret-browsing" } }, +{ MODKEY|GDK_SHIFT_MASK,GDK_s, toggle, { .v = "enable-scripts" } }, }; diff -r 51a6d05c2c84 surf.c --- a/surf.cMon Mar 26 09:33:42 2012 +0200 +++ b/surf.cThu May 31 09:31:38 2012 +0200 @@ -106,6 +106,7 @@ static void eval(Client *c, const Arg *arg); static void stop(Client *c, const Arg *arg); static void titlechange(WebKitWebView *v, WebKitWebFrame* frame, const char* title, Client *c); +static void toggle(Client *c, const Arg *arg); static void update(Client *c); static void updatewinid(Client *c); static void usage(void); @@ -796,6 +797,20 @@ } void +toggle(Client *c, const Arg *arg) { + WebKitWebSettings *settings; + char *name = (char *)arg->v; + gboolean value; + Arg a = { .b = FALSE }; + + settings = webkit_web_view_get_settings(c->view); + g_object_get(G_OBJECT(settings), name, &value, NULL); + g_object_set(G_OBJECT(settings), name, !value, NULL); + + reload(c,&a); +} + +void update(Client *c) { char *t;