[prev in list] [next in list] [prev in thread] [next in thread] 

List:       xmonad
Subject:    Re: [xmonad] How to prefix workspace names with numbers?
From:       Hans Chen <hanswchen () gmail ! com>
Date:       2012-10-10 0:01:41
Message-ID: CAFfzviCRUf0CPPozypGJJ49Yc+XdTc2kUHr1vrxADedqt2UfsA () mail ! gmail ! com
[Download RAW message or body]

[Attachment #2 (multipart/alternative)]


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 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 = defaultXPConfig
    { autoComplete        = Just 0
    , showCompletionOnTab = True
    }

myXPConfigNew = defaultXPConfig
    { autoComplete        = Nothing
    , showCompletionOnTab = 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ópez 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 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

[Attachment #5 (text/html)]

On Tue, Oct 9, 2012 at 1:43 PM, Jacek Generowicz <span dir="ltr">&lt;<a \
href="mailto:jacek.generowicz@cern.ch" \
target="_blank">jacek.generowicz@cern.ch</a>&gt;</span> wrote:<br><blockquote \
class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc \
solid;padding-left:1ex">

<br>
OK, I&#39;ll have a go. I won&#39;t paste my whole config file, as that could<br>
well overwhelm you with irrelevant nonsense (and I&#39;m embarassed about<br>
how much of a mess some of it is :-).</blockquote><br>Wow, thanks for the \
comprehensive explanation! I actually figured it out myself, but your config looks \
very interesting and I&#39;ll certainly see what more I can learn from it.<br>

<br>Here&#39;s what I did:<br>1. Define two custom prompts:<br><br><div \
style="margin-left:40px"><span style="font-family:courier \
new,monospace">myXPConfigSelect = defaultXPConfig</span><br \
style="font-family:courier new,monospace">

<span style="font-family:courier new,monospace">    { autoComplete        = Just \
0</span><br style="font-family:courier new,monospace"><span \
style="font-family:courier new,monospace">    , showCompletionOnTab = True</span><br \
style="font-family:courier new,monospace">

<span style="font-family:courier new,monospace">    }</span><br \
style="font-family:courier new,monospace"><br style="font-family:courier \
new,monospace"><span style="font-family:courier new,monospace">myXPConfigNew = \
defaultXPConfig</span><br style="font-family:courier new,monospace">

<span style="font-family:courier new,monospace">    { autoComplete        = \
Nothing</span><br style="font-family:courier new,monospace"><span \
style="font-family:courier new,monospace">    , showCompletionOnTab = True</span><br \
style="font-family:courier new,monospace">

<span style="font-family:courier new,monospace">    }</span><br></div>(I have some \
more settings but they aren&#39;t relevant here.)<br><br>2. Bind keys for switching \
and creating workspaces, in the latter case it doesn&#39;t autocomplete:<br>

<br><div style="margin-left:40px"><span style="font-family:courier \
new,monospace"></span><span style="font-family:courier new,monospace">-- Switch \
workspace<br></span><span style="font-family:courier new,monospace">, ((modm          \
, xK_h), selectWorkspace  myXPConfigSelect)<br>

-- Move window to workspace</span><br style="font-family:courier new,monospace"><span \
style="font-family:courier new,monospace">, ((modm .|. shiftMask, xK_h), \
withWorkspace myXPConfigSelect (windows . W.shift))</span><br \
style="font-family:courier new,monospace">

<span style="font-family:courier new,monospace">-- Create new workspace<br>, ((modm   \
, xK_n), selectWorkspace myXPConfigNew)<br>-- Move window to newly created \
workspace<br style="font-family:courier new,monospace">

</span><span style="font-family:courier new,monospace">, ((modm .|. shiftMask, xK_n), \
withWorkspace myXPConfigNew (windows . W.shift)</span><br></div><br>Works like a \
charm. I&#39;m still experimenting with which keys to use, but otherwise I&#39;m \
pretty satisfied with this.<br>

<br>On Wed, Oct 10, 2012 at 12:04 AM, Pablo Olmos de Aguilera C. <span \
dir="ltr">&lt;<a href="mailto:pablo@glatelier.org" \
target="_blank">pablo@glatelier.org</a>&gt;</span> wrote:<br><blockquote \
style="margin:0px 0px 0px 0.8ex;border-left:1px solid \
rgb(204,204,204);padding-left:1ex" class="gmail_quote">

<div class="im"><br>
</div>That&#39;s sounds great. I don&#39;t understand how (or where) in the \
screen<br> you can list all those workspaces without going crazy or memorizing<br>
everything. I tried to use DWS and every new workspace is added before<br>
the first one (which seems a bit odd to me) and after a while dzen was<br>
totally filled, so I couldn&#39;t keep track of \
everything.<br></blockquote><div><br>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: <a href="http://www.haskell.org/pipermail/xmonad/2012-July/012810.html">http://www.haskell.org/pipermail/xmonad/2012-July/012810.html</a><br>


<br>Ideally I would like to order all workspaces by when they were created.<br></div>








<br><div class="gmail_quote">On Wed, Oct 10, 2012 at 12:26 AM, Carlos López Camey \
<span dir="ltr">&lt;<a href="mailto:c.lopez@kmels.net" \
target="_blank">c.lopez@kmels.net</a>&gt;</span> wrote:<br><blockquote \
class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc \
solid;padding-left:1ex">

<br>FWIW, I would like a setup where I can use Actions.CycleWS functions<br>
without going through empty workspaces. This could be<br>
simulated with workspaces on the fly.<br></blockquote><div><br>And I would like \
Actions.CycleWS to ignore workspaces that are visible on other screen (to avoid \
switching those workspaces). Now I&#39;m going off topic, but does anyone know if \
it&#39;s possible with the <a name="v:toggleOrDoSkip" class="def">toggleOrDoSkip \
function?<br>

<br>About the original question about prefixing workspace names with numbers, I&#39;m \
happy with the prompt + autocomplete, so I don&#39;t really need an answer (unless \
it&#39;s easy to achieve).<br><br>Cheers,<br>Hans<br>

</a></div></div>



_______________________________________________
xmonad mailing list
xmonad@haskell.org
http://www.haskell.org/mailman/listinfo/xmonad


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic