aboutsummaryrefslogblamecommitdiff
path: root/.config/yambar/config.yml
blob: 8cf8d5d7f4a2ec6beb4f5483efdc83d1ede98ed0 (plain) (tree)





























































                                                                                                           





                                                                          
 



                           
 





































                                                                                      


































                                                                                 




                                               























































































































                                                                                                                                                        
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
          margin: 10
          text: "{id}"
          on-click: sh -c "riverctl set-focused-tags $((1 << ({id} - 1)))"

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

      content:
        map:
          conditions:
            state == focused:
              string:
                <<: *river_base
                deco:
                  stack:
                  - background: { color: 00000000 }
                  - underline: { size: 3, color: 98971aff }
            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, foreground: a89984ff }}
                        id == 2: { string: { <<: *river_base , foreground: a89984ff }}
                        id == 3: { string: { <<: *river_base , foreground: a89984ff }}
                        id == 4: { string: { <<: *river_base , foreground: a89984ff }}
                        id == 5: { string: { <<: *river_base , foreground: a89984ff }}
                        id == 6: { string: { <<: *river_base , foreground: a89984ff }}
                        id == 7: { string: { <<: *river_base , foreground: a89984ff }}
                        id == 8: { string: { <<: *river_base , foreground: a89984ff }}
                        id == 9: { string: { <<: *river_base , foreground: a89984ff }}
  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}%"}