
in my .xmonad/xmonad.hs , I have: ++ [((m .|. mod4Mask, key), screenWorkspace sc >>= flip whenJust (windows . f)) | (key, sc) <- zip [xK_a, xK_f] [0..] , (f, m) <- [(W.view, 0)]] ++ [((m .|. mod4Mask, key), screenWorkspace sc >>= flip whenJust (windows . f)) | (key, sc) <- zip [xK_s, xK_d] [0..] , (f, m) <- [(W.shift, 0)]] now, instead of this, I'd perfer to have something where xK_f alternates between workspace 0 & 1 I'd also like to make xK_d to send current window to other workspace (this requires that I somehow know what my current workspace is -- is there a function to return this?)

Do be more specific, I'm trying to read off the current: "ScreenId"
On Mon, Feb 16, 2009 at 4:45 PM, lowly coder
in my .xmonad/xmonad.hs , I have:
++
[((m .|. mod4Mask, key), screenWorkspace sc >>= flip whenJust (windows . f)) | (key, sc) <- zip [xK_a, xK_f] [0..] , (f, m) <- [(W.view, 0)]]
++
[((m .|. mod4Mask, key), screenWorkspace sc >>= flip whenJust (windows . f)) | (key, sc) <- zip [xK_s, xK_d] [0..] , (f, m) <- [(W.shift, 0)]]
now, instead of this, I'd perfer to have something where
xK_f alternates between workspace 0 & 1 I'd also like to make xK_d to send current window to other workspace
(this requires that I somehow know what my current workspace is -- is there a function to return this?)

In continuing to find how to get the current "ScreenId", I see that in
Core.hs, we have:
data XState =
XState
{ windowset :: !WindowSet -- ^ workspace list
and ...
type WindowSet = StackSet WorkspaceId (Layout Window) Window ScreenId
ScreenDetail
So the question is ... 1, can I grab the windowset var? and if so, how do I
read the ScreenId off from it
On Mon, Feb 16, 2009 at 4:59 PM, lowly coder
Do be more specific, I'm trying to read off the current: "ScreenId"
On Mon, Feb 16, 2009 at 4:45 PM, lowly coder
wrote:
in my .xmonad/xmonad.hs , I have:
++
[((m .|. mod4Mask, key), screenWorkspace sc >>= flip whenJust (windows . f)) | (key, sc) <- zip [xK_a, xK_f] [0..] , (f, m) <- [(W.view, 0)]]
++
[((m .|. mod4Mask, key), screenWorkspace sc >>= flip whenJust (windows . f)) | (key, sc) <- zip [xK_s, xK_d] [0..] , (f, m) <- [(W.shift, 0)]]
now, instead of this, I'd perfer to have something where
xK_f alternates between workspace 0 & 1 I'd also like to make xK_d to send current window to other workspace
(this requires that I somehow know what my current workspace is -- is there a function to return this?)

okay, I have most of this figured out:
shiftWindow =
do
XState { windowset = old } <-
get
let currentWorkspace = W.screen $ W.current $
old
screenWorkspace (1 - currentWorkspace) >>= flip whenJust (windows .
W.shift)
however, when I look at the source code for windows ... it apepars it only
works for W.current -- what if I want to modify a windowStack on a workspace
that's not the current one? is that possible to do?
On Mon, Feb 16, 2009 at 5:05 PM, lowly coder
In continuing to find how to get the current "ScreenId", I see that in Core.hs, we have:
data XState = XState { windowset :: !WindowSet -- ^ workspace list
and ...
type WindowSet = StackSet WorkspaceId (Layout Window) Window ScreenId ScreenDetail
So the question is ... 1, can I grab the windowset var? and if so, how do I read the ScreenId off from it
On Mon, Feb 16, 2009 at 4:59 PM, lowly coder
wrote:
Do be more specific, I'm trying to read off the current: "ScreenId"
On Mon, Feb 16, 2009 at 4:45 PM, lowly coder < lowlycoder@huoyanjinjing.com> wrote:
in my .xmonad/xmonad.hs , I have:
++
[((m .|. mod4Mask, key), screenWorkspace sc >>= flip whenJust (windows . f)) | (key, sc) <- zip [xK_a, xK_f] [0..] , (f, m) <- [(W.view, 0)]]
++
[((m .|. mod4Mask, key), screenWorkspace sc >>= flip whenJust (windows . f)) | (key, sc) <- zip [xK_s, xK_d] [0..] , (f, m) <- [(W.shift, 0)]]
now, instead of this, I'd perfer to have something where
xK_f alternates between workspace 0 & 1 I'd also like to make xK_d to send current window to other workspace
(this requires that I somehow know what my current workspace is -- is there a function to return this?)

Excerpts from lowly coder's message of Mon Feb 16 20:18:11 -0700 2009:
okay, I have most of this figured out:
shiftWindow = ....
Looks like you're looking for something like: withOtherScr fn = do -- squashed left for email tag <- withWindowSet $ screenWorkspace . (1 -) . W.screen . W.current W.current flip whenJust (windows . fn) tag and bind to: -- more keys where modm = mod4Mask , ((modm, xK_f), withOtherScr W.view) , ((modm, xK_d), withOtherScr W.shift) -- wmw
participants (2)
-
lowly coder
-
Wirt Wolff