From b297ef80d8132b3fb4b166e56f81e41a06aaee69 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?L=C3=A9ana=20=E6=B1=9F?= Date: Mon, 15 Sep 2025 12:24:45 +0800 Subject: [PATCH] xmonad: add magnifier --- .../vanadium/home/xmonad/xmonad.hs | 17 ++++++++++------- 1 file changed, 10 insertions(+), 7 deletions(-) diff --git a/nix/configurations/vanadium/home/xmonad/xmonad.hs b/nix/configurations/vanadium/home/xmonad/xmonad.hs index 334bb214..1e1a16e3 100644 --- a/nix/configurations/vanadium/home/xmonad/xmonad.hs +++ b/nix/configurations/vanadium/home/xmonad/xmonad.hs @@ -22,11 +22,12 @@ 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 Data.Monoid (Endo(Endo)) -import Graphics.X11.ExtraTypes.XF86 +import Data.Monoid import System.Posix +import Graphics.X11.ExtraTypes.XF86 import Leanamonad.Layouts.ReflectMsg import Leanamonad.GreekChar @@ -91,12 +92,13 @@ main = putEnv "MOZ_USE_XINPUT2=1" -- Force touchpad for firefox , layoutHook = - let tallr = reflectMsg . reflectHoriz + let tallr = named "Normal" + $ smartSpacingWithEdge 5 + $ reflectMsg . reflectHoriz $ ResizableTall 1 (1/10) (3/7) [] - in avoidStruts - $ smartBorders - $ named "Normal" (smartSpacingWithEdge 5 tallr) - ||| Full + mag = magnifyxy 1.05 1.3 (NoMaster 4) True tallr + in avoidStruts . smartBorders $ + mag ||| Full , manageHook = let @@ -184,6 +186,7 @@ main = , ((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)