From ddcc8c65e30a9ca3b56e25466e749cb100b28510 Mon Sep 17 00:00:00 2001 From: Gregor Kleen Date: Sat, 22 Oct 2022 19:33:45 +0200 Subject: ... --- accounts/gkleen@sif/xmonad/xmonad.hs | 51 ++++++++++++++++++------------------ 1 file changed, 25 insertions(+), 26 deletions(-) (limited to 'accounts/gkleen@sif/xmonad') diff --git a/accounts/gkleen@sif/xmonad/xmonad.hs b/accounts/gkleen@sif/xmonad/xmonad.hs index 830bb2dd..3dc017a9 100644 --- a/accounts/gkleen@sif/xmonad/xmonad.hs +++ b/accounts/gkleen@sif/xmonad/xmonad.hs @@ -340,7 +340,7 @@ hostFromName h , NS "toggl" "toggldesktop" (className =? "Toggl Desktop") centerFloat , NS "calendar" "minetime -- --force-device-scale-factor=1.6" (className =? "MineTime") centerFloat , NS "emacs" "emacsclient -c -F \"'(title . \\\"Scratchpad\\\")\"" (className =? "Emacs" <&&> title =? "Scratchpad") centerFloat - -- , NS "music" "google-play-music-desktop-player --force-device-scale-factor=1.6" (className =? "Google Play Music Desktop Player") centerFloat + , NS "music" "ytmdesktop" (className =? "youtube-music-desktop-app") centerFloat ] centerFloat = customFloating $ RationalRect (1 % 16) (1 % 16) (7 % 8) (7 % 8) centerFloatSmall = customFloating $ RationalRect (1 % 4) (1 % 4) (1 % 2) (1 % 2) @@ -414,10 +414,10 @@ hostFromName h (first : rest) = filter (not . null) $ lines result notification = Notify.summary first <> Notify.body (unlines rest) <> Notify.timeout Infinite <> Notify.urgency Normal <> Notify.appName "dc" void $ Notify.display notification - synergyCompl = mkComplFunFromList' xPConfigMonospace ["mathw86"] + synergyCompl = mkComplFunFromList' xPConfigMonospace ["mathw86"] synergyStart host = safeSpawn "systemctl" ["--user", "start", "synergy-rtunnel@" ++ host ++ ".service"] synergyStop host = safeSpawn "systemctl" ["--user", "stop", "synergy-rtunnel@" ++ host ++ ".service"] - + hostFromName _ = defaultHost -- muteRef :: IORef (Maybe (String, Notification)) @@ -530,13 +530,13 @@ main = do -- We canĀ“t define per-host layout modifiers because we lack dependent types layout' = onHost "skadhi" ( onWorkspace (wsp 1) (Full ||| withIM (1%5) (Title "Buddy List") tabbedLayout') $ onWorkspace (wsp 10) Full $ - onWorkspace (wsp 2) (Full ||| tabbedLayout') $ + onWorkspace (wsp 2) (Full ||| tabbedLayout') $ onWorkspace (wsp 5) tabbedLayout' $ onWorkspace (wsp 8) (withIM (1%5) (Title "Friends") tabbedLayout') $ defaultLayouts ) $ onHost "vali" ( onWorkspace (wsp 2) (Full ||| tabbedLayout' ||| combineTwo (TwoPane 0.01 0.57) Full tabbedLayout') $ - onWorkspace (wsp 3) workLayouts $ + onWorkspace (wsp 3) workLayouts $ defaultLayouts ) $ onHost "hel" ( onWorkspace (wsp 1) (withIM (1 % 8) (Title "Buddy List") $ trackFloating tabbedLayout') $ @@ -565,7 +565,7 @@ main = do tabbedLayoutHoriz' = tabbedLayoutHoriz tabbedLeftAlways defaultLayouts = {- spiralWithDir East CW (1 % 2) -} Dwindle R CW 1 (5 % 100) ||| tabbedLayout' ||| Full -- workLayouts = {- spiralWithDir East CW (1 % 2) -} Dwindle R CW (2 % 1) (5 % 100) ||| tabbedLayout' ||| Full - workLayouts = tabbedLayout' ||| (renamed [Replace "Combined"] $ combineTwoP (TwoPane (1 % 100) (1891 % 2560)) tabbedLayout''' (Column 1.6) (ClassName "Postman" `Or` ClassName "Emacs" `Or` ClassName "jetbrains-idea-ce" `Or` (Resource "Devtools" `And` ClassName "Firefox"))) ||| Full ||| Dwindle R CW 1 (5 % 100) + workLayouts = tabbedLayout' ||| (renamed [Replace "Combined"] $ combineTwoP (TwoPane (1 % 100) (1891 % 2560)) tabbedLayout''' (Column 1.6) (ClassName "Postman" `Or` ClassName "Emacs" `Or` ClassName "jetbrains-idea-ce" `Or` (Resource "Devtools" `And` ClassName "Firefox"))) ||| Full ||| Dwindle R CW 1 (5 % 100) sqrtTwo = approxRational (sqrt 2) (1 / 2560) xmobarPP' = xmobarPP { ppTitle = shorten 80 , ppSort = (liftM2 (.)) getSortByIndex $ return scratchpadFilterOutWorkspace @@ -607,7 +607,7 @@ main = do | otherwise = return () handle _ = return () handle shutdown $ launch myConfig =<< getDirectories - + secs :: Int -> Int secs = (* 1000000) @@ -651,7 +651,7 @@ isDisabled :: String -> X Bool isDisabled str = do out <- runProcessWithInput "xinput" ["list", str] "" return $ "disabled" `isInfixOf` out - + spawnKeychain :: X () spawnKeychain = do @@ -790,7 +790,7 @@ myKeys' conf host = Map.fromList $ -- launch a terminal [ ((modm, xK_Return), spawn $ (XMonad.terminal conf) ++ " -e tmux") , ((modm .|. shiftMask, xK_Return), spawn $ XMonad.terminal conf) - + -- launch dmenu --, ((modm, xK_d ), spawn "exe=`dmenu_path | dmenu` && eval \"exec $exe\"") , ((modm, xK_d ), shellPrompt "Run: " xPConfigMonospace) @@ -800,31 +800,31 @@ myKeys' conf host = Map.fromList $ -- close focused window , ((modm .|. shiftMask, xK_q ), kill) , ((modm .|. controlMask .|. shiftMask, xK_q ), spawn "xkill") - + -- Rotate through the available layout algorithms , ((modm, xK_space ), sendMessage NextLayout) - + -- Reset the layouts on the current workspace to default , ((modm .|. controlMask, xK_r ), (setLayout $ XMonad.layoutHook conf) >> refresh) - + -- Resize viewed windows to the correct size , ((modm, xK_r ), refresh) -- Move focus to the next window , ((modm, xK_t ), windows W.focusDown) - + -- Move focus to the previous window , ((modm, xK_n ), windows W.focusUp ) - + -- Move focus to the master window , ((modm, xK_m ), windows W.focusMaster ) - + -- Swap the focused window and the master window , ((modm .|. shiftMask, xK_m ), windows W.swapMaster) - + -- Swap the focused window with the next window , ((modm .|. shiftMask, xK_t ), windows W.swapDown ) - + -- Swap the focused window with the previous window , ((modm .|. shiftMask, xK_n ), windows W.swapUp ) @@ -845,18 +845,18 @@ myKeys' conf host = Map.fromList $ -- , ((modm .|. controlMask, xK_Down ), withFocused $ keysMoveWindow (0, 10)) -- Shrink the master area , ((modm, xK_h ), sendMessage Shrink) - + -- Expand the master area , ((modm, xK_s ), sendMessage Expand) - + -- Push window back into tiling , ((modm .|. shiftMask, xK_space ), withFocused $ windows . W.sink) , ((modm, xK_BackSpace), focusUrgent) , ((modm .|. shiftMask, xK_BackSpace), clearUrgents) - + -- Increment the number of windows in the master area , ((modm , xK_comma ), sendMessage (IncMasterN 1)) - + -- Deincrement the number of windows in the master area , ((modm , xK_period), sendMessage (IncMasterN (-1))) @@ -875,7 +875,7 @@ myKeys' conf host = Map.fromList $ , ((modm , xK_Escape), cycleKbLayout (hKbLayouts host)) , ((modm .|. controlMask, xK_Escape), safeSpawn "setxkbmap" $ fst (head $ hKbLayouts host) : maybeToList (snd . head $ hKbLayouts host)) - + -- Toggle the status bar gap -- Use this binding with avoidStruts from Hooks.ManageDocks. -- See also the statusBar function from Hooks.DynamicLog. @@ -883,10 +883,10 @@ myKeys' conf host = Map.fromList $ , ((modm , xK_b ), sendMessage ToggleStruts) , ((modm .|. shiftMask, xK_p ), safeSpawn "playerctl" ["-a", "pause"]) - + -- Quit xmonad , ((modm .|. shiftMask, xK_e ), io (exitWith ExitSuccess)) - + -- Restart xmonad -- , ((modm .|. shiftMask .|. controlMask, xK_r ), void . xfork $ recompile False >>= flip when (safeSpawn "xmonad" ["--restart"])) , ((modm .|. shiftMask, xK_r ), void . liftIO $ executeFile "xmonad" True [] Nothing) @@ -902,7 +902,7 @@ myKeys' conf host = Map.fromList $ , ((modm , xK_g ), windowPrompt xPConfig Bring allWindows) ] ++ - + -- -- mod-[1..9], Switch to workspace N -- @@ -924,4 +924,3 @@ myKeys' conf host = Map.fromList $ modm = XMonad.modMask conf brCycle = [0, 1 % 100, 1 % 10, 1 % 4, 1 % 2, 3 % 4, 1] - -- cgit v1.2.3