about summary refs log tree commit diff
path: root/dotfiles/xmonad.hs
diff options
context:
space:
mode:
authorBaitinq <manuelpalenzuelamerino@gmail.com>2022-07-07 12:23:30 +0200
committerBaitinq <manuelpalenzuelamerino@gmail.com>2022-07-07 12:23:30 +0200
commit947b1243cad550557b6d8428648556462dd2ed70 (patch)
tree8c91afd8c37e7bca135e9a97768bcdf049ef5acb /dotfiles/xmonad.hs
parentXMonad: Code cleanup (diff)
downloadnixos-config-947b1243cad550557b6d8428648556462dd2ed70.tar.gz
nixos-config-947b1243cad550557b6d8428648556462dd2ed70.tar.bz2
nixos-config-947b1243cad550557b6d8428648556462dd2ed70.zip
XMonad: Add urgency border and tag
Diffstat (limited to '')
-rw-r--r--dotfiles/xmonad.hs6
1 files changed, 6 insertions, 0 deletions
diff --git a/dotfiles/xmonad.hs b/dotfiles/xmonad.hs
index d8174b1..fb841d0 100644
--- a/dotfiles/xmonad.hs
+++ b/dotfiles/xmonad.hs
@@ -14,6 +14,7 @@ import XMonad.Hooks.ServerMode
 import XMonad.Hooks.StatusBar
 import XMonad.Hooks.StatusBar.PP
 import XMonad.Hooks.EwmhDesktops
+import XMonad.Hooks.UrgencyHook
 
 import XMonad.Layout.Gaps
 import XMonad.Layout.NoBorders
@@ -112,6 +113,9 @@ backgroundColor = "#005577"
 foregroundColor :: String
 foregroundColor = "#bbbbbb"
 
+urgentColor :: String
+urgentColor = "#ff0000"
+
 --This sets the "_NET_WM_STATE_FULLSCREEN" window property, helping some programs such as firefox to adjust acoordingly to fullscreen mode
 --In a perfect world we shouldnt need to do this manually but it seems like ewmhFullscreen/others dont implement this functionality
 setFullscreenProp :: Bool -> Window -> X ()
@@ -223,6 +227,7 @@ myStatusBar = statusBarProp "xmobar" (do
                                                   , ppLayout = (\_ -> "")
                                                   , ppHidden = (\s -> clickableWrap ((read s::Int) - 1) (createDwmBox foregroundColor ("  " ++ s ++ "  "))) --better way to clickablewrap . 
                                                   , ppHiddenNoWindows = (\s -> clickableWrap ((read s::Int) - 1) ("  " ++ s ++ "  "))
+                                                  , ppUrgent = (\s -> clickableWrap ((read s::Int) - 1) (xmobarBorder "Top" urgentColor 4 ("  " ++ s ++ "  ")))
                                           }
                                       )
                                       where
@@ -232,6 +237,7 @@ myStatusBar = statusBarProp "xmobar" (do
 main :: IO ()
 main = do
   xmonad . withSB myStatusBar . docks . ewmhFullscreen . ewmh
+         $ withUrgencyHookC BorderUrgencyHook { urgencyBorderColor = urgentColor } urgencyConfig { suppressWhen = XMonad.Hooks.UrgencyHook.Never }
          $ def {
                 focusFollowsMouse  = myFocusFollowsMouse,
                 borderWidth        = myBorderWidth,