Code Monkey home page Code Monkey logo

surfsticker's Introduction

surfsticker

I wrote surfsticker so that I can have a browser window on my desktop that is reasonably sticky. What I did not want was the default behavior of surf, where every invocation opens a new window.

Instead, I wrap surf in surfsticker, with an optional -sticker flag.

surfsticker creates a surf window with an extra XProperty on it named _STICKER. Without an explicitly chosen -sticker flag, it will set the value to "default".

Once a surf window has been started by surfsticker with a particular _STICKER, further invocations of surfsticker will re-use the existing window to visit a chosen URL.

Each _STICKER is tied to a stylesheet in ~/.surf/styles.

I have a custom surf stylesheet that I like to use with godoc so that its brightness doesn't melt my eyes. To invoke it, I put the following in my .vimrc:

let g:go_play_browser_command = 'surfsticker -sticker godoc %URL% &'

This opens a surf window labeled with the godoc _STICKER that uses the following stylesheet: ~/.surf/styles/godoc.css. So long as that window stays open, it will be reused every time I surfsticker -sticker godoc https://example.com.

surfsticker screenshot

installation

So long as the go toolchain is available and you've added ~/go/bin to your regular path, surfsticker should install and be usable by invoking go install ./... in its root.

surfsticker uses the Linux inotify API.

surfsticker's People

Contributors

alrs avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.