Git Product home page Git Product logo

plash's Introduction

Plash

Make any website your Mac desktop wallpaper




Plash enables you to have a highly dynamic desktop wallpaper. You could display your favorite news site, Facebook feed, or a random beautiful scenery photo. The use-cases are limitless. You could even set an animated GIF as wallpaper. You can even add multiple websites and easily switch between them.

Use-cases

Share your use-case

Features

  • Show a remote or local website
  • Interact with the website (“Browsing Mode”)
  • Automatically reload the website at a custom interval
  • Add multiple websites
  • Show the website on a different display
  • Invert website colors (fake dark mode)
  • Add custom CSS and JavaScript to the website
  • Lower the opacity
  • Transparent background
  • Automatically deactivate while on battery
  • Audio is muted
  • Single image will be aspect-filled to your screen
  • Hide menu bar icon
  • Shortcuts support
  • Scriptable
  • Share extension

Download

Requires macOS 12 or later.

Older versions

Tips

Browsing mode

You can interact with the website by enabling “Browsing Mode”. When in this mode, you can right-click to be able to go back/forward, reload, and zoom in the page contents (the zoom level is saved). You can also pinch to magnify. This is different from zooming the page contents in that it will zoom in to a specific part of the page instead of just enlarging everything.

Plash injects a CSS class named plash-is-browsing-mode on the <html> element while browsing mode is active. You could use this class to customize the website for browsing mode.

If clicking a link opens it in a new window, you can hold the Option key while clicking the link to open it in the main Plash window.

Zoom in website

To zoom in the website, activate “Browsing Mode”, right-click the website, and then select “Zoom In”.

URL placeholders for screen width and height

Use [[screenWidth]] and [[screenHeight]] in any URL and Plash will substitute the right values for you. For example, https://source.unsplash.com/random/[[screenWidth]]x[[screenHeight]]?puppy.

Scroll to position

You can scroll a website to a specific position each time it is loaded by putting the following in the website's “JavaScript” field. Adjust the “500” to how far down it should scroll.

window.scrollTo(0, 500);

You can also scroll to a specific element matching a CSS selector:

document.querySelector('.title')?.scrollIntoView();

Make the website occupy only half the screen

You can use the “CSS” field in the website settings to adjust the padding of the website:

:root {
    margin-left: 50% !important;
}

Detect Plash

Plash injects a CSS class named is-plash-app on the <html> element. You could use this class to customize your website for Plash. For example, if your website has instructions on how to use it in Plash, you could hide those when it's running in Plash.

Screenshots

Scripting

You can control Plash using anything that supports opening a URL with a custom scheme.

For example, to reload the current website, run this terminal command:

$ open -g plash:reload

Share extension

Plash comes bundled with a share extension. You can, for example, use it to quickly add a website you have open in Safari to Plash.

Tools

Commands

add

Add a website to Plash.

You can optionally specify a title. If no title is given, a title will be automatically fetched from the website.

$ open -g 'plash:add?url=https://sindresorhus.com/plash&title=Plash%20website'

Don't forget to correctly encode query parameters.

Note: Local file URLs are not supported.

reload

Reload the current website.

$ open -g plash:reload

next

Switch to the next website in the list.

$ open -g plash:next

previous

Switch to the previous website in the list.

$ open -g plash:previous

random

Switch to a random website in the list.

It will never show the same website twice in a row, unless you only have a single website.

$ open -g plash:random

toggle-browsing-mode

Toggle browsing mode.

$ open -g plash:toggle-browsing-mode

Examples

Node.js

import {execFileSync} from 'node:child_process';

execFileSync('open', ['--background', 'plash:reload']);

Swift

import Cocoa

let command = "plash:reload"

let configuration = NSWorkspace.OpenConfiguration()
configuration.activates = false
NSWorkspace.shared.open(URL(string: command)!, configuration: configuration)

AppleScript

do shell script "open --background 'plash:reload'"

Python

import subprocess

subprocess.run(['open', '--background', 'plash:reload'])

FAQ

The app does not show up in the menu bar

macOS hides menu bar apps when there is no space left in the menu bar. This is a common problem on MacBooks with a notch. Try quitting some menu bar apps to free up space. If this does not solve it, try quitting Bartender if you have it installed.

Can it automatically switch websites every 10 minutes?

Plash can be automated with the built-in Shortcuts app, for example, using the “Switch to Next Website” action. Shortcuts on macOS 12 does not yet support automations, but for now, you can use the Shortery app.

Why does Plash use so much memory?

Plash uses very little memory. Usually around 40 MB. However, the websites you display can take up a lot of memory, and sometimes even have a memory leaks.

Can I contribute localizations?

I don't have any immediate plans to localize the app.

What does “Plash” mean?

Click here.

How can I switch to a specific website with a keyboard shortcut?

Make a shortcut in the Shortcuts app that uses the “Set Current Website” action and then set a keyboard shortcut for the shortcut.

Built with

  • Defaults - Swifty and modern UserDefaults
  • KeyboardShortcuts - Add user-customizable global keyboard shortcuts to your macOS app

Links

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.