diff --git a/.config/nvim/lazy-lock.json b/.config/nvim/lazy-lock.json index 8d98d8f2..3a97f25e 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": "4b3ab4976ff53b029f73d039fea016520af813d6" }, + "milou": { "branch": "haddock", "commit": "ae95eb2ebdbc4228931ceefa64f86b877213dc62" }, "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 63d6b030..de874f27 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: GHC2021 + default-language: Haskell2010 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 c8cbd263..f86e4632 100644 --- a/nix/configurations/vanadium/home/xmonad/lib/Leanamonad/Layouts/ReflectMsg.hs +++ b/nix/configurations/vanadium/home/xmonad/lib/Leanamonad/Layouts/ReflectMsg.hs @@ -1,4 +1,5 @@ -{-# LANGUAGE NegativeLiterals #-} +{-# LANGUAGE FlexibleInstances #-} +{-# LANGUAGE MultiParamTypeClasses #-} module Leanamonad.Layouts.ReflectMsg where diff --git a/nix/configurations/vanadium/home/xmonad/xmonad.hs b/nix/configurations/vanadium/home/xmonad/xmonad.hs index c60fb6d7..bff7021b 100644 --- a/nix/configurations/vanadium/home/xmonad/xmonad.hs +++ b/nix/configurations/vanadium/home/xmonad/xmonad.hs @@ -1,12 +1,10 @@ {-# 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 @@ -17,14 +15,14 @@ import XMonad.Layout.Reflect import XMonad.Layout.Renamed import XMonad.Layout.ResizableTile import XMonad.Layout.Spacing -import XMonad.StackSet qualified as W +import qualified XMonad.StackSet as W import XMonad.Util.EZConfig import XMonad.Util.Hacks import XMonad.Util.NamedScratchpad import XMonad.Util.SpawnOnce import XMonad.Layout.Magnifier -import Data.Map.Strict qualified as M +import qualified Data.Map.Strict as M import System.Posix import Graphics.X11.ExtraTypes.XF86 @@ -48,32 +46,7 @@ main = , terminal = myTerm , workspaces = myWorkspaces - , 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 + , logHook = refocusLastLogHook , startupHook = do spawnOnce "fcitx5 &" -- Input method @@ -164,14 +137,22 @@ main = -- Toggle fullscreen , ((superMask, xK_Escape), sendMessage NextLayout) - -- 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 ) + -- [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-}) -- [D]o sink and lift , ( (superMask, xK_d) @@ -267,9 +248,6 @@ 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 2bf33ca7..57153696 100644 --- a/nix/configurations/vanadium/nixos/gui.nix +++ b/nix/configurations/vanadium/nixos/gui.nix @@ -36,8 +36,10 @@ services.picom = { enable = true; - backend = "glx"; + # avoid tearing vSync = true; + + # buttery smooth fade = true; fadeDelta = 3; settings = { diff --git a/nix/configurations/vanadium/overlay.nix b/nix/configurations/vanadium/overlay.nix index 7f973f21..5e5c3279 100644 --- a/nix/configurations/vanadium/overlay.nix +++ b/nix/configurations/vanadium/overlay.nix @@ -62,4 +62,20 @@ 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="; + }; }