diff --git a/.config/nvim/lazy-lock.json b/.config/nvim/lazy-lock.json index 3a97f25e..8d98d8f2 100644 --- a/.config/nvim/lazy-lock.json +++ b/.config/nvim/lazy-lock.json @@ -15,7 +15,7 @@ "lazy.nvim": { "branch": "main", "commit": "59334064f8604ca073791c25dcc5c9698865406e" }, "lazydev.nvim": { "branch": "main", "commit": "258d2a5ef4a3e3d6d9ba9da72c9725c53e9afcbd" }, "leap.nvim": { "branch": "main", "commit": "07304103f6bd923004fdef9262d9a4d7925fb70a" }, - "milou": { "branch": "haddock", "commit": "ae95eb2ebdbc4228931ceefa64f86b877213dc62" }, + "milou": { "branch": "haddock", "commit": "4b3ab4976ff53b029f73d039fea016520af813d6" }, "no-neck-pain.nvim": { "branch": "main", "commit": "ecc584150f5c8a2a82f2e1d43201df0f65c63d0e" }, "nvim-autopairs": { "branch": "master", "commit": "23320e75953ac82e559c610bec5a90d9c6dfa743" }, "nvim-cmp": { "branch": "main", "commit": "b5311ab3ed9c846b585c0c15b7559be131ec4be9" }, diff --git a/nix/configurations/vanadium/home/xmonad/leanamonad.cabal b/nix/configurations/vanadium/home/xmonad/leanamonad.cabal index de874f27..63d6b030 100644 --- a/nix/configurations/vanadium/home/xmonad/leanamonad.cabal +++ b/nix/configurations/vanadium/home/xmonad/leanamonad.cabal @@ -18,7 +18,7 @@ common common , xmonad-contrib , containers , X11 - default-language: Haskell2010 + default-language: GHC2021 library import: common diff --git a/nix/configurations/vanadium/home/xmonad/lib/Leanamonad/Layouts/ReflectMsg.hs b/nix/configurations/vanadium/home/xmonad/lib/Leanamonad/Layouts/ReflectMsg.hs index f86e4632..c8cbd263 100644 --- a/nix/configurations/vanadium/home/xmonad/lib/Leanamonad/Layouts/ReflectMsg.hs +++ b/nix/configurations/vanadium/home/xmonad/lib/Leanamonad/Layouts/ReflectMsg.hs @@ -1,5 +1,4 @@ -{-# LANGUAGE FlexibleInstances #-} -{-# LANGUAGE MultiParamTypeClasses #-} +{-# LANGUAGE NegativeLiterals #-} module Leanamonad.Layouts.ReflectMsg where diff --git a/nix/configurations/vanadium/home/xmonad/xmonad.hs b/nix/configurations/vanadium/home/xmonad/xmonad.hs index bff7021b..c60fb6d7 100644 --- a/nix/configurations/vanadium/home/xmonad/xmonad.hs +++ b/nix/configurations/vanadium/home/xmonad/xmonad.hs @@ -1,10 +1,12 @@ {-# LANGUAGE NegativeLiterals #-} +{-# LANGUAGE LambdaCase #-} import XMonad import XMonad.Actions.Submap import XMonad.Actions.SwapWorkspaces import XMonad.Hooks.DynamicLog import XMonad.Hooks.EwmhDesktops +import XMonad.Hooks.FadeWindows import XMonad.Hooks.InsertPosition import XMonad.Hooks.ManageDocks import XMonad.Hooks.ManageHelpers @@ -15,14 +17,14 @@ import XMonad.Layout.Reflect import XMonad.Layout.Renamed import XMonad.Layout.ResizableTile import XMonad.Layout.Spacing -import qualified XMonad.StackSet as W +import XMonad.StackSet qualified as W import XMonad.Util.EZConfig import XMonad.Util.Hacks import XMonad.Util.NamedScratchpad import XMonad.Util.SpawnOnce import XMonad.Layout.Magnifier -import qualified Data.Map.Strict as M +import Data.Map.Strict qualified as M import System.Posix import Graphics.X11.ExtraTypes.XF86 @@ -46,7 +48,32 @@ main = , terminal = myTerm , workspaces = myWorkspaces - , logHook = refocusLastLogHook + , logHook = + let + fadeHook = + composeOne + [ -- easier to paint over stuff + isFloating + <&&> isFocused + <&&> title ~? "Wplace" + -?> transparency 0.5 + + -- matches the second string of the WM_CLASS + , className `isOneOf` + [ "firefox" + , "Signal" + , "steam" + , "discord" + , "vlc" + ] + -?> opaque + + , isFloating -?> ifM isFocused (transparency 0.04) (transparency 0.08) + , isUnfocused -?> transparency 0.02 + ] + in + fadeWindowsLogHook fadeHook + <> refocusLastLogHook , startupHook = do spawnOnce "fcitx5 &" -- Input method @@ -137,22 +164,14 @@ main = -- Toggle fullscreen , ((superMask, xK_Escape), sendMessage NextLayout) - -- [I]nc of the main area - -- - -- This shouldn't be too easy anyway otherwise if I accidentally spam it, - -- I wouldn't know how big the main area is. - , ( (superMask, xK_i) - , submap $ M.fromList - [ ((0, xK_period), sendMessage $ IncMasterN 1) - , ((0, xK_comma ), sendMessage $ IncMasterN -1) - ] - ) - - , ((superMask , xK_comma ), sendMessage Shrink ) - , ((superMask , xK_period ), sendMessage Expand ) - , ((superMask .|. shiftMask, xK_comma ), sendMessage MirrorShrink ) - , ((superMask .|. shiftMask, xK_period ), sendMessage MirrorExpand ) - , ((superMask , xK_apostrophe), sendMessage Toggle{-Magnifier-}) + -- Resize windows + , ((superMask, xK_equal ), sendMessage $ IncMasterN 1) + , ((superMask, xK_minus ), sendMessage $ IncMasterN -1) + , ((superMask, xK_comma ), sendMessage Shrink ) + , ((superMask, xK_period ), sendMessage Expand ) + , ((superMask .|. shiftMask, xK_comma ), sendMessage MirrorShrink ) + , ((superMask .|. shiftMask, xK_period), sendMessage MirrorExpand ) + , ((superMask , xK_apostrophe), sendMessage Toggle ) -- [D]o sink and lift , ( (superMask, xK_d) @@ -248,6 +267,9 @@ xmobarConfig = statusBarProp "xmobar -x 0" (pure myPrettyPrinter) isOneOf :: Eq a => Query a -> [a] -> Query Bool isOneOf q = fmap or . traverse (q =?) +isFocused :: Query Bool +isFocused = fmap not isUnfocused + isFirefoxPIP :: Query Bool isFirefoxPIP = className =? "firefox" diff --git a/nix/configurations/vanadium/nixos/gui.nix b/nix/configurations/vanadium/nixos/gui.nix index 57153696..2bf33ca7 100644 --- a/nix/configurations/vanadium/nixos/gui.nix +++ b/nix/configurations/vanadium/nixos/gui.nix @@ -36,10 +36,8 @@ services.picom = { enable = true; - # avoid tearing + backend = "glx"; vSync = true; - - # buttery smooth fade = true; fadeDelta = 3; settings = { diff --git a/nix/configurations/vanadium/overlay.nix b/nix/configurations/vanadium/overlay.nix index 5e5c3279..7f973f21 100644 --- a/nix/configurations/vanadium/overlay.nix +++ b/nix/configurations/vanadium/overlay.nix @@ -62,20 +62,4 @@ in ./patches/fcitx5-chinese-addons/disable-fullwidth.patch # Note: disabling pinyin helper breaks canjie ]; - - # Security, Xorg vuln - # Backport has failed in upstream currently , - # might as well patch it while people are blogging about it - # Upstream talks about it here https://lists.x.org/archives/xorg-announce/2025-October/003635.html - xorg.xorgserver.__output.version = oldVersion: let - version = "21.1.20"; - in - if oldVersion == version - then throw "This patch has been merged upstream" - else version; - xorg.xorgserver.__output.src = _: - final.fetchurl { - url = "mirror://xorg/individual/xserver/xorg-server-21.1.20.tar.xz"; - sha256 = "sha256-dpW8YYJLOoG2utL3iwVADKAVAD3kAtGzIhFxBbcC6Tc="; - }; }