Skip to content

Instantly share code, notes, and snippets.

@domsson
Created June 26, 2020 12:02
Show Gist options
  • Save domsson/ac47e52aa07ffbb455f013ce2eb86f2f to your computer and use it in GitHub Desktop.
Save domsson/ac47e52aa07ffbb455f013ce2eb86f2f to your computer and use it in GitHub Desktop.
blocks = "desktop | | dummy mem cpu volume updates datetime"
width = 816
height = 14
foreground = #bbbece
background = #2a2c41
line-width = 2
line-color = #7285b7
block-prefix = " "
font = 6x13
label-font = "-wuncon-siji-medium-r-normal--10-100-75-75-c-80-iso10646-1"
affix-font = "-xos4-terminesspowerline-medium-r-normal--12-120-72-72-c-60-iso10646-1"
[desktop]
command = "bspc query -D -d focused --names"
trigger = "bspc subscribe"
prefix = " "
suffix = " "
underline = true
[dummy]
command = "echo ' '"
background = #bbd984
affix-foreground = #bbd984
affix-background = #2a2c41
[mem]
command = "mem-proc -mus"
live = true
label = "  Mem "
min-width = 5
foreground = #352c38
background = #7ea3fd
label-foreground = #352c38
label-background = #7ea3fd
affix-foreground = #7ea3fd
affix-background = #bbd984
[cpu]
command = "cpu-proc -mus"
live = true
label = "  Cpu "
min-width = 5
foreground = #352c38
background = #c399e7
label-foreground = #352c38
label-background = #c399e7
affix-foreground = #c399e7
affix-background = #7ea3fd
[volume]
command = "volume-pulse -mus -w'muted'"
live = true
label = "  "
min-width = 5
foreground = #352c38
background = #fadb82
label-foreground = #352c38
label-background = #fadb82
affix-foreground = #fadb82
affix-background = #c399e7
[updates]
command = "echo ' 27'"
background = #c399e7
label = "  Updates: "
foreground = #ffffff
background = #f27975
label-foreground = #ffffff
label-background = #f27975
affix-foreground = #f27975
affix-background = #fadb82
[datetime]
command = "datetime -m -f'%a %b %d, %Y %I:%M%p'"
label = "  "
live = true
affix-foreground = #2a2c41
affix-background = #f27975
@domsson
Copy link
Author

domsson commented Jul 9, 2020

Well, it really depends on the context. But let's say color was an int, then you could probably (I have not tested it) do this:

printf("%%{B#%08X}%s%%{B-}\n", color, output);

@Joe23232
Copy link

Joe23232 commented Jul 9, 2020

Oh I see mate thanks.

@Joe23232
Copy link

Joe23232 commented Jul 9, 2020

Have you used wmctrl package before? I am trying to get the output of the workspace's name but that seems to fail so I was just curious you have some experience with it by any chance?

@domsson
Copy link
Author

domsson commented Jul 9, 2020

I didn't even know about it, but it sounds very useful.

@Joe23232
Copy link

Joe23232 commented Jul 9, 2020

Yeah I was recommended to use it, but yeah I can't get the current work space's name (I can get hte ID).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment