diff options
author | tv <tv@krebsco.de> | 2025-01-31 03:50:16 +0100 |
---|---|---|
committer | tv <tv@krebsco.de> | 2025-01-31 05:18:25 +0100 |
commit | cb39058136c9c7c9abbc929807863b08bf02bd06 (patch) | |
tree | 07d85504514e621610344bb4d2c11fb4b8cfb3e5 | |
parent | a208e44bf9a59c15125ca24a1535fd8de31d7392 (diff) |
xmonad: don't use fonts
-rw-r--r-- | pkgs/haskell/xmonad-tv/src/main.hs | 25 |
1 files changed, 8 insertions, 17 deletions
diff --git a/pkgs/haskell/xmonad-tv/src/main.hs b/pkgs/haskell/xmonad-tv/src/main.hs index 3bc9abe..834ea83 100644 --- a/pkgs/haskell/xmonad-tv/src/main.hs +++ b/pkgs/haskell/xmonad-tv/src/main.hs @@ -20,15 +20,13 @@ import XMonad.Extra (isFloatingX) import System.IO (hPutStrLn, stderr) import System.Environment (getArgs, getEnv, getEnvironment, lookupEnv) import System.Posix.Process (executeFile) -import XMonad.Actions.DynamicWorkspaces ( addWorkspacePrompt, renameWorkspace - , removeEmptyWorkspace) +import XMonad.Actions.DynamicWorkspaces (removeEmptyWorkspace) import XMonad.Actions.CycleWS (toggleWS) import XMonad.Layout.Gaps (Direction2D(U,R,D,L), gaps) import XMonad.Layout.NoBorders ( smartBorders ) import XMonad.Layout.ResizableTile (ResizableTall(ResizableTall)) import XMonad.Layout.ResizableTile (MirrorResize(MirrorExpand,MirrorShrink)) import XMonad.Layout.StateFull (pattern StateFull) -import qualified XMonad.Prompt import qualified XMonad.StackSet as W import Data.Map (Map) import qualified Data.Map as Map @@ -74,8 +72,7 @@ mainNoArgs :: IO () mainNoArgs = do myScreenGaps <- readEnv' [] "XMONAD_SCREEN_GAPS" :: IO [Int] myScreenWidth <- readEnv "XMONAD_SCREEN_WIDTH" :: IO Dimension - myTermFont <- getEnv "XMONAD_TERM_FONT" - myTermFontWidth <- readEnv "XMONAD_TERM_FONT_WIDTH" :: IO Dimension + myTermCellWidth <- readEnv "XMONAD_TERM_CELL_WIDTH" :: IO Dimension myTermPadding <- readEnv "XMONAD_TERM_PADDING" :: IO Dimension handleShutdownEvent <- newShutdownEventHandler config <- @@ -93,15 +90,15 @@ mainNoArgs = do { terminal = {-pkg:alacritty-tv-}"alacritty" , clientMask = clientMask def .|. focusChangeMask , modMask = mod4Mask - , keys = myKeys myTermFont + , keys = myKeys , layoutHook = refocusLastLayoutHook $ gaps (zip [U,R,D,L] myScreenGaps) $ smartBorders $ ResizableTall 1 - (fromIntegral (10 * myTermFontWidth) / fromIntegral myScreenWidth) - (fromIntegral (80 * myTermFontWidth + 2 * (myTermPadding + borderWidth def)) / fromIntegral myScreenWidth) + (fromIntegral (10 * myTermCellWidth) / fromIntegral myScreenWidth) + (fromIntegral (80 * myTermCellWidth + 2 * (myTermPadding + borderWidth def)) / fromIntegral myScreenWidth) [] ||| StateFull @@ -148,8 +145,8 @@ spawnRootTerm = Nothing -myKeys :: String -> XConfig Layout -> Map (KeyMask, KeySym) (X ()) -myKeys font conf = Map.fromList $ +myKeys :: XConfig Layout -> Map (KeyMask, KeySym) (X ()) +myKeys conf = Map.fromList $ [ ((_4 , xK_Escape ), forkFile {-pkg-}"slock" [] Nothing) , ((_4S , xK_c ), kill) @@ -185,8 +182,6 @@ myKeys font conf = Map.fromList $ , ((_4 , xK_comma ), sendMessage $ IncMasterN 1) , ((_4 , xK_period ), sendMessage $ IncMasterN (-1)) - , ((_4 , xK_a ), addWorkspacePrompt promptXPConfig) - , ((_4 , xK_r ), renameWorkspace promptXPConfig) , ((_4 , xK_Delete ), removeEmptyWorkspace) , ((_4 , xK_Return ), toggleWS) @@ -225,14 +220,10 @@ myKeys font conf = Map.fromList $ resetLayout = setLayout $ XMonad.layoutHook conf - promptXPConfig = - def { XMonad.Prompt.font = font } - xdeny = forkFile {-pkg-}"xterm" - [ "-fn", font - , "-geometry", "300x100" + [ "-geometry", "300x100" , "-name", "AlertFloat" , "-bg", "#E4002B" , "-e", "sleep", "0.05" |