#! /usr/bin/ruby # This is a script that uses transset-df or any other transset- # patch that can take an window id as argument to allow # opacity to follow the focused window in enlightenment 0.16 # The focused window get opacity 1.0 while all others # have opacity set by the var 'faded' in this script # It is licensed under the GNU GPL license # http://www.gnu.org/licenses/gpl.html # This program is written by: Daniel Forchheimer # Last update: 2005-01-21 Float faded = 0.5; String transset = "/usr/bin/transset-df"; #initialize by fading all windowses s = `eesh -ewait window_list`; s.each_line do |l| w = l.split[0]; if(w!=nil) then system("#{transset} --id #{w} #{faded} >/dev/null"); end end last = 0; while(true) do s = `eesh -ewait dump_info | grep Focus`; active = s[12..-1].chomp if(last!=active) then system("#{transset} --id #{active} 1 >/dev/null"); system("#{transset} --id #{last} #{faded} >/dev/null"); last = active; end sleep 0.1 end