about summary refs log tree commit diff stats
path: root/home-manager/yambar/config/laptop.yml
blob: c3bfe6ab7d120139428ce0427a9c9e98b14f1aa7 (plain) (blame)
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
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
# Config file for yambar
# Note that this may be version-dependent, this file is written for v1.8.0


# Font anchors
font-main: &fontmain DejavuSansMono:pixelsize=22
font-aws: &awesome Font Awesome 5 Free:style=solid:pixelsize=20

# Color anchors
fg-none: &fgnone 00000000
fg-1: &fg1 c6ceefff
fg-blue: &fgblue 99d1dbff
fg-sapphire: &fgsapp 74c7ecdd
fg-green: &fggreen a6e3a1dd
fg-peach: &fgpeach fab387dd
fg-mauve: &fgmauve cba6f7dd
fg-teal: &fgteal 94e2d5dd
fg-lavendar: &fglav b4befedd
fg-focus: &fgfocus e78284ff
bg-1: &bg1 303446ff
bg-tag: &bgtag 585b70ff
bg-tag2: &bgtag2 45475aff
bg-urgent: &bgurgent e78284ff

# Background blocks
background-block: &bgcblock {background: {color: *bg1 }}
background-block-urgent: &bgcurg {background: {color: *bgurgent }}

# Underlines
underline-focused: &line {underline: { size: 3, color: *fgfocus}}
underline-urgent: &lineurgent {underline: { size: 3, color: *fgblue}}
underline-utils: &lineutil {underline: { size: 3, color: *fgpeach}}
underline-resources: &linemem {underline: { size: 3, color: *fggreen}}
underline-battery: &linebat {underline: { size: 3, color: *fgsapp}}
underline-clock: &lineclock {underline: { size: 3, color: *fgteal}}
underline-weather: &linewea {underline: { size: 3, color: *fglav}}
underline-title: &linetitle {underline: { size: 3, color: *bgtag}}

# Combined decorations
combination-utils: &combutil {stack: [ <<: *bgcblock, <<: *lineutil]}
combination-resources: &combmem {stack: [ <<: *bgcblock, <<: *linemem]}
combination-battery: &combbat {stack: [ <<: *bgcblock, <<: *linebat]}
combination-clock: &combclock {stack: [ <<: *bgcblock, <<: *lineclock]}
combination-weather: &combwea {stack: [ <<: *bgcblock, <<: *linewea]}


### Main

bar:
  location: top
  height: 25
  layer: bottom
  monitor: DP-2
  spacing: 0
  margin: 10
  border: {margin: 0, top-margin: 5}
  foreground: *fg1
  background: *fgnone
  font: *fontmain

  ### Left, river tags
  left:
    - river:
        anchors:
          - id: &name { text: "{id}" }
          - string: &focus { stack: [ {background: {color: *bg1}} ] }
          - string: &normal { string: { <<: *name, margin: 10 } }
          - string:
              &occupied { string: { <<: *name, deco: {background: {color: *bgtag2}}, margin: 10 } }
          - string: &urgent { string: { <<: *name, deco: {stack: [background: {color: *bgurgent}, <<: *lineurgent]}, margin: 10 } }
          - string: &focused { string: { <<: *name, deco: {stack: [background: {color: *bgtag}, <<: *line]}, margin: 10 } }
          - string: &unfocused { string: { <<: *name, deco: {background: {color: *bgtag2}}, margin: 10 } }
          - base: &river_base
              tag: state
              default: *normal
              values:
                focused: *focused
                unfocused: *unfocused
                urgent: *urgent
                invisible:
                  map:
                    tag: occupied
                    values:
                      true: *occupied
                      false: *normal
        content:
          map:
            on-click:
              left: sh -c "riverctl set-focused-tags $((1 << ({id} - 1)))"
              right: sh -c "riverctl toggle-focused-tags $((1 << ({id} -1)))"
              middle: sh -c "riverctl toggle-view-tags $((1 << ({id} -1)))"
            tag: id
            values:
              1: { map: { <<: *river_base } }
              2: { map: { <<: *river_base } }
              3: { map: { <<: *river_base } }
              4: { map: { <<: *river_base } }
              5: { map: { <<: *river_base } }
              6: { map: { <<: *river_base } }
              7: { map: { <<: *river_base } }
              8: { map: { <<: *river_base } }
              9: { map: { <<: *river_base } }
        title:
          map:
            tag: title
            default:
              {
                string:
                  {
                    text: "{title}",
                    left-margin: 12,
                    right-margin: 12,
                      #max: 35,
                    deco: *linetitle
                  },
              }
            values: { "": { string: { text: "" } } }