Re: [dev] Bug when unfocusing/focusing GTK3 windows
Eckehard Berns wrote: > On Fri, Aug 17, 2012 at 03:53:22PM +0200, Eckehard Berns wrote: > > I'll try things at home and maybe I find another workaround. > > It was just to hot here over the weekend to do anything productive. > > I looked into this again today and could see that GDK just doesn't send > any focus related events any more after the toplevel GTK window has a > flag called has_pointer_focus set. GTK on the other hand doesn't think > it has the focus if a flag called has_focus isn't set. > > I found bug reports that indicate that GTK2 also had problems regarding > has_focus and has_pointer_focus in 2005 or so. Now they introduced > something similar with GTK3... Makes me wonder what has_pointer_focus > is good for anyway. > > I don't know if this is the best way of dealing with the situation, but > the following patch to gtk+-3.4.4 seems to fix it for me. I haven't tried > it with xombrero yet (webkitgtk is still compiling in the background - my > machine at work is pretty old). > > --- gtk+-3.4.4.orig/gdk/x11/gdkdevicemanager-core-x11.c 2012-07-15 > 17:48:47.0 +0200 > +++ gtk+-3.4.4/gdk/x11/gdkdevicemanager-core-x11.c2012-08-20 > 10:43:58.824103715 +0200 > @@ -802,9 +802,9 @@ _gdk_device_manager_core_handle_focus (G > intdetail, > intmode) > { >GdkToplevelX11 *toplevel; > - gboolean had_focus; > + gboolean has_focus, had_focus; > >g_return_if_fail (GDK_IS_WINDOW (window)); >g_return_if_fail (GDK_IS_DEVICE (device)); >g_return_if_fail (source_device == NULL || GDK_IS_DEVICE (source_device)); > @@ -822,9 +822,9 @@ _gdk_device_manager_core_handle_focus (G > >if (toplevel->focus_window == original) > return; > > - had_focus = HAS_FOCUS (toplevel); > + had_focus = toplevel->has_focus | (toplevel->has_pointer_focus << 1); > >switch (detail) > { > case NotifyAncestor: > @@ -869,9 +869,11 @@ _gdk_device_manager_core_handle_focus (G > default: >break; > } > > - if (HAS_FOCUS (toplevel) != had_focus) > + has_focus = toplevel->has_focus | (toplevel->has_pointer_focus << 1); > + > + if (has_focus != had_focus) > { >GdkEvent *event; > >event = gdk_event_new (GDK_FOCUS_CHANGE); > > -- > Eckehard Berns > Rebuilt my GTK with this patch and it did wonders; thanks for looking into this! You should also post this patch to that Evince bug report to get more feedback. -- Josh Rickmar http://jrick.devio.us/ smime.p7s Description: S/MIME cryptographic signature
Re: [dev] Bug when unfocusing/focusing GTK3 windows
Eckehard Berns wrote: > On Thu, Aug 16, 2012 at 07:03:10PM -0400, Josh Rickmar wrote: > > This is a focusing issue that was noticed when we (me and many of the > > the other xombrero devs) noticed when we switched our browser from > > GTK2 to GTK3. If a GTK3 window is shown and focused on one tag, and I > > switch to another tag with no windows on it, whenever I switch back to > > the tag with the GTK3 window, the toplevel GtkWindow no longer has its > > it-active and has-toplevel-focus properties set to true. > > I'm pretty sure this is a GTK3 bug since I saw strange focusing behavior > with other window managers too. Not this behavior, but unexpected behavior > non the less. > > On my system the following patch to dwm seems to work around the GTK3 > focus problem: > > --- a/dwm.c 2012-07-09 10:28:59.106043161 +0200 > +++ b/dwm.c 2012-08-17 12:02:11.618822311 +0200 > @@ -865,6 +865,7 @@ > else { > XSetInputFocus(dpy, root, RevertToPointerRoot, CurrentTime); > XDeleteProperty(dpy, root, netatom[NetActiveWindow]); > + XFlush(dpy); > } > selmon->sel = c; > drawbars(); > > -- > Eckehard Berns > Sorry, but that doesn't seem to work for me. (Were you testing using xombrero? we added a pretty horrible hack to fake a focus-in event under certain conditions so help minimize this problem, before it was discovered this was a bug either in the WM or GTK. I removed this hack before testing this dwm patch.) One of our spectrwm devs says he believes he found the bug. I don't know WM code so I may be putting words in his mouth here.. but I believe it was something about calling an unmap on all other windows first, then an unmap on windows in the current workspace, which meant newly mapped windows were totally obscuring the GTK3 window, causing a VisibilityNotify state VisibilityFullyObscured. Don't ask me what all that means :) No idea if this is the same problem in dwm, but I suppose it's worth looking into. -- Josh Rickmar http://jrick.devio.us/ smime.p7s Description: S/MIME cryptographic signature
[dev] Bug when unfocusing/focusing GTK3 windows
This is a focusing issue that was noticed when we (me and many of the the other xombrero devs) noticed when we switched our browser from GTK2 to GTK3. If a GTK3 window is shown and focused on one tag, and I switch to another tag with no windows on it, whenever I switch back to the tag with the GTK3 window, the toplevel GtkWindow no longer has its it-active and has-toplevel-focus properties set to true. If I try this with multiple windows on the tag, and the GTK3 window is not focused, switching to the empty workspace does not trigger the bug. This focus bug causes all sorts of problems with our browser, like events no longer firing correctly and the text cursors in GtkEntry widgets being shown as invisible (like if the window was unfocusd). I'm not sure if this is a GTK3 or dwm bug, but I was able to successfully reproduce it on other GTK3 apps (not just our browser). The only other WM we have seen the issue with is spectrwm, but as that was forked off from dwm, it's possible/likely the bug (if not a GTK3 bug) is present in both. -- Josh Rickmar http://jrick.devio.us/ smime.p7s Description: S/MIME cryptographic signature
Re: [dev] Surf 0.5 released
Nick wrote: > The SSL something is changeset 227, The incrementing changeset numbers are local only. If you want to reference a changeset for another, use the hash. -- Josh Rickmar http://jrick.devio.us/ smime.p7s Description: S/MIME cryptographic signature
Re: [dev] [dwm] strange behavior with mupdf
Uli Armbruster wrote: > Hi guys > > Dwm is almost perfect for me, actually there are only two things I don't > like, one of them I want to discuss here, because I don't have any idea what > causes this. > > When I open a pdf with mupdf (http://mupdf.com), my pdf viewer of choice, it > looks like this: > > Hidden bar (you don't need to know everything :P ) with rxvt-unicode opened, > about to open a pdf file > http://www.unstucc.de/myspace/2012-02-02-143816_1440x900_scrot.png > Pressed to open the pdf, now it looks like this > http://www.unstucc.de/myspace/2012-02-02-143819_1440x900_scrot.png > After that, I refocus the terminal > http://www.unstucc.de/myspace/2012-02-02-143823_1440x900_scrot.png > and go back to mupdf > http://www.unstucc.de/myspace/2012-02-02-143826_1440x900_scrot.png > > Means, only after refocusing mupdf, it looks fine. It doesn't depend on this > certain pdf file, it happens with all pdf files. It also doesn't depend on > the layout I use. Using no layout (floating) it's fine. > > This doesn't happen with any other tiling window manager I came across (and I > tried MANY before I gave dwm a real try and kinda fell in love with) > > Can somebody confirm this? Or even know a way to fix this? > > Thanks! > I also see this same behavior with dwm tip on OpenBSD-current. -- Josh Rickmar http://jrick.devio.us/ smime.p7s Description: S/MIME cryptographic signature
[dev] New floating windows on unselected tags are misplaced
Hello, With the latest dwm tip, I just noticed that if a floating window is opened and tagged with an unselected tag via the config.h rules, the window will be shifted all the way over to the left side of the screen when the tag is activated. I have all my mplayer windows automatically tagged on tag 9, and if I don't have tag 9 currently in view and open a mplayer window, the window will be shifted over. However, if I do have tag 9 selected when opening, the mplayer window is then placed in the center of the screen. It's been a while since I've last updated to tip so I'm not sure what commit caused this bug. -- Josh Rickmar http://jrick.devio.us/ smime.p7s Description: S/MIME cryptographic signature
Re: [dev] Re: [dmenu] dmenu_run improvements
lolilolicon wrote: > On Sun, Jul 24, 2011 at 10:30 PM, lolilolicon wrote: > > On Sun, Jul 24, 2011 at 10:08 PM, Christian Neukirchen > > wrote: > >> anonymous writes: > >> > >>> On Sun, Jul 24, 2011 at 02:34:22PM +0800, lolilolicon wrote: > > unset IFS > > > > cmd=$(dmenu "$@" < "$CACHE") && eval exec "$cmd" > Yeah, I see you just hate backticks :P > > >>> > >>> There is a difference: > >>> > >>> ? ? % echo `echo '\\'` > >>> ? ? \ > >>> ? ? % echo $(echo '\\') > >>> ? ? \\ > >> > >> That must be a bashism, can't reproduce in dash, mksh, zsh. > >> > >> -- > >> Christian Neukirchen ? ?http://chneukirchen.org > >> > >> > >> > > > > The builtin echo may differ from /bin/echo. For example, here in dash: > > > > $ echo '\\' > > \ > > $ echo `echo '\\'` > > \ > > $ echo $(echo '\\') > > \ > > > > $ /bin/echo '\\' > > \\ > > $ /bin/echo `/bin/echo '\\'` > > \ > > $ /bin/echo $(/bin/echo '\\') > > \\ > > > > In fact the builtin echo really sucks: > > > > $ echo \\ > > \ > > $ echo > > \ > > > > Sorry, but please allow me to rephrase the issue. > The `echo' builtin in dash by default behaves like `echo -e' in bash. > So it's a bit tricky to reproduce the difference in dash: > > $ echo `echo ''` > \ > $ echo $(echo '') > \\ > > Or, just use `printf %s': > > $ printf '%s\n' `printf '%s\n' '\\'` > \ > $ printf '%s\n' $(printf '%s\n' '\\') > \\ > > For the record, the sucky `echo' is what POSIX defines: > http://pubs.opengroup.org/onlinepubs/9699919799/utilities/echo.html > > And thank you Szabolcs Nagy for pointing me to the lastes spec. > > Cheers. > This is why ksh added the print builtin; echo is different on so many systems it's not practical to write programs using it. Not that I think adding yet another command is a good idea to solve the situation, but it has helped with some of my own scripts.
Re: [dev] [dwm] sloppy focus
"Benjamin R. Haskell" wrote: > On Mon, 4 Jul 2011, Josh Rickmar wrote: > > > Um, why is a systray needed for IRC? > > It's not necessary for IRC, per se. I wrote: > > > Without a systray, I don't understand where one gets the spare screen > > real estate to dedicate to IRC. > > I don't understand how to effectively use IRC without doing one of the > following: > > 1. keeping it on-screen (which seems impractical to me, partly because I > still don't quite "get" dwm) > > or > > 2. having some kind of indication that you've been addressed (urgent > hints or whatever). > > In other wm's, #2 is often handled by having a little flashing systray > icon. So, broadening: what (if anything) do dwm users use for > "notifications" or indicating urgency? > > -- > Best, > Ben > Generally you'll end up using the dwm statusbar for that. I recently switched from an always-open mutt (that used a terminal bell when new mail arrived) to using heirloom's mailx. Now, if there's a new mail message, my dwm statusbar script will append a little "new mail" notification. I haven't yet completed the switch from irssi to something more decent (read: ii) but would probably do the same sort of thing if someone sent me a private message or used my nick in a channel. Josh
Re: [dev] [dwm] sloppy focus
"Benjamin R. Haskell" wrote: > On Mon, 4 Jul 2011, Bjartur Thorlacius wrote: > > > ??ann m??n 4.j??l 2011 15:14, skrifa??i Connor Lane Smith: > >> Interesting, those on IRC were very 'for' this idea. Different > >> demographics? Oh you silly ML people! > >> > > So people who use mice prefer laggy ML communications over IM? > > I hate mice, but I also can't stand the constant interruptions model of > IRC. Email without notification-style popups lets you deal with (or > ignore) stuff at your own pace instead of letting others dictate control > of your attention. (i.e. I prefer "laggy") > > That said, what do people here use for IRC and how do you deal with it > in dwm? Without a systray, I don't understand where one gets the spare > screen real estate to dedicate to IRC. And w/o dedicated space for it, > I end up forgetting it's there (to the annoyance of people who want > responses). > > -- > Best, > Ben Um, why is a systray needed for IRC?
Re: [dev] Microsoft considers harmful...
On Fri, Jun 17, 2011 at 12:00:25PM +0200, hiro wrote: > http://blogs.technet.com/b/srd/archive/2011/06/16/webgl-considered-harmful.aspx > > They learned their lesson and I want a button for disabling HTML5 in my > browser. > They haven't learned anything. http://arstechnica.com/microsoft/news/2011/06/html5-centric-windows-8-leaves-microsoft-developers-horrified.ars
Re: [dev] Re: Experimental editor
On Wed, Jun 15, 2011 at 04:42:27PM +0200, Christian Neukirchen wrote: > Josh Rickmar writes: > > > This makes sense. I love sam, but always wished there was a way to > > switch to the command window (~~sam~~) using the keyboard. > > I think sam together with the "common" discussed keybindings (which are > partly implemented in p9p already), up/down-cursor keys for line > movement(!) and shift-cursor selection would be a very usable and powerful > editor already. > > Next step would be to drop its windowing system and use X11 windows. > > I'd also kill for a console samterm. ;) Why not just keep the underlying sam the same (sam -d) but write a different samterm for it which does one window per buffer? This would also make it easy to switch to any buffer you wanted since it would just be part of the window manger.
Re: [dev] Experimental editor
On Wed, Jun 15, 2011 at 02:47:55PM +0100, Connor Lane Smith wrote: > My view of that kind of editing is, you select the third word in the > fourth sentence (either by leaping or with the mouse), hop over to the > command buffer (Ctrl-Tab?), and run `x/[aeiou]/d'. If you want > something weird like sorting a file, just use `|sort'. > > Thanks, > cls This makes sense. I love sam, but always wished there was a way to switch to the command window (~~sam~~) using the keyboard.
Re: [dev] Sandy editor
On Fri, May 27, 2011 at 10:55:53PM +0200, Arian Kuschki wrote: > On 27 May 2011 10:46, Aur?lien Aptel wrote: > > > On Fri, May 27, 2011 at 10:29 AM, Aur?lien Aptel > > wrote: > > > arrows on them. A triangle layout (wqsd or ijkl for example) is much > > > easier to type. > > > > I meant wasd (on qwerty), obviously. > > > > that would be just sweet for the myriads of colemak users like myself Colemak user here. Most of the time I'm editing with sam, however if for whatever reason I do use vim, I have the hjkl keybindings remapped to colemak's neio. This is shifted over one key to the right (qwerty jkl;), but I think it makes much more sense since that's where you hand is placed already. I also have tab mapped to escape (with shift-tab inserting a literal tab character).
Re: [dev] st -e not working?
On Thu, May 12, 2011 at 11:11:10PM +0100, Sir Cyrus wrote: > Using st 0.1.1 and the -e switch appears to not be working. As test cases I > ran > st -e ls > st -e "ls" > st -e echo hello > st -e "echo hello" > and a few others, but nothing seemed to work. Has this not been > implemented yet? Or am I doing something wrong? This makes it > impossible to download files using surf/st/wget. > It runs the given command in place of your shell. As soon as it quits, so does st. Run "st -e cat" to try with a program that doesn't terminate immediatelly.
Re: [dev] @bleidl, 26/03/11 19:41
On Tue, Mar 29, 2011 at 07:26:24PM +0200, pancake wrote: > About twitter i think i the best news platform atm. And email is > probably the worst one. I use them a lot. But definitively twitter > sucks much less than email. The only sad thing is that twitter is > not free and not distributted. identi.ca (free and distributed) works reasonably well, but is unfortunately overloaded with gnu freetards.
Re: [dev] [surf] arrows
On Fri, Mar 25, 2011 at 12:30:52PM -0400, Peter John Hartman wrote: > On Fri, Mar 25, 2011 at 12:28:55PM -0400, Josh Rickmar wrote: > > The solution is to turn off spatial navigation. > > Huh? diff -r 7a931a352cf9 surf.c --- a/surf.cThu Sep 09 11:15:02 2010 +0200 +++ b/surf.cFri Mar 25 12:36:10 2011 -0400 @@ -501,7 +501,7 @@ g_object_set(G_OBJECT(settings), "auto-load-images", loadimage, NULL); g_object_set(G_OBJECT(settings), "enable-plugins", plugin, NULL); g_object_set(G_OBJECT(settings), "enable-scripts", script, NULL); - g_object_set(G_OBJECT(settings), "enable-spatial-navigation", true, NULL); + g_object_set(G_OBJECT(settings), "enable-spatial-navigation", false, NULL); g_free(uri);
Re: [dev] [surf] arrows
On Fri, Mar 25, 2011 at 12:11:50PM -0400, Peter John Hartman wrote: > The solution is to train yourself to never hit Up/Down and rather aim your > fingers at C-j/C-k. PgUp/PgDown work fine, fwiw. > > I'd be happy to hear of someone who has a quick-n-dirty solution to this > problem. The solution is to turn off spatial navigation.
Re: [dev] How do you cope with OSX? (if at all)
On Fri, Mar 18, 2011 at 06:13:21PM +0100, pancake wrote: > It is possible.. But i do t think it takes much sense. Mach/darwin is just > slow and bloat architecture. I would jst prefer netbsd or openbsd.. Or > archlinux. Well if you need OS X-like support without the crap that is aqua then there you go. Personally I would just slap OpenBSD on it.
Re: [dev] How do you cope with OSX? (if at all)
On Fri, Mar 18, 2011 at 10:23:24AM +0100, Anselm R Garbe wrote: > Hi there, > > at work I have to use OSX (on a MacBook Pro 13") for various reasons > and wonder if anyone is using dwm in conjunction with OSX? > I tried different approaches so far, but all are really PITA. > The only approach I can envision is running arch in VirtualBox and > having a saner Linux environment to work with. But I have no idea what > performance penalty that will be in regular use. > > At home I tend to leave the OSX machine untouched these days though. > But using the braindamaged OSX UI feels more and more totally in the > way and ineffecient. > > Any recommendations you'd like to share? > > Thanks in advance, > Anselm > > PS: Those of you who are tempted to say, drop this shit altogether and > simply don't cope -- I can understand you and I agree to some degree, > but I really wonder if there are people out there that do cope indeed > and possibly would benefit from some improvements to dwm or so... > Would it be possible/make sense to use something like PureDarwin instead of OS X?
Re: [dev] [st] Fixed -e with support for spaces
On Sun, Nov 28, 2010 at 04:20:21PM -0500, Joseph Xu wrote: > > > On 11/28/2010 06:22 AM, Aur??lien Aptel wrote: > > On Sat, Nov 27, 2010 at 12:35 AM, Joseph Xu wrote: > >> came up with. It relies on the shell that executes st to parse the > >> arguments, so you can't run a command like st -e "touch arst", you have > >> to run st -e touch arst. This also means you can't have any st arguments > >> after the -e because they'll all be included in the command to run. > > > > This breaks argument parsing. Why would you want to do that? > > Josh's solution is better imo. I've pushed (a slight variation of) it to > > tip. > > Not sure what you mean by breaking argument parsing. I think it's the > simplest way to parse a command with complex quoted arguments correctly > without having to run an extra shell process. > Agree. I prefer this patch to mine. Mainly due to a bug(?) in dmenu_run where everything is escaped before being executed by the shell. So, for example, I can't run `st -e "tmux a"` from dmenu_run, since it parses it as st -e \"tmux a\" instead. The xterm-like -e behavior circumvents this issue.
[dev] [st] Fixed -e with support for spaces
Here's a quick fix to pass the opt_cmd to $SHELL -c, which fixes a bug where you couldn't call -e with a command with spaces (arguments to that command). I earlier tried to pass the command directly to execvp() by using strsep to set args, but the code turned out to be far too complex (I think). diff -r c4ef5533a330 st.c --- a/st.c Fri Nov 26 22:12:54 2010 +0100 +++ b/st.c Fri Nov 26 17:44:30 2010 -0500 @@ -545,9 +545,9 @@ void execsh(void) { - char *args[] = {getenv("SHELL"), "-i", NULL}; + char *args[] = {getenv("SHELL"), "-i", NULL, NULL}; if(opt_cmd) - args[0] = opt_cmd, args[1] = NULL; + args[1] = "-c", args[2] = opt_cmd, args[3] = NULL; else DEFAULT(args[0], SHELL); putenv("TERM="TNAME);
Re: [dev] Slock: Logging patch
On Thu, Nov 11, 2010 at 08:04:32PM +0100, Danilo Bargen wrote: > Hello all > > In case anyone is interested: I've added logging capabilities to > Slock. The patch is attached. It will enable logging of all locks, > unlocks and failed unlock attempts to ~/.slock.log, if compiled with > the ENABLE_LOGGING flag. > > --Danilo Why all the #ifdefs? Why not just apply the patch if you want the feature?
Re: [dev] [OT] ubuntu moves to wayland from xorg
On Fri, Nov 05, 2010 at 01:04:59PM -0400, Jacob Todd wrote: > Someone should touchscreen-ify acme. Yeah, make it do different things depending on which finger you use to touch the text.
Re: [dev] [patch] dmenu - support for xft font rendering
On Sun, Sep 05, 2010 at 11:02:58PM -0400, Kris Maglione wrote: > I still don't think that the auto-hinter is nearly up to par with > designer hinted fonts. For the fonts that I have screen and print > varieties from different foundaries, the versions without hinting > information look considerably worse on-screen (though better in > print) than the auto-hinted varieties. This all really depends on how you like your fonts rendered. When Apple first ported Safari to Windows, everyone was screaming about how the fonts looked like crap. The Apply way is to use little hinting and respect the shape of the font glyphs, while the Microsoft way is to hammer the font into the pixel grid so it looks sharper, but also causes the original typeface's unique shape to suffer. Personally, I prefer the autohinter since I've found that with slight hinting it looks very similar to the way Apple renders their fonts. I don't know if Apple uses an autohinter or the hints in the font, but they certainly put a lot less emphasis on the hinting and more on the shape. Generally, if you like your fonts sharp on screen (Microsoft), designer hints are usually the best. If you want your fonts to look more like print (Apple), using the autohinter seems to work better. Not that this matters much, as I spend most of my time staring at bitmaped monospace fonts. Josh Rickmar
Re: [dev] Stripping html from email
On Tue, Aug 24, 2010 at 04:58:20PM +0200, pancake wrote: > there's dmc-pack to unpack and unpack mime attachments. The > implementation is 162 LOC and works quite nice. I think is the > sanest way to work with it. dmc looks like it could be just what I need, unfortunately I can't compile it on OpenBSD. Any help appreciated. If this doesn't work out, I could always go to Kurt's perl solution. $ gmake HAVE_SSL=0 cc -Wall -DHAVE_SSL=0 -DVERSION=\"0.1\" -DPREFIX=\"/usr\" -c -o dmc.o dmc.c dmc.c: In function 'dmcinit': dmc.c:195: warning: implicit declaration of function 'signal' dmc.c:195: error: 'SIGINT' undeclared (first use in this function) dmc.c:195: error: (Each undeclared identifier is reported only once dmc.c:195: error: for each function it appears in.) dmc.c: In function 'dmcstart': dmc.c:230: error: 'SIGPIPE' undeclared (first use in this function) dmc.c:230: error: 'SIG_IGN' undeclared (first use in this function) dmc.c:256: warning: missing sentinel in function call dmc.c: In function 'dmckill': dmc.c:271: warning: implicit declaration of function 'kill' dmc.c:271: error: 'SIGKILL' undeclared (first use in this function) dmc.c: In function 'dmcstop': dmc.c:278: error: 'SIGALRM' undeclared (first use in this function) gmake: *** [dmc.o] Error 1
Re: [dev] Stripping html from email
On Tue, Aug 24, 2010 at 04:58:20PM +0200, pancake wrote: > On 08/24/10 16:45, Kurt H Maier wrote: > >MIME sucks; there's no nice way to deal with it. I use perl and the > there's dmc-pack to unpack and unpack mime attachments. The > implementation is 162 LOC and works quite nice. I think is the > sanest way to work with it. > Thanks, I'll take a look at it (not a perl fan..). Where can I get the dmc source again?
Re: [dev] Stripping html from email
On Tue, Aug 24, 2010 at 09:07:25AM -0400, Kurt H Maier wrote: > On Tue, Aug 24, 2010 at 9:01 AM, anonymous wrote: > > But it is not what OP asks for. ?Tool should process MIME emails and > > remove text/html attachments. > > that is a different task than stripping html from email data. OP > should be looking for two tools. anonymous is right, I just want to remove the text/html attachments, not strip the html tags.
Re: [dev] Stripping html from email
On Mon, Aug 23, 2010 at 09:46:58PM -0600, Anthony J. Bentley wrote: > > Is there currently a tool or script that I can use to strip html > > from emails? Basically, it should work like this: > > > > - Read the message from stdin > > - If there is no html, leave as is > > - If it finds both html and plain text, strip the html attachment > > - If it finds html but no plain text, leave as is > > > > In case something like this doesn't exist, I wouldn't mind writing > > one for myself (awk sounds like the right tool for the job). > > It???s not quite what you???re asking for, but I have nmh set up like this: > mhshow-show-text/html: lynx -dump %F | less > > Lynx sucks but it sorta works well enough here, I guess. > Yeah, not quite what I'm looking for. Basically I want something that I can pipe the message to with my MDA (fdm) before it is delievered to my maildir.
[dev] Stripping html from email
Is there currently a tool or script that I can use to strip html from emails? Basically, it should work like this: - Read the message from stdin - If there is no html, leave as is - If it finds both html and plain text, strip the html attachment - If it finds html but no plain text, leave as is In case something like this doesn't exist, I wouldn't mind writing one for myself (awk sounds like the right tool for the job).
Re: [dev] [surf] Why enable spatial navigation?
On Sun, Aug 22, 2010 at 04:19:10PM -0400, Alex Puterbaugh wrote: > Personal taste I guess. There are existing keybinds for > scrolling that you can change in config.h, so I guess enabling > spatial navigation allows the best of both worlds or something. It also means that you can't then use left and right for horizontal scrolling. If spatial navigation does stay, then the patch to add horizontal scrolling should probably be added to surf.
Re: [dev] Usable typesetting system?
On Sun, Aug 22, 2010 at 01:15:40PM +0200, Martin Kopta wrote: > Hi everyone, > > I wrote my bachelor thesis using LaTeX and now I am going to write my > master thesis. I would rather avoid TeX and everything TeX based this time. > > The PDF output of (La)TeX is awesome and I really like that part of it, but > writting itself was painful, since the language is pretty cryptic and complex > for 'simple document like thesis'. Overhelming compilation output completely > hides any warnings and errors, which are too fuzzy and useless anyway. Also, > work with images is pretty much impossible and texlive package is too big in > size. > > I am currently looking for some replacement with: > > * input as plain text (NOT xml) > * simple syntax/commands/language > * output as PDF (acceptable as thesis), may be indirectly > * usable compilator (readable overall output, warnings and errors) > * overall good design > > I guess my demands are too high, but if you know about something interesting, > please, let me know. > > Thank you, > dum8d0g This is probably not what you're looking for, but last year I've been using lout[1] (that website is awful, btw) for all of my university documents. It's not really suckless, but I think that overall it's better than LaTeX. The syntax feels rather lisp-y (it's actually a functional language), but is much easier to extend and program than TeX. It's written entirely in C and the lout distribution is *much* smaller than (La)TeX. $ du -sh lout.lib/ 5.5Mlout.lib/ lout outputs directly to postscript, so compiling to pdf is rather easy. $ lout test.lout | ps2pdf - test.pdf Links: [1] http://lout.wiki.sourceforge.net/
Re: [dev] [sic] port argument necessary?
On Wed, Aug 18, 2010 at 07:18:48AM +1000, Ramana Kumar wrote: > Why must an argument be provided with its default value? > > ram...@archbox ~ % sic > error: cannot resolve hostname 'irc.oftc.net': Success > ram...@archbox ~ % sic -p 6667 > solenoid.oftc.net: 08/18/10 07:17 >< NOTICE (AUTH): *** Looking up > your hostname... > solenoid.oftc.net: 08/18/10 07:17 >< NOTICE (AUTH): *** Checking Ident > solenoid.oftc.net: 08/18/10 07:17 >< NOTICE (AUTH): *** Found your hostname > Man page says it should be 6667 by default, source says otherwise. Here's a fix: diff -r 904b7747c223 sic.c --- a/sic.c Fri Aug 06 09:52:12 2010 +0100 +++ b/sic.c Tue Aug 17 17:31:53 2010 -0400 @@ -9,7 +9,7 @@ #include static char *host = "irc.oftc.net"; -static char *port = "ircd"; +static char *port = "6667"; static char *password; static char nick[32]; static char bufin[4096];
Re: [dev] Suckless Way to Learn How To Program
On Fri, Aug 13, 2010 at 06:20:17PM -0400, Brandon LaRocque wrote: > This is a pretty easy question to ask, though I'm not sure how hard it > would be to answer. My question to those at Suckless is this: > > My son is interested in computer programming, and given the way that > programming is being taught, I don't think it's the right way to go > about learning.What would you guys here suggest for a self-learning > curriculum that I could set up for him? By this, I mean languages, > ideas, projects. I would really appreciate any help in the matter. > It'd be interesting to know what you guys consider a 'suckless > programming 101' course would consist of, for self-learners. > > Thank you. > > -- > Brandon LaRocque > Perhaps the best way to learn how to program suckless is to write your code and then be yelled at when it's not suckless. I first thought of this as a sort of joke, but after more consideration it may actually be a good way to teach it. Suckless programers need to be able to take criticism (even if it doesn't always seem constructive), and then be able to build upon suggestions (if any) to improve their code. A new programmer's first reaction will probably be the same as most of the other crap programmers out there (more code = more 1337ness), so some guidance from one who has "seen the light" would certainly be beneficial. If they can't be told by others that their code sucks, I'm not sure that they'll ever program suckless. Josh Rickmar
Re: [dev] Suckless design in Games
On Wed, Aug 11, 2010 at 11:04:24AM +1000, Alex Hutton wrote: > You're right, that would be even simpler. I was thinking about whether > or not the 'relational' abilities of the database would come in handy > but I haven't come up with any definite uses for them yet. join(1)
Re: [dev] How about sta.li ?
On Sun, Aug 01, 2010 at 11:38:14AM +0100, Ethan Grammatikidis wrote: > Agreed, but what about other libcs? I'm astonished glibc has come up > at all. Is dietlibc really that inadequate? Or uclibc? I brought up > dietlibc first because as far as I know it doesn't even have dynamic > linking. If it is missing necessary features, perhaps it might even > be easier to add those features than to bring glibc to heel. Isn't dietlibc GPL'd? Wouldn't this require that any binary distributions of statically linked programs also be distributed under the terms of the GPL? Josh Rickmar
Re: [dev] Problem building dmenu tip
On Mon, Jul 19, 2010 at 11:35:03AM +0200, Szabolcs Nagy wrote: > * Anselm R Garbe [2010-07-19 07:45:16 +0100]: > > > On 18 July 2010 21:40, Josh Rickmar wrote: > > > CC -o dinput > > > /usr/lib/crt0.o(.text+0x9d): In function `___start': > > > : undefined reference to `main' > > > collect2: ld returned 1 exit status > > > *** Error code 1 > > > > > > Stop in /home/joshua/src/dmenu (line 28 of Makefile) > > > > Make sure to > > > > hg clone http://hg.suckless.org/libdraw > > cd libdraw > > make install > > > > before you build dmenu. Does this fix your issues? > > i assume without libdraw he would get lot of undefined symbol errors during > compilation > > this seems a general linking problem to me > Yes, I already have installed libdraw.
Re: [dev] Problem building dmenu tip
On Mon, Jul 19, 2010 at 08:30:40AM +0200, Szabolcs Nagy wrote: > On 7/18/10, Josh Rickmar wrote: > > in the irc channel said he remembers a similar problem when linking with > > ld on Linux. Any ideas? > > nah, that's not what i meant > > i just noted that you get similar error when you link with ld in general like > ld -o foo -lc foo.o > > > /usr/lib/crt0.o(.text+0x9d): In function `___start': > > : undefined reference to `main' > > collect2: ld returned 1 exit status > > *** Error code 1 > > does other stuff compile fine? eg try > cc -c -o foo.o foo.c > cc -o foo -lc foo.o > This works fine on some small C programs I have written.
[dev] Problem building dmenu tip
I'm having the following problem when building dmenu tip on OpenBSD current. At first I thought it was a problem with OpenBSD, but a user in the irc channel said he remembers a similar problem when linking with ld on Linux. Any ideas? dmenu build options: CFLAGS = -std=c99 -pedantic -Wall -Os -I. -I/usr/include -I/usr/local/include -I/usr/X11R6/include -D_BSD_SOURCE -DVERSION="4.1.1" LDFLAGS = -s -L/usr/lib -L/usr/local/lib -lc -L/usr/X11R6/lib -lX11 -ldraw CC = cc CC dinput.c config.h:9: warning: 'spaceitem' defined but not used CC common.c config.h:9: warning: 'spaceitem' defined but not used CC -o dinput /usr/X11R6/lib/libX11.so.13.0: warning: strcpy() is almost always misused, please use strlcpy() /usr/X11R6/lib/libX11.so.13.0: warning: strcat() is almost always misused, please use strlcat() /usr/X11R6/lib/libX11.so.13.0: warning: sprintf() is often misused, please use snprintf() /usr/lib/crt0.o(.text+0x9d): In function `___start': : undefined reference to `main' collect2: ld returned 1 exit status *** Error code 1 Stop in /home/joshua/src/dmenu (line 28 of Makefile)
Re: [dev] plumb 1.0
On Wed, Jul 14, 2010 at 07:28:16PM +0200, Mate Nagy wrote: > On Wed, Jul 14, 2010 at 07:25:56PM +0200, Uriel wrote: > > http://doc.cat-v.org/plan_9/4th_edition/papers/plumb > > well darn, should've expected it from plan9 :) > yeah, i'll consider the name change, it's no problem at this point - > any suggestions for names? :) > > Mate > Name it prune since plum(b) was already taken.
Re: [dev] Presentation slides software
On Tue, Jun 29, 2010 at 12:34:52PM +0200, Uriel wrote: > I'm looking for a minimally sane way to generate presentation slides, > ideally using something similar to markdown and capable of generating > decent-looking html (and hopefully) pdf. > > I know about magicpoint, and I normally use the troff slides macros: > http://repo.cat-v.org/troff-slider/ > > But the generated HTML is rather messy, and fixing htmlroff is too much work. > > Suggestions welcome. > > Peace > > uriel > I recently found out about slideml[1], but the two things which I didn't really like about it were it being written in perl and producing XHTML instead of just regular HTML. I began working on my own tool, hsg (HTML Slidy Generator), which is slideml rewritten in ksh. There are currently several bugs with the HTML output and I haven't had much motivation to fix them just yet as I don't begin school again until fall, but others are welcome to take a look and provide fixes. hg clone http://bitbucket.org/jrick/hsg No PDF output, unfortunately. Links: [1] http://www.peereboom.us/slideml/index.html
[dev] Focusing problem in tabbed
I noticed that when using tabbed (with either surf or xterm), that if the window is focused with the mouse over another window, I am able to send keystrokes to tabbed (next/previous tab, for example), but am not able to send keystrokes so the surf or xterm window. I have to manually move my mouse over the tabbed window before I am then able to type in that window. I'm also running dwm, in case that makes any difference.
Re: [dev] Fwd: OT:GUI wireless connections management?
[Disclaimer: I love OpenBSD] On Sun, May 30, 2010 at 10:26:03PM +0100, Ethan Grammatikidis wrote: > Why is there software being developed for any BSD either? I have a > FreeBSD box, I wonder what the commands are. > > Grep is... Gnu grep! Gnu grep is an abomination! I used it on a big > file last November when I was still using Linux. I noticed it took a > seemingly unreasonable time, decided to try Plan 9's grep. I am not > kidding in the least when I say it was FOUR HUNDRED TIMES faster. To > be fair to Gnu in general it's just grep, Gnu sed was nearly 200 > times faster than grep at the same task, but that bug's only been > open for 5 years. What grep does your BSD use? OpenBSD does not use GNU grep. I'm not sure how it compares speed wise though. > diffutils - no horror stories I know of, but it's the same one linux > uses. OpenBSD has their own diff. > gcc... do I even need to begin? You want to do anything remotely > interesting and it can't generate the code correctly with any set of > options! Well, can't say much here. OpenBSD did just make the switch from GCC3 to GCC4 recently in -current, and I believe the main reason was for C++ support. Also note that OpenBSD is trying to phase out all C++ from the source tree (ex. see mandoc) so they can switch to using pcc. > What about the kernels? NetBSD - XML parser in the kernel! At least > the Linux kernel maintainers keep some of the crap out. FreeBSD... > not really heard much positive about it, and Stealth used to say it > was just "trying to be Linux" anyway. OpenBSD's hardware support > seems to be around the level of Plan 9's, but at least it's got gcc, > eh? Looking around for something to replace Linux at the end of last > year I seriously got a "why bother" feeling about all the BSDs. If hardware doesn't work in openbsd there's usually a good reason, like if a hardware vendor will not release documentation (with or without an NDA). I would rather run something which has a strict no-blob policy and find hardware which works with it then relying on hacks and blobs for bad hardware. > A little careful listening & my feeling became more than just "why > bother". "Cat went to _Berkley_ [not Gnu] and came back waving > flags." It's Berkley that took a good unix and started gluing cruft > to it, and if Gnu has attracted more hackers to glue rubbish onto > their stuff, so what? The attitude is still there, certainly in > FreeBSD and NetBSD, so what reason is there to believe they won't > mess up any future features they take from Plan 9? From what I hear > they already have screwed up union mounts. Union mounts are crucial > to Plan 9's design! >From cat(1): SEE ALSO head(1), less(1), more(1), pr(1), sh(1), tail(1), vis(1), setbuf(3) Rob Pike, UNIX Style, or cat -v Considered Harmful, USENIX Summer Conference Proceedings, 1983. Yeah, they recognize the problem. I think it's more there for historical reasons then because anyone likes it. If this counts as fanboyism I'll gladly take the label. :) OpenBSD sucks considerably less then any other unix I've tried. Josh Rickmar
Re: [dev] dwm-5.8.1 / dmenu-4.1.1
On Sun, May 30, 2010 at 09:05:13PM +0200, ilf wrote: > On 05-30 11:12, David DEMELIER wrote: > >>Please test hg tip and let me know any issues. > >Do you remember the mplayer scaling issue that we talked about on > >IRC? The issue is still here even in hg tip. > > I don't know which issue you were talking about, but for me mplayer > now *always* is fulscreen. I cannot resize it via 'f' or with the > mouse. > > But flash fullscreen works. :) Problem I noticed in tip with mplayer: if I have a window full screen and switch tags (MOD-Tab twice) or switch on and off the tag, if the video is a different aspect ratio then my monitor, then the video is still in "fullscreen mode" but is shoved over to the left side of the screen.
Re: [dev] Fwd: OT:GUI wireless connections management?
On Sat, May 29, 2010 at 07:30:36PM -0400, Niki Yoshiuchi wrote: > ifconfig doesn't work on wireless networks, but assuming you mean iwconfig, > well that doesn't work with WPA encryption. And neither of them is > automatic. well I'm on openbsd. ifconfig is used for everything.
Re: [dev] Fwd: OT:GUI wireless connections management?
On Sun, May 30, 2010 at 03:01:24AM +0400, Ilya Ilembitov wrote: > Hi, all.I wanted to ask for an advice. > > Being a laptop user, I have to swtich between wireless networks quite > frequently, and often I have to connect to the new networks. So, I am in need > of a tool that would allow me to automatize the whole routine: provide me > with a list of networks, allow me to select the one to connect, find out the > type of encryption and actually connect to it (prompting me for the > encryption key, if needed) - since I don't think that I'll be able to > memorize all the wpa_supplicant options to use it fluently (i.e. without > having to read the manpage each time I want to connect to a new network). > > The current options that I am aware of: > > 1. Networkmanager - ties a lot of dependencies and is not quite stable > > 2. wicd - has a ncurses flavour, I'll probably give it a try. > > 3. connman (that thing that is used in Moblin/Meego) - quite young and I > haven't heard much of it, and whether it could be used outside of its > original environment. Although I believe I have read somewhere that E17 > people were trying to make a EFL GUi to it, so probably it's rather flexible. > > Any other options? I was hoping that someone has already come up with a > custom solution that would integrate into dwm/dmenu environment nicely. What's wrong with just using ifconfig?
Re: [dev] [surf] please recheck tip
On Fri, May 28, 2010 at 01:20:46PM +0200, Enno Boland (Gottox) wrote: > Ok. I'm off for the weekend. If there aren't any complains, I will > release surf on sunday. I just realized why my $HOME is being littered by surf.core files, if I close a surf window while it is still loading a page it will crash. Not a show-stopper, but annoying nonetheless.
Re: [dev] [surf] please recheck tip
On Tue, May 25, 2010 at 11:09:27AM -0400, Jeremiah Dow wrote: > Yes - you probably don't want to default the sessiontime to 0 again yet - > Google/Gmail still won't recognize cookies with that set, I don' t know > about others. > > Jeremiah Thanks, this fixed it.
Re: [dev] [surf] please recheck tip
On Tue, May 25, 2010 at 05:05:57PM +0200, Marvin Vek wrote: > On Tue, May 25, 2010 at 11:04:07AM -0400, Josh Rickmar wrote: > > On Mon, May 24, 2010 at 09:33:10PM +0200, Enno Boland (Gottox) wrote: > > > Hi! > > > > > > Please recheck current tip of surf. If there are no big stoppers, I > > > will release it next week. > > > > > > There are still some bugs regarding cookies, They are delayed to 0.5. > > > > > > kind regards, > > > > > > Enno > > > > > > > I just updated to tip again, and cookies are much worse than before. > > Now I can't seem to log into any website at all. I thought it was the > > new useragent so I changed it back, but it didn't solve the problem. > > Has nothing to do with the User-Agent. Remove your cookies file, start > fresh, that helps a lot mostly. I did this already. I can see that cookies are being saved to the new file, but it seems like surf is not reading them at all.
Re: [dev] [surf] please recheck tip
On Mon, May 24, 2010 at 09:33:10PM +0200, Enno Boland (Gottox) wrote: > Hi! > > Please recheck current tip of surf. If there are no big stoppers, I > will release it next week. > > There are still some bugs regarding cookies, They are delayed to 0.5. > > kind regards, > > Enno > I just updated to tip again, and cookies are much worse than before. Now I can't seem to log into any website at all. I thought it was the new useragent so I changed it back, but it didn't solve the problem.
Re: [dev] [surf] please recheck tip
On Tue, May 25, 2010 at 11:36:28AM +0200, Claudio M. Alessi wrote: > On Mon, May 24, 2010 at 04:06:00PM -0400, Josh Rickmar wrote: > > Also, is there a better way of doing cookies then wget? As an (Open)BSD > > user, I'd like to use something in base (I did install wget though to > > test to make sure that wasn't the download problem above). > IIRC you can use ftp(1) for HTTP requests. Thanks, I knew about (and use) ftp(1), but didn't think it would work with cookies. However, after checking the manpage, I see that it does support them with the -c flag.
Re: [dev] [surf] please recheck tip
On Mon, May 24, 2010 at 09:33:10PM +0200, Enno Boland (Gottox) wrote: > Hi! > > Please recheck current tip of surf. If there are no big stoppers, I > will release it next week. > > There are still some bugs regarding cookies, They are delayed to 0.5. > > kind regards, > > Enno > Downloads don't work, I get the error: _SURF_HILIGHT: no closing quote Also, is there a better way of doing cookies then wget? As an (Open)BSD user, I'd like to use something in base (I did install wget though to test to make sure that wasn't the download problem above).
Re: [dev] my suckless.org compatible ideas: vim like mapping for any tools, C scripts, vi clone
On Mon, May 17, 2010 at 11:29:24AM -0400, Kurt H Maier wrote: > On Mon, May 17, 2010 at 11:20 AM, anonymous wrote: > > If the only problem is tags, maybe replace them with more common > > "virtual desktops"? ?If you look at screenshots > > [http://dwm.suckless.org/screenshots/], there is only one tag selected > > on each desktop - tags are used as virtual desktops. > > If you're doing one tag at a time, something like 2wm or matchbox is > fine. I use the multiple-tags features of dwm extensively, and to the > best of my knowledge suckless.org is the only place to get that sort > of functionality. I believe this can also be done in OpenBSD's cwm using groups, but cwm isn't tiling. Also, I think xmonad has some contrib packages to support window tagging, but they work in addition to workspaces instead of replacing them.
Re: [dev] GSoC 2010
On Fri, Mar 05, 2010 at 12:47:12PM +0100, Uriel wrote: > Some people are supposedly working on an OpenBSD port, it is likely > that a port will be done long before GSoC actually starts. > > uriel Well, I do have a spare partition that I could throw Linux (stali?) or FreeBSD on, so it's not too big of an issue. I think that either of these projects would be a great fit for me. Josh
Re: [dev] GSoC 2010
On Thu, Mar 04, 2010 at 11:19:01PM +0100, Uriel wrote: > I will note that one of the original goals for creating werc was to > help build a sane replacement for the kinds of things trac does, > including bug tracking. I would be happy to mentor any project that > works in that direction. > > uriel This seems like a project that I could do. I would like to do something like Goblin, but Go doesn't yet run on my OS (OpenBSD). Josh
Re: [dev] GSoC 2010
On Thu, Mar 04, 2010 at 12:40:17PM +0100, Szabolcs Nagy wrote: > let me summarise the ideas so far: > > stali > ld wrapper > window system > bug and issue tracker > improve dmc (mail) > widget tool kit > dwm in go > text indexing > ssl cert validation for surf > text editor > improve st (terminal) > port scanner > > if we need to focus the application in one area then these are not > very good i guess.. > What about a usable interface for facebook? IIRC, there was some talk about this on this list a while back.
Re: [dev] GSoC 2010
On Wed, Mar 03, 2010 at 07:16:22PM -0500, Jacob Todd wrote: > On Wed, Mar 03, 2010 at 07:01:48PM -0500, Josh Rickmar wrote: > > Should probably say that I'm also a student (studying Computer > > Engineering at the University of Michigan) that would be interested in > > doing something like this. I don't yet know what exact project I'd like > > to take, keep posting ideas. > > > Which U of M are you studying at? > > Another suggestion: more work on st. The one in Ann Arbor.
Re: [dev] GSoC 2010
Should probably say that I'm also a student (studying Computer Engineering at the University of Michigan) that would be interested in doing something like this. I don't yet know what exact project I'd like to take, keep posting ideas.
Re: [dev] GSoC 2010
On Wed, Mar 03, 2010 at 09:47:08PM +, Connor Lane Smith wrote: > As an aside, where are the stali utils from? Not GNU, surely? It's using a OpenBSD userland if I recall.
Re: [dev] Distribution
On Mon, Jan 18, 2010 at 10:50:29PM -0600, Kurt H Maier wrote: > On Mon, Jan 18, 2010 at 10:23 PM, Samuel Baldwin > wrote: > > Extremely valid point. Are there any distros, gentoo or not, that > > don't use gcc in favour of something a little saner, though? Obviously > > Plan 9 doesn't count. > > I think the FreeBSD guys are working on a version built with clang. I > don't think the linux kernel can be compiled with anything but gcc. OpenBSD is switching to pcc, or it appears very likely that it will sometime in the future. http://www.undeadly.org/cgi?action=article&sid=20091228231142
Re: [dev] [surf] patch for SETPROP
On Thu, Jan 14, 2010 at 04:38:57PM +, Josh Rickmar wrote: > Here's a config.def.h patch to prevent SETPROP from setting a property > to an empty value. This will prevent errors in surf when hitting escape > and to close dmenu when setting some surf XProperties, like the url. > --- surf.orig/config.def.hThu Jan 14 16:31:24 2010 > +++ surf/config.def.h Thu Jan 14 16:30:46 2010 > @@ -10,7 +10,7 @@ > > #define SETPROP(p) { .v = (char *[]){ "/bin/sh", "-c", \ > "prop=\"`xprop -id $1 $0 | cut -d '\"' -f 2 | dmenu`\" &&" \ > - "xprop -id $1 -f $0 8s -set $0 \"$prop\"", \ > + "[ -n \"$prop\" ] && xprop -id $1 -f $0 8s -set $0 \"$prop\"", \ > p, winid, NULL } } > #define MODKEY GDK_CONTROL_MASK > static Key keys[] = { Oh, guess this isn't needed after all. Thought it was, since I was using another pipe after the dmenu command, so $? was no longer the return code from dmenu.
[dev] [surf] patch for SETPROP
Here's a config.def.h patch to prevent SETPROP from setting a property to an empty value. This will prevent errors in surf when hitting escape and to close dmenu when setting some surf XProperties, like the url. --- surf.orig/config.def.h Thu Jan 14 16:31:24 2010 +++ surf/config.def.h Thu Jan 14 16:30:46 2010 @@ -10,7 +10,7 @@ #define SETPROP(p) { .v = (char *[]){ "/bin/sh", "-c", \ "prop=\"`xprop -id $1 $0 | cut -d '\"' -f 2 | dmenu`\" &&" \ - "xprop -id $1 -f $0 8s -set $0 \"$prop\"", \ + "[ -n \"$prop\" ] && xprop -id $1 -f $0 8s -set $0 \"$prop\"", \ p, winid, NULL } } #define MODKEY GDK_CONTROL_MASK static Key keys[] = {
Re: [dev] Profont in dwm
On Mon, Jan 04, 2010 at 09:03:08PM +, Rob wrote: > > "-*-terminus-medium-r-normal-*-12-*-*-*-*-*-*-", which is what dwm > > requires. I'm not incredibly knowledgeable about fonts on linux, so > > I'm not really sure what to do. I would, however, like to stop using > > terminus in the status bar in favour of profont, so I'd like to know > > how to specify profont with such a string. > > I use profont and > > static const char font[]= "-*-*-profont-*-*-*-12-*-*-*-*-*-*-*"; > > works fine for me. Although profont shows up in xfontsel for me too, > so perhaps you need to run fc-cache, mkfontscale, mkfontdir, or some > other font utility. > Try xset +fp, that's what I'm using to add terminus.
Re: [dev] simple portscanner
On Sat, Jan 02, 2010 at 07:37:29PM +0300, anonymous wrote: > On Sat, Jan 02, 2010 at 02:04:37PM +0100, hiro wrote: > > licenses are stupid > > > > I agree. What should be done to place it into the public domain? > Will adding of "/* Public Domain */" into every source file be enough? > > You may think licenses are stupid, but (as another poster noted), the phrase "public domain" can cause problems in some places. Why not just place it under something like the ISC license, or even closer to "public domain", the WTFPL license?
[dev] Binding mouse events in surf
Is there any way to currently bind mouse buttons to functions in surf's config.h? I'm trying to figure out a way to make the forward/backward buttons on my mouse (buttons 8 and 9) call the navigate function. Are there any GDK_* values for the mouse which will work? If something like this isn't currently possible, is there an external application to bind these buttons to the back/forward keyboard shortcuts when a surf window has focus?
Re: [dev] MoveStack patch
On Tue, Dec 01, 2009 at 02:25:16PM +0900, Alex Matviychuk wrote: > Is the movestack patch still being maintained? It does not work > against the latest dwm. > > Is there a reason why this functionality is not mainlined? > > Ref: http://dwm.suckless.org/patches/movestack > > Cheers! > I haven't tried movestack, but push.c seems to do the exact same thing. I'm using it on the latest dwm release with no problems.
Re: [dev] sic - remove stdout formatting?
On Mon, Oct 19, 2009 at 04:18:32PM -0400, Kris Maglione wrote: > On Mon, Oct 19, 2009 at 04:04:12PM -0400, Josh Rickmar wrote: > >I would like to (re)write an irc bot using sic, but the formatted output > >is making this harder then it could/should be. For example, the first > >field, the channel or irc server, is cut off at 12 characters by a > >colon. This becomes a problem when trying to parse the output because > >longer field names can be cut off. It can also cause the number of > >fields (seperated by whitespace) to change since a field with >=12 > >characters will be missing a space between the name and the colon. > > > >To make this program more useful, wouldn't it be better if all the > >information was presented to the user? Doing so would make writing bots > >much easier and would allow the user to easily format the output any way > >he/she wants to by passing sic's output to awk. > > I've written IRC bots with sic before, and made the same > modification. Try kris/sic.c from the hg repo. Ah, thanks. Yeah, much better. Josh Rickmar
[dev] sic - remove stdout formatting?
I would like to (re)write an irc bot using sic, but the formatted output is making this harder then it could/should be. For example, the first field, the channel or irc server, is cut off at 12 characters by a colon. This becomes a problem when trying to parse the output because longer field names can be cut off. It can also cause the number of fields (seperated by whitespace) to change since a field with >=12 characters will be missing a space between the name and the colon. To make this program more useful, wouldn't it be better if all the information was presented to the user? Doing so would make writing bots much easier and would allow the user to easily format the output any way he/she wants to by passing sic's output to awk. Josh Rickmar