diff --git a/lib/Projects.hs b/lib/Projects.hs index eb3885c..999a9d8 100644 --- a/lib/Projects.hs +++ b/lib/Projects.hs @@ -23,29 +23,36 @@ singleTermAppWithName name app = Project -- safeSpawn "nvidia-offload" ["alacritty","-e","tmux","new","-A","-s",name] -- } -singleAppWithName :: String -> String -> Project -singleAppWithName name app = Project +singleAppWithName' :: String -> String -> [String] -> Project +singleAppWithName' name app args = Project { projectName = name , projectDirectory = "/tmp" - , projectStartHook = Just $ do spawn app + , projectStartHook = Just $ do safeSpawn app args } +singleAppWithName :: String -> String -> Project +singleAppWithName name app = singleAppWithName' name app [] + singleApp :: String -> Project singleApp app = singleAppWithName app app +singleJackApp :: String -> Project +singleJackApp app = singleAppWithName' app "pw-jack" [app] + projects :: [Project] projects = - [ singleApp "carla" + [ singleApp "m8c" , singleApp "obs" - , singleApp "reaper" - , singleApp "m8c" - , singleApp "renoise" , singleApp "steam" + , singleJackApp "carla" + , singleJackApp "reaper" + , singleJackApp "renoise" , singleAppWithName "Books" "calibre" , singleAppWithName "discord" "Discord" , singleAppWithName "element" "element-desktop" , singleAppWithName "signal" "signal-desktop" - , singleAppWithName "vcv" "Rack" + , singleAppWithName "youtube" "chromium" + , singleAppWithName' "vcv" "pw-jack" ["Rack"] , singleTermAppWithName "email" "neomutt" , Project { projectName = "admin" , projectDirectory = "~/admin/nixos-config" diff --git a/lib/Scratchpad.hs b/lib/Scratchpad.hs index bdaaf1d..70d80c9 100644 --- a/lib/Scratchpad.hs +++ b/lib/Scratchpad.hs @@ -12,7 +12,7 @@ import qualified XMonad.StackSet as W modify :: XConfig l -> XConfig l modify conf = conf - { manageHook = namedScratchpadManageHook pads + { manageHook = manageHook conf <> namedScratchpadManageHook pads } pads = diff --git a/xmonad.hs b/xmonad.hs index 66ef284..c165204 100755 --- a/xmonad.hs +++ b/xmonad.hs @@ -29,24 +29,26 @@ import Scratchpad (modify) layouts = toggleLayouts fullscreen tiled where smallBorder = SS.Border 5 5 5 5 - fullscreen = (noBorders Full) - tiled = smarts $ resizableTall ||| (Mirror resizableTall) - smarts = (spacingRaw True smallBorder True smallBorder True) . smartBorders + fullscreen = noBorders Full + tiled = smarts $ resizableTall ||| Mirror resizableTall + smarts = spacingRaw True smallBorder True smallBorder True . smartBorders resizableTall = ResizableTall 1 (5/100) (1/2) [] -- Use the `xprop' tool to get the info you need for these matches. -- For className, use the second value that xprop gives you. -------------- Here be the law of windows -myManageHook = composeOne - [ className =? "Pavucontrol" -?> doShift "music" - , className =? "Steam" -?> doShift "steam" - , className =? "Renoise" -?> hasBorder False - , className =? "REAPER" -?> hasBorder False - , className =? "Pinentry" -?> doCenterFloat - , isDialog -?> doCenterFloat +myManageHook = composeAll + [ className =? "Patchage" --> doShift "sound" + , className =? "Pavucontrol" --> doShift "music" + , className =? "Pinentry" --> doCenterFloat + , className =? "REAPER" --> hasBorder False + , className =? "Renoise" --> hasBorder False + , className =? "Steam" --> doShift "steam" + , className =? "csgo_linux64" --> doShift "steam" + , isDialog --> doCenterFloat -- Move transient windows to their parent: - , transience + , transience' ] ------------ build the full config