mirror of
https://codeberg.org/leana8959/.files.git
synced 2025-12-06 06:39:14 +00:00
vanadium/xmonad: update xmobar handling
This commit is contained in:
parent
7a8d963413
commit
ba51e49051
1 changed files with 12 additions and 17 deletions
|
|
@ -8,6 +8,7 @@ import XMonad.Hooks.DynamicLog
|
|||
import XMonad.Hooks.EwmhDesktops
|
||||
import XMonad.Hooks.FadeWindows
|
||||
import XMonad.Hooks.InsertPosition
|
||||
import XMonad.Hooks.ManageDocks
|
||||
import XMonad.Hooks.ManageHelpers
|
||||
import XMonad.Hooks.RefocusLast
|
||||
import XMonad.Hooks.StatusBar
|
||||
|
|
@ -29,15 +30,13 @@ import System.Posix
|
|||
import Leanamonad.Layouts.ReflectMsg
|
||||
import Leanamonad.GreekChar
|
||||
|
||||
-- Note: `xmonad --restart` will make Firefox's fullscreen work duck the xmobar stop working
|
||||
-- You need restart Firefox
|
||||
main :: IO ()
|
||||
main =
|
||||
xmonad
|
||||
-- Fix all java things that don't scale with XMonad
|
||||
-- https://wiki.archlinux.org/title/java#Gray_window,_applications_not_resizing_with_WM,_menus_immediately_closing
|
||||
. javaHack
|
||||
. dynamicEasySBs xmonadOn
|
||||
. withSB xmobarConfig . docks
|
||||
. ewmhFullscreen . ewmh
|
||||
$ def
|
||||
{ modMask = superMask
|
||||
|
|
@ -88,11 +87,10 @@ main =
|
|||
, layoutHook =
|
||||
let tallr = reflectMsg . reflectHoriz
|
||||
$ ResizableTall 1 (1/10) (3/7) []
|
||||
in smartBorders
|
||||
( named "Normal"
|
||||
(smartSpacingWithEdge 5 tallr)
|
||||
||| Full
|
||||
)
|
||||
in avoidStruts
|
||||
$ smartBorders
|
||||
$ named "Normal" (smartSpacingWithEdge 5 tallr)
|
||||
||| Full
|
||||
|
||||
, manageHook =
|
||||
let
|
||||
|
|
@ -248,19 +246,16 @@ centeredFloat = W.RationalRect (1/9) (1/9) (7/9) (7/9)
|
|||
smallFloat = W.RationalRect (3/5) (3/5) (2/7) (2/7)
|
||||
fullFloat = W.RationalRect 0 0 1 1
|
||||
|
||||
xmonadOn :: ScreenId -> X StatusBarConfig
|
||||
xmonadOn = \case
|
||||
0 -> pure $ statusBarProp "xmobar -x 0" (pure myPrettyPrinter)
|
||||
1 -> pure $ statusBarProp "xmobar -x 1" (pure myPrettyPrinter)
|
||||
_ -> mempty
|
||||
xmobarConfig :: StatusBarConfig
|
||||
xmobarConfig = statusBarProp "xmobar -x 0" (pure myPrettyPrinter)
|
||||
where
|
||||
myPrettyPrinter =
|
||||
filterOutWsPP [scratchpadWorkspaceTag]
|
||||
$ def
|
||||
{ ppCurrent = xmobarColor "#000000" "#ffffff" . wrap " " " " . fmap toUpper
|
||||
, ppHiddenNoWindows = xmobarColor "#9c9c9c" "" . const "⋅"
|
||||
, ppSep = " | "
|
||||
}
|
||||
{ ppCurrent = xmobarColor "#000000" "#ffffff" . wrap " " " " . fmap toUpper
|
||||
, ppHiddenNoWindows = xmobarColor "#9c9c9c" "" . const "⋅"
|
||||
, ppSep = " | "
|
||||
}
|
||||
|
||||
isFirefoxPIP :: Query Bool
|
||||
isFirefoxPIP =
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue