Skip to content

stewart/dotcss

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

38 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

dotcss

dotcss is two(2) things:

  1. A tiny web server that runs on your machine, serving CSS files out of ~/.css
  2. A Chrome extension that fetches these CSS files and injects them based on their filename.

The files are requested on a per-page basics, based on the hostname. For example, if you go to https://github.com, ~/.css/gh.neting.cc.css would be injected into the page.

This makes it super simple and easy to change and improve the look of your favorite sites.

How it works

Chrome extensions can't access the filesystem, so dotcss runs a tiny web server on port 1243 that serves files out of the ~/.css folder.

Requirements

  • OS X or Linux
  • Ruby 1.8 or newer
  • rake (gem install rake)
  • Chrome or Chromium
  • /usr/local/bin in your $PATH
  • on Linux: exo-open (Can be found in exo-utils on Ubuntu. Required until Bug #378783 in xdg-utils is fixed.)

Installation

git clone http://github.com/stewart/dotcss.git
cd dotcss
rake install

Now open https://localhost:1243 in Chrome and follow these steps:

  • Click the "X" Padlock icon in the address bar
  • Click "Certificate Information"
  • Drag the large cert icon to your desktop
  • Open it with Keychain
  • Configure its Trust section as shown: http://cl.ly/Pdny

Then, go grab the Chrome extension and have fun!

If you use Safari, @maman has a pretty cool extension you can use.

Uninstallation

rake uninstall

Chrome/Chromium/Chrome Canary

If you have multiple versions of Chrome installed, just install the extension in whichever one you fancy.

Troubleshooting

Attempting to run rake install within a tmux session may fail with the following error:

Could not open job overrides database at: /private/var/db/launchd.db/com.apple.launchd/overrides.plist: 13: Permission denied
launchctl: Error unloading: ca.stwrt.dotcss

To avoid this, quit tmux before installing dotcss.

Thanks