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.EwmhDesktops
|
||||||
import XMonad.Hooks.FadeWindows
|
import XMonad.Hooks.FadeWindows
|
||||||
import XMonad.Hooks.InsertPosition
|
import XMonad.Hooks.InsertPosition
|
||||||
|
import XMonad.Hooks.ManageDocks
|
||||||
import XMonad.Hooks.ManageHelpers
|
import XMonad.Hooks.ManageHelpers
|
||||||
import XMonad.Hooks.RefocusLast
|
import XMonad.Hooks.RefocusLast
|
||||||
import XMonad.Hooks.StatusBar
|
import XMonad.Hooks.StatusBar
|
||||||
|
|
@ -29,15 +30,13 @@ import System.Posix
|
||||||
import Leanamonad.Layouts.ReflectMsg
|
import Leanamonad.Layouts.ReflectMsg
|
||||||
import Leanamonad.GreekChar
|
import Leanamonad.GreekChar
|
||||||
|
|
||||||
-- Note: `xmonad --restart` will make Firefox's fullscreen work duck the xmobar stop working
|
|
||||||
-- You need restart Firefox
|
|
||||||
main :: IO ()
|
main :: IO ()
|
||||||
main =
|
main =
|
||||||
xmonad
|
xmonad
|
||||||
-- Fix all java things that don't scale with 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
|
-- https://wiki.archlinux.org/title/java#Gray_window,_applications_not_resizing_with_WM,_menus_immediately_closing
|
||||||
. javaHack
|
. javaHack
|
||||||
. dynamicEasySBs xmonadOn
|
. withSB xmobarConfig . docks
|
||||||
. ewmhFullscreen . ewmh
|
. ewmhFullscreen . ewmh
|
||||||
$ def
|
$ def
|
||||||
{ modMask = superMask
|
{ modMask = superMask
|
||||||
|
|
@ -88,11 +87,10 @@ main =
|
||||||
, layoutHook =
|
, layoutHook =
|
||||||
let tallr = reflectMsg . reflectHoriz
|
let tallr = reflectMsg . reflectHoriz
|
||||||
$ ResizableTall 1 (1/10) (3/7) []
|
$ ResizableTall 1 (1/10) (3/7) []
|
||||||
in smartBorders
|
in avoidStruts
|
||||||
( named "Normal"
|
$ smartBorders
|
||||||
(smartSpacingWithEdge 5 tallr)
|
$ named "Normal" (smartSpacingWithEdge 5 tallr)
|
||||||
||| Full
|
||| Full
|
||||||
)
|
|
||||||
|
|
||||||
, manageHook =
|
, manageHook =
|
||||||
let
|
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)
|
smallFloat = W.RationalRect (3/5) (3/5) (2/7) (2/7)
|
||||||
fullFloat = W.RationalRect 0 0 1 1
|
fullFloat = W.RationalRect 0 0 1 1
|
||||||
|
|
||||||
xmonadOn :: ScreenId -> X StatusBarConfig
|
xmobarConfig :: StatusBarConfig
|
||||||
xmonadOn = \case
|
xmobarConfig = statusBarProp "xmobar -x 0" (pure myPrettyPrinter)
|
||||||
0 -> pure $ statusBarProp "xmobar -x 0" (pure myPrettyPrinter)
|
|
||||||
1 -> pure $ statusBarProp "xmobar -x 1" (pure myPrettyPrinter)
|
|
||||||
_ -> mempty
|
|
||||||
where
|
where
|
||||||
myPrettyPrinter =
|
myPrettyPrinter =
|
||||||
filterOutWsPP [scratchpadWorkspaceTag]
|
filterOutWsPP [scratchpadWorkspaceTag]
|
||||||
$ def
|
$ def
|
||||||
{ ppCurrent = xmobarColor "#000000" "#ffffff" . wrap " " " " . fmap toUpper
|
{ ppCurrent = xmobarColor "#000000" "#ffffff" . wrap " " " " . fmap toUpper
|
||||||
, ppHiddenNoWindows = xmobarColor "#9c9c9c" "" . const "⋅"
|
, ppHiddenNoWindows = xmobarColor "#9c9c9c" "" . const "⋅"
|
||||||
, ppSep = " | "
|
, ppSep = " | "
|
||||||
}
|
}
|
||||||
|
|
||||||
isFirefoxPIP :: Query Bool
|
isFirefoxPIP :: Query Bool
|
||||||
isFirefoxPIP =
|
isFirefoxPIP =
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue