From 7b76723a6c33b50fffa6972b384169f11da217bd Mon Sep 17 00:00:00 2001 From: Gregor Kleen Date: Thu, 20 Jan 2022 22:53:40 +0100 Subject: gkleen@sif: ... --- accounts/gkleen@sif/taffybar/src/taffybar.hs | 1 + accounts/gkleen@sif/xmonad/xmonad.hs | 13 +++++++++---- 2 files changed, 10 insertions(+), 4 deletions(-) (limited to 'accounts') diff --git a/accounts/gkleen@sif/taffybar/src/taffybar.hs b/accounts/gkleen@sif/taffybar/src/taffybar.hs index 728ccf2e..7dbb5c8e 100644 --- a/accounts/gkleen@sif/taffybar/src/taffybar.hs +++ b/accounts/gkleen@sif/taffybar/src/taffybar.hs @@ -39,6 +39,7 @@ exampleTaffybarConfig = Workspace{ workspaceName } | workspaceName == "NSP" -> False _other -> True , getWindowIconPixbuf = \i d -> either (\(_ :: SomeException) -> Nothing) id <$> mapReaderT try (defaultGetWindowIconPixbuf i d) + , urgentWorkspaceState = True } workspaces = workspacesNew myWorkspacesConfig clock = MyClock.textClockNewWith MyClock.defaultClockConfig diff --git a/accounts/gkleen@sif/xmonad/xmonad.hs b/accounts/gkleen@sif/xmonad/xmonad.hs index 1fb672bb..853fc47a 100644 --- a/accounts/gkleen@sif/xmonad/xmonad.hs +++ b/accounts/gkleen@sif/xmonad/xmonad.hs @@ -1,4 +1,4 @@ -{-# LANGUAGE TupleSections, ViewPatterns, OverloadedStrings, FlexibleInstances, UndecidableInstances, MultiWayIf #-} +{-# LANGUAGE TupleSections, ViewPatterns, OverloadedStrings, FlexibleInstances, UndecidableInstances, MultiWayIf, NumDecimals #-} import XMonad import XMonad.Hooks.DynamicLog @@ -215,6 +215,7 @@ hostFromName h , assign "comm" $ className =? "Skype" , assign "comm" $ className =? "Daily" , assign "comm" $ className =? "Pidgin" + , assign "comm" $ className =? "Thunderbird" , assign "comm" $ className =? "Slack" , Just $ (resource =? "xvkbd") -?> doRectFloat $ RationalRect (1 % 8) (3 % 8) (6 % 8) (4 % 8) , Just $ (stringProperty "_NET_WM_WINDOW_TYPE" =? "_NET_WM_WINDOW_TYPE_DIALOG") -?> doFloat @@ -568,11 +569,15 @@ main = do , ppSep = "\n" } withHostUrgency = case hostname of - "hel" -> withUrgencyHookC urgencyHook' $ urgencyConfig { suppressWhen = U.Never, remindWhen = Dont } - "sif" -> withUrgencyHookC urgencyHook' $ urgencyConfig { suppressWhen = U.Never, remindWhen = Dont } + "sif" -> withUrgencyHookC urgencyHook' $ urgencyConfig { suppressWhen = U.Never, remindWhen = Every 2 } _ -> id urgencyHook' window = do - runQuery ((resource =? "comm" <||> resource =? "Pidgin" <||> className =? "Gajim" <||> className =? "Skype") --> safeSpawn "thinklight" ["Blink", "100"]) window + let blinkLight = (lightHigh >> threadDelay 1e6) `finally` lightLow + where + lightHigh = + writeFile "/sys/class/leds/input0::capslock/brightness" =<< readFile "/sys/class/leds/input0::capslock/max_brightness" + lightLow = writeFile "/sys/class/leds/input0::capslock/brightness" "0" + runQuery ((resource =? "comm" <||> resource =? "Pidgin" <||> className =? "Gajim" <||> className =? "Skype" <||> className =? "Thunderbird") --> void (xfork blinkLight)) window urgencyHook (BorderUrgencyHook { urgencyBorderColor = red }) window shutdown :: SomeException -> IO a shutdown e = do -- cgit v1.2.3