Switch to previous workspace layout

Hello. Few months ago I became a incredibly happy user of the tiling window manager XMonad. Though I know only the very basics of Haskell, I managed to create a desirable configuration with the help of this posthttp://www.nepherte.be/step-by-step-configuration-of-xmonadand this perfectly documented config for Ubuntu https://github.com/davidbrewer/xmonad-ubuntu-conf. Yet I have a question on switching workspace layouts. I'd like the Mod + Shift + Space shortcut to switch to previous workspace instead of the first (default) one. In default config I found only: -- Rotate through the available layout algorithms , ((modm, xK_space ), sendMessage NextLayout) -- Reset the layouts on the current workspace to default , ((modm .|. shiftMask, xK_space ), setLayout $ XMonad.layoutHook conf) Also looking through XMonad.Layout I could find only NextLayout and FirstLayout messages. No PreviousLayout. Is there any straight forward way to implement that? Thank you. -- Sincerely, Ruslan Kiianchuk.

On Sat, Jan 18, 2014 at 9:20 PM, Ruslan Kiianchuk < ruslan.kiianchuk@gmail.com> wrote:
Hello.
Few months ago I became a incredibly happy user of the tiling window manager XMonad. Though I know only the very basics of Haskell, I managed to create a desirable configuration with the help of this posthttp://www.nepherte.be/step-by-step-configuration-of-xmonadand this perfectly documented config for Ubuntu https://github.com/davidbrewer/xmonad-ubuntu-conf.
Yet I have a question on switching workspace layouts. I'd like the Mod + Shift + Space shortcut to switch to previous workspace instead of the first (default) one. In default config I found only:
-- Rotate through the available layout algorithms , ((modm, xK_space ), sendMessage NextLayout)
-- Reset the layouts on the current workspace to default , ((modm .|. shiftMask, xK_space ), setLayout $ XMonad.layoutHook conf)
Also looking through XMonad.Layout I could find only NextLayout and FirstLayout messages. No PreviousLayout. Is there any straight forward way to implement that?
Thank you.
-- Sincerely, Ruslan Kiianchuk.
_______________________________________________ xmonad mailing list xmonad@haskell.org http://www.haskell.org/mailman/listinfo/xmonad
-- brandon s allbery kf8nh sine nomine associates allbery.b@gmail.com ballbery@sinenomine.net unix, openafs, kerberos, infrastructure, xmonad http://sinenomine.net

On Sat, Jan 18, 2014 at 9:20 PM, Ruslan Kiianchuk < ruslan.kiianchuk@gmail.com> wrote:
Yet I have a question on switching workspace layouts. I'd like the Mod + Shift + Space shortcut to switch to previous workspace instead of the first (default) one. In default config I found only:
-- Rotate through the available layout algorithms , ((modm, xK_space ), sendMessage NextLayout)
-- Reset the layouts on the current workspace to default , ((modm .|. shiftMask, xK_space ), setLayout $ XMonad.layoutHook conf)
Also looking through XMonad.Layout I could find only NextLayout and FirstLayout messages. No PreviousLayout. Is there any straight forward way to implement that?
The layoutHook is a function; a previous-layout mechanism would involve trying to run that function "backwards". There is unfortunately no way around this. -- brandon s allbery kf8nh sine nomine associates allbery.b@gmail.com ballbery@sinenomine.net unix, openafs, kerberos, infrastructure, xmonad http://sinenomine.net

Thanks for the info!
That is probably the only thing XMonad can't do :)
On Sat, Jan 18, 2014 at 6:41 PM, Brandon Allbery
On Sat, Jan 18, 2014 at 9:20 PM, Ruslan Kiianchuk < ruslan.kiianchuk@gmail.com> wrote:
Yet I have a question on switching workspace layouts. I'd like the Mod + Shift + Space shortcut to switch to previous workspace instead of the first (default) one. In default config I found only:
-- Rotate through the available layout algorithms , ((modm, xK_space ), sendMessage NextLayout)
-- Reset the layouts on the current workspace to default , ((modm .|. shiftMask, xK_space ), setLayout $ XMonad.layoutHook conf)
Also looking through XMonad.Layout I could find only NextLayout and FirstLayout messages. No PreviousLayout. Is there any straight forward way to implement that?
The layoutHook is a function; a previous-layout mechanism would involve trying to run that function "backwards". There is unfortunately no way around this.
-- brandon s allbery kf8nh sine nomine associates allbery.b@gmail.com ballbery@sinenomine.net unix, openafs, kerberos, infrastructure, xmonad http://sinenomine.net
-- Sincerely, Ruslan Kiianchuk.
participants (2)
-
Brandon Allbery
-
Ruslan Kiianchuk