diff options
| -rw-r--r-- | dot-config/yambar/config.yml | 176 | ||||
| -rwxr-xr-x | dot-config/yambar/scripts/newsboat | 7 | ||||
| -rwxr-xr-x | dot-config/yambar/scripts/pacman (renamed from dot-config/yambar/scripts/pacman-label) | 0 | ||||
| -rwxr-xr-x | dot-config/yambar/scripts/pacman-notify | 3 |
4 files changed, 85 insertions, 101 deletions
diff --git a/dot-config/yambar/config.yml b/dot-config/yambar/config.yml index e7bdb3a..a1550e6 100644 --- a/dot-config/yambar/config.yml +++ b/dot-config/yambar/config.yml @@ -1,31 +1,31 @@ # -# YAMBAR CONFIG +# YAMBAR # # VARIABLES define: # Colours - - &bg 00000000 + - &bg 000000ff + - &mg 222222ff - &fg ffffffff - &fgdim ffffff88 - - &red f38ba8ff + - &red ff959cff - &green 90ee90ff - &blue 89b4faff - &purple cba6f7ff - &yellow f1c40fff - &teal 00ddccff - - &magenta ff4578ff + - &orange fab12Fff - &RED ff0000ff - - &YLW ffff00ff - &GRN 00ff00ff + - &YLW ffff00ff # Settings - &font 'hack-nerd:size=24:weight=bold' - &margin 20 - &height 50 - - &line 2 # Actions - &select-workspace "swaymsg workspace number {name}" @@ -42,14 +42,7 @@ define: # MODULES battery: &battery name: BAT0 - poll-interval: 1000 - anchors: - battery-anchor: &battery-anchor - margin: *margin - deco: - stack: - - {underline: {size: *line, color: *teal}} - - {background: {color: *bg}} + poll-interval: 3000 content: map: conditions: @@ -61,34 +54,26 @@ battery: &battery - ramp: tag: capacity items: - - string: {text: "({estimate}) {capacity}% ", foreground: *RED, <<: *battery-anchor} - - string: {text: "({estimate}) {capacity}% ", foreground: *yellow, <<: *battery-anchor} - - string: {text: "({estimate}) {capacity}% ", foreground: *teal, <<: *battery-anchor} - - string: {text: "({estimate}) {capacity}% ", foreground: *teal, <<: *battery-anchor} - - string: {text: "({estimate}) {capacity}% ", foreground: *teal, <<: *battery-anchor} + - string: {text: "({estimate}) {capacity}% ", margin: *margin, foreground: *RED} + - string: {text: "({estimate}) {capacity}% ", margin: *margin, foreground: *yellow} + - string: {text: "({estimate}) {capacity}% ", margin: *margin, foreground: *teal} + - string: {text: "({estimate}) {capacity}% ", margin: *margin, foreground: *teal} + - string: {text: "({estimate}) {capacity}% ", margin: *margin, foreground: *teal} state == "charging": - ramp: tag: capacity items: - - string: {text: "({estimate}) {capacity}% ", foreground: *RED, <<: *battery-anchor} - - string: {text: "({estimate}) {capacity}% ", foreground: *YLW, <<: *battery-anchor} - - string: {text: "({estimate}) {capacity}% ", foreground: *GRN, <<: *battery-anchor} + - string: {text: "({estimate}) {capacity}% ", margin: *margin, foreground: *RED} + - string: {text: "({estimate}) {capacity}% ", margin: *margin, foreground: *YLW} + - string: {text: "({estimate}) {capacity}% ", margin: *margin, foreground: *GRN} state == "full": - - string: {text: "{capacity}% ", foreground: *green, <<: *battery-anchor} + - string: {text: "{capacity}% ", margin: *margin, foreground: *green} pipewire: &pipewire anchors: - volume-anchor: &volume-anchor - foreground: *yellow + pipewire-anchor: &pipewire-anchor margin: *margin - deco: - stack: - - {underline: {size: *line, color: *yellow}} - - {background: {color: *bg}} - on-click: - left: *audiomixer - wheel-up: *volume-up - wheel-down: *volume-down + foreground: *yellow content: map: conditions: @@ -98,67 +83,46 @@ pipewire: &pipewire - ramp: tag: cubic_volume items: - - string: {text: "{cubic_volume}% ", <<: *volume-anchor} - - string: {text: "{cubic_volume}% ", <<: *volume-anchor} - - string: {text: "{cubic_volume}% ", <<: *volume-anchor} + - string: {text: "{cubic_volume}% ", <<: *pipewire-anchor} + - string: {text: "{cubic_volume}% ", <<: *pipewire-anchor} + - string: {text: "{cubic_volume}% ", <<: *pipewire-anchor} conditions: - muted: + muted: string: text: "mute " - foreground: *red margin: *margin - deco: - stack: - - {underline: {size: *line, color: *red}} - - {background: {color: *bg}} - on-click: *audiomixer + foreground: *red + on-click: + left: *audiomixer + wheel-up: *volume-up + wheel-down: *volume-down network: &network - anchors: - network-anchor: &network-anchor - text: "{ssid} " - margin: *margin - deco: - stack: - - {underline: {size: *line, color: *green}} - - {background: {color: *bg}} content: map: conditions: name == "wlan0": map: - default: - string: {text: "{ssid} ({state}) "} + default: {string: {text: "{ssid} ({state}) "}} conditions: state == "up": - string: {foreground: *green, <<: *network-anchor} + string: {text: "{ssid} ", margin: *margin, foreground: *green} state == "down": - string: {text: "Offline ", <<: *network-anchor, foreground: *red} - on-click: *network-control + string: {text: "Offline ", margin: *margin, foreground: *red} + on-click: *network-control clock: &clock time-format: "%R" content: - string: - text: "{time} " - foreground: *blue - margin: *margin - deco: - stack: - - {underline: {size: *line, color: *blue}} - - {background: {color: *bg}} + string: {text: "{time} ", margin: *margin, foreground: *blue} date: &date date-format: "%F" content: string: text: "{date} " - foreground: *purple margin: *margin - deco: - stack: - - {underline: {size: *line, color: *purple}} - - {background: {color: *bg}} + foreground: *purple on-click: *calendar workspace: &workspace @@ -168,74 +132,88 @@ workspace: &workspace "": map: default: - string: - text: "{name}" - foreground: *fgdim - margin: *margin - on-click: *select-workspace + string: {text: "{name}", margin: *margin, foreground: *fgdim} conditions: name == "0": {string: {text: ""}} state == "focused": - string: - text: "{name}" - foreground: *fg - margin: *margin - deco: - stack: - - {underline: {size: *line, color: *fg}} - - {background: {color: *bg}} + string: {text: "{name}", margin: *margin, foreground: *fg} state == "urgent": - string: - text: "{name}" - foreground: *red - margin: *margin + string: {text: "{name}", margin: *margin, foreground: *red} + on-click: *select-workspace +# Note: name is found in '/sys/class/backlight' backlight: &backlight -# note: name is found in '/sys/class/backlight' name: intel_backlight content: string: text: "{percent}% " margin: *margin foreground: *fg - deco: - stack: - - {underline: {size: *line, color: *fg}} - - {background: {color: *bg}} on-click: wheel-up: *brightness-up wheel-down: *brightness-down pacman: &pacman - path: ~/.config/yambar/scripts/pacman-label - args: [] + path: ~/.config/yambar/scripts/pacman + poll-interval: 3000 content: string: text: "{count} " foreground: *red margin: *margin - deco: - stack: - - {underline: {size: *line, color: *red}} - - {background: {color: *bg}} on-click: left: *pacman-notify right: *pacman-update +# Newsboat +newsboat: &newsboat + path: ~/.config/yambar/scripts/newsboat + poll-interval: 10000 + content: + string: + text: "{unread} " + foreground: *orange + margin: *margin + +mpd: &mpd + host: /run/user/1000/mpd/socket + anchors: + mpd-anchor: &mpd-anchor + foreground: *fg + margin: *margin + content: + map: + default: {string: {text: "{state} 🎶", foreground: *fg, <<: *mpd-anchor}} + conditions: + state == paused: + string: {text: "{artist} - {title} 🎶", <<: *mpd-anchor} + state == playing: + string: {text: "{artist} - {title} 🎶", <<: *mpd-anchor} + state == stopped: + string: {text: "mpd 🎶", <<: *mpd-anchor} + on-click: + left: mpc toggle + right: mpc next + wheel-up: mpc next + wheel-down: mpc prev + # LAYOUT bar: location: top foreground: *fg - background: *bg + background: *mg margin: *margin font: *font spacing: 10 - height: 49 + height: 45 + border: {color: *bg, bottom-width: 2} left: - i3: *workspace right: + - mpd: *mpd + - script: *newsboat - script: *pacman - network: *network - backlight: *backlight diff --git a/dot-config/yambar/scripts/newsboat b/dot-config/yambar/scripts/newsboat new file mode 100755 index 0000000..3fb006c --- /dev/null +++ b/dot-config/yambar/scripts/newsboat @@ -0,0 +1,7 @@ +#!/bin/sh + +# Get unread count +unread=$(cut -f1 -d' ' ~/.cache/unread) + +# Display unread count +printf "%s\n\n" "unread|int|$unread" diff --git a/dot-config/yambar/scripts/pacman-label b/dot-config/yambar/scripts/pacman index 7015e5b..7015e5b 100755 --- a/dot-config/yambar/scripts/pacman-label +++ b/dot-config/yambar/scripts/pacman diff --git a/dot-config/yambar/scripts/pacman-notify b/dot-config/yambar/scripts/pacman-notify index a9ce535..9c6a84b 100755 --- a/dot-config/yambar/scripts/pacman-notify +++ b/dot-config/yambar/scripts/pacman-notify @@ -13,6 +13,5 @@ fi # Notify notify-send \ - -i package-x-generic \ -h string:x-canonical-private-synchronous:updates \ - "$msg" "$(cut -f1 -d' ' ~/.cache/updates)" + "$msg" "$(cut -f1 -d' ' ~/.cache/updates | sed -z 's/\n/ /g')" |
