Skip to content

Commit

Permalink
xmonad: Add keybinding for copying window to workspace N
Browse files Browse the repository at this point in the history
  • Loading branch information
ssh0 committed Feb 7, 2017
1 parent 8f63e39 commit 33269cd
Show file tree
Hide file tree
Showing 3 changed files with 21 additions and 27 deletions.
16 changes: 7 additions & 9 deletions xmonad/S10e/xmonad.hs
Original file line number Diff line number Diff line change
Expand Up @@ -188,18 +188,16 @@ main = do
]

-------------------------------------------------------------------- }}}
-- Keymap: moving workspace by number {{{
-- Keymap: Manage workspace {{{
------------------------------------------------------------------------
-- mod-[1..9] Switch to workspace N
-- mod-shift-[1..9] Move window to workspace N
-- mod-control-[1..9] Copy window to workspace N

`additionalKeys`
[ ((modm .|. m, k), windows $ f i)
| (i, k) <- zip myWorkspaces
[ xK_exclam, xK_at, xK_numbersign
, xK_dollar, xK_percent, xK_asciicircum
, xK_ampersand, xK_asterisk, xK_parenleft
, xK_parenright
]
, (f, m) <- [(W.greedyView, 0), (W.shift, shiftMask)]
[ ((m .|. modm, k), windows $ f i)
| (i, k) <- zip myWorkspaces [xK_1 ..]
, (f, m) <- [(W.greedyView, 0), (W.shift, shiftMask), (copy, controlMask)]
]

-------------------------------------------------------------------- }}}
Expand Down
16 changes: 7 additions & 9 deletions xmonad/T540p/xmonad.hs
Original file line number Diff line number Diff line change
Expand Up @@ -192,18 +192,16 @@ main = do
]

-------------------------------------------------------------------- }}}
-- Keymap: moving workspace by number {{{
-- Keymap: Manage workspace {{{
------------------------------------------------------------------------
-- mod-[1..9] Switch to workspace N
-- mod-shift-[1..9] Move window to workspace N
-- mod-control-[1..9] Copy window to workspace N

`additionalKeys`
[ ((modm .|. m, k), windows $ f i)
| (i, k) <- zip myWorkspaces
[ xK_exclam, xK_at, xK_numbersign
, xK_dollar, xK_percent, xK_asciicircum
, xK_ampersand, xK_asterisk, xK_parenleft
, xK_parenright
]
, (f, m) <- [(W.greedyView, 0), (W.shift, shiftMask)]
[ ((m .|. modm, k), windows $ f i)
| (i, k) <- zip myWorkspaces [xK_1 ..]
, (f, m) <- [(W.greedyView, 0), (W.shift, shiftMask), (copy, controlMask)]
]

-------------------------------------------------------------------- }}}
Expand Down
16 changes: 7 additions & 9 deletions xmonad/xmonad.hs
Original file line number Diff line number Diff line change
Expand Up @@ -192,18 +192,16 @@ main = do
]

-------------------------------------------------------------------- }}}
-- Keymap: moving workspace by number {{{
-- Keymap: Manage workspace {{{
------------------------------------------------------------------------
-- mod-[1..9] Switch to workspace N
-- mod-shift-[1..9] Move window to workspace N
-- mod-control-[1..9] Copy window to workspace N

`additionalKeys`
[ ((modm .|. m, k), windows $ f i)
| (i, k) <- zip myWorkspaces
[ xK_exclam, xK_at, xK_numbersign
, xK_dollar, xK_percent, xK_asciicircum
, xK_ampersand, xK_asterisk, xK_parenleft
, xK_parenright
]
, (f, m) <- [(W.greedyView, 0), (W.shift, shiftMask)]
[ ((m .|. modm, k), windows $ f i)
| (i, k) <- zip myWorkspaces [xK_1 ..]
, (f, m) <- [(W.greedyView, 0), (W.shift, shiftMask), (copy, controlMask)]
]

-------------------------------------------------------------------- }}}
Expand Down

0 comments on commit 33269cd

Please sign in to comment.