Browse Source

Window transparency, new promote history, cycle history

master
Peter J. Jones 3 months ago
parent
commit
9416eb9919
Signed by: Peter Jones <pjones@devalot.com> GPG Key ID: 9DAFAA8D01941E49
3 changed files with 33 additions and 4 deletions
  1. 5
    3
      src/XMonad/Local/Keys.hs
  2. 26
    1
      src/XMonad/Local/Log.hs
  3. 2
    0
      xmonadrc.hs

+ 5
- 3
src/XMonad/Local/Keys.hs View File

@@ -26,12 +26,14 @@ import qualified XMonad.StackSet as W
-- Package: xmonad-contrib.
import XMonad.Actions.CopyWindow (kill1)
import XMonad.Actions.CycleSelectedLayouts (cycleThroughLayouts)
import XMonad.Actions.CycleWorkspaceByScreen (cycleWorkspaceOnCurrentScreen)
import XMonad.Actions.DynamicProjects (switchProjectPrompt, lookupProject, switchProject)
import XMonad.Actions.GroupNavigation (Direction (..), nextMatch)
import XMonad.Actions.Navigation2D
import XMonad.Actions.PhysicalScreens (onNextNeighbour, onPrevNeighbour)
import XMonad.Actions.Promote (promote)
import XMonad.Actions.RotSlaves (rotSlavesUp, rotSlavesDown)
import XMonad.Actions.SwapPromote (swapHybrid)
import XMonad.Actions.TagWindows (addTag, delTag, withTagged)
import XMonad.Actions.UpdatePointer (updatePointer)
import XMonad.Hooks.ManageDocks (ToggleStruts(..))
@@ -53,7 +55,7 @@ import XMonad.Local.Layout (selectLayoutByName)
import XMonad.Local.Music (radioPrompt)
import qualified XMonad.Local.Prompt as Local
import XMonad.Local.Tagging
import XMonad.Local.Workspaces (asKey, viewPrevWS, scratchPads)
import XMonad.Local.Workspaces (asKey, scratchPads)

--------------------------------------------------------------------------------
-- Join all the key maps into a single list and send it through @mkKeymap@.
@@ -119,7 +121,7 @@ windowKeys _ =
, ("M-M1-k", windowSwap U False)
, ("M-<U>", rotSlavesUp)
, ("M-<D>", rotSlavesDown)
, ("M-m", promote) -- Promote current window to master.
, ("M-m", whenX (swapHybrid False) promote) -- Promote current window to master.

-- Resizing Windows:
, ("M-C-h", sendMessage Shrink)
@@ -177,7 +179,7 @@ windowTagKeys _ =
-- Keys for manipulating workspaces.
workspaceKeys :: XConfig Layout -> [(String, X ())]
workspaceKeys _ =
[ ("M-'", viewPrevWS)
[ ("M-'", cycleWorkspaceOnCurrentScreen [xK_Super_L] xK_apostrophe xK_semicolon)
, ("M-<Space>", switchProjectPrompt Local.promptConfig)
, ("M-f", lookupProject "agenda" >>= maybe (return ()) switchProject)
, ("M-g", lookupProject "browsers" >>= maybe (return ()) switchProject)

+ 26
- 1
src/XMonad/Local/Log.hs View File

@@ -13,8 +13,33 @@ module XMonad.Local.Log (logHook) where
--------------------------------------------------------------------------------
import XMonad hiding (logHook)
import XMonad.Actions.GroupNavigation (historyHook)
import XMonad.Actions.SwapPromote (masterHistoryHook)
import XMonad.Hooks.WorkspaceHistory (workspaceHistoryHook)

import XMonad.Hooks.FadeWindows
( FadeHook
, fadeWindowsLogHook
, transparency
, opaque
, isUnfocused
, isFloating
)

--------------------------------------------------------------------------------
-- | XMonad @logHook@.
logHook :: X ()
logHook = historyHook
logHook =
historyHook <>
workspaceHistoryHook <>
masterHistoryHook <>
fadeWindowsLogHook fadeHook

--------------------------------------------------------------------------------
-- | Control the opacity of windows. The list is processed from the
-- bottom up.
fadeHook :: FadeHook
fadeHook = composeAll
[ opaque
, isUnfocused --> transparency 0.3
, isFloating --> transparency 0.0
]

+ 2
- 0
xmonadrc.hs View File

@@ -19,6 +19,7 @@ import XMonad.Config.Desktop (desktopConfig)
import XMonad.Hooks.ManageDocks (avoidStruts)
import XMonad.Hooks.UrgencyHook hiding (urgencyConfig)
import XMonad.Util.NamedScratchpad (namedScratchpadManageHook)
import XMonad.Hooks.FadeWindows (fadeWindowsEventHook)

--------------------------------------------------------------------------------
import qualified XMonad.Local.Action as Local
@@ -41,6 +42,7 @@ config = desktopConfig
Local.manageHook

, handleEventHook = handleEventHook desktopConfig <>
fadeWindowsEventHook <>
Local.handleEventHook

, logHook = logHook desktopConfig <>

Loading…
Cancel
Save