https://github.com/alrs/surfsticker
Manage sticky suckless surf windows.
https://github.com/alrs/surfsticker
suckless surf vim-go
Last synced: about 2 months ago
JSON representation
Manage sticky suckless surf windows.
- Host: GitHub
- URL: https://github.com/alrs/surfsticker
- Owner: alrs
- License: gpl-3.0
- Created: 2020-07-27T01:00:32.000Z (over 5 years ago)
- Default Branch: master
- Last Pushed: 2022-01-08T23:59:02.000Z (about 4 years ago)
- Last Synced: 2024-06-19T14:51:28.511Z (over 1 year ago)
- Topics: suckless, surf, vim-go
- Language: Go
- Homepage:
- Size: 36.1 KB
- Stars: 16
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
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`.

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.