domsson / succade

Run, feed and style your Lemonbar with ease
Creative Commons Zero v1.0 Universal
55 stars 3 forks source link

Hi, how would I connect an external script to it? #54

Closed Joe23232 closed 3 years ago

Joe23232 commented 3 years ago

Hey man I don't know if you remember me. it has been a while since I have tried any of this and this is because I have been away.

Anyways I wanted to try this again but I forgot how do I connect a script to your code?

Here is my current succade config file (very similar to your default configuration).

[bar]
name = "testbar"
blocks = "desktop | user | date time"
height = 24
areas = 16
foreground = "#222222"
background = "#262626"
line-color = "#555555"
line-width = 2
bottom = true

[default]
label-foreground = "#dddddd"
affix-foreground = "#555555"
margin = 8
padding-left = 1
prefix = "[ " 
suffix = " ]"
underline = true

[desktop]
command = "bspc query -D -d focused --names"
trigger = "bspc subscribe"
label = "WORKSPACE"
margin-left = 8

[user]
command = "whoami"
label = "USER"

[date]
command = "date +'%Y-%m-%d'"
interval = 1
label = "DATE"

[time]
command = "date +'%H:%M:%S'"
interval = 1
label = "TIME"
mouse-left = "xclock"
margin-right = 8

I wanted to connect my script that will show on the left hand side:

image

domsson commented 3 years ago

Hey Joe, not sure what you mean when you say you want to "connect" your script. But as long as your script outputs text, you can simply use it as the command. Say your script is called joe-foo-bar, then in your config, have something like:

[foo-bar]
command = "joe-foo-bar"

This assumes the script is in your PATH.

Joe23232 commented 3 years ago

Hey man,

Oh I see, thanks mate :)

domsson commented 3 years ago

Assuming this is solved. Otherwise let me know.