Browse Source

xmonad: tweak note window display; avoid workspace swapping

Using `moveTo Prev HiddenWS` and `moveTo Next HiddenWS` instead of `prevWS`
/ `nextWS` gets rid of a behavior where cycling workspaces with the arrow
keys will cause workspaces to swap between screens, which has always been
slightly confusing.  If a workspace is already displaying, I'm probably
not looking for it.
master
Brennen Bearnes 2 years ago
parent
commit
0d84e4d1b8
1 changed files with 11 additions and 4 deletions
  1. +11
    -4
      home/.xmonad/xmonad.hs

+ 11
- 4
home/.xmonad/xmonad.hs View File

@ -89,7 +89,7 @@ scratchpads =
-- this goes: start-x, start-y, width (1.0 is full screen), height:
(customFloating $ W.RationalRect 0.0 0.0 1.0 0.5)
, NS "notes" "gnome-terminal --role=notesession -e notesession" (role =? "notesession")
(customFloating $ W.RationalRect 0.3 0.0 0.7 0.95)
(customFloating $ W.RationalRect 0.2 0.03 0.6 0.90)
] where role = stringProperty "WM_WINDOW_ROLE"
myTabConfig = def
@ -156,6 +156,8 @@ main = do
-- https://stackoverflow.com/questions/21218309/how-to-use-dzen-instead-of-xmobar-in-this-unusual-setup#21445159
myBar = "xmobar"
myPP = xmobarPP { ppCurrent = xmobarColor "green" "" . wrap "@" "" . shorten 50 }
-- mod-b to toggle xmobar visibility:
toggleStrutsKey XConfig { XMonad.modMask = modMask } = (modMask, xK_b)
defaults = def {
@ -169,11 +171,9 @@ defaults = def {
, handleEventHook = XMonad.Hooks.EwmhDesktops.fullscreenEventHook
} `additionalKeysP`
-- http://xmonad.org/xmonad-docs/xmonad-contrib/XMonad-Util-EZConfig.html
[ ("M-<Right>", nextWS)
[ ("M-p", spawn myLauncher)
-- , ("M-s", scratchpadSpawnActionTerminal $ myTerminal)
, ("M-p", spawn myLauncher)
, ("M-S-l", spawn myLockScreen)
, ("M-<Left>", prevWS)
, ("M-S-<Down>", shiftToNext)
, ("M-S-<Up>", shiftToPrev)
, ("M-S-<Right>", shiftNextScreen)
@ -182,6 +182,13 @@ defaults = def {
, ("M-g", goToSelected def)
, ("M-S-g", spawn "jump-to-window")
-- The following could use just nextWS / prevWS, but I got tired of
-- workspaces swapping between displays when I cycled through with
-- arrow keys; this version avoids that entirely.
-- Move to the next/prev workspaces not already visible on a screen:
, ("M-<Left>", moveTo Prev HiddenWS)
, ("M-<Right>", moveTo Next HiddenWS)
-- Invert screen colors using https://github.com/zoltanp/xrandr-invert-colors
-- can be helpful for legibility in really bright or dark environments:
, ("M-i", spawn "xrandr-invert-colors")


Loading…
Cancel
Save