aboutsummaryrefslogtreecommitdiff
path: root/.config/yambar/config.yml
blob: 85862b0dfc10378bd75714a418f2d4a69b2a9ee6 (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
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
nerdfont: &nerdfont Symbols Nerd Font Mono:pixelsize=12 
gomono: &gomono GoMono Nerd Font Mono:pixelsize=12
focused: &focused {stack: [{background: {color: 00000000}}, {underline: {size: 3, color: 98971aff}}]}
col-inv: &col-inv {foreground: a89984ff}

bar:
  font: *gomono
  height: 20
  location: top
  left-margin: 10
  right-spacing: 8
  right-margin: 10
  border:
    top-margin: 5 
    left-margin: 10
    right-margin: 10
    color: d8dee900 
  background: 000000aa
  foreground: ffffffff

  left:
  - river:
      anchors:
      - base: &river_base
          margin: 10
          text: "{id}"
          on-click: sh -c "riverctl set-focused-tags $((1 << ({id} - 1)))"

      # title:
      #   string:
      #     margin: 6
      #     text: "{title}"

      content:
        map:
          conditions:
            # Don't display any tags higher or equal to 10
            id >= 10: { string: { text: "" }} 
            state == focused:
              { string: { <<: [*river_base, deco: *focused] }}
            state == unfocused:
              string:
                <<: *river_base
            state == invisible:
              map:
                conditions:
                  occupied:
                    string:
                      <<: *river_base
                      deco:
                        stack:
                        - underline: { size: 3, color: 00000000 }
                  ~occupied:
                    map:
                      deco: {background: {color: 00000000 }}
                      default:
                        empty: {}
                      conditions:
                        # 9 default tags that are shown unless occupied
                        id == 1: { string: { <<: [*river_base, *col-inv] }}
                        id == 2: { string: { <<: [*river_base , *col-inv] }}
                        id == 3: { string: { <<: [*river_base , *col-inv] }}
                        id == 4: { string: { <<: [*river_base , *col-inv] }}
                        id == 5: { string: { <<: [*river_base , *col-inv] }}
                        id == 6: { string: { <<: [*river_base , *col-inv] }}
                        id == 7: { string: { <<: [*river_base , *col-inv] }}
                        id == 8: { string: { <<: [*river_base , *col-inv] }}
                        id == 9: { string: { <<: [*river_base , *col-inv] }}
  center:
    - script:
        path: ~/.config/yambar/scripts/dater.sh
        args: []
        content:
            string: 
                margin: 0
                text: "{date}"
                on-click: sh -c "~/.config/yambar/scripts/calendar.sh show"
    - clock:
        content:
          - string:
                margin: 0
                text: "{time}"

  right: 
    - script:
        path: ~/.config/yambar/scripts/void-updates.sh
        args: []
        content: 
            string: 
                margin: 0
                text: "{updates}"
                font: *nerdfont
                foreground: 98971aff
                on-click: sh -c "~/.config/yambar/scripts/void-updates.sh update"
    - script:
        path: ~/.config/yambar/scripts/idleinhibit.sh
        args: []
        content: 
            string: 
                margin: 0
                text: "{idleinhibit}"
                font: *nerdfont
                on-click: sh -c "~/.config/yambar/scripts/idleinhibit.sh toggle"
    - pipewire:
        anchors:
          volume: &volume
            conditions:
              muted:
                string:
                  text: "0%"
                  on-click:
                    middle: sh -c "pactl set-sink-mute @DEFAULT_SINK@ toggle"
              ~muted:
                string:
                  text: "{cubic_volume}%"
                  on-click:
                    left: sh -c "pactl set-sink-volume @DEFAULT_SINK@ -2%"
                    middle: sh -c "pactl set-sink-mute @DEFAULT_SINK@ toggle"
                    right: sh -c "pactl set-sink-volume @DEFAULT_SINK@ +2%"
        content:
          list:
            items:
              - map:
                  conditions:
                    type == "sink":
                      map:
                        conditions:
                          icon == "audio-headset-bluetooth":
                            string: {text: "󰋋", font: *nerdfont}
                          muted: {string: {text: "󰝟", font: *nerdfont}}
                        default:
                          - ramp:
                              tag: cubic_volume
                              items:
                                - string: {text: "󰕿", font: *nerdfont}
                                - string: {text: "󰖀", font: *nerdfont}
                                - string: {text: "󰕾", font: *nerdfont}
                    type == "source":
                      - string: {text: "", font: *nerdfont, left-margin: 5}
              - map:
                  <<: *volume
    - backlight:
        name: amdgpu_bl0
        content: [ string: {text: , font: *nerdfont}, string: {text: "{percent}%", on-click: { left: sh -c "brightnessctl s 5-", right: sh -c "brightnessctl s +5"}}]
    - network:
        name: enp5s0
        content:
          map:
            conditions:
              state == down: {string: {text: 󰲜, font: *nerdfont, foreground: ffffffff}}
              ~carrier: {empty: {}}
              carrier:
                map:
                  default: {string: {text: 󰈀, font: *nerdfont, foreground: ffffffff}}
                  conditions:
                    state == up && ipv4 != "": {string: {text: 󰈀, font: *nerdfont}}
    - network:
        name: wlp3s0
        poll-interval: 1000
        content:
          map:
            default: {string: {text: , font: *nerdfont, foreground: ffffff66}}
            conditions:
              state == down: {string: {text: , font: *nerdfont, foreground: ffffffff}}
              state == up:
                map:
                  default:
                    - string: {text: , font: *nerdfont}
                    - string: {text: "{ssid}"}

                  conditions:
                    ipv4 == "":
                      - string: {text: , font: *nerdfont, foreground: ffffff66}
                      - string: {text: "{ssid}", foreground: ffffff66}
    - battery:
        name: BAT0
        poll-interval: 10000
        anchors:
          discharging: &discharging
            list:
              items:
                - ramp:
                    tag: capacity
                    items:
                      - string: {text: , foreground: ff0000ff, font: *nerdfont}
                      - string: {text: , foreground: ffa600ff, font: *nerdfont}
                      - string: {text: , font: *nerdfont}
                      - string: {text: , font: *nerdfont}
                      - string: {text: , font: *nerdfont}
                      - string: {text: , font: *nerdfont}
                      - string: {text: , font: *nerdfont}
                      - string: {text: , font: *nerdfont}
                      - string: {text: , font: *nerdfont}
                      - string: {text: , foreground: ffffffff, font: *nerdfont}
                - string: {text: " {capacity}% {estimate}"}
        content:
          map:
            conditions:
              state == unknown:
                <<: *discharging
              state == discharging:
                <<: *discharging
              state == full:
                - string: {text: , foreground: ffffffff, font: *nerdfont}
                - string: {text: " {capacity}%"}
              state == "not charging":
                - string: {text: , foreground: ffffffff, font: *nerdfont}
                - string: {text: " {capacity}%"}
              state == charging:
                - ramp:
                    tag: capacity
                    items:
                      - string: {text:  , foreground: ff0000ff, font: *nerdfont}
                      - string: {text:  , foreground: ffa600ff, font: *nerdfont}
                      - string: {text:  , foreground: ffffffff, font: *nerdfont}
                      - string: {text:  , foreground: ffffffff, font: *nerdfont}
                      - string: {text:  , foreground: ffffffff, font: *nerdfont}
                      - string: {text:  , foreground: ffffffff, font: *nerdfont}
                      - string: {text:  , foreground: ffffffff, font: *nerdfont}
                      - string: {text:  , foreground: ffffffff, font: *nerdfont}
                      - string: {text:  , foreground: ffffffff, font: *nerdfont}
                      - string: {text:  , foreground: ffffffff, font: *nerdfont}
                - string: {text: " {capacity}%"}