From 71aef1f0b75f8030160b9b98a7dd5cea17a528cd Mon Sep 17 00:00:00 2001 From: tv Date: Mon, 4 Apr 2022 15:19:19 +0200 Subject: tv xmonad: move my* to Build This prevents Main from getting rebuilt due to TH whenever one of its imported modules changes. --- tv/5pkgs/haskell/xmonad-tv/src/main.hs | 17 +---------------- 1 file changed, 1 insertion(+), 16 deletions(-) (limited to 'tv/5pkgs/haskell/xmonad-tv/src/main.hs') diff --git a/tv/5pkgs/haskell/xmonad-tv/src/main.hs b/tv/5pkgs/haskell/xmonad-tv/src/main.hs index 81373f4..b82f398 100644 --- a/tv/5pkgs/haskell/xmonad-tv/src/main.hs +++ b/tv/5pkgs/haskell/xmonad-tv/src/main.hs @@ -1,6 +1,4 @@ {-# LANGUAGE LambdaCase #-} -{-# LANGUAGE TemplateHaskell #-} -{-# LANGUAGE TypeApplications #-} module Main (main) where @@ -35,22 +33,9 @@ import XMonad.Actions.PerWorkspaceKeys (chooseAction) import XMonad.Stockholm.Pager import XMonad.Stockholm.Shutdown -import THEnv.JSON (getCompileEnvJSONExp) -myFont :: String -myFont = "-schumacher-*-*-*-*-*-*-*-*-*-*-*-iso10646-*" - -myScreenWidth :: Dimension -myScreenWidth = - $(getCompileEnvJSONExp (id @Dimension) "XMONAD_BUILD_SCREEN_WIDTH") - -myTermFontWidth :: Dimension -myTermFontWidth = - $(getCompileEnvJSONExp (id @Dimension) "XMONAD_BUILD_TERM_FONT_WIDTH") - -myTermPadding :: Dimension -myTermPadding = 2 +import Build (myFont, myScreenWidth, myTermFontWidth, myTermPadding) main :: IO () -- cgit v1.2.3 From a55064d787e0f1bca999b23e23fff2393e8c6858 Mon Sep 17 00:00:00 2001 From: tv Date: Mon, 5 Dec 2022 16:25:33 +0100 Subject: tv: deprecated xmonad-stockholm --- tv/5pkgs/haskell/xmonad-tv/src/main.hs | 27 +-------------------------- 1 file changed, 1 insertion(+), 26 deletions(-) (limited to 'tv/5pkgs/haskell/xmonad-tv/src/main.hs') diff --git a/tv/5pkgs/haskell/xmonad-tv/src/main.hs b/tv/5pkgs/haskell/xmonad-tv/src/main.hs index b82f398..d346bfd 100644 --- a/tv/5pkgs/haskell/xmonad-tv/src/main.hs +++ b/tv/5pkgs/haskell/xmonad-tv/src/main.hs @@ -30,10 +30,7 @@ import Data.Ratio import XMonad.Hooks.Place (placeHook, smart) import XMonad.Actions.PerWorkspaceKeys (chooseAction) -import XMonad.Stockholm.Pager -import XMonad.Stockholm.Shutdown - - +import Shutdown (shutdown, newShutdownEventHandler) import Build (myFont, myScreenWidth, myTermFontWidth, myTermPadding) @@ -139,8 +136,6 @@ myKeys conf = Map.fromList $ , ((_4 , xK_x ), chooseAction spawnTermAt) , ((_4C , xK_x ), spawnRootTerm) - , ((0 , xK_Menu ), gets windowset >>= allWorkspaceNames >>= pager pagerConfig (windows . W.view) ) - , ((_S , xK_Menu ), gets windowset >>= allWorkspaceNames >>= pager pagerConfig (windows . W.shift) ) , ((_C , xK_Menu ), toggleWS) , ((_4 , xK_space ), withFocused $ \w -> ifM (isFloatingX w) xdeny $ sendMessage NextLayout) @@ -218,23 +213,3 @@ xdeny = , "-e", "sleep", "0.05" ] Nothing - - -pagerConfig :: PagerConfig -pagerConfig = def - { pc_font = myFont - , pc_cellwidth = 64 - , pc_matchmethod = MatchPrefix - , pc_windowColors = windowColors - } - where - windowColors _ _ _ True _ = ("#ef4242","#ff2323") - windowColors wsf m c u wf = do - let y = defaultWindowColors wsf m c u wf - if m == False && wf == True - then ("#402020", snd y) - else y - - -allWorkspaceNames :: W.StackSet i l a sid sd -> X [i] -allWorkspaceNames = return . map W.tag . W.workspaces -- cgit v1.2.3 From be9274b6c2b213c376bf9f0efeefb6275d0224fd Mon Sep 17 00:00:00 2001 From: tv Date: Fri, 9 Dec 2022 04:42:09 +0100 Subject: =?UTF-8?q?tv:=20XMONAD=5FSPAWN=5FWORKSPACE=20=E2=86=92=20=5FCURRE?= =?UTF-8?q?NT=5FDESKTOP=5FNAME?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- tv/5pkgs/haskell/xmonad-tv/src/main.hs | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) (limited to 'tv/5pkgs/haskell/xmonad-tv/src/main.hs') diff --git a/tv/5pkgs/haskell/xmonad-tv/src/main.hs b/tv/5pkgs/haskell/xmonad-tv/src/main.hs index d346bfd..c921d42 100644 --- a/tv/5pkgs/haskell/xmonad-tv/src/main.hs +++ b/tv/5pkgs/haskell/xmonad-tv/src/main.hs @@ -118,13 +118,6 @@ spawnRootTerm = Nothing -spawnTermAt :: String -> X () -spawnTermAt ws = do - env <- io getEnvironment - let env' = ("XMONAD_SPAWN_WORKSPACE", ws) : env - forkFile {-pkg:rxvt_unicode-}"urxvtc" [] (Just env') - - myKeys :: XConfig Layout -> Map (KeyMask, KeySym) (X ()) myKeys conf = Map.fromList $ [ ((_4 , xK_Escape ), forkFile {-pkg-}"slock" [] Nothing) @@ -133,7 +126,7 @@ myKeys conf = Map.fromList $ , ((_4 , xK_o ), forkFile {-pkg:fzmenu-}"otpmenu" [] Nothing) , ((_4 , xK_p ), forkFile {-pkg:fzmenu-}"passmenu" [] Nothing) - , ((_4 , xK_x ), chooseAction spawnTermAt) + , ((_4 , xK_x ), forkFile {-pkg:rxvt_unicode-}"urxvtc" [] Nothing) , ((_4C , xK_x ), spawnRootTerm) , ((_C , xK_Menu ), toggleWS) -- cgit v1.2.3