summaryrefslogtreecommitdiffstats
path: root/src/Phi.hs
blob: 229a0079ec3a5d20311d503a4fa0e8b57e180224 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
import Phi.Types
import Phi.Widget
import Phi.Panel
import Phi.Border
import Phi.X11

import Phi.Widgets.AlphaBox
import Phi.Widgets.Clock
import Phi.Widgets.Taskbar
import Phi.Widgets.Systray


main :: IO ()
main = do
  runPhi defaultXConfig defaultPanelConfig { panelPosition = Top } $ alphaBox 0.9 $ theTaskbar <~> brightBorder theSystray <~> brightBorder theClock
    where
      normalTaskBorder = BorderConfig (BorderWidth (-1) (-3) (-1) 7) 1 (BorderWidth 0 5 0 5) (0.9, 0.9, 0.9, 0.8) (0.45, 0.45, 0.45, 0.8) 5 0
      activeTaskBorder = normalTaskBorder { borderColor = (1, 1, 1, 0.8)
                                          , backgroundColor = (0, 0, 0, 1)
                                          }
      normalDesktopBorder = normalTaskBorder { margin = BorderWidth 2 3 2 3
                                             , padding = BorderWidth 0 2 0 2
                                             , borderColor = (0.7, 0.7, 0.7, 0.9)
                                             , backgroundColor = (1, 1, 1, 0.9)
                                             }
      currentDesktopBorder = normalDesktopBorder { backgroundColor = (0.2, 0.2, 0.2, 0.9)
                                                 }
      taskStyle = TaskStyle { taskFont = "Sans 7"
                            , taskColor = (1, 1, 1, 1)
                            , taskBorder = normalTaskBorder
                            , taskIconStyle = idIconStyle
                            }
      normalDesktopStyle = DesktopStyle { desktopFont = "Sans 8"
                                        , desktopLabelWidth = 15
                                        , desktopLabelGap = (-5)
                                        , desktopColor = (0, 0, 0, 1)
                                        , desktopBorder = normalDesktopBorder
                                        }
      currentDesktopStyle = normalDesktopStyle { desktopBorder = currentDesktopBorder
                                               , desktopColor = (1, 1, 1, 1)
                                               }
                        
      
      theTaskbar = taskbar defaultTaskbarConfig { normalTaskStyle = taskStyle {taskIconStyle = desaturateIconStyle 0.7}
                                                , activeTaskStyle = taskStyle {taskBorder = activeTaskBorder}
                                                , desktopStyle = Just (normalDesktopStyle, currentDesktopStyle)
                                                }
      
      theSystray = systray
      
      theClock = clock defaultClockConfig { clockFormat = "<span font='Sans 8'>%R</span>\n<span font='Sans 6'>%A %d %B</span>"
                                          , lineSpacing = (-3)
                                          , clockSize = 75
                                          }
      brightBorder :: (Widget w s c) => w -> Border w s c
      brightBorder = border normalDesktopBorder