l xmonad: send urgency to dbus
This commit is contained in:
parent
dc2b6931eb
commit
75eaf9cf08
@ -36,7 +36,7 @@ import XMonad.Hooks.FloatNext (floatNextHook)
|
||||
import XMonad.Hooks.ManageDocks (avoidStruts, ToggleStruts(ToggleStruts))
|
||||
import XMonad.Hooks.Place (placeHook, smart)
|
||||
import XMonad.Hooks.UrgencyHook (focusUrgent)
|
||||
import XMonad.Hooks.UrgencyHook (SpawnUrgencyHook(..), withUrgencyHook)
|
||||
import XMonad.Hooks.UrgencyHook (withUrgencyHook, UrgencyHook(..))
|
||||
import XMonad.Layout.FixedColumn (FixedColumn(..))
|
||||
import XMonad.Layout.Minimize (minimize, minimizeWindow, MinimizeMsg(RestoreNextMinimizedWin))
|
||||
import XMonad.Layout.NoBorders (smartBorders)
|
||||
@ -44,9 +44,20 @@ import XMonad.Layout.SimplestFloat (simplestFloat)
|
||||
import XMonad.Prompt (autoComplete, font, searchPredicate, XPConfig)
|
||||
import XMonad.Prompt.Window (windowPromptGoto, windowPromptBringCopy)
|
||||
import XMonad.Util.EZConfig (additionalKeysP)
|
||||
import XMonad.Util.NamedWindows (getName)
|
||||
import XMonad.Util.Run (safeSpawn)
|
||||
|
||||
import XMonad.Stockholm.Shutdown
|
||||
|
||||
data LibNotifyUrgencyHook = LibNotifyUrgencyHook deriving (Read, Show)
|
||||
|
||||
instance UrgencyHook LibNotifyUrgencyHook where
|
||||
urgencyHook LibNotifyUrgencyHook w = do
|
||||
name <- getName w
|
||||
Just idx <- fmap (W.findTag w) $ gets windowset
|
||||
|
||||
safeSpawn "${pkgs.libnotify}/bin/notify-send" [show name, "workspace " ++ idx]
|
||||
|
||||
myTerm :: FilePath
|
||||
myTerm = "${pkgs.rxvt_unicode_with-plugins}/bin/urxvtc"
|
||||
|
||||
@ -61,7 +72,7 @@ main = getArgs >>= \case
|
||||
main' :: IO ()
|
||||
main' = do
|
||||
xmonad $ ewmh
|
||||
$ withUrgencyHook (SpawnUrgencyHook "echo emit Urgency ")
|
||||
$ withUrgencyHook LibNotifyUrgencyHook
|
||||
$ def
|
||||
{ terminal = myTerm
|
||||
, modMask = mod4Mask
|
||||
|
Loading…
Reference in New Issue
Block a user