Update xmonad/xmonad.hs
parent
61ef0f0e75
commit
2bc587b613
|
@ -21,23 +21,20 @@ import XMonad.Layout.Spacing
|
|||
import XMonad.Hooks.EwmhDesktops
|
||||
import XMonad.Util.SpawnOnce (spawnOnce)
|
||||
|
||||
|
||||
-- run or raise
|
||||
import XMonad.Actions.WindowGo (runOrRaise)
|
||||
import XMonad.Actions.WindowGo (raiseMaybe, runOrRaise)
|
||||
import XMonad.ManageHook (className)
|
||||
import XMonad.StackSet (RationalRect(..))
|
||||
--
|
||||
|
||||
import XMonad.Layout.Decoration (decoration, DefaultShrinker(..), Theme(..), shrinkText)
|
||||
import XMonad.Layout.Decoration
|
||||
import XMonad.Layout.Simplest
|
||||
import XMonad.Layout.SimplestFloat
|
||||
import XMonad.Layout.Spacing
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
main :: IO ()
|
||||
main = xmonad
|
||||
. ewmhFullscreen
|
||||
|
@ -49,6 +46,7 @@ myConfig = def
|
|||
{ modMask = mod4Mask -- Rebind Mod to the Super key
|
||||
, layoutHook = myLayout -- Use custom layouts
|
||||
, terminal = "alacritty"
|
||||
, focusedBorderColor = "#000000"
|
||||
, manageHook = myManageHook -- Match on certain windows
|
||||
, startupHook = do
|
||||
-- other startup commands
|
||||
|
@ -56,6 +54,8 @@ myConfig = def
|
|||
spawnOnce "xrdb /home/hashirama/.Xresources"
|
||||
spawnOnce "feh --bg-fill /home/hashirama/wallpaper.jpg"
|
||||
spawnOnce "compton -b"
|
||||
spawnOnce "polybar top-monitor-1"
|
||||
|
||||
}
|
||||
`additionalKeysP`
|
||||
[ ("M-d", spawn "rofi -show run")
|
||||
|
@ -65,6 +65,7 @@ myConfig = def
|
|||
, ("M-p", runOrRaise "nyxt" (className =? "Nyxt"))
|
||||
, ("M-t", withFocused $ windows . W.sink) -- Toggle float for the focused window
|
||||
, ("M-S-q", return ()) -- Unbind Mod + Shift + Q, to avoid quiting the wm.
|
||||
, ("M-q", kill) -- Change the keybinding for closing windows to Mod + Q
|
||||
]
|
||||
|
||||
|
||||
|
@ -77,10 +78,12 @@ myManageHook = composeAll
|
|||
|
||||
myTheme :: Theme
|
||||
myTheme = def
|
||||
{ decoHeight = 20 -- Adjust the height of the title bar as needed
|
||||
{ decoHeight = 20
|
||||
|
||||
-- Add other theme properties as needed
|
||||
}
|
||||
|
||||
|
||||
myLayout = mouseResize $ spacingRaw True (Border 10 10 10 10) True (Border 10 10 10 10) True $
|
||||
Tall 1 (3/100) (1/2) ||| Full
|
||||
|
||||
|
@ -89,7 +92,7 @@ myLayout = mouseResize $ spacingRaw True (Border 10 10 10 10) True (Border 10 10
|
|||
|
||||
myXmobarPP :: PP
|
||||
myXmobarPP = def
|
||||
{ ppSep = magenta " • "
|
||||
{ ppSep = cyan " • "
|
||||
, ppTitleSanitize = xmobarStrip
|
||||
, ppCurrent = wrap " " "" . xmobarBorder "Top" "#8be9fd" 2
|
||||
, ppHidden = white . wrap " " ""
|
||||
|
@ -99,18 +102,19 @@ myXmobarPP = def
|
|||
, ppExtras = [logTitles formatFocused formatUnfocused]
|
||||
}
|
||||
where
|
||||
formatFocused = wrap (white "[") (white "]") . magenta . ppWindow
|
||||
formatUnfocused = wrap (lowWhite "[") (lowWhite "]") . blue . ppWindow
|
||||
formatFocused = wrap (white "[") (white "]") . cyan . ppWindow
|
||||
formatUnfocused = wrap (lowWhite "[") (lowWhite "]") . vividGreen . ppWindow
|
||||
|
||||
-- | Windows should have *some* title, which should not not exceed a
|
||||
-- | Windows should have *some* title, which should not exceed a
|
||||
-- sane length.
|
||||
ppWindow :: String -> String
|
||||
ppWindow = xmobarRaw . (\w -> if null w then "untitled" else w) . shorten 30
|
||||
|
||||
blue, lowWhite, magenta, red, white, yellow :: String -> String
|
||||
magenta = xmobarColor "#ff79c6" ""
|
||||
blue = xmobarColor "#bd93f9" ""
|
||||
cyan, vividGreen, lowWhite, red, white, yellow :: String -> String
|
||||
cyan = xmobarColor "#8be9fd" ""
|
||||
vividGreen = xmobarColor "#50fa7b" ""
|
||||
white = xmobarColor "#f8f8f2" ""
|
||||
yellow = xmobarColor "#f1fa8c" ""
|
||||
red = xmobarColor "#ff5555" ""
|
||||
lowWhite = xmobarColor "#bbbbbb" ""
|
||||
|
||||
|
|
Loading…
Reference in New Issue