From f699652e81270f70d23b128ab6a16884e643d1cb Mon Sep 17 00:00:00 2001 From: Justine Smithies Date: Fri, 27 Oct 2023 20:52:08 +0100 Subject: Revised code for River tags in Yambar --- .config/yambar/config.yml | 95 ++++++++++++++++++++++++----------------------- 1 file changed, 48 insertions(+), 47 deletions(-) (limited to '.config') diff --git a/.config/yambar/config.yml b/.config/yambar/config.yml index df11ddd..8cf8d5d 100644 --- a/.config/yambar/config.yml +++ b/.config/yambar/config.yml @@ -60,55 +60,56 @@ bar: # 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}} + - river: + anchors: + - base: &river_base + margin: 10 + text: "{id}" + on-click: sh -c "riverctl set-focused-tags $((1 << ({id} - 1)))" - 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}} + # 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 -- cgit v1.2.3