Created
July 22, 2021 13:12
-
-
Save nfedyashev/9f7d4036f38a15ca7129b06b217fc85a to your computer and use it in GitHub Desktop.
i3blocks - ruby json output command
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
# [ib] | |
# command=/home/nikita/.rbenv/shims/ruby /home/nikita/Projects/nikita-dotfiles/bin/ibb | |
# interval=10 | |
# format=json | |
# frozen_string_literal: true | |
require "bundler/setup" | |
require_relative "../lib/ibb | |
require 'json' | |
color = [ | |
'#D0312D', # red | |
'#000000' | |
].sample | |
hash = { | |
full_text: 'test', | |
# color: red, | |
background: color, | |
} | |
puts hash.to_json |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment