From xmonad Wed Oct 10 00:01:41 2012 From: Hans Chen Date: Wed, 10 Oct 2012 00:01:41 +0000 To: xmonad Subject: Re: [xmonad] How to prefix workspace names with numbers? Message-Id: X-MARC-Message: https://marc.info/?l=xmonad&m=134987001501627 MIME-Version: 1 Content-Type: multipart/mixed; boundary="--===============8022959211387410373==" --===============8022959211387410373== Content-Type: multipart/alternative; boundary=14dae9cfc73a0860c604cba92aaf --14dae9cfc73a0860c604cba92aaf Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable On Tue, Oct 9, 2012 at 1:43 PM, Jacek Generowicz wrote: > > OK, I'll have a go. I won't paste my whole config file, as that could > well overwhelm you with irrelevant nonsense (and I'm embarassed about > how much of a mess some of it is :-). Wow, thanks for the comprehensive explanation! I actually figured it out myself, but your config looks very interesting and I'll certainly see what more I can learn from it. Here's what I did: 1. Define two custom prompts: myXPConfigSelect =3D defaultXPConfig { autoComplete =3D Just 0 , showCompletionOnTab =3D True } myXPConfigNew =3D defaultXPConfig { autoComplete =3D Nothing , showCompletionOnTab =3D True } (I have some more settings but they aren't relevant here.) 2. Bind keys for switching and creating workspaces, in the latter case it doesn't autocomplete: -- Switch workspace , ((modm , xK_h), selectWorkspace myXPConfigSelect) -- Move window to workspace , ((modm .|. shiftMask, xK_h), withWorkspace myXPConfigSelect (windows . W.shift)) -- Create new workspace , ((modm , xK_n), selectWorkspace myXPConfigNew) -- Move window to newly created workspace , ((modm .|. shiftMask, xK_n), withWorkspace myXPConfigNew (windows . W.shift) Works like a charm. I'm still experimenting with which keys to use, but otherwise I'm pretty satisfied with this. On Wed, Oct 10, 2012 at 12:04 AM, Pablo Olmos de Aguilera C. < pablo@glatelier.org> wrote: > > That's sounds great. I don't understand how (or where) in the screen > you can list all those workspaces without going crazy or memorizing > everything. I tried to use DWS and every new workspace is added before > the first one (which seems a bit odd to me) and after a while dzen was > totally filled, so I couldn't keep track of everything. > I was also annoyed by how newly created workspaces would mess up the order with my configured ones. I found this patch that fixes it for me: http://www.haskell.org/pipermail/xmonad/2012-July/012810.html Ideally I would like to order all workspaces by when they were created. On Wed, Oct 10, 2012 at 12:26 AM, Carlos L=F3pez Camey w= rote: > > FWIW, I would like a setup where I can use Actions.CycleWS functions > without going through empty workspaces. This could be > simulated with workspaces on the fly. > And I would like Actions.CycleWS to ignore workspaces that are visible on other screen (to avoid switching those workspaces). Now I'm going off topic, but does anyone know if it's possible with the toggleOrDoSkip function? About the original question about prefixing workspace names with numbers, I'm happy with the prompt + autocomplete, so I don't really need an answer (unless it's easy to achieve). Cheers, Hans --14dae9cfc73a0860c604cba92aaf Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable On Tue, Oct 9, 2012 at 1:43 PM, Jacek Generowicz <jacek.generowicz@= cern.ch> wrote:

OK, I'll have a go. I won't paste my whole config file, as that cou= ld
well overwhelm you with irrelevant nonsense (and I'm embarassed about how much of a mess some of it is :-).

Wow, thanks for the c= omprehensive explanation! I actually figured it out myself, but your config= looks very interesting and I'll certainly see what more I can learn fr= om it.

Here's what I did:
1. Define two custom prompts:

m= yXPConfigSelect =3D defaultXPConfig
=A0=A0=A0 { autoComplete= =A0=A0=A0=A0=A0=A0=A0 =3D Just 0
=A0=A0=A0 , s= howCompletionOnTab =3D True
=A0=A0=A0 }

myXPConfigN= ew =3D defaultXPConfig
=A0=A0=A0 { autoComplete= =A0=A0=A0=A0=A0=A0=A0 =3D Nothing
=A0=A0=A0 , = showCompletionOnTab =3D True
=A0=A0=A0 }
(I have some more settings but they aren't relevant here.)

2.= Bind keys for switching and creating workspaces, in the latter case it doe= sn't autocomplete:

-- Swit= ch workspace
, = ((modm=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 , xK_h), selectWorkspace=A0 m= yXPConfigSelect)
-- Move window to workspace

, ((modm .|. shift= Mask, xK_h), withWorkspace myXPConfigSelect (windows . W.shift))
-- Create new workspace, ((modm=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 , xK_n), selectWorkspace = myXPConfigNew)
-- Move window to newly created workspace
, ((modm .|. shift= Mask, xK_n), withWorkspace myXPConfigNew (windows . W.shift)

Works like a charm. I'm still experimenting with which keys to us= e, but otherwise I'm pretty satisfied with this.

On Wed, Oct 10, 2012 at 12:04 AM, Pablo Olmos de Aguilera C. <pablo= @glatelier.org> wrote:

That's sounds great. I don't understand how (or where) in the= screen
you can list all those workspaces without going crazy or memorizing
everything. I tried to use DWS and every new workspace is added before
the first one (which seems a bit odd to me) and after a while dzen was
totally filled, so I couldn't keep track of everything.

I was also annoyed by how newly created workspaces would mess up = the order with my configured ones. I found this patch that fixes it for me:= = http://www.haskell.org/pipermail/xmonad/2012-July/012810.html

Ideally I would like to order all workspaces by when they were created.=

On Wed, Oct 10, 2012 at 12:26 AM, Carlos L= =F3pez Camey <c.lopez@kmels.net> wrote:

FWIW, I would like a setup where I can use Actions.CycleWS functions without going through empty workspaces. This could be
simulated with workspaces on the fly.

And I would = like Actions.CycleWS to ignore workspaces that are visible on other screen = (to avoid switching those workspaces). Now I'm going off topic, but doe= s anyone know if it's possible with the toggleOrDoSkip function?

About the original question about prefixing workspace names with number= s, I'm happy with the prompt + autocomplete, so I don't really need= an answer (unless it's easy to achieve).

Cheers,
Hans
--14dae9cfc73a0860c604cba92aaf-- --===============8022959211387410373== Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ xmonad mailing list xmonad@haskell.org http://www.haskell.org/mailman/listinfo/xmonad --===============8022959211387410373==--