Last active
May 20, 2022 10:09
-
-
Save lidgnulinux/0050d462e8b7a5f8ccd5a4b39f518658 to your computer and use it in GitHub Desktop.
Yambar Configuration for vivarium wayland compositor.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env bash | |
# add this to your yambar configuration, left for example: | |
# left: | |
# - script: | |
# path: /home/ahmad/bin/viwo.sh | |
# args: [] | |
# content: {string: {text: "{workspace}"}} | |
declare workspace | |
readonly fname=/home/ahmad/.config/file.txt | |
_cycle() { | |
printf -- '%s\n' "workspace|string|${workspace}" | |
printf -- '%s\n' "" | |
} | |
_cycle | |
while true; do | |
inotifywait -qq --event modify "${fname}" | |
workspace="$(cat "${fname}")" | |
_cycle | |
done | |
unset -v workspace |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Typical laptop setup, with wifi, brightness, battery etc, for | |
# i3/Sway. | |
# For X11/i3, you'll want to replace calls to swaymsg with i3-msg, and | |
# the sway-xkb module with the xkb module. | |
# fonts we'll be re-using here and there | |
awesome: &awesome Font Awesome 5 Free:style=solid:pixelsize=10 | |
#awesome_brands: &awesome_brands Font Awesome 5 Brands:pixelsize=16 | |
std_underline: &std_underline {underline: { size: 2, color: ff0000ff}} | |
# This is THE bar configuration | |
bar: | |
height: 18 | |
location: top | |
spacing: 5 | |
margin: 3 | |
monitor: LVDS-1 | |
# Default font | |
font: Ubuntu Mono derivative Powerline:style=Bold:pixelsize=12 | |
#Adobe Helvetica | |
foreground: ffffffff | |
background: 00004fff | |
#004c66ff | |
border: | |
width: 2 | |
color: 999999cc | |
margin: 3 | |
top-margin: 3 | |
left: | |
- label: | |
content: | |
string: | |
on-click: fuzzel -i Papirus -r 0 -b 2b303b80 -w 50 -t ccffffff --line-height=15 | |
text: " Home" | |
font: *awesome | |
- label: | |
content: | |
string: | |
on-click: /home/ahmad/bin/screen-screenshot | |
text: " Camera" | |
font: *awesome | |
- script: | |
path: /home/ahmad/bin/viwo.sh | |
args: [] | |
content: {string: {text: "{workspace}"}} | |
right: | |
- removables: | |
anchors: | |
drive: &drive { text: , font: *awesome} | |
optical: &optical {text: , font: *awesome} | |
spacing: 5 | |
content: | |
map: | |
tag: mounted | |
values: | |
false: | |
map: | |
tag: optical | |
on-click: udisksctl mount -b {device} | |
values: | |
false: [{string: *drive}, {string: {text: "{label}"}}] | |
true: [{string: *optical}, {string: {text: "{label}"}}] | |
true: | |
map: | |
tag: optical | |
on-click: udisksctl unmount -b {device} | |
values: | |
false: | |
- string: {<<: *drive, deco: *std_underline} | |
- string: {text: "{label}"} | |
true: | |
- string: {<<: *optical, deco: *std_underline} | |
- string: {text: "{label}"} | |
- sway-xkb: | |
identifiers: [1:1:AT_Translated_Set_2_keyboard] | |
content: | |
- string: {text: , font: *awesome} | |
- string: {text: "{layout}"} | |
- network: | |
name: enp1s0 | |
content: | |
map: | |
tag: carrier | |
values: | |
false: {empty: {}} | |
true: | |
map: | |
tag: state | |
default: {string: {text: , font: *awesome, foreground: ffffff66}} | |
values: | |
up: | |
map: | |
tag: ipv4 | |
default: {string: {text: , font: *awesome}} | |
values: | |
"": {string: {text: , font: *awesome, foreground: ffffff66}} | |
- network: | |
name: wlp3s0 | |
content: | |
map: | |
tag: state | |
default: {string: {text: , font: *awesome, foreground: ffffff66}} | |
values: | |
down: {string: {text: , font: *awesome, foreground: ff0000ff}} | |
up: | |
map: | |
tag: ipv4 | |
default: {string: {text: , font: *awesome}} | |
values: | |
"": {string: {text: , font: *awesome, foreground: ffffff66}} | |
- alsa: | |
card: hw:PCH | |
mixer: Master | |
content: | |
map: | |
on-click: pavucontrol | |
tag: muted | |
values: | |
true: {string: {text: , font: *awesome, foreground: ffffff66}} | |
false: | |
ramp: | |
tag: volume | |
items: | |
- string: {text: , font: *awesome} | |
- string: {text: , font: *awesome} | |
- string: {text: , font: *awesome} | |
- string: {text: , font: *awesome} | |
- string: {text: , font: *awesome} | |
- battery: | |
name: BAT0 | |
poll-interval: 30 | |
content: | |
map: | |
tag: state | |
values: | |
discharging: | |
- ramp: | |
tag: capacity | |
items: | |
- string: {text: , foreground: ff0000ff, font: *awesome} | |
- string: {text: , foreground: ffa600ff, font: *awesome} | |
- string: {text: , font: *awesome} | |
- string: {text: , font: *awesome} | |
- string: {text: , font: *awesome} | |
- string: {text: , font: *awesome} | |
- string: {text: , font: *awesome} | |
- string: {text: , font: *awesome} | |
- string: {text: , font: *awesome} | |
- string: {text: , foreground: 00ff00ff, font: *awesome} | |
- string: {text: "{capacity}% {estimate}"} | |
charging: | |
- string: {text: , foreground: 00ff00ff, font: *awesome} | |
- string: {text: "{capacity}% {estimate}"} | |
full: | |
- string: {text: , foreground: 00ff00ff, font: *awesome} | |
- string: {text: "{capacity}% full"} | |
- clock: | |
time-format: "%H:%M %Z" | |
content: | |
# - string: {text: , font: *awesome} | |
- string: {text: "{date}", right-margin: 5} | |
# - string: {text: , font: *awesome} | |
- string: {text: "{time}"} | |
- label: | |
content: | |
string: | |
on-click: wlogout -p layer-shell | |
text: " " | |
font: *awesome |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
This is a yambar configuration for vivarium wayland compositor.