diff options
author | Matthias Schiffer <mschiffer@universe-factory.net> | 2011-07-14 20:21:30 +0200 |
---|---|---|
committer | Matthias Schiffer <mschiffer@universe-factory.net> | 2011-07-14 20:21:30 +0200 |
commit | 861fa81d8503b64023777ec815845361bbcc2885 (patch) | |
tree | c194a5bbd4c839eb4ccf5b933d5abebcb3368385 /src | |
parent | 7c0f602343e84823d370c8742716ce6b7a8b9850 (diff) | |
download | phi-861fa81d8503b64023777ec815845361bbcc2885.tar phi-861fa81d8503b64023777ec815845361bbcc2885.zip |
Added clock widget
Diffstat (limited to 'src')
-rw-r--r-- | src/Phi.hs | 15 |
1 files changed, 8 insertions, 7 deletions
@@ -1,19 +1,20 @@ -import Phi.Phi import Phi.Types import Phi.Widget import Phi.Panel import Phi.Border import Phi.X11 - -import Data.Monoid +import Phi.Widgets.Clock main :: IO () main = do - phi <- initPhi - initPhiX phi defaultXConfig defaultPanelConfig { panelPosition = Bottom } - [border border1 [border border3 [], border border3 []], border border2 []] - runPhi phi + runPhi defaultXConfig defaultPanelConfig { panelPosition = Bottom } + [border border1 [border border3 [], border border3 []], border border2 [], border brightBorder [theClock]] where + theClock = clock defaultClockConfig { clockFormat = "<span font='Sans 8'>%R</span>\n<span font='Sans 6'>%A %d %B</span>" + , lineSpacing = (-2) + , clockSize = 75 + } + brightBorder = BorderConfig (simpleBorderWidth 1) 1 (BorderWidth (-2) 3 0 3) (0.5, 0.5, 0.5, 0.65) (0.85, 0.85, 0.85, 0.8) 5 0 border1 = BorderConfig (simpleBorderWidth 1) 1 (simpleBorderWidth 2) (1, 1, 1, 0.5) (0.25, 0.25, 0.25, 0.5) 7 2 border2 = BorderConfig (simpleBorderWidth 1) 1 (simpleBorderWidth 2) (1, 1, 1, 0.5) (0.5, 0.0, 0.25, 0.5) 7 1 border3 = BorderConfig (simpleBorderWidth 0) 1 (simpleBorderWidth 2) (1, 1, 1, 0.5) (0.0, 0.0, 0.5, 0.5) 3 1 |