diff options
| -rw-r--r-- | accounts/gkleen@sif/taffybar/src/taffybar.hs | 1 | ||||
| -rw-r--r-- | accounts/gkleen@sif/xmonad/xmonad.hs | 13 | ||||
| -rw-r--r-- | overlays/pidgin.nix | 23 |
3 files changed, 32 insertions, 5 deletions
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 = | |||
| 39 | Workspace{ workspaceName } | workspaceName == "NSP" -> False | 39 | Workspace{ workspaceName } | workspaceName == "NSP" -> False |
| 40 | _other -> True | 40 | _other -> True |
| 41 | , getWindowIconPixbuf = \i d -> either (\(_ :: SomeException) -> Nothing) id <$> mapReaderT try (defaultGetWindowIconPixbuf i d) | 41 | , getWindowIconPixbuf = \i d -> either (\(_ :: SomeException) -> Nothing) id <$> mapReaderT try (defaultGetWindowIconPixbuf i d) |
| 42 | , urgentWorkspaceState = True | ||
| 42 | } | 43 | } |
| 43 | workspaces = workspacesNew myWorkspacesConfig | 44 | workspaces = workspacesNew myWorkspacesConfig |
| 44 | clock = MyClock.textClockNewWith MyClock.defaultClockConfig | 45 | 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 @@ | |||
| 1 | {-# LANGUAGE TupleSections, ViewPatterns, OverloadedStrings, FlexibleInstances, UndecidableInstances, MultiWayIf #-} | 1 | {-# LANGUAGE TupleSections, ViewPatterns, OverloadedStrings, FlexibleInstances, UndecidableInstances, MultiWayIf, NumDecimals #-} |
| 2 | 2 | ||
| 3 | import XMonad | 3 | import XMonad |
| 4 | import XMonad.Hooks.DynamicLog | 4 | import XMonad.Hooks.DynamicLog |
| @@ -215,6 +215,7 @@ hostFromName h | |||
| 215 | , assign "comm" $ className =? "Skype" | 215 | , assign "comm" $ className =? "Skype" |
| 216 | , assign "comm" $ className =? "Daily" | 216 | , assign "comm" $ className =? "Daily" |
| 217 | , assign "comm" $ className =? "Pidgin" | 217 | , assign "comm" $ className =? "Pidgin" |
| 218 | , assign "comm" $ className =? "Thunderbird" | ||
| 218 | , assign "comm" $ className =? "Slack" | 219 | , assign "comm" $ className =? "Slack" |
| 219 | , Just $ (resource =? "xvkbd") -?> doRectFloat $ RationalRect (1 % 8) (3 % 8) (6 % 8) (4 % 8) | 220 | , Just $ (resource =? "xvkbd") -?> doRectFloat $ RationalRect (1 % 8) (3 % 8) (6 % 8) (4 % 8) |
| 220 | , Just $ (stringProperty "_NET_WM_WINDOW_TYPE" =? "_NET_WM_WINDOW_TYPE_DIALOG") -?> doFloat | 221 | , Just $ (stringProperty "_NET_WM_WINDOW_TYPE" =? "_NET_WM_WINDOW_TYPE_DIALOG") -?> doFloat |
| @@ -568,11 +569,15 @@ main = do | |||
| 568 | , ppSep = "\n" | 569 | , ppSep = "\n" |
| 569 | } | 570 | } |
| 570 | withHostUrgency = case hostname of | 571 | withHostUrgency = case hostname of |
| 571 | "hel" -> withUrgencyHookC urgencyHook' $ urgencyConfig { suppressWhen = U.Never, remindWhen = Dont } | 572 | "sif" -> withUrgencyHookC urgencyHook' $ urgencyConfig { suppressWhen = U.Never, remindWhen = Every 2 } |
| 572 | "sif" -> withUrgencyHookC urgencyHook' $ urgencyConfig { suppressWhen = U.Never, remindWhen = Dont } | ||
| 573 | _ -> id | 573 | _ -> id |
| 574 | urgencyHook' window = do | 574 | urgencyHook' window = do |
| 575 | runQuery ((resource =? "comm" <||> resource =? "Pidgin" <||> className =? "Gajim" <||> className =? "Skype") --> safeSpawn "thinklight" ["Blink", "100"]) window | 575 | let blinkLight = (lightHigh >> threadDelay 1e6) `finally` lightLow |
| 576 | where | ||
| 577 | lightHigh = | ||
| 578 | writeFile "/sys/class/leds/input0::capslock/brightness" =<< readFile "/sys/class/leds/input0::capslock/max_brightness" | ||
| 579 | lightLow = writeFile "/sys/class/leds/input0::capslock/brightness" "0" | ||
| 580 | runQuery ((resource =? "comm" <||> resource =? "Pidgin" <||> className =? "Gajim" <||> className =? "Skype" <||> className =? "Thunderbird") --> void (xfork blinkLight)) window | ||
| 576 | urgencyHook (BorderUrgencyHook { urgencyBorderColor = red }) window | 581 | urgencyHook (BorderUrgencyHook { urgencyBorderColor = red }) window |
| 577 | shutdown :: SomeException -> IO a | 582 | shutdown :: SomeException -> IO a |
| 578 | shutdown e = do | 583 | shutdown e = do |
diff --git a/overlays/pidgin.nix b/overlays/pidgin.nix index 3c9fb93c..4c315f55 100644 --- a/overlays/pidgin.nix +++ b/overlays/pidgin.nix | |||
| @@ -26,9 +26,30 @@ let | |||
| 26 | ''; | 26 | ''; |
| 27 | }; | 27 | }; |
| 28 | in { | 28 | in { |
| 29 | pidgin-rocketchat = let | ||
| 30 | rev = "5c08ad0eacd39914d27b692d7eb42a94a991fb4c"; | ||
| 31 | in prev.stdenv.mkDerivation { | ||
| 32 | pname = "pidgin-rocketchat"; | ||
| 33 | version = builtins.substring 0 8 rev; | ||
| 34 | |||
| 35 | src = prev.fetchFromGitHub { | ||
| 36 | owner = "EionRobb"; | ||
| 37 | repo = "purple-rocketchat"; | ||
| 38 | inherit rev; | ||
| 39 | hash = "sha256-UBIp5tpj4Xfo+mPhY51+rzs+ojKr90zWK+XLiK7XvWM="; | ||
| 40 | }; | ||
| 41 | |||
| 42 | nativeBuildInputs = with final; [ pidgin json-glib glib discount ]; | ||
| 43 | |||
| 44 | installFlags = [ | ||
| 45 | "ROCKETCHAT_DEST=$(out)/lib/purple-2" | ||
| 46 | "ROCKETCHAT_ICONS_DEST=$(out)/share/pixmaps/pidgin/protocols" | ||
| 47 | ]; | ||
| 48 | }; | ||
| 49 | |||
| 29 | pidgin-with-plugins = pidginWrapper { | 50 | pidgin-with-plugins = pidginWrapper { |
| 30 | inherit (prev) makeWrapper symlinkJoin; | 51 | inherit (prev) makeWrapper symlinkJoin; |
| 31 | plugins = with final; [ purple-lurch pidgin-carbons pidgin-opensteamworks pidgin-xmpp-receipts ]; | 52 | plugins = with final; [ purple-lurch pidgin-carbons pidgin-opensteamworks pidgin-xmpp-receipts pidgin-rocketchat ]; |
| 32 | pidgin = prev.pidgin.overrideAttrs (oldAttrs: { | 53 | pidgin = prev.pidgin.overrideAttrs (oldAttrs: { |
| 33 | patches = (oldAttrs.patches or []) ++ [mucHistory]; | 54 | patches = (oldAttrs.patches or []) ++ [mucHistory]; |
| 34 | }); | 55 | }); |
