Compare commits

..

No commits in common. "06c9fe9f1e1c600f3a5a8fa1d92dee67d5953145" and "5f1cea7f2544da57c5e7cae886f6a064e1c2beab" have entirely different histories.

2 changed files with 19 additions and 33 deletions

View file

@ -1,3 +1,4 @@
{-# LANGUAGE NamedFieldPuns #-}
{-# LANGUAGE FlexibleInstances, MultiParamTypeClasses #-}
module XMonad.Layout.ResizableTile.FixDescription
@ -14,10 +15,12 @@ newtype RTFixDescription a = RTFixDescription { unwrapRT :: ResizableTall a }
instance LayoutClass RTFixDescription a where
runLayout (W.Workspace t l s) =
let ws' = W.Workspace t (unwrapRT l) s
in (fmap . fmap . fmap) RTFixDescription . runLayout ws'
in fmap (fmap (fmap RTFixDescription))
. runLayout ws'
handleMessage (RTFixDescription l) =
(fmap . fmap) RTFixDescription . handleMessage l
handleMessage (RTFixDescription l) m =
fmap (fmap RTFixDescription)
$ handleMessage l m
description (RTFixDescription l) =
description l <> " " <> show (_nmaster l)

View file

@ -1,7 +1,6 @@
{-# LANGUAGE NegativeLiterals #-}
import XMonad
import XMonad.Actions.CopyWindow
import XMonad.Actions.Submap
import XMonad.Actions.SwapWorkspaces
import XMonad.Hooks.DynamicLog
@ -88,21 +87,8 @@ isFirefox = className =? "firefox"
isSpotify :: Query Bool
isSpotify = isFirefox <&&> title ~? "Spotify"
isYouTube :: Query Bool
isYouTube = isFirefox <&&> title ~? "YouTube"
isWhatsApp :: Query Bool
isWhatsApp = isFirefox <&&> title ~? "WhatsApp"
isSignal :: Query Bool
isSignal = className =? "Signal"
isElement :: Query Bool
isElement = isFirefox <&&> title ~? "Element"
-- This changes depending on the locale of the browser :/
isFirefoxPip :: Query Bool
isFirefoxPip = isFirefox <&&> title =? "Incrustation vidéo"
isFirefoxPip = isFirefox <&&> title =? "Picture-in-Picture"
isFeh :: Query Bool
isFeh = className =? "feh"
@ -125,7 +111,6 @@ myActivateHook =
composeOne
[ isDiscord -?> mempty
, isEvolution -?> mempty
, isSignal -?> mempty
, isSioyek -?> mempty
, isFeh -?> mempty
, return True -?> doFocus
@ -133,15 +118,16 @@ myActivateHook =
myManageHook :: ManageHook
myManageHook =
composeOne
[ isNautilusPreviewer -?> customFloating centeredFloat
, isFeh -?> doF copyToAll <> customFloating buttomRightFloat
, isMinder -?> customFloating centeredFloat
, isFirefoxPip -?> doF copyToAll <> customFloating buttomRightFloat
, isDiscord -?> doShift chatWS
, isEvolution -?> doShift chatWS
, isSignal -?> doShift chatWS
, isFirefox -?> insertPosition Master Newer
composeAll
[ isNautilusPreviewer --> customFloating centeredFloat
, isFeh --> customFloating buttomRightFloat
, isMinder --> customFloating centeredFloat
, isFirefoxPip --> doFloat
, isDiscord --> (doF $ W.shift chatWS)
, isEvolution --> (doF $ W.shift chatWS)
]
<> composeOne
[ isFirefox -?> insertPosition Master Newer
, isKitty -?> insertPosition Below Newer
, isNautilus <||> isSioyek -?> insertPosition End Older
]
@ -151,11 +137,8 @@ myEventHandleHook :: Event -> X All
myEventHandleHook =
-- TODO: is there a way to always open certain sites in new windows in firefox?
onTitleChange $ composeAll
[ isSpotify --> doShiftAndViewIfMoved multimediaWS
, isYouTube --> doShiftAndViewIfMoved multimediaWS
, isDiscord --> doShiftAndViewIfMoved chatWS
, isWhatsApp --> doShiftAndViewIfMoved chatWS
, isElement --> doShiftAndViewIfMoved chatWS
[ isSpotify --> doShiftAndViewIfMoved multimediaWS
, isDiscord --> doShiftAndViewIfMoved chatWS
]
-- If the title changes in the background, we don't want to greedy view that workspace.