v0.5.0
You can discuss this release here.
Complete information about each new widget and property can be found in the configuration docs.
New
Search widget
- type: search
search-engine: duckduckgo
bangs:
- title: YouTube
shortcut: "!yt"
url: https://www.youtube.com/results?search_query={QUERY}
Yes, there's support for custom bangs! If you don't know what bangs are, you can learn about them here. In short, you can easily specify where to search depending on how your query starts. With the above configuration, the query "!yt good mythical morning" will search in YouTube.
You can also use a custom search engine:
- type: search
search-engine: https://whoogle.your-domain.com/search?q={QUERY}
Tip
Pressing S anywhere on the page will focus the search input.
Pressing Enter will show search results in the same tab.
Pressing Ctrl + Enter will show search results in a new tab.
(thanks for contributing @chand1012)
Clock widget
- type: clock
hour-format: 24h
timezones:
- timezone: Europe/Paris
label: Paris
- timezone: America/New_York
label: New York
- timezone: Asia/Tokyo
label: Tokyo
The timezones are optional.
(thanks for contributing @yardenshoham)
Lobsters widget
- type: lobsters
sort-by: hot
(thanks for contributing @jonasknobloch)
changedetection.io widget
- type: change-detection
instance-url: changedetection.your-domain.com
token: <your API token>
(thanks for contributing @knhash)
Extension widget
While I will continue adding new widgets, I won't be able to add every single requested widget. To alleviate this, if you know how to setup an HTTP server and a bit of HTML and CSS, you can now develop your own widgets:
- type: extension
url: http://localhost:9001
allow-potentially-dangerous-html: true
parameters:
name: David
Regardless of whether you know PHP:
<?php
header('Widget-Title: My first extension');
header('Widget-Content-Type: html');
?>
<p>Hello, <span class="color-primary"><?= $_GET['name'] ?>!</span></p>
JavaScript:
const express = require('express');
const app = express();
app.get('/', (req, res) => {
res.set('Widget-Title', 'My first extension');
res.set('Widget-Content-Type', 'html');
res.send(`<p>Hello, <span class="color-primary">${req.query.name}!</span></p>`);
});
app.listen(9001);
Or any other programming language. You can learn more about building your own extensions here.
Note that the API for this is not set in stone and may change in the future.
What's with the scary looking allow-potentially-dangerous-html
?
In its current state, the extension widget is meant to be used by developers who want to add their own widgets to Glance but may not want to build and deploy their own fork (or may not know/want to learn Go). As we know, with great power comes great responsibility and being able to insert any HTML into your dashboard means you can also run any JavaScript. Do not use this widget with this property enabled and point to random URLs you may find online.
The long-term goal is to have extensions return generic content types such as videos
, forum-posts
, markets
, streams
, etc. in JSON format and then displayed by Glance using existing styles and functionality, allowing extension developers to achieve a native look while only focusing on providing data from their preferred source. This will allow for safe use of publicly hosted extensions.
HTML widget
For when you want to insert something a little more custom:
- type: html
source: |
<p>Hello, <span class="color-primary">World</span>!</p>
(thanks for the suggestion @yefoenix)
Glance can now be installed as a PWA
There are currently no major benefits to installing Glance as a PWA, however it does give you a dedicated app icon as well as remove the URL bar for a cleaner look.
(thanks for contributing @medinnna)
detailed-list
style for the RSS widget
moving a little closer towards being worthy of being called an RSS reader
- type: rss
style: detailed-list
(thanks for the suggestion @carlyman)
collapse-after-rows
for Videos widget when using grid-cards
style
You can now choose how many rows of videos are visible when using the grid-cards
style, defaulting to 4:
- type: videos
style: grid-cards
collapse-after-rows: 2
(thanks for the suggestion @MKwareContributions)
Simple icons for the monitor widget
Just like with the bookmarks widget, you can now use simple icons for your monitored sites using the si:
prefix:
- type: monitor
sites:
- title: Jellyfin
url: https://jellyfin.your-domain.com/
icon: si:jellyfin
(thanks for the suggestion @github-random-827495)
Insecure requests for the monitor widget
You can now make insecure requests to your monitored sites which is helpful for those who use self-signed certificates:
- type: monitor
sites:
- title: Jellyfin
url: https://localhost:8080/
icon: si:jellyfin
allow-insecure: true
(thanks for the suggestion @Petbotson)
24-hour format for the weather widget
- type: weather
hour-format: 24h
location: London, UK
(thanks for contributing @tarikcoskun)
item-link-prefix
for RSS feeds
Some (naughty) RSS feeds don't return full links for each post, omitting the domain and only providing the path. Glance will now try to automatically correct such links by prepending the feed domain, however in cases where it gets this wrong you can override the prefix with the new item-link-prefix
property:
- type: rss
feeds:
- url: https://www.bungie.net/en/rss/News
item-link-prefix: https://www.bungie.net/
title: Bungie
(thanks for reporting the issue @SapphicMoe)
Changed
Weather widget no longer prevents app startup
Previously, the weather widget would make an HTTP request to validate the provided location which occurred during app startup, meaning that if you had no internet connection you couldn't start Glance. This also meant that the --check-config option wouldn't work if you had no internet connection. This has now been changed and the validation of the location is done on page load.
(thanks for reporting this issue @msfjarvis & @Jerakin)
Stocks widget is now Markets
Initially the stocks widget was intended for, well, stocks. This quickly stopped being the case as it was being used for all kinds of different markets. To better reflect this, it will now be referred to as "Markets" within the configuration as well as the docs. To retain backwards compatibility you don't have to change anything and you can still use this in your configuration:
- type: stocks
stocks:
- symbol: SPY
name: S&P 500
However the preferred way of configuring it will now be the following:
- type: markets
markets:
- symbol: SPY
name: S&P 500
(thanks for the suggestion @0x3e4)