Skip to content

Instantly share code, notes, and snippets.

View kronn's full-sized avatar

Matthias Viehweger kronn

View GitHub Profile
@kronn
kronn / workrave-info
Created August 29, 2018 08:43
A small tool to query workrave via DBus and implement a text-based widget for status-bars
#!/usr/bin/env /home/mviehweger/.rvm/wrappers/ruby-2.4.2/ruby
# frozen_string_literal: true
# http://trac.luon.net/data/ruby-dbus/tutorial/basic_client.html
# for ubuntu, there is d-feet
begin
require 'dbus'
rescue LoadError => e
require 'rbconfig'
@kronn
kronn / monitors
Created November 9, 2018 09:22
thin wrapper around xrandr to determine the primary output (among others)
#!/usr/bin/env ruby
# frozen_string_literal: true
# Detect the monitor setup
#
# rubocop:disable Metrics/LineLength,Lint/MissingCopEnableDirective
command = ARGV[0]
# subcommand = ARGV[1]
# value-object with high-end regex string-parsing power