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
abort 'Aborting. Gemfile already exists.' if File.exists? 'Gemfile' | |
@requires = [] | |
files = Dir['*.rb'] | |
files.each do |file| | |
open file do |file| | |
file.each do |line| | |
@requires << line.chomp if line.start_with? 'require ' | |
end |
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
function active-window-id { | |
echo `xprop -root | awk '/_NET_ACTIVE_WINDOW\(WINDOW\)/{print $NF}'` | |
} | |
# end and compare timer, notify-send if needed | |
function notifyosd-precmd() { | |
if [ ! -z "$cmd" ]; then | |
cmd_end=`date +%s` | |
((cmd_time=$cmd_end - $cmd_start)) | |
fi |
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
# commands to ignore | |
cmdignore=(htop tmux top vim) | |
# end and compare timer, notify-send if needed | |
function notifyosd-precmd() { | |
retval=$? | |
if [[ ${cmdignore[(r)$cmd_basename]} == $cmd_basename ]]; then | |
return | |
else | |
if [ ! -z "$cmd" ]; then |