Skip to content

Instantly share code, notes, and snippets.

@nfedyashev
Created July 22, 2021 13:12
Show Gist options
  • Save nfedyashev/9f7d4036f38a15ca7129b06b217fc85a to your computer and use it in GitHub Desktop.
Save nfedyashev/9f7d4036f38a15ca7129b06b217fc85a to your computer and use it in GitHub Desktop.
i3blocks - ruby json output command
# [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