Re: [dev] [PATCH] sbase: add cut
On 00:12 Thu 02 Aug, sjferr...@gmail.com wrote: >> On 19:52 Wed 01 Aug, Kurt H Maier wrote: >>>On Wed, Aug 01, 2012 at 07:28:57PM -0400, Steven Blatchford wrote: >>>> >>>> What is your awk to print fields three and four with this input: >>>> >>>> 'foo bar baz quz' >>>> >>> >>>Depends on what output format I want. Get to the point instead of >>>trying to set me up for failure; I don't have time for this shit >> >> I wanted to know how you use awk to get the same output as >> "cut -d' ' -f3-" > >awk '{for (i=3; i<=NF; i++) printf "%s ", $i} END {print}' > > >> Also what about "cut -d' ' -f1,3,9-" ? > >awk '{printf "%s %s ", 1, 3; for (i=9; i<=NF; i++) printf "%s ", $i} END >{print}' > I think you mean '... END {printf "\n"}' but even with this you have a trailing space.
Re: [dev] [PATCH] sbase: add cut
On 19:52 Wed 01 Aug, Kurt H Maier wrote: >On Wed, Aug 01, 2012 at 07:28:57PM -0400, Steven Blatchford wrote: >> >> What is your awk to print fields three and four with this input: >> >> 'foo bar baz quz' >> > >Depends on what output format I want. Get to the point instead of >trying to set me up for failure; I don't have time for this shit I wanted to know how you use awk to get the same output as "cut -d' ' -f3-" Also what about "cut -d' ' -f1,3,9-" ?
Re: [dev] [PATCH] sbase: add cut
On 19:21 Wed 01 Aug, Kurt H Maier wrote: >On Wed, Aug 01, 2012 at 07:13:57PM -0400, Steven Blatchford wrote: >> >> Give this[0] a read and see what you think. >> >> [0] http://awk.freeshell.org/RangeOfFields >> > >I think their suggestions are based on > 1) deciding to use a shitty version of awk, and > 2) the idea that you should give a shit if someone who doesn't know awk >is reading your script. > >I don't understand why sbase should care about either of these things. Hmm you didn't read it or didn't read it well. What is your awk to print fields three and four with this input: 'foo bar baz quz'
Re: [dev] [PATCH] sbase: add cut
On 18:54 Wed 01 Aug, Kurt H Maier wrote: >On Wed, Aug 01, 2012 at 11:02:52PM +0100, Nick wrote: >> >> Bah. There's a balance to be struck. Scripts which aren't awful >> should be supported. The issue is whether using cut constitutes >> 'awful'. I think it does not. There are legitimate cases where it's >> simpler and clearer than awk/sed. >> > >The question is: since cut can be implemented IN awk, why should it get >a separate C binary? Anyone nattering about performance in a shell >script is barking up the wrong tree. Give this[0] a read and see what you think. [0] http://awk.freeshell.org/RangeOfFields
Re: [dev] [st] scrollback function
googling 'st scrollback' reveals: http://lists.suckless.org/dev/1101/6681.html On 03:10 Mon 20 Feb, Nuno Pires wrote: >Hi, > >I'm having a hard time finding a way to scrollback on st. > >Can someone point me in the right direction? > >Thanks
Re: [dev] New hardware migration
On 22:44 Thu 08 Sep, Moritz Wilhelmy wrote: >On Sun, Aug 28, 2011 at 15:14:33 +0200, hiro wrote: >> Yeah, has not been completely rewritten for at least two weeks now and >> is thus obviously stale. > >All these threads on the ML about people who don't even get wmii to >start are actually quite funny :-) >I'm not actually reading them though, and I'd prefer a separate wmii >mailing list, so I wouldn't have to delete them by hand... >I'm serious here, try counting the wmii issues and the dwm issues on >this list, and let the numbers speak. > I created a mail filter matching on To:, Cc: or Subject: to mark them as read. It works surprisingly well.
Re: [dev] [dwm] scrot -s fails
On 20:22 Fri 19 Aug, Bastien Dejean wrote: >Hi, > >The following command don't work (i.e. I can't select the region of the >screen I'm willing to capture) when it's spawn from dwm: > >static const char *partialshotcmd[] = { "scrot", "-s", NULL }; > >Any idea why? ...which is part of the imagemagick package.
Re: [dev] [dwm] scrot -s fails
On 20:22 Fri 19 Aug, Bastien Dejean wrote: >Hi, > >The following command don't work (i.e. I can't select the region of the >screen I'm willing to capture) when it's spawn from dwm: > >static const char *partialshotcmd[] = { "scrot", "-s", NULL }; > >Any idea why? An IRC discussion on Jul 03, 2011 suggested to use 'import'. -steve
Re: [dev] [st] 0.1 Feedback - Was: A few small patches
On 19:59 Sun 03 Apr, ilf wrote: >3. I really like urxvt(1)s urlLauncher functionality. Copy+Pasting >URLs is a PITA, especially on laptops without a middle mouse button >for pasting. What do you all think about it? This is getting off-topic; if you like urlLauncher I suggest looking at the url-select[1] and keyboard-select[1] plugins. -steve [1] https://github.com/muennich/urxvt-perls
Re: [dev] How do you cope with OSX? (if at all)
On 13:07 Fri 18 Mar, Anselm R Garbe wrote: >On 18 March 2011 13:02, Enno Boland (Gottox) wrote: >> I'm using MacPorts and XQuartz to run dwm on my air. It works ok, but >> in the longterm I want to replace macos by linux. > >In my impression running Linux natively on Mac hardware sucks -- tried >it on the MacBook Pro, but seems that Linux freezes every 2 hours due >to overheating the hardware. I've run Arch on a bunch of mac mini's with no problems specific to the mac hardware. -steve
Re: [dev] Tiling windowmanager workflow (Was: [dvtm] Fibonacci layout patch)
On 13:56 Tue 01 Jun, Moritz Wilhelmy wrote: >> On Tue, Jun 01, 2010 at 01:27:07PM +0200, Mate Nagy wrote: >> > Using the vim splits may be cheating, but it sure is convenient. >> sorry for self-reply: I thought that maybe for maximum punishment, the >> fibonacci layout could support nmaster. (Also note that this is a >> 2560x1600 setup, that's why so much division (and nmaster) makes sense.) > >Ah, guess it's just my 1280x1024 screen then :) >Actually tiling doesn't even make much sense on it, when I went with monocle on >the netbook I grew used to it and use it everywhere now. >Anyone else interested in sharing their way how they use their System? It seems >like an interesting topic. I use a laptop (1200x800) at home and my work computer (1920x1200). I use dwm-5.2 with the gridmode patch. The gridmode patch allows me to use equal sized windows. I use five tags. On my work computer: main - two terms named term1 term - two terms named term2 www - two browsers ooo - one term named term4 and gnumeric mail - two terms named mail (mutt and weechat) On my laptop: main - one term named term1 term - one term named term2 www - one browser ooo - nothing. I only use gnumeric for work mail - one term On my work computer I use tag main and pull in what is needed. I found pressing mod4+1, mod4+ctrl+2 to be annoying. I first used xmodmap to switch mod4 and mod1. This allows me to press the keys on either side of the spacebar with my thumb. Second, I used yiyus suggestion from awhile back[1] on how to pull in two tags with one key (ie mod4+q could switch to tag1 and tag2). Here is his code from my config.h: #define WORKSPACE(KEY,TAG) \ { MODKEY, KEY, view, {.ui = TAG} }, . . . WORKSPACE( XK_q, 1 << 0 | 1 << 1) WORKSPACE( XK_w, 1 << 0 | 1 << 2) WORKSPACE( XK_e, 1 << 1 | 1 << 2) I use q,w,e,r,t to combine main+term, main+www, term+www, ooo+www and main+mail. On my laptop I have the option of using mod4+q,w,e,r,t or mod4+,1,2,3,4,5. -steve [1] http://lists.suckless.org/dwm/0808/6573.html
Re: [dev] Re: [dwm] can't toggle tags with mouse
while xsetroot -name "$(setxkbmap -print | awk -F"+" '/xkb_symbols/ {print $2}' | $(date +"%a, %b %d %Y | %H:%M")"; do sleep 2s done -steve On 15:42 Thu 27 May, pascal wrote: >Le Thu, 27 May 2010 15:25:32 +0200 >orsch...@googlemail.com a écrit: > >> Hello Andreas, >> >> your solution is almost working. The only thing that doesn't fit is >> the length of the output. de/pl should only by two letters but in the >> output there are a plenty of blanks before. I assume this happens >> because the eight digits were substituted by only two letters? >> >> Better understanding: >> >> xxde where 'x' stands for a blank >> >> Could that be corrected to use not so much space in the bar? >> >> 2010/5/27 Andreas Amann : >> > On Thu, May 27, 2010 at 12:49:59PM +0200, orsch...@googlemail.com wrote: >> >> Thanks for the hint Andreas. xset -q shows a difference between both >> >> values. I tried to implement it into my statusbar but as I'm not >> >> familiar with bash scripting it doesn't work. This is my trial: >> >> >> >> #set statusbar >> >> while true >> >> do >> >> #define keyboard layout >> >> if [ "$(xset -q | grep "LED mask:" | awk '{ print $10 }')" == >> >> "" ] ; then >> >> kb = "de" >> >> else >> >> kb = "pl" >> >> fi >> >> if acpi -a | grep off-line > /dev/null; then >> >> xsetroot -name "Bat. $( acpi -b | awk '{ print $4 " " $5 }' | >> >> tr -d ',' ) | Vol. $(amixer get Master | tail -1 | awk '{ print $5}' | >> >> tr -d '[]') | $kb | $(date +"%a, %b %d %R")" >> >> else >> >> xsetroot -name "Vol. $(amixer get Master | tail -1 | awk '{ >> >> print $5}' | tr -d '[]') | $kb | $(date +"%a, %b %d %R")" >> >> fi >> >> sleep 1s >> >> done & >> >> >> >> Could you help me out please? >> > >> > The following works for me: >> > while xsetroot -name "$(xset -q|sed -ne "2 s/^.*/uk/ p; 2 >> > s/^*/de/ p") | $(date +"%a, %b %d %Y | %H:%M")" >> > do >> > sleep 2s >> > done & >> > >> > Andreas >> > >> > >> >> > >You can use this : >while xsetroot -name "$(setxkbmap -print | grep xkb_symbols | awk >'{print $4}' | awk -F"+" '{print $2}') | $(date +"%a, %b %d %Y | %H:%M")" >do sleep 2s >done & > > > >
Re: [dev] skvm bug and question
On 02:12 Fri 12 Feb, stateless wrote: >Hi, > >Try to pull the tip. > *snicker*
Re: [dev] Suckless mail client solution?
On 20:17 Thu 15 Oct, pancake wrote: > Anselm R Garbe wrote: >> following (n)mh in this respect, though I'd really appreciate having >> some kind of mail dir pager, perhaps the relevant parts ripped from >> mutt or written from scratch. I always found that the threading >> display in mutt is excellent and I'd really think the basic mail >> lister + previewer as an addition tool in the mh tool chain for >> listing mails and threads would be nice, it's the only feature I'd >> really miss and the only feature with a crappy curses dependency in >> the toolchain ;) >> >> > I have always hated the threaded views..Well that's not true at all, > few years ago I used to use them a lot, and yeah, mutt owns the best > threading view (compared to thunderbird, claws..) > > But actually I dont find them useful or practical because they hide the > timeline of the mailbox by strange trees of mails. > > What I would really find useful is a decent filtering system , but always > keeping the timeline, which is in mail one of the most important things. -- snip -- In mutt one can press 'o' and 'd' to sort by date and 'o' 't' to sort by thread. One can supply defaults with hooks -- eg: folder-hook inbox "set sort=date" folder-hook dwm "set sort=threads" -steve
Re: [dev] Alternative for tabbing in web-browsers?
On 17:11 Wed 07 Oct, Szabolcs Nagy wrote: >On 10/7/09, Илья Илембитов wrote: >> A suggestion was made to revisit a bookmarking system. I was thinking about >> it and here is my suggestion: what if basically do not just bookmark pages? > >imho the main issue is the ease of use (ie adding/retrieving/removing >links easily), downloading the entire site or just keeping a link is a >secondary question > >adding links to a list can be made easy (eg a single middle click), >but recalling which url meant what is not that easy (with tabs the >list is already visible, with favicons and title +one can remember the >position of a link in the list) > >> 1. one page opened, all others stored to disk > >yes, but the question is how do you manage those links >they will have obscure name, no context or tags vimperator handles this with 'buffers'. Pressing 'b' gives a list like: 1: BashGuide - Greg's Wiki # http://mywiki.wooledge.org/BashGuide 2: UsingFind - Greg's Wiki # http://mywiki.wooledge.org/UsingFind#Searching_based_on_times 3: Arch Linux Forums / Post your .vimrc # http://bbs.archlinux.org/viewtopic.php?id=62748 4: dotfiles/.vimrc - rsontech.net # http://rsontech.net/dotfiles/.vimrc 5: Google Calendar # http://www.google.com/calendar/render?hl=en&tab=wc 6: dotfiles/.fonts.conf - rsontech.net # http://rsontech.net/dotfiles/.fonts.conf 7: create group vim color - Google Search # http://www.google.ca/search?ie=utf-8&oe=utf-8&aq=t&rls=org.mozilla:en-US:official&client=firefox-a&as_qdr=y&q=create%20group%20vim%20color Minus the favicons, could be accomplished with dmenu?
Re: [dev] dwm default bindings
I also bind dwm keys and others to MOD4 and then use xmodmap to swap it with the Alt key. I rarely use the Alt key and find using the key on either side of the space bar easily accessible with my thumbs. -steve On 10:33 Wed 22 Jul, Niki Yoshiuchi wrote: >Personally I use the windows key as my modifier, which I think makes the >most sense. However there are keyboards out there that don't have a windows >key so I don't know if it would be a good idea to use that as the default. > >On Wed, Jul 22, 2009 at 10:30 AM, Donald Allen wrote: > >> I think the default key bindings for dwm are a unfortunate in some >> cases. For example, alt-f, a natural choice for *f*loat mode, >> conflicts with pulling down the File menu in many applications from >> the keyboard. alt-T similarly conflicts with using the Tools menu in >> Firefox from the keyboard. >> >> I realize that these bindings can be changed. But that requires some >> work (and knowledge of C) on the part of the user. I'm talking about >> the choice of the defaults. Perhaps the keys modified by alt should >> instead be modified by ctrl-alt by default? And similarly, alt-shift >> -> ctrl-alt-shift? I am going to test this idea by modifying my setup. >> I'll let you know how it works out. >> >> /Don >> >>