Compare commits
2 Commits
0b7b647daa
...
4d947ab1a3
Author | SHA1 | Date |
---|---|---|
qvalentin | 4d947ab1a3 | |
qvalentin | a3ad5c5544 |
23
xmonad.hs
23
xmonad.hs
|
@ -61,7 +61,7 @@ import XMonad.Hooks.DynamicLog
|
|||
xmobarBorder,
|
||||
xmobarColor,
|
||||
xmobarRaw,
|
||||
xmobarStrip,
|
||||
xmobarStrip, ppVisible
|
||||
)
|
||||
import XMonad.Hooks.EwmhDesktops
|
||||
( activateLogHook,
|
||||
|
@ -92,7 +92,8 @@ import XMonad.Util.SpawnOnce (spawnOnce)
|
|||
import XMonad.Util.Ungrab (unGrab)
|
||||
import XMonad.Util.WorkspaceCompare (getSortByIndex)
|
||||
import XMonad.Layout (Resize(Expand,Shrink) )
|
||||
import XMonad.Layout.DwmStyle (dwmStyle, shrinkText)
|
||||
import XMonad.Layout.NoBorders
|
||||
import XMonad.Layout.Named (named)
|
||||
|
||||
main :: IO ()
|
||||
main = do
|
||||
|
@ -141,19 +142,20 @@ main = do
|
|||
myXmobarPP :: [String] -> PP
|
||||
myXmobarPP colors =
|
||||
def
|
||||
{ ppSep = walXmobarColor 1 " • ",
|
||||
{ ppSep = walXmobarColor 1 " \63617 ",
|
||||
ppTitleSanitize = xmobarStrip,
|
||||
ppCurrent = wrap " " "" . xmobarBorder "Top" (colors !! 6) 2,
|
||||
ppHidden = white . wrap " " "",
|
||||
ppHiddenNoWindows = white . wrap " " "",
|
||||
ppHiddenNoWindows = lowWhite . wrap " " "",
|
||||
ppUrgent = red . wrap (yellow "!") (yellow "!"),
|
||||
ppVisible = wrap " " "" . xmobarBorder "Bottom" (colors !! 6) 2,
|
||||
ppOrder = \[ws, l, _, wins] -> [ws, l, wins],
|
||||
ppExtras = [logTitles formatFocused formatUnfocused],
|
||||
ppSort = hideWorkspaces
|
||||
}
|
||||
where
|
||||
formatFocused = wrap (white "[") (white "]") . walXmobarColor 7 . ppWindow
|
||||
formatUnfocused = wrap (lowWhite "[") (lowWhite "]") . walXmobarColor 4 . ppWindow
|
||||
formatFocused = wrap (walXmobarColor 7 "<fn=2>\58279</fn>") (walXmobarColor 7 "<fn=2>\58254</fn>") . walXmobarColor 7 . ppWindow
|
||||
formatUnfocused = wrap (walXmobarColor 4 "<fn=2>\58279</fn>") (walXmobarColor 4 "<fn=2>\58254</fn>") . walXmobarColor 4 . ppWindow
|
||||
walXmobarColor index = xmobarColor (colors !! index) ""
|
||||
ppWindow :: String -> String
|
||||
ppWindow = xmobarRaw . (\w -> if null w then "untitled" else w) . shorten 30
|
||||
|
@ -179,6 +181,7 @@ myStartupHook :: X ()
|
|||
myStartupHook = do
|
||||
spawnOnce "picom &"
|
||||
spawnOnce "sh $HOME/.fehbg"
|
||||
spawnOnce "setxkbmap -option caps:escape"
|
||||
|
||||
getWalColors :: IO [String]
|
||||
getWalColors = do
|
||||
|
@ -193,9 +196,9 @@ mySpacing' i = spacingRaw True (Border i 0 i i) True (Border i 0 i i) True
|
|||
--myWorkspaces = [" dev ", " www ", " sys ", " doc ", " vbox ", " chat ", " mus ", " vid ", " gfx "]
|
||||
myWorkspaces :: [String]
|
||||
myWorkspaces = show <$> ([1 .. 9] ::[Integer] )
|
||||
myLayout = windowNavigation tiled ||| Mirror tiled ||| Full
|
||||
myLayout = smartBorders $ windowNavigation tiled ||| smartBorders Full ||| Mirror tiled
|
||||
where
|
||||
tiled = mySpacing' 8 $ Tall nmaster delta ratio
|
||||
tiled = named "Tall" $ mySpacing' 8 $ Tall nmaster delta ratio
|
||||
nmaster = 1 -- Default number of windows in the master pane
|
||||
ratio = 1 / 2 -- Default proportion of screen occupied by master pane
|
||||
delta = 3 / 100 -- Percent of screen to increment by when resizing panes
|
||||
|
@ -221,9 +224,11 @@ myManageHook =
|
|||
title =? "Mozilla Firefox" --> viewShift (myWorkspaces !! 1),
|
||||
title =? "Signal" --> viewShift (myWorkspaces !! 2),
|
||||
className =? "TelegramDesktop" --> viewShift (myWorkspaces !! 2),
|
||||
className =? "Element" --> viewShift (myWorkspaces !! 2),
|
||||
className =? "Thunderbird" --> viewShift (myWorkspaces !! 2),
|
||||
className =? "Gimp" --> doShift (myWorkspaces !! 8),
|
||||
(className =? "firefox" <&&> resource =? "Dialog") --> doFloat, -- Float Firefox Dialog
|
||||
className =? "alfaview" --> viewShift (myWorkspaces !! 5),
|
||||
className =? "alfaview" --> viewShift (myWorkspaces !! 3),
|
||||
className =? "jetbrains-idea" --> viewShift (myWorkspaces !! 4),
|
||||
(className =? "jetbrains-studio") <&&> (title ~=? "win") --> doIgnore
|
||||
]
|
||||
|
|
Loading…
Reference in New Issue