aboutsummaryrefslogtreecommitdiff
path: root/.config/yambar/config.yml
blob: 2c402fb9aac79049b0d26da6acafdbaff00d5b1b (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
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
nerdfont: &nerdfont Symbols Nerd Font Mono:pixelsize=12 
gomono: &gomono GoMono Nerd Font Mono:pixelsize=12
bg_default: &bg_default {stack: [{background: {color: 00000000}}, {underline: {size: 3, color: 98971aff}}]}

std_underline: &std_underline {underline: { size: 5, color: 98c379ff}}

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

  left:
    # - i3:
    #     # persistent: [1, 2, 3, 4, 5, 6, 7, 8, 9]
    #     sort: ascending
    #     anchors:
    #       - string: &i3_common {margin: 5, on-click: "~/.config/waybar/scripts/dispatch.sh {name}"}
    #       - string: &default {<<: *i3_common, text: "{name}", margin: 10}
    #       - focused: &focused
    #           deco: {stack: [ *bg_default]}
    #       - invisible: &invisible {foreground: 888888ff}
    #       - urgent: &urgent
    #           deco: {stack: [background: {color: eb6e67ff}, <<: *std_underline]}
    #       - map: &i3_mode
    #           default:
    #             - string:
    #                 margin: 5
    #                 text: "{mode}"
    #                 deco: {background: {color: cc421dff}}
    #             - empty: {right-margin: 0}
    #           conditions:
    #             mode == default: {empty: {}} 
    #     content:
    #       "":
    #         map:
    #           conditions:
    #             state == focused:   {string: {<<: [*default, *focused]}}
    #             state == unfocused: {string: {<<: *default}}
    #             state == invisible: {string: {<<: [*default, *invisible]}}
    #             state == urgent:    {string: {<<: [*default, *urgent]}}
    #
    #       current:
    #         map:
    #           left-margin: 7
    #           conditions:
    #             application == "":
    #               - map: {<<: *i3_mode}
    #               - string: {text: "{title}"}
    #           default:
    #             list:
    #               spacing: 0
    #               items:
    #                 - map: {<<: *i3_mode}
    - river:
        anchors:
          - base: &river_base
              left-margin: 10
              right-margin: 10 
              default: {string: {text: , font: *gomono}}
              conditions:
                id == 1: {string: {text: 1, font: *gomono}}  
                id == 2: {string: {text: 2, font: *gomono}}  
                id == 3: {string: {text: 3, font: *gomono}}  
                id == 4: {string: {text: 4, font: *gomono}}  
                id == 5: {string: {text: 5, font: *gomono}}  
                id == 6: {string: {text: 6, font: *gomono}}  
                id == 7: {string: {text: 7, font: *gomono}}  
                id == 8: {string: {text: 8, font: *gomono}}  
                id == 9: {string: {text: 9, font: *gomono}}
                # id == 21: {string: {text: "Scratchpad", font: *gomono}}

        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)))"
            conditions:
              state == urgent:
                map:
                  <<: *river_base
                  deco: {background: {color: D08770ff}}
              state == focused:
                map:
                  <<: *river_base
                  deco: *bg_default
              state == visible && ~occupied:
                map:
                  <<: *river_base
              state == visible && occupied:
                map:
                  <<: *river_base
                  deco: *bg_default
              state == unfocused:
                map:
                  <<: *river_base
              state == invisible && ~occupied: {empty: {}}
              state == invisible && occupied:
                map:
                  <<: *river_base
                  deco: {underline: {size: 3, color: 00000000}}

  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"
    - sway-xkb:
        identifiers:
          - 1:1:AT_Translated_Set_2_keyboard
        spacing: 5
        content: {string: {text: "{layout}"}}
    - pipewire:
        anchors:
          volume: &volume
            conditions:
              muted:
                string:
                  text: "0%"
                  on-click:
                    middle: sh -c "amixer set Master 1+ toggle"
              ~muted:
                string:
                  text: "{cubic_volume}%"
                  on-click:
                    left: sh -c "amixer sset Master 2%-"
                    middle: sh -c "amixer set Master 1+ toggle"
                    right: sh -c "amixer sset Master 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 "light -U 5", right: sh -c "light -A 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} {dl-speed:mb}/{ul-speed:mb} Mb/s"}

                  conditions:
                    ipv4 == "":
                      - string: {text: , font: *nerdfont, foreground: ffffff66}
                      - string: {text: "{ssid} {dl-speed:mb}/{ul-speed:mb} Mb/s", 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 == charging:
                - string: {text: , foreground: ffffffff, font: *nerdfont}
                - string: {text: "{capacity}% {estimate}"}
              state == full:
                - string: {text: , foreground: ffffffff, font: *nerdfont}
                - string: {text: "{capacity}% full"}
              state == "not 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}%"}