[dev] Focusing on windows by name

2011-10-26 Thread Manolo Martínez
Dear all, In openbox I have a key bound to the following:"wmctrl -xa mutt || urxvt -name mutt -e mutt" The idea is not to have many instances of mutt lying around -- my key raises a "mutt" window if there is one, or launches it if there isn't. wmctrl does not speak to dwm, if I understand it corr

Re: [dev] Focusing on windows by name

2011-10-26 Thread Patrick Haller
On 2011-10-26 11:48, Manolo Martínez wrote: > > In openbox I have a key bound to the following:"wmctrl -xa mutt || > urxvt -name mutt -e mutt" xlsclients | grep -q mutt || urxvt -e mutt

Re: [dev] Focusing on windows by name

2011-10-26 Thread Manolo Martínez
On 10/26/11 at 05:51pm, Patrick Haller wrote: > > In openbox I have a key bound to the following:"wmctrl -xa mutt || > > urxvt -name mutt -e mutt" > > xlsclients | grep -q mutt || urxvt -e mutt > Thanks, Patrick, this does half of what I want: it launches mutt only if there is no previous mutt wi

Re: [dev] Focusing on windows by name

2011-10-26 Thread Bastien Dejean
Patrick Haller a écrit : > On 2011-10-26 11:48, Manolo Martínez wrote: > > > > In openbox I have a key bound to the following:"wmctrl -xa mutt || > > urxvt -name mutt -e mutt" > > xlsclients | grep -q mutt || urxvt -e mutt No, this is not equivalent because the following command: wmctrl -xa

Re: [dev] Focusing on windows by name

2011-10-26 Thread Manolo Martínez
On 10/26/11 at 05:51pm, Patrick Haller wrote: > > > > In openbox I have a key bound to the following:"wmctrl -xa mutt || > > urxvt -name mutt -e mutt" > > xlsclients | grep -q mutt || urxvt -e mutt > xdotool seems to work: "xdotool search "mutt" windowactivate | urxvt -e mutt" Manolo --

Re: [dev] [dwm] BadAtom error solved

2011-10-26 Thread Christoph Helma
On Tue, 25 Oct 2011 22:10:07 +0200, Anselm R Garbe wrote: > On 25 October 2011 13:08, wrote: > > Running the example code at the bottom of > > https://github.com/wedesoft/hornetseye-xorg results in the following > > error: > > > > X Error of failed request:  BadAtom (invalid Atom parameter) > >

Re: [dev] Focusing on windows by name

2011-10-26 Thread Manolo Martínez
On 10/26/11 at 12:32pm, Bastien Dejean wrote: > No, this is not equivalent because the following command: > > wmctrl -xa mutt > > activates the first client matching the given 'title'. > > You could rather do: > > #! /bin/sh > > wid=$(lsw -l | grep -m 1 "$@" | cut -d ' ' -f 1) > >

Re: [dev] Focusing on windows by name

2011-10-26 Thread Bastien Dejean
Manolo Martínez a écrit : > Is using xdotool's search option slower or otherwise > worse than this? I can't tell. > (btw, i'm not sure I know what lsw is) http://tools.suckless.org/lsw Greetings, -- Bastien

[dev] [dwm] ncol layout

2011-10-26 Thread Thomas Dahms
Hi list, with nmaster becoming mainstream (again), what was known as the nmaster-ncol patch can also be simplified a lot. Attached file provides a layout that arranges clients in columns in the master area. Maybe someone finds it useful. -- Thomas Dahms void ncol(Monitor *m) { unsigned int i, n

Re: [dev] Focusing on windows by name

2011-10-26 Thread Peter John Hartman
I do something similar: TMPFILE=/tmp/dwm-lastwindow xdotool getwindowfocus > $TMPFILE foo=$(xdotool search --class st) if [[ $foo != "" ]]; then xdotool windowactivate $foo else st -e tmux-start & fi -- sic dicit magister P University of Toronto / Fordham University Collins Hall

Re: [dev] List of tools for a CLI environment

2011-10-26 Thread Jimmy Tang
On 25 Oct 2011, at 16:48, Džen wrote: > On 25/10/2011 03:56, Evan Gates wrote: >> Really wish I had an undo send feature... >> (IFS=:; ls $PATH) > > couldn't do better. > just showed this to a friend of mine and he cooked this up ls ${PATH//:/ } Regards, Jimmy Tang -- Trinity Centre for Hi

Re: [dev] List of tools for a CLI environment

2011-10-26 Thread Troels Henriksen
Jimmy Tang writes: > On 25 Oct 2011, at 16:48, Džen wrote: > >> On 25/10/2011 03:56, Evan Gates wrote: >>> Really wish I had an undo send feature... >>> (IFS=:; ls $PATH) >> >> couldn't do better. >> > > just showed this to a friend of mine and he cooked this up > > ls ${PATH//:/ } That will f

Re: [dev] List of tools for a CLI environment

2011-10-26 Thread Kurt H Maier
On Wed, Oct 26, 2011 at 11:34 AM, Jimmy Tang wrote: > just showed this to a friend of mine and he cooked this up > > ls ${PATH//:/ } shit only works in bash -- # Kurt H Maier

Re: [dev] List of tools for a CLI environment

2011-10-26 Thread Džen
On 26/10/2011 18:12, Kurt H Maier wrote: shit only works in bash +99 Death to bashisms. -- Džen

Re: [dev] Focusing on windows by name

2011-10-26 Thread Rob
On 26 October 2011 14:51, Peter John Hartman wrote: > I do something similar: > > if [[ $foo != "" ]]; then [ -n "$foo" ] if you're going for POSIX.

Re: [dev] Focusing on windows by name

2011-10-26 Thread pancake
I think [ "$foo" ] will work too. No need for -n. But yeah. Bashisms did lot of brain damage On 26/10/2011, at 20:09, Rob wrote: > On 26 October 2011 14:51, Peter John Hartman > wrote: >> I do something similar: >> >> if [[ $foo != "" ]]; then > > [ -n "$foo" ] > > if you're going for POSI

Re: [dev] [dwm] BadAtom error solved

2011-10-26 Thread pod
> "CH" == Christoph Helma writes: CH> Thanks! Changing that line to CH> Atom wmProperty = XInternAtom(display->get(), "WM_HINTS", True); CH> seems to solve the problem. ... and almost certainly introduces an entirely different sort of problem. I don't think WM_HINTS an

[dev] Linux sucks!

2011-10-26 Thread Guilherme Lino
yo fund this.. it kind of old, but it rise some questions http://lunduke.com/?p=429 how do you feel about this? -- Guilherme Lino

Re: [dev] Linux sucks!

2011-10-26 Thread Pieter Praet
On Thu, 27 Oct 2011 01:04:42 +0100, Guilherme Lino wrote: > yo > > fund this.. it kind of old, but it rise some questions > You're absolutely right, it does raise some questions: So, not only did you take this guy's useless drivel seriously, but you actually thought the suckless community woul