mirror of
https://codeberg.org/leana8959/.files.git
synced 2025-12-06 06:39:14 +00:00
Compare commits
No commits in common. "06c9fe9f1e1c600f3a5a8fa1d92dee67d5953145" and "5f1cea7f2544da57c5e7cae886f6a064e1c2beab" have entirely different histories.
06c9fe9f1e
...
5f1cea7f25
2 changed files with 19 additions and 33 deletions
|
|
@ -1,3 +1,4 @@
|
||||||
|
{-# LANGUAGE NamedFieldPuns #-}
|
||||||
{-# LANGUAGE FlexibleInstances, MultiParamTypeClasses #-}
|
{-# LANGUAGE FlexibleInstances, MultiParamTypeClasses #-}
|
||||||
|
|
||||||
module XMonad.Layout.ResizableTile.FixDescription
|
module XMonad.Layout.ResizableTile.FixDescription
|
||||||
|
|
@ -14,10 +15,12 @@ newtype RTFixDescription a = RTFixDescription { unwrapRT :: ResizableTall a }
|
||||||
instance LayoutClass RTFixDescription a where
|
instance LayoutClass RTFixDescription a where
|
||||||
runLayout (W.Workspace t l s) =
|
runLayout (W.Workspace t l s) =
|
||||||
let ws' = W.Workspace t (unwrapRT 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) =
|
handleMessage (RTFixDescription l) m =
|
||||||
(fmap . fmap) RTFixDescription . handleMessage l
|
fmap (fmap RTFixDescription)
|
||||||
|
$ handleMessage l m
|
||||||
|
|
||||||
description (RTFixDescription l) =
|
description (RTFixDescription l) =
|
||||||
description l <> " " <> show (_nmaster l)
|
description l <> " " <> show (_nmaster l)
|
||||||
|
|
|
||||||
|
|
@ -1,7 +1,6 @@
|
||||||
{-# LANGUAGE NegativeLiterals #-}
|
{-# LANGUAGE NegativeLiterals #-}
|
||||||
|
|
||||||
import XMonad
|
import XMonad
|
||||||
import XMonad.Actions.CopyWindow
|
|
||||||
import XMonad.Actions.Submap
|
import XMonad.Actions.Submap
|
||||||
import XMonad.Actions.SwapWorkspaces
|
import XMonad.Actions.SwapWorkspaces
|
||||||
import XMonad.Hooks.DynamicLog
|
import XMonad.Hooks.DynamicLog
|
||||||
|
|
@ -88,21 +87,8 @@ isFirefox = className =? "firefox"
|
||||||
isSpotify :: Query Bool
|
isSpotify :: Query Bool
|
||||||
isSpotify = isFirefox <&&> title ~? "Spotify"
|
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 :: Query Bool
|
||||||
isFirefoxPip = isFirefox <&&> title =? "Incrustation vidéo"
|
isFirefoxPip = isFirefox <&&> title =? "Picture-in-Picture"
|
||||||
|
|
||||||
isFeh :: Query Bool
|
isFeh :: Query Bool
|
||||||
isFeh = className =? "feh"
|
isFeh = className =? "feh"
|
||||||
|
|
@ -125,7 +111,6 @@ myActivateHook =
|
||||||
composeOne
|
composeOne
|
||||||
[ isDiscord -?> mempty
|
[ isDiscord -?> mempty
|
||||||
, isEvolution -?> mempty
|
, isEvolution -?> mempty
|
||||||
, isSignal -?> mempty
|
|
||||||
, isSioyek -?> mempty
|
, isSioyek -?> mempty
|
||||||
, isFeh -?> mempty
|
, isFeh -?> mempty
|
||||||
, return True -?> doFocus
|
, return True -?> doFocus
|
||||||
|
|
@ -133,15 +118,16 @@ myActivateHook =
|
||||||
|
|
||||||
myManageHook :: ManageHook
|
myManageHook :: ManageHook
|
||||||
myManageHook =
|
myManageHook =
|
||||||
composeOne
|
composeAll
|
||||||
[ isNautilusPreviewer -?> customFloating centeredFloat
|
[ isNautilusPreviewer --> customFloating centeredFloat
|
||||||
, isFeh -?> doF copyToAll <> customFloating buttomRightFloat
|
, isFeh --> customFloating buttomRightFloat
|
||||||
, isMinder -?> customFloating centeredFloat
|
, isMinder --> customFloating centeredFloat
|
||||||
, isFirefoxPip -?> doF copyToAll <> customFloating buttomRightFloat
|
, isFirefoxPip --> doFloat
|
||||||
, isDiscord -?> doShift chatWS
|
, isDiscord --> (doF $ W.shift chatWS)
|
||||||
, isEvolution -?> doShift chatWS
|
, isEvolution --> (doF $ W.shift chatWS)
|
||||||
, isSignal -?> doShift chatWS
|
]
|
||||||
, isFirefox -?> insertPosition Master Newer
|
<> composeOne
|
||||||
|
[ isFirefox -?> insertPosition Master Newer
|
||||||
, isKitty -?> insertPosition Below Newer
|
, isKitty -?> insertPosition Below Newer
|
||||||
, isNautilus <||> isSioyek -?> insertPosition End Older
|
, isNautilus <||> isSioyek -?> insertPosition End Older
|
||||||
]
|
]
|
||||||
|
|
@ -151,11 +137,8 @@ myEventHandleHook :: Event -> X All
|
||||||
myEventHandleHook =
|
myEventHandleHook =
|
||||||
-- TODO: is there a way to always open certain sites in new windows in firefox?
|
-- TODO: is there a way to always open certain sites in new windows in firefox?
|
||||||
onTitleChange $ composeAll
|
onTitleChange $ composeAll
|
||||||
[ isSpotify --> doShiftAndViewIfMoved multimediaWS
|
[ isSpotify --> doShiftAndViewIfMoved multimediaWS
|
||||||
, isYouTube --> doShiftAndViewIfMoved multimediaWS
|
, isDiscord --> doShiftAndViewIfMoved chatWS
|
||||||
, isDiscord --> doShiftAndViewIfMoved chatWS
|
|
||||||
, isWhatsApp --> doShiftAndViewIfMoved chatWS
|
|
||||||
, isElement --> doShiftAndViewIfMoved chatWS
|
|
||||||
]
|
]
|
||||||
|
|
||||||
-- If the title changes in the background, we don't want to greedy view that workspace.
|
-- If the title changes in the background, we don't want to greedy view that workspace.
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue