Full Code of glanceapp/glance for AI

main 6c5b7a3f4cc4 cached
148 files
647.6 KB
180.8k tokens
581 symbols
1 requests
Download .txt
Showing preview only (689K chars total). Download the full file or copy to clipboard to get everything.
Repository: glanceapp/glance
Branch: main
Commit: 6c5b7a3f4cc4
Files: 148
Total size: 647.6 KB

Directory structure:
gitextract_g8m113ra/

├── .dockerignore
├── .github/
│   ├── CODE_OF_CONDUCT.md
│   ├── FUNDING.yml
│   ├── ISSUE_TEMPLATE/
│   │   ├── bug_report.yml
│   │   ├── config.yml
│   │   └── feature_request.yml
│   ├── PULL_REQUEST_TEMPLATE.md
│   ├── SECURITY.md
│   └── workflows/
│       └── release.yaml
├── .gitignore
├── .goreleaser.yaml
├── Dockerfile
├── Dockerfile.goreleaser
├── LICENSE
├── README.md
├── docs/
│   ├── configuration.md
│   ├── custom-api.md
│   ├── extensions.md
│   ├── glance.yml
│   ├── preconfigured-pages.md
│   ├── themes.md
│   └── v0.7.0-upgrade.md
├── go.mod
├── go.sum
├── internal/
│   └── glance/
│       ├── auth.go
│       ├── auth_test.go
│       ├── cli.go
│       ├── config-fields.go
│       ├── config.go
│       ├── diagnose.go
│       ├── embed.go
│       ├── glance.go
│       ├── main.go
│       ├── static/
│       │   ├── css/
│       │   │   ├── forum-posts.css
│       │   │   ├── login.css
│       │   │   ├── main.css
│       │   │   ├── mobile.css
│       │   │   ├── popover.css
│       │   │   ├── site.css
│       │   │   ├── utils.css
│       │   │   ├── widget-bookmarks.css
│       │   │   ├── widget-calendar.css
│       │   │   ├── widget-clock.css
│       │   │   ├── widget-dns-stats.css
│       │   │   ├── widget-docker-containers.css
│       │   │   ├── widget-group.css
│       │   │   ├── widget-markets.css
│       │   │   ├── widget-monitor.css
│       │   │   ├── widget-reddit.css
│       │   │   ├── widget-releases.css
│       │   │   ├── widget-rss.css
│       │   │   ├── widget-search.css
│       │   │   ├── widget-server-stats.css
│       │   │   ├── widget-todo.css
│       │   │   ├── widget-twitch.css
│       │   │   ├── widget-videos.css
│       │   │   ├── widget-weather.css
│       │   │   └── widgets.css
│       │   └── js/
│       │       ├── animations.js
│       │       ├── calendar.js
│       │       ├── login.js
│       │       ├── masonry.js
│       │       ├── page.js
│       │       ├── popover.js
│       │       ├── templating.js
│       │       ├── todo.js
│       │       └── utils.js
│       ├── templates/
│       │   ├── bookmarks.html
│       │   ├── calendar.html
│       │   ├── change-detection.html
│       │   ├── clock.html
│       │   ├── custom-api.html
│       │   ├── dns-stats.html
│       │   ├── docker-containers.html
│       │   ├── document.html
│       │   ├── extension.html
│       │   ├── footer.html
│       │   ├── forum-posts.html
│       │   ├── group.html
│       │   ├── iframe.html
│       │   ├── login.html
│       │   ├── manifest.json
│       │   ├── markets.html
│       │   ├── monitor-compact.html
│       │   ├── monitor.html
│       │   ├── old-calendar.html
│       │   ├── page-content.html
│       │   ├── page.html
│       │   ├── reddit-horizontal-cards.html
│       │   ├── reddit-vertical-cards.html
│       │   ├── releases.html
│       │   ├── repository.html
│       │   ├── rss-detailed-list.html
│       │   ├── rss-horizontal-cards-2.html
│       │   ├── rss-horizontal-cards.html
│       │   ├── rss-list.html
│       │   ├── search.html
│       │   ├── server-stats.html
│       │   ├── split-column.html
│       │   ├── theme-preset-preview.html
│       │   ├── theme-style.gotmpl
│       │   ├── todo.html
│       │   ├── twitch-channels.html
│       │   ├── twitch-games-list.html
│       │   ├── v0.7-update-notice-page.html
│       │   ├── video-card-contents.html
│       │   ├── videos-grid.html
│       │   ├── videos-vertical-list.html
│       │   ├── videos.html
│       │   ├── weather.html
│       │   └── widget-base.html
│       ├── templates.go
│       ├── theme.go
│       ├── utils.go
│       ├── widget-bookmarks.go
│       ├── widget-calendar.go
│       ├── widget-changedetection.go
│       ├── widget-clock.go
│       ├── widget-container.go
│       ├── widget-custom-api.go
│       ├── widget-dns-stats.go
│       ├── widget-docker-containers.go
│       ├── widget-extension.go
│       ├── widget-group.go
│       ├── widget-hacker-news.go
│       ├── widget-html.go
│       ├── widget-iframe.go
│       ├── widget-lobsters.go
│       ├── widget-markets.go
│       ├── widget-monitor.go
│       ├── widget-old-calendar.go
│       ├── widget-reddit.go
│       ├── widget-releases.go
│       ├── widget-repository.go
│       ├── widget-rss.go
│       ├── widget-search.go
│       ├── widget-server-stats.go
│       ├── widget-shared.go
│       ├── widget-split-column.go
│       ├── widget-todo.go
│       ├── widget-twitch-channels.go
│       ├── widget-twitch-top-games.go
│       ├── widget-utils.go
│       ├── widget-videos.go
│       ├── widget-weather.go
│       └── widget.go
├── main.go
└── pkg/
    └── sysinfo/
        └── sysinfo.go

================================================
FILE CONTENTS
================================================

================================================
FILE: .dockerignore
================================================
# https://docs.docker.com/build/building/context/#dockerignore-files
# Ignore all files by default
*

# Only add necessary files to the Docker build context (Dockerfiles are always included implicitly)
!/build/
!/internal/
!/pkg/
!/go.mod
!/go.sum
!main.go


================================================
FILE: .github/CODE_OF_CONDUCT.md
================================================
# Contributor Covenant Code of Conduct

## Our Pledge

We as members, contributors, and leaders pledge to make participation in our
community a harassment-free experience for everyone, regardless of age, body
size, visible or invisible disability, ethnicity, sex characteristics, gender
identity and expression, level of experience, education, socio-economic status,
nationality, personal appearance, race, religion, or sexual identity
and orientation.

We pledge to act and interact in ways that contribute to an open, welcoming,
diverse, inclusive, and healthy community.

## Our Standards

Examples of behavior that contributes to a positive environment for our
community include:

* Demonstrating empathy and kindness toward other people
* Being respectful of differing opinions, viewpoints, and experiences
* Giving and gracefully accepting constructive feedback
* Accepting responsibility and apologizing to those affected by our mistakes,
  and learning from the experience
* Focusing on what is best not just for us as individuals, but for the
  overall community

Examples of unacceptable behavior include:

* The use of sexualized language or imagery, and sexual attention or
  advances of any kind
* Trolling, insulting or derogatory comments, and personal or political attacks
* Public or private harassment
* Publishing others' private information, such as a physical or email
  address, without their explicit permission
* Other conduct which could reasonably be considered inappropriate in a
  professional setting

## Enforcement Responsibilities

Community leaders are responsible for clarifying and enforcing our standards of
acceptable behavior and will take appropriate and fair corrective action in
response to any behavior that they deem inappropriate, threatening, offensive,
or harmful.

Community leaders have the right and responsibility to remove, edit, or reject
comments, commits, code, wiki edits, issues, and other contributions that are
not aligned to this Code of Conduct, and will communicate reasons for moderation
decisions when appropriate.

## Scope

This Code of Conduct applies within all community spaces, and also applies when
an individual is officially representing the community in public spaces.
Examples of representing our community include using an official e-mail address,
posting via an official social media account, or acting as an appointed
representative at an online or offline event.

## Enforcement

Instances of abusive, harassing, or otherwise unacceptable behavior may be
reported to the community leaders responsible for enforcement at
glanceapp@duck.com.
All complaints will be reviewed and investigated promptly and fairly.

All community leaders are obligated to respect the privacy and security of the
reporter of any incident.

## Enforcement Guidelines

Community leaders will follow these Community Impact Guidelines in determining
the consequences for any action they deem in violation of this Code of Conduct:

### 1. Correction

**Community Impact**: Use of inappropriate language or other behavior deemed
unprofessional or unwelcome in the community.

**Consequence**: A private, written warning from community leaders, providing
clarity around the nature of the violation and an explanation of why the
behavior was inappropriate. A public apology may be requested.

### 2. Warning

**Community Impact**: A violation through a single incident or series
of actions.

**Consequence**: A warning with consequences for continued behavior. No
interaction with the people involved, including unsolicited interaction with
those enforcing the Code of Conduct, for a specified period of time. This
includes avoiding interactions in community spaces as well as external channels
like social media. Violating these terms may lead to a temporary or
permanent ban.

### 3. Temporary Ban

**Community Impact**: A serious violation of community standards, including
sustained inappropriate behavior.

**Consequence**: A temporary ban from any sort of interaction or public
communication with the community for a specified period of time. No public or
private interaction with the people involved, including unsolicited interaction
with those enforcing the Code of Conduct, is allowed during this period.
Violating these terms may lead to a permanent ban.

### 4. Permanent Ban

**Community Impact**: Demonstrating a pattern of violation of community
standards, including sustained inappropriate behavior,  harassment of an
individual, or aggression toward or disparagement of classes of individuals.

**Consequence**: A permanent ban from any sort of public interaction within
the community.

## Attribution

This Code of Conduct is adapted from the [Contributor Covenant][homepage],
version 2.0, available at
https://www.contributor-covenant.org/version/2/0/code_of_conduct.html.

Community Impact Guidelines were inspired by [Mozilla's code of conduct
enforcement ladder](https://github.com/mozilla/diversity).

[homepage]: https://www.contributor-covenant.org

For answers to common questions about this code of conduct, see the FAQ at
https://www.contributor-covenant.org/faq. Translations are available at
https://www.contributor-covenant.org/translations.


================================================
FILE: .github/FUNDING.yml
================================================
github: [glanceapp]
patreon: glanceapp


================================================
FILE: .github/ISSUE_TEMPLATE/bug_report.yml
================================================
name: Bug report
description: Let us know if something isn't working as expected
labels: ["bug report"]
body:
  - type: markdown
    attributes:
      value: |
        > [!NOTE]
        >
        > Do not prefix your title with "[BUG]", "[Bug report]", etc., a label will be added automatically.

        If you're unsure whether you're experiencing a bug or not, consider using the [Discussions](https://github.com/glanceapp/glance/discussions) or [Discord](https://discord.com/invite/7KQ7Xa9kJd) to ask for help.

        Please include only the information you think is relevant to the bug:

        * How did you install Glance? (Docker container, manual binary install, etc)
        * Which version of Glance are you using?
        * Include the relevant parts of your `glance.yml` if applicable (widget, data source, properties used, etc)
        * Include any relevant logs or screenshots if applicable
        * Is the issue specific to a certain browser or OS?
        * Steps to reliably reproduce the issue
        * Are you hosting Glance on a VPS?
        * Anything else you think might be relevant

        **No need to copy the above list into your description, it's just a guide to help you provide the most useful information.**

  - type: textarea
    id: description
    validations:
      required: true
    attributes:
      label: Description

  - type: markdown
    attributes:
      value: |
        Thank you for taking the time to submit a bug report.


================================================
FILE: .github/ISSUE_TEMPLATE/config.yml
================================================
blank_issues_enabled: false
contact_links:
  - name: Discussions
    url: https://github.com/glanceapp/glance/discussions
    about: For help, feedback, guides, resources and more
  - name: Discord
    url: https://discord.com/invite/7KQ7Xa9kJd
    about: Much like the discussions but more chatty


================================================
FILE: .github/ISSUE_TEMPLATE/feature_request.yml
================================================
name: Feature request
description: Share your ideas for new features or improvements
labels: ["feature request"]
body:
  - type: markdown
    attributes:
      value: |
        > [!NOTE]
        >
        > Do not prefix your title with "[REQUEST]", "[Feature request]", etc., a label will be added automatically.

        Please provide a detailed description of what the feature would do and what it would look like:

        * What problem would this feature solve?
        * Are there any potential downsides to this feature?
        * If applicable, what would the configuration for this feature look like?
        * Are there any existing examples of this feature in other software?
        * If applicable, include any external documentation required to implement this feature
        * Anything else you think might be relevant

        **No need to copy the above list into your description, it's just a guide to help you provide the most useful information.**

  - type: textarea
    id: description
    validations:
      required: true
    attributes:
      label: Description

  - type: markdown
    attributes:
      value: |
        Thank you for taking the time to submit your idea.


================================================
FILE: .github/PULL_REQUEST_TEMPLATE.md
================================================
<!-- If your pull request adds new features, changes existing ones or fixes any bugs, please use the dev branch as the base, otherwise use the main branch -->


================================================
FILE: .github/SECURITY.md
================================================
# Security Policy

## Supported Versions

Security updates will be applied to the latest as well as previous minor version release depending on severity and if applicable.

## Reporting a Vulnerability

Please report any suspected security vulnerabilities to [glanceapp@duck.com](mailto:glanceapp@duck.com) and do not disclose them publicly. You should receive a response within a few days and if confirmed the issue will be resolved as soon as possible.


================================================
FILE: .github/workflows/release.yaml
================================================
name: Create release

permissions:
  contents: write

on:
  push:
    tags:
      - 'v*'

jobs:
  release:
    runs-on: ubuntu-latest
    steps:
      - name: Checkout the target Git reference
        uses: actions/checkout@v4
        with:
          fetch-depth: 0

      - name: Log in to Docker Hub
        uses: docker/login-action@v3
        with:
          username: ${{ secrets.DOCKERHUB_USERNAME }}
          password: ${{ secrets.DOCKERHUB_TOKEN }}

      - name: Set up Golang
        uses: actions/setup-go@v5
        with:
          go-version-file: go.mod

      - name: Set up Docker buildx
        uses: docker/setup-buildx-action@v3

      - name: Run GoReleaser
        uses: goreleaser/goreleaser-action@v5
        env:
          GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
        with:
          args: release


================================================
FILE: .gitignore
================================================
/assets
/build
/playground
/.idea
/glance*.yml


================================================
FILE: .goreleaser.yaml
================================================
project_name: glanceapp/glance

checksum:
  disable: true

builds:
  - binary: glance
    env:
      - CGO_ENABLED=0
    goos:
      - linux
      - openbsd
      - freebsd
      - windows
      - darwin
    goarch:
      - amd64
      - arm64
      - arm
      - 386
    goarm:
      - 7
    ldflags:
      - -s -w -X github.com/glanceapp/glance/internal/glance.buildVersion={{ .Tag }}

archives:
  -
    name_template: "glance-{{ .Os }}-{{ .Arch }}{{ with .Arm }}v{{ . }}{{ end }}"
    files:
      - nothing*
    format_overrides:
      - goos: windows
        format: zip

dockers:
  - image_templates:
      - &amd64_image "{{ .ProjectName }}:{{ .Tag }}-amd64"
    build_flag_templates:
      - --platform=linux/amd64
    goarch: amd64
    use: buildx
    dockerfile: Dockerfile.goreleaser

  - image_templates:
      - &arm64v8_image "{{ .ProjectName }}:{{ .Tag }}-arm64"
    build_flag_templates:
      - --platform=linux/arm64
    goarch: arm64
    use: buildx
    dockerfile: Dockerfile.goreleaser

  - image_templates:
      - &armv7_image "{{ .ProjectName }}:{{ .Tag }}-armv7"
    build_flag_templates:
      - --platform=linux/arm/v7
    goarch: arm
    goarm: 7
    use: buildx
    dockerfile: Dockerfile.goreleaser

docker_manifests:
  - name_template: "{{ .ProjectName }}:{{ .Tag }}"
    image_templates: &multiarch_images
      - *amd64_image
      - *arm64v8_image
      - *armv7_image
  - name_template: "{{ .ProjectName }}:latest"
    skip_push: auto
    image_templates: *multiarch_images


================================================
FILE: Dockerfile
================================================
FROM golang:1.24.3-alpine3.21 AS builder

WORKDIR /app
COPY . /app
RUN CGO_ENABLED=0 go build .

FROM alpine:3.21

WORKDIR /app
COPY --from=builder /app/glance .

EXPOSE 8080/tcp
ENTRYPOINT ["/app/glance", "--config", "/app/config/glance.yml"]


================================================
FILE: Dockerfile.goreleaser
================================================
FROM alpine:3.21

WORKDIR /app
COPY glance .

EXPOSE 8080/tcp
ENTRYPOINT ["/app/glance", "--config", "/app/config/glance.yml"]


================================================
FILE: LICENSE
================================================
                    GNU AFFERO GENERAL PUBLIC LICENSE
                       Version 3, 19 November 2007

 Copyright (C) 2007 Free Software Foundation, Inc. <https://fsf.org/>
 Everyone is permitted to copy and distribute verbatim copies
 of this license document, but changing it is not allowed.

                            Preamble

  The GNU Affero General Public License is a free, copyleft license for
software and other kinds of works, specifically designed to ensure
cooperation with the community in the case of network server software.

  The licenses for most software and other practical works are designed
to take away your freedom to share and change the works.  By contrast,
our General Public Licenses are intended to guarantee your freedom to
share and change all versions of a program--to make sure it remains free
software for all its users.

  When we speak of free software, we are referring to freedom, not
price.  Our General Public Licenses are designed to make sure that you
have the freedom to distribute copies of free software (and charge for
them if you wish), that you receive source code or can get it if you
want it, that you can change the software or use pieces of it in new
free programs, and that you know you can do these things.

  Developers that use our General Public Licenses protect your rights
with two steps: (1) assert copyright on the software, and (2) offer
you this License which gives you legal permission to copy, distribute
and/or modify the software.

  A secondary benefit of defending all users' freedom is that
improvements made in alternate versions of the program, if they
receive widespread use, become available for other developers to
incorporate.  Many developers of free software are heartened and
encouraged by the resulting cooperation.  However, in the case of
software used on network servers, this result may fail to come about.
The GNU General Public License permits making a modified version and
letting the public access it on a server without ever releasing its
source code to the public.

  The GNU Affero General Public License is designed specifically to
ensure that, in such cases, the modified source code becomes available
to the community.  It requires the operator of a network server to
provide the source code of the modified version running there to the
users of that server.  Therefore, public use of a modified version, on
a publicly accessible server, gives the public access to the source
code of the modified version.

  An older license, called the Affero General Public License and
published by Affero, was designed to accomplish similar goals.  This is
a different license, not a version of the Affero GPL, but Affero has
released a new version of the Affero GPL which permits relicensing under
this license.

  The precise terms and conditions for copying, distribution and
modification follow.

                       TERMS AND CONDITIONS

  0. Definitions.

  "This License" refers to version 3 of the GNU Affero General Public License.

  "Copyright" also means copyright-like laws that apply to other kinds of
works, such as semiconductor masks.

  "The Program" refers to any copyrightable work licensed under this
License.  Each licensee is addressed as "you".  "Licensees" and
"recipients" may be individuals or organizations.

  To "modify" a work means to copy from or adapt all or part of the work
in a fashion requiring copyright permission, other than the making of an
exact copy.  The resulting work is called a "modified version" of the
earlier work or a work "based on" the earlier work.

  A "covered work" means either the unmodified Program or a work based
on the Program.

  To "propagate" a work means to do anything with it that, without
permission, would make you directly or secondarily liable for
infringement under applicable copyright law, except executing it on a
computer or modifying a private copy.  Propagation includes copying,
distribution (with or without modification), making available to the
public, and in some countries other activities as well.

  To "convey" a work means any kind of propagation that enables other
parties to make or receive copies.  Mere interaction with a user through
a computer network, with no transfer of a copy, is not conveying.

  An interactive user interface displays "Appropriate Legal Notices"
to the extent that it includes a convenient and prominently visible
feature that (1) displays an appropriate copyright notice, and (2)
tells the user that there is no warranty for the work (except to the
extent that warranties are provided), that licensees may convey the
work under this License, and how to view a copy of this License.  If
the interface presents a list of user commands or options, such as a
menu, a prominent item in the list meets this criterion.

  1. Source Code.

  The "source code" for a work means the preferred form of the work
for making modifications to it.  "Object code" means any non-source
form of a work.

  A "Standard Interface" means an interface that either is an official
standard defined by a recognized standards body, or, in the case of
interfaces specified for a particular programming language, one that
is widely used among developers working in that language.

  The "System Libraries" of an executable work include anything, other
than the work as a whole, that (a) is included in the normal form of
packaging a Major Component, but which is not part of that Major
Component, and (b) serves only to enable use of the work with that
Major Component, or to implement a Standard Interface for which an
implementation is available to the public in source code form.  A
"Major Component", in this context, means a major essential component
(kernel, window system, and so on) of the specific operating system
(if any) on which the executable work runs, or a compiler used to
produce the work, or an object code interpreter used to run it.

  The "Corresponding Source" for a work in object code form means all
the source code needed to generate, install, and (for an executable
work) run the object code and to modify the work, including scripts to
control those activities.  However, it does not include the work's
System Libraries, or general-purpose tools or generally available free
programs which are used unmodified in performing those activities but
which are not part of the work.  For example, Corresponding Source
includes interface definition files associated with source files for
the work, and the source code for shared libraries and dynamically
linked subprograms that the work is specifically designed to require,
such as by intimate data communication or control flow between those
subprograms and other parts of the work.

  The Corresponding Source need not include anything that users
can regenerate automatically from other parts of the Corresponding
Source.

  The Corresponding Source for a work in source code form is that
same work.

  2. Basic Permissions.

  All rights granted under this License are granted for the term of
copyright on the Program, and are irrevocable provided the stated
conditions are met.  This License explicitly affirms your unlimited
permission to run the unmodified Program.  The output from running a
covered work is covered by this License only if the output, given its
content, constitutes a covered work.  This License acknowledges your
rights of fair use or other equivalent, as provided by copyright law.

  You may make, run and propagate covered works that you do not
convey, without conditions so long as your license otherwise remains
in force.  You may convey covered works to others for the sole purpose
of having them make modifications exclusively for you, or provide you
with facilities for running those works, provided that you comply with
the terms of this License in conveying all material for which you do
not control copyright.  Those thus making or running the covered works
for you must do so exclusively on your behalf, under your direction
and control, on terms that prohibit them from making any copies of
your copyrighted material outside their relationship with you.

  Conveying under any other circumstances is permitted solely under
the conditions stated below.  Sublicensing is not allowed; section 10
makes it unnecessary.

  3. Protecting Users' Legal Rights From Anti-Circumvention Law.

  No covered work shall be deemed part of an effective technological
measure under any applicable law fulfilling obligations under article
11 of the WIPO copyright treaty adopted on 20 December 1996, or
similar laws prohibiting or restricting circumvention of such
measures.

  When you convey a covered work, you waive any legal power to forbid
circumvention of technological measures to the extent such circumvention
is effected by exercising rights under this License with respect to
the covered work, and you disclaim any intention to limit operation or
modification of the work as a means of enforcing, against the work's
users, your or third parties' legal rights to forbid circumvention of
technological measures.

  4. Conveying Verbatim Copies.

  You may convey verbatim copies of the Program's source code as you
receive it, in any medium, provided that you conspicuously and
appropriately publish on each copy an appropriate copyright notice;
keep intact all notices stating that this License and any
non-permissive terms added in accord with section 7 apply to the code;
keep intact all notices of the absence of any warranty; and give all
recipients a copy of this License along with the Program.

  You may charge any price or no price for each copy that you convey,
and you may offer support or warranty protection for a fee.

  5. Conveying Modified Source Versions.

  You may convey a work based on the Program, or the modifications to
produce it from the Program, in the form of source code under the
terms of section 4, provided that you also meet all of these conditions:

    a) The work must carry prominent notices stating that you modified
    it, and giving a relevant date.

    b) The work must carry prominent notices stating that it is
    released under this License and any conditions added under section
    7.  This requirement modifies the requirement in section 4 to
    "keep intact all notices".

    c) You must license the entire work, as a whole, under this
    License to anyone who comes into possession of a copy.  This
    License will therefore apply, along with any applicable section 7
    additional terms, to the whole of the work, and all its parts,
    regardless of how they are packaged.  This License gives no
    permission to license the work in any other way, but it does not
    invalidate such permission if you have separately received it.

    d) If the work has interactive user interfaces, each must display
    Appropriate Legal Notices; however, if the Program has interactive
    interfaces that do not display Appropriate Legal Notices, your
    work need not make them do so.

  A compilation of a covered work with other separate and independent
works, which are not by their nature extensions of the covered work,
and which are not combined with it such as to form a larger program,
in or on a volume of a storage or distribution medium, is called an
"aggregate" if the compilation and its resulting copyright are not
used to limit the access or legal rights of the compilation's users
beyond what the individual works permit.  Inclusion of a covered work
in an aggregate does not cause this License to apply to the other
parts of the aggregate.

  6. Conveying Non-Source Forms.

  You may convey a covered work in object code form under the terms
of sections 4 and 5, provided that you also convey the
machine-readable Corresponding Source under the terms of this License,
in one of these ways:

    a) Convey the object code in, or embodied in, a physical product
    (including a physical distribution medium), accompanied by the
    Corresponding Source fixed on a durable physical medium
    customarily used for software interchange.

    b) Convey the object code in, or embodied in, a physical product
    (including a physical distribution medium), accompanied by a
    written offer, valid for at least three years and valid for as
    long as you offer spare parts or customer support for that product
    model, to give anyone who possesses the object code either (1) a
    copy of the Corresponding Source for all the software in the
    product that is covered by this License, on a durable physical
    medium customarily used for software interchange, for a price no
    more than your reasonable cost of physically performing this
    conveying of source, or (2) access to copy the
    Corresponding Source from a network server at no charge.

    c) Convey individual copies of the object code with a copy of the
    written offer to provide the Corresponding Source.  This
    alternative is allowed only occasionally and noncommercially, and
    only if you received the object code with such an offer, in accord
    with subsection 6b.

    d) Convey the object code by offering access from a designated
    place (gratis or for a charge), and offer equivalent access to the
    Corresponding Source in the same way through the same place at no
    further charge.  You need not require recipients to copy the
    Corresponding Source along with the object code.  If the place to
    copy the object code is a network server, the Corresponding Source
    may be on a different server (operated by you or a third party)
    that supports equivalent copying facilities, provided you maintain
    clear directions next to the object code saying where to find the
    Corresponding Source.  Regardless of what server hosts the
    Corresponding Source, you remain obligated to ensure that it is
    available for as long as needed to satisfy these requirements.

    e) Convey the object code using peer-to-peer transmission, provided
    you inform other peers where the object code and Corresponding
    Source of the work are being offered to the general public at no
    charge under subsection 6d.

  A separable portion of the object code, whose source code is excluded
from the Corresponding Source as a System Library, need not be
included in conveying the object code work.

  A "User Product" is either (1) a "consumer product", which means any
tangible personal property which is normally used for personal, family,
or household purposes, or (2) anything designed or sold for incorporation
into a dwelling.  In determining whether a product is a consumer product,
doubtful cases shall be resolved in favor of coverage.  For a particular
product received by a particular user, "normally used" refers to a
typical or common use of that class of product, regardless of the status
of the particular user or of the way in which the particular user
actually uses, or expects or is expected to use, the product.  A product
is a consumer product regardless of whether the product has substantial
commercial, industrial or non-consumer uses, unless such uses represent
the only significant mode of use of the product.

  "Installation Information" for a User Product means any methods,
procedures, authorization keys, or other information required to install
and execute modified versions of a covered work in that User Product from
a modified version of its Corresponding Source.  The information must
suffice to ensure that the continued functioning of the modified object
code is in no case prevented or interfered with solely because
modification has been made.

  If you convey an object code work under this section in, or with, or
specifically for use in, a User Product, and the conveying occurs as
part of a transaction in which the right of possession and use of the
User Product is transferred to the recipient in perpetuity or for a
fixed term (regardless of how the transaction is characterized), the
Corresponding Source conveyed under this section must be accompanied
by the Installation Information.  But this requirement does not apply
if neither you nor any third party retains the ability to install
modified object code on the User Product (for example, the work has
been installed in ROM).

  The requirement to provide Installation Information does not include a
requirement to continue to provide support service, warranty, or updates
for a work that has been modified or installed by the recipient, or for
the User Product in which it has been modified or installed.  Access to a
network may be denied when the modification itself materially and
adversely affects the operation of the network or violates the rules and
protocols for communication across the network.

  Corresponding Source conveyed, and Installation Information provided,
in accord with this section must be in a format that is publicly
documented (and with an implementation available to the public in
source code form), and must require no special password or key for
unpacking, reading or copying.

  7. Additional Terms.

  "Additional permissions" are terms that supplement the terms of this
License by making exceptions from one or more of its conditions.
Additional permissions that are applicable to the entire Program shall
be treated as though they were included in this License, to the extent
that they are valid under applicable law.  If additional permissions
apply only to part of the Program, that part may be used separately
under those permissions, but the entire Program remains governed by
this License without regard to the additional permissions.

  When you convey a copy of a covered work, you may at your option
remove any additional permissions from that copy, or from any part of
it.  (Additional permissions may be written to require their own
removal in certain cases when you modify the work.)  You may place
additional permissions on material, added by you to a covered work,
for which you have or can give appropriate copyright permission.

  Notwithstanding any other provision of this License, for material you
add to a covered work, you may (if authorized by the copyright holders of
that material) supplement the terms of this License with terms:

    a) Disclaiming warranty or limiting liability differently from the
    terms of sections 15 and 16 of this License; or

    b) Requiring preservation of specified reasonable legal notices or
    author attributions in that material or in the Appropriate Legal
    Notices displayed by works containing it; or

    c) Prohibiting misrepresentation of the origin of that material, or
    requiring that modified versions of such material be marked in
    reasonable ways as different from the original version; or

    d) Limiting the use for publicity purposes of names of licensors or
    authors of the material; or

    e) Declining to grant rights under trademark law for use of some
    trade names, trademarks, or service marks; or

    f) Requiring indemnification of licensors and authors of that
    material by anyone who conveys the material (or modified versions of
    it) with contractual assumptions of liability to the recipient, for
    any liability that these contractual assumptions directly impose on
    those licensors and authors.

  All other non-permissive additional terms are considered "further
restrictions" within the meaning of section 10.  If the Program as you
received it, or any part of it, contains a notice stating that it is
governed by this License along with a term that is a further
restriction, you may remove that term.  If a license document contains
a further restriction but permits relicensing or conveying under this
License, you may add to a covered work material governed by the terms
of that license document, provided that the further restriction does
not survive such relicensing or conveying.

  If you add terms to a covered work in accord with this section, you
must place, in the relevant source files, a statement of the
additional terms that apply to those files, or a notice indicating
where to find the applicable terms.

  Additional terms, permissive or non-permissive, may be stated in the
form of a separately written license, or stated as exceptions;
the above requirements apply either way.

  8. Termination.

  You may not propagate or modify a covered work except as expressly
provided under this License.  Any attempt otherwise to propagate or
modify it is void, and will automatically terminate your rights under
this License (including any patent licenses granted under the third
paragraph of section 11).

  However, if you cease all violation of this License, then your
license from a particular copyright holder is reinstated (a)
provisionally, unless and until the copyright holder explicitly and
finally terminates your license, and (b) permanently, if the copyright
holder fails to notify you of the violation by some reasonable means
prior to 60 days after the cessation.

  Moreover, your license from a particular copyright holder is
reinstated permanently if the copyright holder notifies you of the
violation by some reasonable means, this is the first time you have
received notice of violation of this License (for any work) from that
copyright holder, and you cure the violation prior to 30 days after
your receipt of the notice.

  Termination of your rights under this section does not terminate the
licenses of parties who have received copies or rights from you under
this License.  If your rights have been terminated and not permanently
reinstated, you do not qualify to receive new licenses for the same
material under section 10.

  9. Acceptance Not Required for Having Copies.

  You are not required to accept this License in order to receive or
run a copy of the Program.  Ancillary propagation of a covered work
occurring solely as a consequence of using peer-to-peer transmission
to receive a copy likewise does not require acceptance.  However,
nothing other than this License grants you permission to propagate or
modify any covered work.  These actions infringe copyright if you do
not accept this License.  Therefore, by modifying or propagating a
covered work, you indicate your acceptance of this License to do so.

  10. Automatic Licensing of Downstream Recipients.

  Each time you convey a covered work, the recipient automatically
receives a license from the original licensors, to run, modify and
propagate that work, subject to this License.  You are not responsible
for enforcing compliance by third parties with this License.

  An "entity transaction" is a transaction transferring control of an
organization, or substantially all assets of one, or subdividing an
organization, or merging organizations.  If propagation of a covered
work results from an entity transaction, each party to that
transaction who receives a copy of the work also receives whatever
licenses to the work the party's predecessor in interest had or could
give under the previous paragraph, plus a right to possession of the
Corresponding Source of the work from the predecessor in interest, if
the predecessor has it or can get it with reasonable efforts.

  You may not impose any further restrictions on the exercise of the
rights granted or affirmed under this License.  For example, you may
not impose a license fee, royalty, or other charge for exercise of
rights granted under this License, and you may not initiate litigation
(including a cross-claim or counterclaim in a lawsuit) alleging that
any patent claim is infringed by making, using, selling, offering for
sale, or importing the Program or any portion of it.

  11. Patents.

  A "contributor" is a copyright holder who authorizes use under this
License of the Program or a work on which the Program is based.  The
work thus licensed is called the contributor's "contributor version".

  A contributor's "essential patent claims" are all patent claims
owned or controlled by the contributor, whether already acquired or
hereafter acquired, that would be infringed by some manner, permitted
by this License, of making, using, or selling its contributor version,
but do not include claims that would be infringed only as a
consequence of further modification of the contributor version.  For
purposes of this definition, "control" includes the right to grant
patent sublicenses in a manner consistent with the requirements of
this License.

  Each contributor grants you a non-exclusive, worldwide, royalty-free
patent license under the contributor's essential patent claims, to
make, use, sell, offer for sale, import and otherwise run, modify and
propagate the contents of its contributor version.

  In the following three paragraphs, a "patent license" is any express
agreement or commitment, however denominated, not to enforce a patent
(such as an express permission to practice a patent or covenant not to
sue for patent infringement).  To "grant" such a patent license to a
party means to make such an agreement or commitment not to enforce a
patent against the party.

  If you convey a covered work, knowingly relying on a patent license,
and the Corresponding Source of the work is not available for anyone
to copy, free of charge and under the terms of this License, through a
publicly available network server or other readily accessible means,
then you must either (1) cause the Corresponding Source to be so
available, or (2) arrange to deprive yourself of the benefit of the
patent license for this particular work, or (3) arrange, in a manner
consistent with the requirements of this License, to extend the patent
license to downstream recipients.  "Knowingly relying" means you have
actual knowledge that, but for the patent license, your conveying the
covered work in a country, or your recipient's use of the covered work
in a country, would infringe one or more identifiable patents in that
country that you have reason to believe are valid.

  If, pursuant to or in connection with a single transaction or
arrangement, you convey, or propagate by procuring conveyance of, a
covered work, and grant a patent license to some of the parties
receiving the covered work authorizing them to use, propagate, modify
or convey a specific copy of the covered work, then the patent license
you grant is automatically extended to all recipients of the covered
work and works based on it.

  A patent license is "discriminatory" if it does not include within
the scope of its coverage, prohibits the exercise of, or is
conditioned on the non-exercise of one or more of the rights that are
specifically granted under this License.  You may not convey a covered
work if you are a party to an arrangement with a third party that is
in the business of distributing software, under which you make payment
to the third party based on the extent of your activity of conveying
the work, and under which the third party grants, to any of the
parties who would receive the covered work from you, a discriminatory
patent license (a) in connection with copies of the covered work
conveyed by you (or copies made from those copies), or (b) primarily
for and in connection with specific products or compilations that
contain the covered work, unless you entered into that arrangement,
or that patent license was granted, prior to 28 March 2007.

  Nothing in this License shall be construed as excluding or limiting
any implied license or other defenses to infringement that may
otherwise be available to you under applicable patent law.

  12. No Surrender of Others' Freedom.

  If conditions are imposed on you (whether by court order, agreement or
otherwise) that contradict the conditions of this License, they do not
excuse you from the conditions of this License.  If you cannot convey a
covered work so as to satisfy simultaneously your obligations under this
License and any other pertinent obligations, then as a consequence you may
not convey it at all.  For example, if you agree to terms that obligate you
to collect a royalty for further conveying from those to whom you convey
the Program, the only way you could satisfy both those terms and this
License would be to refrain entirely from conveying the Program.

  13. Remote Network Interaction; Use with the GNU General Public License.

  Notwithstanding any other provision of this License, if you modify the
Program, your modified version must prominently offer all users
interacting with it remotely through a computer network (if your version
supports such interaction) an opportunity to receive the Corresponding
Source of your version by providing access to the Corresponding Source
from a network server at no charge, through some standard or customary
means of facilitating copying of software.  This Corresponding Source
shall include the Corresponding Source for any work covered by version 3
of the GNU General Public License that is incorporated pursuant to the
following paragraph.

  Notwithstanding any other provision of this License, you have
permission to link or combine any covered work with a work licensed
under version 3 of the GNU General Public License into a single
combined work, and to convey the resulting work.  The terms of this
License will continue to apply to the part which is the covered work,
but the work with which it is combined will remain governed by version
3 of the GNU General Public License.

  14. Revised Versions of this License.

  The Free Software Foundation may publish revised and/or new versions of
the GNU Affero General Public License from time to time.  Such new versions
will be similar in spirit to the present version, but may differ in detail to
address new problems or concerns.

  Each version is given a distinguishing version number.  If the
Program specifies that a certain numbered version of the GNU Affero General
Public License "or any later version" applies to it, you have the
option of following the terms and conditions either of that numbered
version or of any later version published by the Free Software
Foundation.  If the Program does not specify a version number of the
GNU Affero General Public License, you may choose any version ever published
by the Free Software Foundation.

  If the Program specifies that a proxy can decide which future
versions of the GNU Affero General Public License can be used, that proxy's
public statement of acceptance of a version permanently authorizes you
to choose that version for the Program.

  Later license versions may give you additional or different
permissions.  However, no additional obligations are imposed on any
author or copyright holder as a result of your choosing to follow a
later version.

  15. Disclaimer of Warranty.

  THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY
APPLICABLE LAW.  EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT
HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY
OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO,
THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
PURPOSE.  THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM
IS WITH YOU.  SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF
ALL NECESSARY SERVICING, REPAIR OR CORRECTION.

  16. Limitation of Liability.

  IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS
THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY
GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE
USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF
DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD
PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS),
EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF
SUCH DAMAGES.

  17. Interpretation of Sections 15 and 16.

  If the disclaimer of warranty and limitation of liability provided
above cannot be given local legal effect according to their terms,
reviewing courts shall apply local law that most closely approximates
an absolute waiver of all civil liability in connection with the
Program, unless a warranty or assumption of liability accompanies a
copy of the Program in return for a fee.

                     END OF TERMS AND CONDITIONS

            How to Apply These Terms to Your New Programs

  If you develop a new program, and you want it to be of the greatest
possible use to the public, the best way to achieve this is to make it
free software which everyone can redistribute and change under these terms.

  To do so, attach the following notices to the program.  It is safest
to attach them to the start of each source file to most effectively
state the exclusion of warranty; and each file should have at least
the "copyright" line and a pointer to where the full notice is found.

    <one line to give the program's name and a brief idea of what it does.>
    Copyright (C) <year>  <name of author>

    This program is free software: you can redistribute it and/or modify
    it under the terms of the GNU Affero General Public License as published
    by the Free Software Foundation, either version 3 of the License, or
    (at your option) any later version.

    This program is distributed in the hope that it will be useful,
    but WITHOUT ANY WARRANTY; without even the implied warranty of
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    GNU Affero General Public License for more details.

    You should have received a copy of the GNU Affero General Public License
    along with this program.  If not, see <https://www.gnu.org/licenses/>.

Also add information on how to contact you by electronic and paper mail.

  If your software can interact with users remotely through a computer
network, you should also make sure that it provides a way for users to
get its source.  For example, if your program is a web application, its
interface could display a "Source" link that leads users to an archive
of the code.  There are many ways you could offer source, and different
solutions will be better for different programs; see section 13 for the
specific requirements.

  You should also get your employer (if you work as a programmer) or school,
if any, to sign a "copyright disclaimer" for the program, if necessary.
For more information on this, and how to apply and follow the GNU AGPL, see
<https://www.gnu.org/licenses/>.


================================================
FILE: README.md
================================================
<p align="center"><img src="docs/logo.png"></p>
<h1 align="center">Glance</h1>
<p align="center">
  <a href="#installation">Install</a> •
  <a href="docs/configuration.md#configuring-glance">Configuration</a> •
  <a href="https://discord.com/invite/7KQ7Xa9kJd">Discord</a> •
  <a href="https://github.com/sponsors/glanceapp">Sponsor</a>
</p>
<p align="center">
  <a href="https://github.com/glanceapp/community-widgets">Community widgets</a> •
  <a href="docs/preconfigured-pages.md">Preconfigured pages</a> •
  <a href="docs/themes.md">Themes</a>
</p>

<p align="center">A lightweight, highly customizable dashboard that displays<br> your feeds in a beautiful, streamlined interface</p>

![](docs/images/readme-main-image.png)

## Features
### Various widgets
* RSS feeds
* Subreddit posts
* Hacker News posts
* Weather forecasts
* YouTube channel uploads
* Twitch channels
* Market prices
* Docker containers status
* Server stats
* Custom widgets
* [and many more...](docs/configuration.md#configuring-glance)

### Fast and lightweight
* Low memory usage
* Few dependencies
* Minimal vanilla JS
* Single <20mb binary available for multiple OSs & architectures and just as small Docker container
* Uncached pages usually load within ~1s (depending on internet speed and number of widgets)

### Tons of customizability
* Different layouts
* As many pages/tabs as you need
* Numerous configuration options for each widget
* Multiple styles for some widgets
* Custom CSS

### Optimized for mobile devices
Because you'll want to take it with you on the go.

![](docs/images/mobile-preview.png)

### Themeable
Easily create your own theme by tweaking a few numbers or choose from one of the [already available themes](docs/themes.md).

![](docs/images/themes-example.png)

<br>

## Configuration
Configuration is done through YAML files, to learn more about how the layout works, how to add more pages and how to configure widgets, visit the [configuration documentation](docs/configuration.md#configuring-glance).
<details>
<summary><strong>Preview example configuration file</strong></summary>
<br>

```yaml
pages:
  - name: Home
    columns:
      - size: small
        widgets:
          - type: calendar
            first-day-of-week: monday

          - type: rss
            limit: 10
            collapse-after: 3
            cache: 12h
            feeds:
              - url: https://selfh.st/rss/
                title: selfh.st
                limit: 4
              - url: https://ciechanow.ski/atom.xml
              - url: https://www.joshwcomeau.com/rss.xml
                title: Josh Comeau
              - url: https://samwho.dev/rss.xml
              - url: https://ishadeed.com/feed.xml
                title: Ahmad Shadeed

          - type: twitch-channels
            channels:
              - theprimeagen
              - j_blow
              - piratesoftware
              - cohhcarnage
              - christitustech
              - EJ_SA

      - size: full
        widgets:
          - type: group
            widgets:
              - type: hacker-news
              - type: lobsters

          - type: videos
            channels:
              - UCXuqSBlHAE6Xw-yeJA0Tunw # Linus Tech Tips
              - UCR-DXc1voovS8nhAvccRZhg # Jeff Geerling
              - UCsBjURrPoezykLs9EqgamOA # Fireship
              - UCBJycsmduvYEL83R_U4JriQ # Marques Brownlee
              - UCHnyfMqiRRG1u-2MsSQLbXA # Veritasium

          - type: group
            widgets:
              - type: reddit
                subreddit: technology
                show-thumbnails: true
              - type: reddit
                subreddit: selfhosted
                show-thumbnails: true

      - size: small
        widgets:
          - type: weather
            location: London, United Kingdom
            units: metric
            hour-format: 12h

          - type: markets
            markets:
              - symbol: SPY
                name: S&P 500
              - symbol: BTC-USD
                name: Bitcoin
              - symbol: NVDA
                name: NVIDIA
              - symbol: AAPL
                name: Apple
              - symbol: MSFT
                name: Microsoft

          - type: releases
            cache: 1d
            repositories:
              - glanceapp/glance
              - go-gitea/gitea
              - immich-app/immich
              - syncthing/syncthing
```
</details>

<br>

## Installation

Choose one of the following methods:

<details>
<summary><strong>Docker compose using provided directory structure (recommended)</strong></summary>
<br>

Create a new directory called `glance` as well as the template files within it by running:

```bash
mkdir glance && cd glance && curl -sL https://github.com/glanceapp/docker-compose-template/archive/refs/heads/main.tar.gz | tar -xzf - --strip-components 2
```

*[click here to view the files that will be created](https://github.com/glanceapp/docker-compose-template/tree/main/root)*

Then, edit the following files as desired:
* `docker-compose.yml` to configure the port, volumes and other containery things
* `config/home.yml` to configure the widgets or layout of the home page
* `config/glance.yml` if you want to change the theme or add more pages

<details>
<summary>Other files you may want to edit</summary>

* `.env` to configure environment variables that will be available inside configuration files
* `assets/user.css` to add custom CSS
</details>

When ready, run:

```bash
docker compose up -d
```

If you encounter any issues, you can check the logs by running:

```bash
docker compose logs
```

<hr>
</details>

<details>
<summary><strong>Docker compose manual</strong></summary>
<br>

Create a `docker-compose.yml` file with the following contents:

```yaml
services:
  glance:
    container_name: glance
    image: glanceapp/glance
    restart: unless-stopped
    volumes:
      - ./config:/app/config
    ports:
      - 8080:8080
```

Then, create a new directory called `config` and download the example starting [`glance.yml`](https://github.com/glanceapp/glance/blob/main/docs/glance.yml) file into it by running:

```bash
mkdir config && wget -O config/glance.yml https://raw.githubusercontent.com/glanceapp/glance/refs/heads/main/docs/glance.yml
```

Feel free to edit the `glance.yml` file to your liking, and when ready run:

```bash
docker compose up -d
```

If you encounter any issues, you can check the logs by running:

```bash
docker logs glance
```

<hr>
</details>

<details>
<summary><strong>Manual binary installation</strong></summary>
<br>

Precompiled binaries are available for Linux, Windows and macOS (x86, x86_64, ARM and ARM64 architectures).

### Linux

Visit the [latest release page](https://github.com/glanceapp/glance/releases/latest) for available binaries. You can place the binary in `/opt/glance/` and have it start with your server via a [systemd service](https://linuxhandbook.com/create-systemd-services/). By default, when running the binary, it will look for a `glance.yml` file in the directory it's placed in. To specify a different path for the config file, use the `--config` option:

```bash
/opt/glance/glance --config /etc/glance.yml
```

To grab a starting template for the config file, run:

```bash
wget https://raw.githubusercontent.com/glanceapp/glance/refs/heads/main/docs/glance.yml
```

### Windows

Download and extract the executable from the [latest release](https://github.com/glanceapp/glance/releases/latest) (most likely the file called `glance-windows-amd64.zip` if you're on a 64-bit system) and place it in a folder of your choice. Then, create a new text file called `glance.yml` in the same folder and paste the content from [here](https://raw.githubusercontent.com/glanceapp/glance/refs/heads/main/docs/glance.yml) in it. You should then be able to run the executable and access the dashboard by visiting `http://localhost:8080` in your browser.



<hr>
</details>

<details>
<summary><strong>Other</strong></summary>
<br>

Glance can also be installed through the following 3rd party channels:
* [Proxmox VE Helper Script](https://community-scripts.github.io/ProxmoxVE/scripts?id=glance)
* [NixOS package](https://search.nixos.org/packages?channel=unstable&show=glance)
* [Coolify.io](https://coolify.io/docs/services/glance/)

<hr>
</details>

<br>

## Common issues
<details>
<summary><strong>Requests timing out</strong></summary>

The most common cause of this is when using Pi-Hole, AdGuard Home or other ad-blocking DNS services, which by default have a fairly low rate limit. Depending on the number of widgets you have in a single page, this limit can very easily be exceeded. To fix this, increase the rate limit in the settings of your DNS service.

If using Podman, in some rare cases the timeout can be caused by an unknown issue, in which case it may be resolved by adding the following to the bottom of your `docker-compose.yml` file:
```yaml
networks:
  podman:
    external: true
```
</details>

<details>
<summary><strong>Broken layout for markets, bookmarks or other widgets</strong></summary>

This is almost always caused by the browser extension Dark Reader. To fix this, disable dark mode for the domain where Glance is hosted.
</details>

<details>
<summary><strong>cannot unmarshal !!map into []glance.page</strong></summary>

The most common cause of this is having a `pages` key in your `glance.yml` and then also having a `pages` key inside one of your included pages. To fix this, remove the `pages` key from the top of your included pages.

</details>

<br>

## FAQ
<details>
<summary><strong>Does the information on the page update automatically?</strong></summary>
No, a page refresh is required to update the information. Some things do dynamically update where it makes sense, like the clock widget and the relative time showing how long ago something happened.
</details>

<details>
<summary><strong>How frequently do widgets update?</strong></summary>
No requests are made periodically in the background, information is only fetched upon loading the page and then cached. The default cache lifetime is different for each widget and can be configured.
</details>

<details>
<summary><strong>Can I create my own widgets?</strong></summary>

Yes, there are multiple ways to create custom widgets:
* `iframe` widget - allows you to embed things from other websites
* `html` widget - allows you to insert your own static HTML
* `extension` widget - fetch HTML from a URL
* `custom-api` widget - fetch JSON from a URL and render it using custom HTML
</details>

<details>
<summary><strong>Can I change the title of a widget?</strong></summary>

Yes, the title of all widgets can be changed by specifying the `title` property in the widget's configuration:

```yaml
- type: rss
  title: My custom title

- type: markets
  title: My custom title

- type: videos
  title: My custom title

# and so on for all widgets...
```
</details>

<br>

## Feature requests

New feature suggestions are always welcome and will be considered, though please keep in mind that some of them may be out of scope for what the project is trying to achieve (or is reasonably capable of). If you have an idea for a new feature and would like to share it, you can do so [here](https://github.com/glanceapp/glance/issues/new?template=feature_request.yml).

Feature requests are tagged with one of the following:

* [Roadmap](https://github.com/glanceapp/glance/labels/roadmap) - will be implemented in a future release
* [Backlog](https://github.com/glanceapp/glance/labels/backlog) - may be implemented in the future but needs further feedback or interest from the community
* [Icebox](https://github.com/glanceapp/glance/labels/icebox) - no plans to implement as it doesn't currently align with the project's goals or capabilities, may be revised at a later date

<br>

## Building from source

Choose one of the following methods:

<details>
<summary><strong>Build binary with Go</strong></summary>
<br>

Requirements: [Go](https://go.dev/dl/) >= v1.23

To build the project for your current OS and architecture, run:

```bash
go build -o build/glance .
```

To build for a specific OS and architecture, run:

```bash
GOOS=linux GOARCH=amd64 go build -o build/glance .
```

[*click here for a full list of GOOS and GOARCH combinations*](https://go.dev/doc/install/source#:~:text=$GOOS%20and%20$GOARCH)

Alternatively, if you just want to run the app without creating a binary, like when you're testing out changes, you can run:

```bash
go run .
```
<hr>
</details>

<details>
<summary><strong>Build project and Docker image with Docker</strong></summary>
<br>

Requirements: [Docker](https://docs.docker.com/engine/install/)

To build the project and image using just Docker, run:

*(replace `owner` with your name or organization)*

```bash
docker build -t owner/glance:latest .
```

If you wish to push the image to a registry (by default Docker Hub), run:

```bash
docker push owner/glance:latest
```

<hr>
</details>

<br>

## Contributing guidelines

* Before working on a new feature it's preferable to submit a feature request first and state that you'd like to implement it yourself
* Please don't submit PRs for feature requests that are either in the roadmap<sup>[1]</sup>, backlog<sup>[2]</sup> or icebox<sup>[3]</sup>
* Use `dev` for the base branch if you're adding new features or fixing bugs, otherwise use `main`
* Avoid introducing new dependencies
* Avoid making backwards-incompatible configuration changes
* Avoid introducing new colors or hard-coding colors, use the standard `primary`, `positive` and `negative`
* For icons, try to use [heroicons](https://heroicons.com/) where applicable
* Provide a screenshot of the changes if UI related where possible
* No `package.json`

<details>
<summary><strong><sup>[1] [2] [3]</sup></strong></summary>

[1] The feature likely already has work put into it that may conflict with your implementation

[2] The demand, implementation or functionality for this feature is not yet clear

[3] No plans to add this feature for the time being

</details>

<br>

## Thank you

To all the people who were generous enough to [sponsor](https://github.com/sponsors/glanceapp) the project and to everyone who has contributed in any way, be it PRs, submitting issues, helping others in the discussions or Discord server, creating guides and tools or just mentioning Glance on social media. Your support is greatly appreciated and helps keep the project going.


================================================
FILE: docs/configuration.md
================================================
# Configuring Glance

- [Preconfigured page](#preconfigured-page)
- [The config file](#the-config-file)
  - [Auto reload](#auto-reload)
  - [Environment variables](#environment-variables)
    - [Other ways of providing tokens/passwords/secrets](#other-ways-of-providing-tokenspasswordssecrets)
  - [Including other config files](#including-other-config-files)
  - [Icons](#icons)
  - [Config schema](#config-schema)
- [Authentication](#authentication)
- [Server](#server)
- [Document](#document)
- [Branding](#branding)
- [Theme](#theme)
  - [Available themes](#available-themes)
- [Pages & Columns](#pages--columns)
- [Widgets](#widgets)
  - [RSS](#rss)
  - [Videos](#videos)
  - [Hacker News](#hacker-news)
  - [Lobsters](#lobsters)
  - [Reddit](#reddit)
  - [Search](#search-widget)
  - [Group](#group)
  - [Split Column](#split-column)
  - [Custom API](#custom-api)
  - [Extension](#extension)
  - [Weather](#weather)
  - [Todo](#todo)
  - [Monitor](#monitor)
  - [Releases](#releases)
  - [Docker Containers](#docker-containers)
  - [DNS Stats](#dns-stats)
  - [Server Stats](#server-stats)
  - [Repository](#repository)
  - [Bookmarks](#bookmarks)
  - [Calendar](#calendar)
  - [Calendar (legacy)](#calendar-legacy)
  - [ChangeDetection.io](#changedetectionio)
  - [Clock](#clock)
  - [Markets](#markets)
  - [Twitch Channels](#twitch-channels)
  - [Twitch Top Games](#twitch-top-games)
  - [iframe](#iframe)
  - [HTML](#html)


## Preconfigured page
If you don't want to spend time reading through all the available configuration options and just want something to get you going quickly you can use [this `glance.yml` file](glance.yml) and make changes to it as you see fit. It will give you a page that looks like the following:

![](images/preconfigured-page-preview.png)

Configure the widgets, add more of them, add extra pages, etc. Make it your own!

## The config file

### Auto reload
Automatic config reload is supported, meaning that you can make changes to the config file and have them take effect on save without having to restart the container/service. Making changes to environment variables does not trigger a reload and requires manual restart. Deleting a config file will stop that file from being watched, even if it is recreated.

> [!NOTE]
>
> If you attempt to start Glance with an invalid config it will exit with an error outright. If you successfully started Glance with a valid config and then made changes to it which result in an error, you'll see that error in the console and Glance will continue to run with the old configuration. You can then continue to make changes and when there are no errors the new configuration will be loaded.

> [!CAUTION]
>
> Reloading the configuration file clears your cached data, meaning that you have to request the data anew each time you do this. This can lead to rate limiting for some APIs if you do it too frequently. Having a cache that persists between reloads will be added in the future.

### Environment variables
Inserting environment variables is supported anywhere in the config. This is done via the `${ENV_VAR}` syntax. Attempting to use an environment variable that doesn't exist will result in an error and Glance will either not start or load your new config on save. Example:

```yaml
server:
  host: ${HOST}
  port: ${PORT}
```

Can also be in the middle of a string:

```yaml
- type: rss
  title: ${RSS_TITLE}
  feeds:
    - url: http://domain.com/rss/${RSS_CATEGORY}.xml
```

Works with any type of value, not just strings:

```yaml
- type: rss
  limit: ${RSS_LIMIT}
```

If you need to use the syntax `${NAME}` in your config without it being interpreted as an environment variable, you can escape it by prefixing with a backslash `\`:

```yaml
something: \${NOT_AN_ENV_VAR}
```

#### Other ways of providing tokens/passwords/secrets

You can use [Docker secrets](https://docs.docker.com/compose/how-tos/use-secrets/) with the following syntax:

```yaml
# This will be replaced with the contents of the file /run/secrets/github_token
# so long as the secret `github_token` is provided to the container
token: ${secret:github_token}
```

Alternatively, you can load the contents of a file who's path is provided by an environment variable:

`docker-compose.yml`
```yaml
services:
  glance:
    image: glanceapp/glance
    environment:
      - TOKEN_FILE=/home/user/token
    volumes:
      - /home/user/token:/home/user/token
```

`glance.yml`
```yaml
token: ${readFileFromEnv:TOKEN_FILE}
```

> [!NOTE]
>
> The contents of the file will be stripped of any leading/trailing whitespace before being used.

### Including other config files
Including config files from within your main config file is supported. This is done via the `$include` directive along with a relative or absolute path to the file you want to include. If the path is relative, it will be relative to the main config file. Additionally, environment variables can be used within included files, and changes to the included files will trigger an automatic reload. Example:

```yaml
pages:
  - $include: home.yml
  - $include: videos.yml
  - $include: homelab.yml
```

The file you are including should not have any additional indentation, its values should be at the top level and the appropriate amount of indentation will be added automatically depending on where the file is included. Example:

`glance.yml`

```yaml
pages:
  - name: Home
    columns:
      - size: full
        widgets:
          - $include: rss.yml
  - name: News
    columns:
      - size: full
        widgets:
          - type: group
            widgets:
              - $include: rss.yml
              - type: reddit
                subreddit: news
```

`rss.yml`

```yaml
- type: rss
  title: News
  feeds:
    - url: ${RSS_URL}
```

The `$include` directive can be used anywhere in the config file, not just in the `pages` property, however it must be on its own line and have the appropriate indentation.

If you encounter YAML parsing errors when using the `$include` directive, the reported line numbers will likely be incorrect. This is because the inclusion of files is done before the YAML is parsed, as YAML itself does not support file inclusion. To help with debugging in cases like this, you can use the `config:print` command and pipe it into `less -N` to see the full config file with includes resolved and line numbers added:

```sh
glance --config /path/to/glance.yml config:print | less -N
```

This is a bit more convoluted when running Glance inside a Docker container:

```sh
docker run --rm -v ./glance.yml:/app/config/glance.yml glanceapp/glance config:print | less -N
```

This assumes that the config you want to print is in your current working directory and is named `glance.yml`.

## Icons

For widgets which provide you with the ability to specify icons such as the monitor, bookmarks, docker containers, etc, you can use the `icon` property to specify a URL to an image or use icon names from multiple libraries via prefixes:

```yml
icon: si:immich # si for Simple icons https://simpleicons.org/
icon: sh:immich # sh for selfh.st icons https://selfh.st/icons/
icon: di:immich # di for Dashboard icons https://github.com/homarr-labs/dashboard-icons
icon: mdi:camera # mdi for Material Design icons https://pictogrammers.com/library/mdi/
```

> [!NOTE]
>
> The icons are loaded externally and are hosted on `cdn.jsdelivr.net`, if you do not wish to depend on a 3rd party you are free to download the icons individually and host them locally.

Icons from the Simple icons library as well as Material Design icons will automatically invert their color to match your light or dark theme, however you may want to enable this manually for other icons. To do this, you can use the `auto-invert` prefix:

```yaml
icon: auto-invert https://example.com/path/to/icon.png # with a URL
icon: auto-invert sh:glance-dark # with a selfh.st icon
```

This expects the icon to be black and will automatically invert it to white when using a dark theme.

## Config schema

For property descriptions, validation and autocompletion of the config within your IDE, @not-first has kindly created a [schema](https://github.com/not-first/glance-schema). Massive thanks to them for this, go check it out and give them a star!

## Authentication

To make sure that only you and the people you want to share your dashboard with have access to it, you can set up authentication via username and password. This is done through a top level `auth` property. Example:

```yaml
auth:
  secret-key: # this must be set to a random value generated using the secret:make CLI command
  users:
    admin:
      password: 123456
    svilen:
      password: 123456
```

To generate a secret key, run the following command:

```sh
./glance secret:make
```

Or with Docker:

```sh
docker run --rm glanceapp/glance secret:make
```

### Using hashed passwords

If you do not want to store plain passwords in your config file or in environment variables, you can hash your password and provide its hash instead:

```sh
./glance password:hash mysecretpassword
```

Or with Docker:

```sh
docker run --rm glanceapp/glance password:hash mysecretpassword
```

Then, in your config file use the `password-hash` property instead of `password`:

```yaml
auth:
  secret-key: # this must be set to a random value generated using the secret:make CLI command
  users:
    admin:
      password-hash: $2a$10$o6SXqiccI3DDP2dN4ADumuOeIHET6Q4bUMYZD6rT2Aqt6XQ3DyO.6
```

### Preventing brute-force attacks

Glance will automatically block IP addresses of users who fail to authenticate 5 times in a row in the span of 5 minutes. In order for this feature to work correctly, Glance must know the real IP address of requests. If you're using a reverse proxy such as nginx, Traefik, NPM, etc, you must set the `proxied` property in the `server` configuration to `true`:

```yaml
server:
  proxied: true
```

When set to `true`, Glance will use the `X-Forwarded-For` header to determine the original IP address of the request, so make sure that your reverse proxy is correctly configured to send that header.

## Server
Server configuration is done through a top level `server` property. Example:

```yaml
server:
  port: 8080
  assets-path: /home/user/glance-assets
```

### Properties

| Name | Type | Required | Default |
| ---- | ---- | -------- | ------- |
| host | string | no |  |
| port | number | no | 8080 |
| proxied | boolean | no | false |
| base-url | string | no | |
| assets-path | string | no |  |

#### `host`
The address which the server will listen on. Setting it to `localhost` means that only the machine that the server is running on will be able to access the dashboard. By default it will listen on all interfaces.

#### `port`
A number between 1 and 65,535, so long as that port isn't already used by anything else.

#### `proxied`
Set to `true` if you're using a reverse proxy in front of Glance. This will make Glance use the `X-Forwarded-*` headers to determine the original request details.

#### `base-url`
The base URL that Glance is hosted under. No need to specify this unless you're using a reverse proxy and are hosting Glance under a directory. If that's the case then you can set this value to `/glance` or whatever the directory is called. Note that the forward slash (`/`) in the beginning is required unless you specify the full domain and path.

> [!IMPORTANT]
> You need to strip the `base-url` prefix before forwarding the request to the Glance server.
> In Caddy you can do this using [`handle_path`](https://caddyserver.com/docs/caddyfile/directives/handle_path) or [`uri strip_prefix`](https://caddyserver.com/docs/caddyfile/directives/uri).

#### `assets-path`
The path to a directory that will be served by the server under the `/assets/` path. This is handy for widgets like the Monitor where you have to specify an icon URL and you want to self host all the icons rather than pointing to an external source.

> [!IMPORTANT]
>
> When installing through docker the path will point to the files inside the container. Don't forget to mount your assets path to the same path inside the container.
> Example:
>
> If your assets are in:
> ```
> /home/user/glance-assets
> ```
>
> You should mount:
> ```
> /home/user/glance-assets:/app/assets
> ```
>
> And your config should contain:
> ```
> assets-path: /app/assets
> ```

##### Examples

Say you have a directory `glance-assets` with a file `gitea-icon.png` in it and you specify your assets path like:

```yaml
assets-path: /home/user/glance-assets
```

To be able to point to an asset from your assets path, use the `/assets/` path like such:

```yaml
icon: /assets/gitea-icon.png
```

## Document
If you want to insert custom HTML into the `<head>` of the document for all pages, you can do so by using the `document` property. Example:

```yaml
document:
  head: |
    <script src="/assets/custom.js"></script>
```

## Branding
You can adjust the various parts of the branding through a top level `branding` property. Example:

```yaml
branding:
  custom-footer: |
    <p>Powered by <a href="https://github.com/glanceapp/glance">Glance</a></p>
  logo-url: /assets/logo.png
  favicon-url: /assets/logo.png
  app-name: "My Dashboard"
  app-icon-url: "/assets/app-icon.png"
  app-background-color: "#151519"
```

### Properties

| Name | Type | Required | Default |
| ---- | ---- | -------- | ------- |
| hide-footer | bool | no | false |
| custom-footer | string | no |  |
| logo-text | string | no | G |
| logo-url | string | no | |
| favicon-url | string | no | |
| app-name | string | no | Glance |
| app-icon-url | string | no | Glance's default icon |
| app-background-color | string | no | Glance's default background color |

#### `hide-footer`
Hides the footer when set to `true`.

#### `custom-footer`
Specify custom HTML to use for the footer.

#### `logo-text`
Specify custom text to use instead of the "G" found in the navigation.

#### `logo-url`
Specify a URL to a custom image to use instead of the "G" found in the navigation. If both `logo-text` and `logo-url` are set, only `logo-url` will be used.

#### `favicon-url`
Specify a URL to a custom image to use for the favicon.

#### `app-name`
Specify the name of the web app shown in browser tab and PWA.

#### `app-icon-url`
Specify URL for PWA and browser tab icon (512x512 PNG).

#### `app-background-color`
Specify background color for PWA. Must be a valid CSS color.

## Theme
Theming is done through a top level `theme` property. Values for the colors are in [HSL](https://giggster.com/guide/basics/hue-saturation-lightness/) (hue, saturation, lightness) format. You can use a color picker [like this one](https://hslpicker.com/) to convert colors from other formats to HSL. The values are separated by a space and `%` is not required for any of the numbers.

Example:

```yaml
theme:
  # This will be the default theme
  background-color: 100 20 10
  primary-color: 40 90 40
  contrast-multiplier: 1.1

  disable-picker: false
  presets:
    gruvbox-dark:
      background-color: 0 0 16
      primary-color: 43 59 81
      positive-color: 61 66 44
      negative-color: 6 96 59

    zebra:
      light: true
      background-color: 0 0 95
      primary-color: 0 0 10
      negative-color: 0 90 50
```

### Available themes
If you don't want to spend time configuring your own theme, there are [several available themes](themes.md) which you can simply copy the values for.

### Properties
| Name | Type | Required | Default |
| ---- | ---- | -------- | ------- |
| light | boolean | no | false |
| background-color | HSL | no | 240 8 9 |
| primary-color | HSL | no | 43 50 70 |
| positive-color | HSL | no | same as `primary-color` |
| negative-color | HSL | no | 0 70 70 |
| contrast-multiplier | number | no | 1 |
| text-saturation-multiplier | number | no | 1 |
| custom-css-file | string | no | |
| disable-picker | bool | false | |
| presets | object | no | |

#### `light`
Whether the scheme is light or dark. This does not change the background color, it inverts the text colors so that they look appropriately on a light background.

#### `background-color`
Color of the page and widgets.

#### `primary-color`
Color used across the page, largely to indicate unvisited links.

#### `positive-color`
Used to indicate that something is positive, such as stock price being up, twitch channel being live or a monitored site being online. If not set, the value of `primary-color` will be used.

#### `negative-color`
Oppposite of `positive-color`.

#### `contrast-multiplier`
Used to increase or decrease the contrast (in other words visibility) of the text. A value of `1.3` means that the text will be 30% lighter/darker depending on the scheme. Use this if you think that some of the text on the page is too dark and hard to read. Example:

![difference between 1 and 1.3 contrast](images/contrast-multiplier-example.png)

#### `text-saturation-multiplier`
Used to increase or decrease the saturation of text, useful when using a custom background color with a high amount of saturation and needing the text to have a more neutral color. `0.5` means that the saturation will be 50% lower and `1.5` means that it'll be 50% higher.

#### `custom-css-file`
Path to a custom CSS file, either external or one from within the server configured assets path. Example:

```yaml
theme:
  custom-css-file: /assets/my-style.css
```

> [!TIP]
>
> Because Glance uses a lot of utility classes it might be difficult to target some elements. To make it easier to style specific widgets, each widget has a `widget-type-{name}` class, so for example if you wanted to make the links inside just the RSS widget bigger you could use the following selector:
>
> ```css
> .widget-type-rss a {
>     font-size: 1.5rem;
> }
> ```
>
> In addition, you can also use the `css-class` property which is available on every widget to set custom class names for individual widgets.

#### `disable-picker`
When set to `true` hides the theme picker and disables the abiltity to switch between themes. All users who previously picked a non-default theme will be switched over to the default theme.

#### `presets`
Define additional theme presets that can be selected from the theme picker on the page. For each preset, you can specify the same properties as for the default theme, such as `background-color`, `primary-color`, `positive-color`, `negative-color`, `contrast-multiplier`, etc., except for the `custom-css-file` property.

Example:

```yaml
theme:
  presets:
    my-custom-dark-theme:
      background-color: 229 19 23
      contrast-multiplier: 1.2
      primary-color: 222 74 74
      positive-color: 96 44 68
      negative-color: 359 68 71
    my-custom-light-theme:
      light: true
      background-color: 220 23 95
      contrast-multiplier: 1.1
      primary-color: 220 91 54
      positive-color: 109 58 40
      negative-color: 347 87 44
```

To override the default dark and light themes, use the key names `default-dark` and `default-light`.

## Pages & Columns
![illustration of pages and columns](images/pages-and-columns-illustration.png)

Using pages and columns is how widgets are organized. Each page contains up to 3 columns and each column can have any number of widgets.

### Pages
Pages are defined through a top level `pages` property. The page defined first becomes the home page and all pages get automatically added to the navigation bar in the order that they were defined. Example:

```yaml
pages:
  - name: Home
    columns: ...

  - name: Videos
    columns: ...

  - name: Homelab
    columns: ...
```

### Properties
| Name | Type | Required | Default |
| ---- | ---- | -------- | ------- |
| name | string | yes | |
| slug | string | no | |
| width | string | no | |
| desktop-navigation-width | string | no | |
| center-vertically | boolean | no | false |
| hide-desktop-navigation | boolean | no | false |
| show-mobile-header | boolean | no | false |
| head-widgets | array | no | |
| columns | array | yes | |

#### `name`
The name of the page which gets shown in the navigation bar.

#### `slug`
The URL friendly version of the title which is used to access the page. For example if the title of the page is "RSS Feeds" you can make the page accessible via `localhost:8080/feeds` by setting the slug to `feeds`. If not defined, it will automatically be generated from the title.

#### `width`
The maximum width of the page on desktop. Possible values are `default`, `slim` and `wide`.

#### `desktop-navigation-width`
The maximum width of the desktop navigation. Useful if you have a few pages that use a different width than the rest and don't want the navigation to jump abruptly when going to and away from those pages. Possible values are `default`, `slim` and `wide`.

Here are the pixel equivalents for each value:

* default: `1600px`
* slim: `1100px`
* wide: `1920px`

> [!NOTE]
>
> When using `slim`, the maximum number of columns allowed for that page is `2`.

#### `center-vertically`
When set to `true`, vertically centers the content on the page. Has no effect if the content is taller than the height of the viewport.

#### `hide-desktop-navigation`
Whether to show the navigation links at the top of the page on desktop.

#### `show-mobile-header`
Whether to show a header displaying the name of the page on mobile. The header purposefully has a lot of vertical whitespace in order to push the content down and make it easier to reach on tall devices.

Preview:

![](images/mobile-header-preview.png)

#### `head-widgets`

Head widgets will be shown at the top of the page, above the columns, and take up the combined width of all columns. You can specify any widget, though some will look better than others, such as the markets, RSS feed with `horizontal-cards` style, and videos widgets. Example:

![](images/head-widgets-preview.png)

```yaml
pages:
  - name: Home
    head-widgets:
      - type: markets
        hide-header: true
        markets:
          - symbol: SPY
            name: S&P 500
          - symbol: BTC-USD
            name: Bitcoin
          - symbol: NVDA
            name: NVIDIA
          - symbol: AAPL
            name: Apple
          - symbol: MSFT
            name: Microsoft

    columns:
      - size: small
        widgets:
          - type: calendar
      - size: full
        widgets:
          - type: hacker-news
      - size: small
        widgets:
          - type: weather
            location: London, United Kingdom
```

### Columns
Columns are defined for each page using a `columns` property. There are two types of columns - `full` and `small`, which refers to their width. A small column takes up a fixed amount of width (300px) and a full column takes up the all of the remaining width. You can have up to 3 columns per page and you must have either 1 or 2 full columns. Example:

```yaml
pages:
  - name: Home
    columns:
      - size: small
        widgets: ...
      - size: full
        widgets: ...
      - size: small
        widgets: ...
```

### Properties
| Name | Type | Required |
| ---- | ---- | -------- |
| size | string | yes |
| widgets | array | no |

Here are some of the possible column configurations:

![column configuration small-full-small](images/column-configuration-1.png)

```yaml
columns:
  - size: small
    widgets: ...
  - size: full
    widgets: ...
  - size: small
    widgets: ...
```

![column configuration small-full-small](images/column-configuration-2.png)

```yaml
columns:
  - size: full
    widgets: ...
  - size: small
    widgets: ...
```

![column configuration small-full-small](images/column-configuration-3.png)

```yaml
columns:
  - size: full
    widgets: ...
  - size: full
    widgets: ...
```

## Widgets
Widgets are defined for each column using a `widgets` property. Example:

```yaml
pages:
  - name: Home
    columns:
      - size: small
        widgets:
          - type: weather
            location: London, United Kingdom
```

> [!NOTE]
>
> Currently not all widgets are designed to fit every column size, however some widgets offer different "styles" that help alleviate this limitation.

### Shared Properties
| Name | Type | Required |
| ---- | ---- | -------- |
| type | string | yes |
| title | string | no |
| title-url | string | no |
| hide-header | boolean | no | false |
| cache | string | no |
| css-class | string | no |

#### `type`
Used to specify the widget.

#### `title`
The title of the widget. If left blank it will be defined by the widget.

#### `title-url`
The URL to go to when clicking on the widget's title. If left blank it will be defined by the widget (if available).

#### `hide-header`
When set to `true`, the header (title) of the widget will be hidden. You cannot hide the header of the group widget.

> [!NOTE]
>
> If a widget fails to update, a red dot or circle is shown next to the title of that widget indicating that the it is not working. You will not be able to see this if you hide the header.

#### `cache`
How long to keep the fetched data in memory. The value is a string and must be a number followed by one of s, m, h, d. Examples:

```yaml
cache: 30s # 30 seconds
cache: 5m  # 5 minutes
cache: 2h  # 2 hours
cache: 1d  # 1 day
```

> [!NOTE]
>
> Not all widgets can have their cache duration modified. The calendar and weather widgets update on the hour and this cannot be changed.

#### `css-class`
Set custom CSS classes for the specific widget instance.

### RSS
Display a list of articles from multiple RSS feeds.

Example:

```yaml
- type: rss
  title: News
  style: horizontal-cards
  feeds:
    - url: https://feeds.bloomberg.com/markets/news.rss
      title: Bloomberg
    - url: https://moxie.foxbusiness.com/google-publisher/markets.xml
      title: Fox Business
    - url: https://moxie.foxbusiness.com/google-publisher/technology.xml
      title: Fox Business
```

#### Properties
| Name | Type | Required | Default |
| ---- | ---- | -------- | ------- |
| style | string | no | vertical-list |
| feeds | array | yes |
| thumbnail-height | float | no | 10 |
| card-height | float | no | 27 |
| limit | integer | no | 25 |
| preserve-order | bool | no | false |
| single-line-titles | boolean | no | false |
| collapse-after | integer | no | 5 |

##### `limit`
The maximum number of articles to show.

##### `collapse-after`
How many articles are visible before the "SHOW MORE" button appears. Set to `-1` to never collapse.

##### `preserve-order`
When set to `true`, the order of the articles will be preserved as they are in the feeds. Useful if a feed uses its own sorting order which denotes the importance of the articles. If you use this property while having a lot of feeds, it's recommended to set a `limit` to each individual feed since if the first defined feed has 15 articles, the articles from the second feed will start after the 15th article in the list.

##### `single-line-titles`
When set to `true`, truncates the title of each post if it exceeds one line. Only applies when the style is set to `vertical-list`.

##### `style`
Used to change the appearance of the widget. Possible values are:

* `vertical-list` - suitable for `full` and `small` columns
* `detailed-list` - suitable for `full` columns
* `horizontal-cards` - suitable for `full` columns
* `horizontal-cards-2` - suitable for `full` columns

Below is a preview of each style:

`vertical-list`

![preview of vertical-list style for RSS widget](images/rss-feed-vertical-list-preview.png)

`detailed-list`

![preview of detailed-list style for RSS widget](images/rss-widget-detailed-list-preview.png)

`horizontal-cards`

![preview of horizontal-cards style for RSS widget](images/rss-feed-horizontal-cards-preview.png)

`horizontal-cards-2`

![preview of horizontal-cards-2 style for RSS widget](images/rss-widget-horizontal-cards-2-preview.png)

##### `thumbnail-height`
Used to modify the height of the thumbnails. Works only when the style is set to `horizontal-cards`. The default value is `10` and the units are `rem`, if you want to for example double the height of the thumbnails you can set it to `20`.

##### `card-height`
Used to modify the height of cards when using the `horizontal-cards-2` style. The default value is `27` and the units are `rem`.

##### `feeds`
An array of RSS/atom feeds. The title can optionally be changed.

###### Properties for each feed
| Name | Type | Required | Default | Notes |
| ---- | ---- | -------- | ------- | ----- |
| url | string | yes | | |
| title | string | no | the title provided by the feed | |
| hide-categories | boolean | no | false | Only applicable for `detailed-list` style |
| hide-description | boolean | no | false | Only applicable for `detailed-list` style |
| limit | integer | no | | |
| item-link-prefix | string | no | | |
| headers | key (string) & value (string) | no | | |

###### `limit`
The maximum number of articles to show from that specific feed. Useful if you have a feed which posts a lot of articles frequently and you want to prevent it from excessively pushing down articles from other feeds.

###### `item-link-prefix`
If an RSS feed isn't returning item links with a base domain and Glance has failed to automatically detect the correct domain you can manually add a prefix to each link with this property.

###### `headers`
Optionally specify the headers that will be sent with the request. Example:

```yaml
- type: rss
  feeds:
    - url: https://domain.com/rss
      headers:
        User-Agent: Custom User Agent
```

### Videos
Display a list of the latest videos from specific YouTube channels.

Example:

```yaml
- type: videos
  channels:
    - UCXuqSBlHAE6Xw-yeJA0Tunw
    - UCBJycsmduvYEL83R_U4JriQ
    - UCHnyfMqiRRG1u-2MsSQLbXA
```

Preview:
![](images/videos-widget-preview.png)

#### Properties
| Name | Type | Required | Default |
| ---- | ---- | -------- | ------- |
| channels | array | yes | |
| playlists | array | no | |
| limit | integer | no | 25 |
| style | string | no | horizontal-cards |
| collapse-after | integer | no | 7 |
| collapse-after-rows | integer | no | 4 |
| include-shorts | boolean | no | false |
| video-url-template | string | no | https://www.youtube.com/watch?v={VIDEO-ID} |

##### `channels`
A list of channels IDs.

One way of getting the ID of a channel is going to the channel's page and clicking on its description:

![](images/videos-channel-description-example.png)

Then scroll down and click on "Share channel", then "Copy channel ID":

![](images/videos-copy-channel-id-example.png)

##### `playlists`

A list of playlist IDs:

```yaml
- type: videos
  playlists:
    - PL8mG-RkN2uTyZZ00ObwZxxoG_nJbs3qec
    - PL8mG-RkN2uTxTK4m_Vl2dYR9yE41kRdBg
```

The playlist ID can be found in its link which is in the form of
```
https://www.youtube.com...&list={ID}&...
```

##### `limit`
The maximum number of videos to show.

##### `collapse-after`
Specify the number of videos to show when using the `vertical-list` style before the "SHOW MORE" button appears.

##### `collapse-after-rows`
Specify the number of rows to show when using the `grid-cards` style before the "SHOW MORE" button appears.

##### `style`
Used to change the appearance of the widget. Possible values are `horizontal-cards`, `vertical-list` and `grid-cards`.

Preview of `vertical-list`:

![](images/videos-widget-vertical-list-preview.png)

Preview of `grid-cards`:

![](images/videos-widget-grid-cards-preview.png)

##### `video-url-template`
Used to replace the default link for videos. Useful when you're running your own YouTube front-end. Example:

```yaml
video-url-template: https://invidious.your-domain.com/watch?v={VIDEO-ID}
```

Placeholders:

`{VIDEO-ID}` - the ID of the video

### Hacker News
Display a list of posts from [Hacker News](https://news.ycombinator.com/).

Example:

```yaml
- type: hacker-news
  limit: 15
  collapse-after: 5
```

Preview:
![](images/hacker-news-widget-preview.png)

#### Properties
| Name | Type | Required | Default |
| ---- | ---- | -------- | ------- |
| limit | integer | no | 15 |
| collapse-after | integer | no | 5 |
| comments-url-template | string | no | https://news.ycombinator.com/item?id={POST-ID} |
| sort-by | string | no | top |
| extra-sort-by | string | no | |

##### `comments-url-template`
Used to replace the default link for post comments. Useful if you want to use an alternative front-end. Example:

```yaml
comments-url-template: https://www.hckrnws.com/stories/{POST-ID}
```

Placeholders:

`{POST-ID}` - the ID of the post

##### `sort-by`
Used to specify the order in which the posts should get returned. Possible values are `top`, `new`, and `best`.

##### `extra-sort-by`
Can be used to specify an additional sort which will be applied on top of the already sorted posts. By default does not apply any extra sorting and the only available option is `engagement`.

The `engagement` sort tries to place the posts with the most points and comments on top, also prioritizing recent over old posts.

### Lobsters
Display a list of posts from [Lobsters](https://lobste.rs).

Example:

```yaml
- type: lobsters
  sort-by: hot
  tags:
    - go
    - security
    - linux
  limit: 15
  collapse-after: 5
```

Preview:
![](images/lobsters-widget-preview.png)

#### Properties
| Name | Type | Required | Default |
| ---- | ---- | -------- | ------- |
| instance-url | string | no | https://lobste.rs/ |
| custom-url | string | no | |
| limit | integer | no | 15 |
| collapse-after | integer | no | 5 |
| sort-by | string | no | hot |
| tags | array | no | |

##### `instance-url`
The base URL for a lobsters instance hosted somewhere other than on lobste.rs. Example:

```yaml
instance-url: https://www.journalduhacker.net/
```

##### `custom-url`
A custom URL to retrieve lobsters posts from. If this is specified, the `instance-url`, `sort-by` and `tags` properties are ignored.

##### `limit`
The maximum number of posts to show.

##### `collapse-after`
How many posts are visible before the "SHOW MORE" button appears. Set to `-1` to never collapse.

##### `sort-by`
The sort order in which posts are returned. Possible options are `hot` and `new`.

##### `tags`
Limit to posts containing one of the given tags. **You cannot specify a sort order when filtering by tags, it will default to `hot`.**

### Reddit
Display a list of posts from a specific subreddit.

> [!WARNING]
>
> Reddit does not allow unauthorized API access from VPS IPs, if you're hosting Glance on a VPS you will get a 403
> response. As a workaround you can either [register an app on Reddit](https://ssl.reddit.com/prefs/apps/) and use the
> generated ID and secret in the widget configuration to authenticate your requests (see `app-auth` property), use a proxy
> (see `proxy` property) or route the traffic from Glance through a VPN.

Example:

```yaml
- type: reddit
  subreddit: technology
```

#### Properties
| Name | Type | Required | Default |
| ---- | ---- | -------- | ------- |
| subreddit | string | yes |  |
| style | string | no | vertical-list |
| show-thumbnails | boolean | no | false |
| show-flairs | boolean | no | false |
| limit | integer | no | 15 |
| collapse-after | integer | no | 5 |
| comments-url-template | string | no | https://www.reddit.com/{POST-PATH} |
| request-url-template | string | no |  |
| proxy | string or multiple parameters | no |  |
| sort-by | string | no | hot |
| top-period | string | no | day |
| search | string | no | |
| extra-sort-by | string | no | |
| app-auth | object | no | |

##### `subreddit`
The subreddit for which to fetch the posts from.

##### `style`
Used to change the appearance of the widget. Possible values are `vertical-list`, `horizontal-cards` and `vertical-cards`. The first two were designed for full columns and the last for small columns.

`vertical-list`

![](images/reddit-widget-preview.png)

`horizontal-cards`

![](images/reddit-widget-horizontal-cards-preview.png)

`vertical-cards`

![](images/reddit-widget-vertical-cards-preview.png)

##### `show-thumbnails`
Shows or hides thumbnails next to the post. This only works if the `style` is `vertical-list`. Preview:

![](images/reddit-widget-vertical-list-thumbnails.png)

> [!NOTE]
>
> Thumbnails don't work for some subreddits due to Reddit's API not returning the thumbnail URL. No workaround for this yet.

##### `show-flairs`
Shows post flairs when set to `true`.

##### `limit`
The maximum number of posts to show.

##### `collapse-after`
How many posts are visible before the "SHOW MORE" button appears. Set to `-1` to never collapse. Not available when using the `vertical-cards` and `horizontal-cards` styles.

##### `comments-url-template`
Used to replace the default link for post comments. Useful if you want to use the old Reddit design or any other 3rd party front-end. Example:

```yaml
comments-url-template: https://old.reddit.com/{POST-PATH}
```

Placeholders:

`{POST-PATH}` - the full path to the post, such as:

```
r/selfhosted/comments/bsp01i/welcome_to_rselfhosted_please_read_this_first/
```

`{POST-ID}` - the ID that comes after `/comments/`

`{SUBREDDIT}` - the subreddit name

##### `request-url-template`
A custom request URL that will be used to fetch the data. This is useful when you're hosting Glance on a VPS where Reddit is blocking the requests and you want to route them through a proxy that accepts the URL as either a part of the path or a query parameter.

Placeholders:

`{REQUEST-URL}` - will be templated and replaced with the expanded request URL (i.e. https://www.reddit.com/r/selfhosted/hot.json). Example:

```
https://proxy/{REQUEST-URL}
https://your.proxy/?url={REQUEST-URL}
```

##### `proxy`
A custom HTTP/HTTPS proxy URL that will be used to fetch the data. This is useful when you're hosting Glance on a VPS where Reddit is blocking the requests and you want to bypass the restriction by routing the requests through a proxy. Example:

```yaml
proxy: http://user:pass@proxy.com:8080
proxy: https://user:pass@proxy.com:443
```

Alternatively, you can specify the proxy URL as well as additional options by using multiple parameters:

```yaml
proxy:
  url: http://proxy.com:8080
  allow-insecure: true
  timeout: 10s
```

###### `allow-insecure`
When set to `true`, allows the use of insecure connections such as when the proxy has a self-signed certificate.

###### `timeout`
The maximum time to wait for a response from the proxy. The value is a string and must be a number followed by one of s, m, h, d. Example: `10s` for 10 seconds, `1m` for 1 minute, etc

##### `sort-by`
Can be used to specify the order in which the posts should get returned. Possible values are `hot`, `new`, `top` and `rising`.

##### `top-period`
Available only when `sort-by` is set to `top`. Possible values are `hour`, `day`, `week`, `month`, `year` and `all`.

##### `search`
Keywords to search for. Searching within specific fields is also possible, **though keep in mind that Reddit may remove the ability to use any of these at any time**:

![](images/reddit-field-search.png)

##### `extra-sort-by`
Can be used to specify an additional sort which will be applied on top of the already sorted posts. By default does not apply any extra sorting and the only available option is `engagement`.

The `engagement` sort tries to place the posts with the most points and comments on top, also prioritizing recent over old posts.

##### `app-auth`
```yaml
widgets:
  - type: reddit
    subreddit: technology
    app-auth:
      name: ${REDDIT_APP_NAME}
      id: ${REDDIT_APP_CLIENT_ID}
      secret: ${REDDIT_APP_SECRET}
```

To register an app on Reddit, go to [this page](https://ssl.reddit.com/prefs/apps/).

### Search Widget
Display a search bar that can be used to search for specific terms on various search engines.

Example:

```yaml
- type: search
  search-engine: duckduckgo
  bangs:
    - title: YouTube
      shortcut: "!yt"
      url: https://www.youtube.com/results?search_query={QUERY}
```

Preview:

![](images/search-widget-preview.png)

#### Keyboard shortcuts
| Keys | Action | Condition |
| ---- | ------ | --------- |
| <kbd>S</kbd> | Focus the search bar | Not already focused on another input field |
| <kbd>Enter</kbd> | Perform search in the same tab | Search input is focused and not empty |
| <kbd>Ctrl</kbd> + <kbd>Enter</kbd> | Perform search in a new tab | Search input is focused and not empty |
| <kbd>Escape</kbd> | Leave focus | Search input is focused |
| <kbd>Up</kbd> | Insert the last search query since the page was opened into the input field | Search input is focused |

> [!TIP]
>
> You can use the property `new-tab` with a value of `true` if you want to show search results in a new tab by default. <kbd>Ctrl</kbd> + <kbd>Enter</kbd> will then show results in the same tab.

#### Properties
| Name | Type | Required | Default |
| ---- | ---- | -------- | ------- |
| search-engine | string | no | duckduckgo |
| new-tab | boolean | no | false |
| autofocus | boolean | no | false |
| target | string | no | _blank |
| placeholder | string | no | Type here to search… |
| bangs | array | no | |

##### `search-engine`
Either a value from the table below or a URL to a custom search engine. Use `{QUERY}` to indicate where the query value gets placed.

| Name | URL |
| ---- | --- |
| duckduckgo | `https://duckduckgo.com/?q={QUERY}` |
| google | `https://www.google.com/search?q={QUERY}` |
| bing | `https://www.bing.com/search?q={QUERY}` |
| perplexity | `https://www.perplexity.ai/search?q={QUERY}` |
| kagi | `https://kagi.com/search?q={QUERY}` |
| startpage | `https://www.startpage.com/search?q={QUERY}` |

##### `new-tab`
When set to `true`, swaps the shortcuts for showing results in the same or new tab, defaulting to showing results in a new tab.

##### `autofocus`
When set to `true`, automatically focuses the search input on page load.

##### `target`
The target to use when opening the search results in a new tab. Possible values are `_blank`, `_self`, `_parent` and `_top`.

##### `placeholder`
When set, modifies the text displayed in the input field before typing.

##### `bangs`
What now? [Bangs](https://duckduckgo.com/bangs). They're shortcuts that allow you to use the same search box for many different sites. Assuming you have it configured, if for example you start your search input with `!yt` you'd be able to perform a search on YouTube:

![](images/search-widget-bangs-preview.png)

##### Properties for each bang
| Name | Type | Required |
| ---- | ---- | -------- |
| title | string | no |
| shortcut | string | yes |
| url | string | yes |

###### `title`
Optional title that will appear on the right side of the search bar when the query starts with the associated shortcut.

###### `shortcut`
Any value you wish to use as the shortcut for the search engine. It does not have to start with `!`.

> [!IMPORTANT]
>
> In YAML some characters have special meaning when placed in the beginning of a value. If your shortcut starts with `!` (and potentially some other special characters) you'll have to wrap the value in quotes:
> ```yaml
> shortcut: "!yt"
>```

###### `url`
The URL of the search engine. Use `{QUERY}` to indicate where the query value gets placed. Examples:

```yaml
url: https://www.reddit.com/search?q={QUERY}
url: https://store.steampowered.com/search/?term={QUERY}
url: https://www.amazon.com/s?k={QUERY}
```

### Group
Group multiple widgets into one using tabs. Widgets are defined using a `widgets` property exactly as you would on a page column. The only limitation is that you cannot place a group widget or a split column widget within a group widget.

Example:

```yaml
- type: group
  widgets:
    - type: reddit
      subreddit: gamingnews
      show-thumbnails: true
      collapse-after: 6
    - type: reddit
      subreddit: games
    - type: reddit
      subreddit: pcgaming
      show-thumbnails: true
```

Preview:

![](images/group-widget-preview.png)

#### Sharing properties

To avoid repetition you can use [YAML anchors](https://support.atlassian.com/bitbucket-cloud/docs/yaml-anchors/) and share properties between widgets.

Example:

```yaml
- type: group
  define: &shared-properties
      type: reddit
      show-thumbnails: true
      collapse-after: 6
  widgets:
    - subreddit: gamingnews
      <<: *shared-properties
    - subreddit: games
      <<: *shared-properties
    - subreddit: pcgaming
      <<: *shared-properties
```

### Split Column
Splits a full sized column in half, allowing you to place widgets side by side horizontally. This is converted to a single column on mobile devices or if not enough width is available. Widgets are defined using a `widgets` property exactly as you would on a page column.

Two widgets side by side in a `full` column:

![](images/split-column-widget-preview.png)

<details>
<summary>View <code>glance.yml</code></summary>
<br>

```yaml
# ...
- size: full
  widgets:
    - type: split-column
      widgets:
        - type: hacker-news
          collapse-after: 3
        - type: lobsters
          collapse-after: 3

    - type: videos
# ...
```
</details>
<br>

You can also achieve a number of different full page layouts using just this widget, such as:

3 column layout where all columns have equal width:

![](images/split-column-widget-3-columns.png)

<details>
<summary>View <code>glance.yml</code></summary>
<br>

```yaml
pages:
  - name: Home
    columns:
      - size: full
        widgets:
          - type: split-column
            max-columns: 3
            widgets:
              - type: reddit
                subreddit: selfhosted
                collapse-after: 15
              - type: reddit
                subreddit: homelab
                collapse-after: 15
              - type: reddit
                subreddit: sysadmin
                collapse-after: 15
```
</details>
<br>

4 column layout where all columns have equal width (and the page is set to `width: wide`):

![](images/split-column-widget-4-columns.png)

<details>
<summary>View <code>glance.yml</code></summary>
<br>

```yaml
pages:
  - name: Home
    width: wide
    columns:
      - size: full
        widgets:
          - type: split-column
            max-columns: 4
            widgets:
              - type: reddit
                subreddit: selfhosted
                collapse-after: 15
              - type: reddit
                subreddit: homelab
                collapse-after: 15
              - type: reddit
                subreddit: linux
                collapse-after: 15
              - type: reddit
                subreddit: sysadmin
                collapse-after: 15
```
</details>
<br>

Masonry layout with up to 5 columns where all columns have equal width (and the page is set to `width: wide`):

![](images/split-column-widget-masonry.png)

<details>
<summary>View <code>glance.yml</code></summary>
<br>

```yaml
define:
  - &subreddit-settings
    type: reddit
    collapse-after: 5

pages:
  - name: Home
    width: wide
    columns:
      - size: full
        widgets:
          - type: split-column
            max-columns: 5
            widgets:
              - subreddit: selfhosted
                <<: *subreddit-settings
              - subreddit: homelab
                <<: *subreddit-settings
              - subreddit: linux
                <<: *subreddit-settings
              - subreddit: sysadmin
                <<: *subreddit-settings
              - subreddit: DevOps
                <<: *subreddit-settings
              - subreddit: Networking
                <<: *subreddit-settings
              - subreddit: DataHoarding
                <<: *subreddit-settings
              - subreddit: OpenSource
                <<: *subreddit-settings
              - subreddit: Privacy
                <<: *subreddit-settings
              - subreddit: FreeSoftware
                <<: *subreddit-settings
```
</details>
<br>

Just like the `group` widget, you can insert any widget type, you can even insert a `group` widget inside of a `split-column` widget, but you can't insert a `split-column` widget inside of a `group` widget.


### Custom API

Display data from a JSON API using a custom template.

> [!NOTE]
>
> The configuration of this widget requires some basic knowledge of programming, HTML, CSS, the Go template language and Glance-specific concepts.

Examples:

![](images/custom-api-preview-1.png)

<details>
<summary>View <code>glance.yml</code></summary>
<br>

```yaml
- type: custom-api
  title: Random Fact
  cache: 6h
  url: https://uselessfacts.jsph.pl/api/v2/facts/random
  template: |
    <p class="size-h4 color-paragraph">{{ .JSON.String "text" }}</p>
```
</details>
<br>

![](images/custom-api-preview-2.png)

<details>
<summary>View <code>glance.yml</code></summary>
<br>

```yaml
- type: custom-api
  title: Immich stats
  cache: 1d
  url: https://${IMMICH_URL}/api/server/statistics
  headers:
    x-api-key: ${IMMICH_API_KEY}
    Accept: application/json
  template: |
    <div class="flex justify-between text-center">
      <div>
          <div class="color-highlight size-h3">{{ .JSON.Int "photos" | formatNumber }}</div>
          <div class="size-h6">PHOTOS</div>
      </div>
      <div>
          <div class="color-highlight size-h3">{{ .JSON.Int "videos" | formatNumber }}</div>
          <div class="size-h6">VIDEOS</div>
      </div>
      <div>
          <div class="color-highlight size-h3">{{ div (.JSON.Int "usage" | toFloat) 1073741824 | toInt | formatNumber }}GB</div>
          <div class="size-h6">USAGE</div>
      </div>
    </div>
```
</details>
<br>

![](images/custom-api-preview-3.png)

<details>
<summary>View <code>glance.yml</code></summary>
<br>

```yaml
- type: custom-api
  title: Steam Specials
  cache: 12h
  url: https://store.steampowered.com/api/featuredcategories?cc=us
  template: |
    <ul class="list list-gap-10 collapsible-container" data-collapse-after="5">
    {{ range .JSON.Array "specials.items" }}
      <li>
        <a class="size-h4 color-highlight block text-truncate" href="https://store.steampowered.com/app/{{ .Int "id" }}/">{{ .String "name" }}</a>
        <ul class="list-horizontal-text">
          <li>{{ div (.Int "final_price" | toFloat) 100 | printf "$%.2f" }}</li>
          {{ $discount := .Int "discount_percent" }}
          <li{{ if ge $discount 40 }} class="color-positive"{{ end }}>{{ $discount }}% off</li>
        </ul>
      </li>
    {{ end }}
    </ul>
```
</details>

#### Properties
| Name | Type | Required | Default |
| ---- | ---- | -------- | ------- |
| url | string | no | |
| headers | key (string) & value (string) | no | |
| method | string | no | GET |
| body-type | string | no | json |
| body | any | no | |
| frameless | boolean | no | false |
| allow-insecure | boolean | no | false |
| skip-json-validation | boolean | no | false |
| template | string | yes | |
| options | map | no | |
| parameters | key (string) & value (string|array) | no | |
| subrequests | map of requests | no | |

##### `url`
The URL to fetch the data from. It must be accessible from the server that Glance is running on.

##### `headers`
Optionally specify the headers that will be sent with the request. Example:

```yaml
headers:
  x-api-key: your-api-key
  Accept: application/json
```

##### `method`
The HTTP method to use when making the request. Possible values are `GET`, `POST`, `PUT`, `PATCH`, `DELETE`, `OPTIONS` and `HEAD`.

##### `body-type`
The type of the body that will be sent with the request. Possible values are `json`, and `string`.

##### `body`
The body that will be sent with the request. It can be a string or a map. Example:

```yaml
body-type: json
body:
  key1: value1
  key2: value2
  multiple-items:
    - item1
    - item2
```

```yaml
body-type: string
body: |
  key1=value1&key2=value2
```

##### `frameless`
When set to `true`, removes the border and padding around the widget.

##### `allow-insecure`
Whether to ignore invalid/self-signed certificates.

##### `skip-json-validation`
When set to `true`, skips the JSON validation step. This is useful when the API returns JSON Lines/newline-delimited JSON, which is a format that consists of several JSON objects separated by newlines.

##### `template`
The template that will be used to display the data. It relies on Go's `html/template` package so it's recommended to go through [its documentation](https://pkg.go.dev/text/template) to understand how to do basic things such as conditionals, loops, etc. In addition, it also uses [tidwall's gjson](https://github.com/tidwall/gjson) package to parse the JSON data so it's worth going through its documentation if you want to use more advanced JSON selectors. You can view additional examples with explanations and function definitions [here](custom-api.md).

##### `options`
A map of options that will be passed to the template and can be used to modify the behavior of the widget.

<details>
<summary>View examples</summary>

<br>

Instead of defining options within the template and having to modify the template itself like such:

```yaml
- type: custom-api
  template: |
    {{ /* User configurable options */ }}
    {{ $collapseAfter := 5 }}
    {{ $showThumbnails := true }}
    {{ $showFlairs := false }}

     <ul class="list list-gap-10 collapsible-container" data-collapse-after="{{ $collapseAfter }}">
      {{ if $showThumbnails }}
        <li>
          <img src="{{ .JSON.String "thumbnail" }}" alt="thumbnail" />
        </li>
      {{ end }}
      {{ if $showFlairs }}
        <li>
          <span class="flair">{{ .JSON.String "flair" }}</span>
        </li>
      {{ end }}
     </ul>
```

You can use the `options` property to retrieve and define default values for these variables:

```yaml
- type: custom-api
  template: |
    <ul class="list list-gap-10 collapsible-container" data-collapse-after="{{ .Options.IntOr "collapse-after" 5 }}">
      {{ if (.Options.BoolOr "show-thumbnails" true) }}
        <li>
          <img src="{{ .JSON.String "thumbnail" }}" alt="thumbnail" />
        </li>
      {{ end }}
      {{ if (.Options.BoolOr "show-flairs" false) }}
        <li>
          <span class="flair">{{ .JSON.String "flair" }}</span>
        </li>
      {{ end }}
    </ul>
```

This way, you can optionally specify the `collapse-after`, `show-thumbnails` and `show-flairs` properties in the widget configuration:

```yaml
- type: custom-api
  options:
    collapse-after: 5
    show-thumbnails: true
    show-flairs: false
```

Which means you can reuse the same template for multiple widgets with different options:

```yaml
# Note that `custom-widgets` isn't a special property, it's just used to define the reusable "anchor", see https://support.atlassian.com/bitbucket-cloud/docs/yaml-anchors/
custom-widgets:
  - &example-widget
    type: custom-api
    template: |
      {{ .Options.StringOr "custom-option" "not defined" }}

pages:
  - name: Home
    columns:
      - size: full
        widgets:
          - <<: *example-widget
            options:
              custom-option: "Value 1"

          - <<: *example-widget
            options:
              custom-option: "Value 2"
```

Currently, the available methods on the `.Options` object are: `StringOr`, `IntOr`, `BoolOr` and `FloatOr`.

</details>

##### `parameters`
A list of keys and values that will be sent to the custom-api as query paramters.

##### `subrequests`
A map of additional requests that will be executed concurrently and then made available in the template via the `.Subrequest` property. Example:

```yaml
- type: custom-api
  cache: 2h
  subrequests:
    another-one:
      url: https://uselessfacts.jsph.pl/api/v2/facts/random
  title: Random Fact
  url: https://uselessfacts.jsph.pl/api/v2/facts/random
  template: |
    <p class="size-h4 color-paragraph">{{ .JSON.String "text" }}</p>
    <p class="size-h4 color-paragraph margin-top-15">{{ (.Subrequest "another-one").JSON.String "text" }}</p>
```

The subrequests support all the same properties as the main request, except for `subrequests` itself, so you can use `headers`, `parameters`, etc.

`(.Subrequest "key")` can be a little cumbersome to write, so you can define a variable to make it easier:

```yaml
  template: |
    {{ $anotherOne := .Subrequest "another-one" }}
    <p>{{ $anotherOne.JSON.String "text" }}</p>
```

You can also access the `.Response` property of a subrequest as you would with the main request:

```yaml
  template: |
    {{ $anotherOne := .Subrequest "another-one" }}
    <p>{{ $anotherOne.Response.StatusCode }}</p>
```

> [!NOTE]
>
> Setting this property will override any query parameters that are already in the URL.

```yaml
parameters:
  param1: value1
  param2:
    - item1
    - item2
```

### Extension
Display a widget provided by an external source (3rd party). If you want to learn more about developing extensions, checkout the [extensions documentation](extensions.md) (WIP).

```yaml
- type: extension
  url: https://domain.com/widget/display-a-message
  allow-potentially-dangerous-html: true
  parameters:
    message: Hello, world!
```

#### Properties
| Name | Type | Required | Default |
| ---- | ---- | -------- | ------- |
| url | string | yes | |
| fallback-content-type | string | no | |
| allow-potentially-dangerous-html | boolean | no | false |
| headers | key & value | no | |
| parameters | key & value | no | |

##### `url`
The URL of the extension. **Note that the query gets stripped from this URL and the one defined by `parameters` gets used instead.**

##### `fallback-content-type`
Optionally specify the fallback content type of the extension if the URL does not return a valid `Widget-Content-Type` header. Currently the only supported value for this property is `html`.

##### `headers`
Optionally specify the headers that will be sent with the request. Example:

```yaml
headers:
  x-api-key: ${SECRET_KEY}
```

##### `allow-potentially-dangerous-html`
Whether to allow the extension to display HTML.

> [!WARNING]
>
> There's a reason this property is scary-sounding. It's intended to be used by developers who are comfortable with developing and using their own extensions. Do not enable it if you have no idea what it means or if you're not **absolutely sure** that the extension URL you're using is safe.

##### `parameters`
A list of keys and values that will be sent to the extension as query paramters.

### Weather
Display weather information for a specific location. The data is provided by https://open-meteo.com/.

Example:

```yaml
- type: weather
  units: metric
  hour-format: 12h
  location: London, United Kingdom
```

> [!NOTE]
>
> US cities which have common names can have their state specified as the second parameter as such:
>
> * Greenville, North Carolina, United States
> * Greenville, South Carolina, United States
> * Greenville, Mississippi, United States


Preview:

![](images/weather-widget-preview.png)

Each bar represents a 2 hour interval. The yellow background represents sunrise and sunset. The blue dots represent the times of the day where there is a high chance for precipitation. You can hover over the bars to view the exact temperature for that time.

#### Properties

| Name | Type | Required | Default |
| ---- | ---- | -------- | ------- |
| location | string | yes |  |
| units | string | no | metric |
| hour-format | string | no | 12h |
| hide-location | boolean | no | false |
| show-area-name | boolean | no | false |

##### `location`
The name of the city and country to fetch weather information for. Attempting to launch the applcation with an invalid location will result in an error. You can use the [gecoding API page](https://open-meteo.com/en/docs/geocoding-api) to search for your specific location. Glance will use the first result from the list if there are multiple.

##### `units`
Whether to show the temperature in celsius or fahrenheit, possible values are `metric` or `imperial`.

#### `hour-format`
Whether to show the hours of the day in 12-hour format or 24-hour format. Possible values are `12h` and `24h`.

##### `hide-location`
Optionally don't display the location name on the widget.

##### `show-area-name`
Whether to display the state/administrative area in the location name. If set to `true` the location will be displayed as:

```
Greenville, North Carolina, United States
```

Otherwise, if set to `false` (which is the default) it'll be displayed as:

```
Greenville, United States
```

### Todo

A simple to-do list that allows you to add, edit and delete tasks. The tasks are stored in the browser's local storage.

Example:

```yaml
- type: to-do
```

Preview:

![](images/todo-widget-preview.png)

To reorder tasks, drag and drop them by grabbing the top side of the task:

![](images/reorder-todo-tasks-prevew.gif)

To delete a task, hover over it and click on the trash icon.

#### Properties

| Name | Type | Required | Default |
| ---- | ---- | -------- | ------- |
| id | string | no | |

##### `id`

The ID of the todo list. If you want to have multiple todo lists, you must specify a different ID for each one. The ID is used to store the tasks in the browser's local storage. This means that if you have multiple todo lists with the same ID, they will share the same tasks.

#### Keyboard shortcuts
| Keys | Action | Condition |
| ---- | ------ | --------- |
| <kbd>Enter</kbd> | Add a task to the bottom of the list | When the "Add a task" field is focused |
| <kbd>Ctrl</kbd> + <kbd>Enter</kbd> | Add a task to the top of the list | When the "Add a task" field is focused |
| <kbd>Down Arrow</kbd> | Focus the last task that was added | When the "Add a task" field is focused |
| <kbd>Escape</kbd> | Focus the "Add a task" field | When a task is focused |

### Monitor
Display a list of sites and whether they are reachable (online) or not. This is determined by sending a GET request to the specified URL, if the response is 200 then the site is OK. The time it took to receive a response is also shown in milliseconds.

Example:

```yaml
- type: monitor
  cache: 1m
  title: Services
  sites:
    - title: Jellyfin
      url: https://jellyfin.yourdomain.com
      icon: /assets/jellyfin-logo.png
    - title: Gitea
      url: https://gitea.yourdomain.com
      icon: /assets/gitea-logo.png
    - title: Immich
      url: https://immich.yourdomain.com
      icon: /assets/immich-logo.png
    - title: AdGuard Home
      url: https://adguard.yourdomain.com
      icon: /assets/adguard-logo.png
    - title: Vaultwarden
      url: https://vault.yourdomain.com
      icon: /assets/vaultwarden-logo.png
```

Preview:

![](images/monitor-widget-preview.png)

You can hover over the "ERROR" text to view more information.

#### Properties

| Name | Type | Required | Default |
| ---- | ---- | -------- | ------- |
| sites | array | yes | |
| style | string | no | |
| show-failing-only | boolean | no | false |

##### `show-failing-only`
Shows only a list of failing sites when set to `true`.

##### `style`
Used to change the appearance of the widget. Possible values are `compact`.

Preview of `compact`:

![](images/monitor-widget-compact-preview.png)

##### `sites`

Properties for each site:

| Name | Type | Required | Default |
| ---- | ---- | -------- | ------- |
| title | string | yes | |
| url | string | yes | |
| check-url | string | no | |
| error-url | string | no | |
| icon | string | no | |
| timeout | string | no | 3s |
| allow-insecure | boolean | no | false |
| same-tab | boolean | no | false |
| alt-status-codes | array | no | |
| basic-auth | object | no | |

`title`

The title used to indicate the site.

`url`

The URL of the monitored service, which must be reachable by Glance, and will be used as the link to go to when clicking on the title. If `check-url` is not specified, this is used as the status check.

`check-url`

The URL which will be requested and its response will determine the status of the site. If not specified, the `url` property is used.

`error-url`

If the monitored service returns an error, the user will be redirected here. If not specified, the `url` property is used.

`icon`

See [Icons](#icons) for more information on how to specify icons.

`timeout`

How long to wait for a response from the server before considering it unreachable. The value is a string and must be a number followed by one of s, m, h, d. Example: `5s` for 5 seconds, `1m` for 1 minute, etc.

`allow-insecure`

Whether to ignore invalid/self-signed certificates.

`same-tab`

Whether to open the link in the same or a new tab.

`alt-status-codes`

Status codes other than 200 that you want to return "OK".

```yaml
alt-status-codes:
  - 403
```

`basic-auth`

HTTP Basic Authentication credentials for protected sites.

```yaml
basic-auth:
  username: your-username
  password: your-password
```

### Releases
Display a list of latest releases for specific repositories on Github, GitLab, Codeberg or Docker Hub.

Example:

```yaml
- type: releases
  show-source-icon: true
  repositories:
    - go-gitea/gitea
    - jellyfin/jellyfin
    - glanceapp/glance
    - codeberg:redict/redict
    - gitlab:fdroid/fdroidclient
    - dockerhub:gotify/server
```

Preview:

![](images/releases-widget-preview.png)

#### Properties

| Name | Type | Required | Default |
| ---- | ---- | -------- | ------- |
| repositories | array | yes |  |
| show-source-icon | boolean | no | false |  |
| token | string | no | |
| gitlab-token | string | no | |
| limit | integer | no | 10 |
| collapse-after | integer | no | 5 |

##### `repositories`
A list of repositores to fetch the latest release for. Only the name/repo is required, not the full URL. A prefix can be specified for repositories hosted elsewhere such as GitLab, Codeberg and Docker Hub. Example:

```yaml
repositories:
  - gitlab:inkscape/inkscape
  - dockerhub:glanceapp/glance
  - codeberg:redict/redict
```

Official images on Docker Hub can be specified by omitting the owner:

```yaml
repositories:
  - dockerhub:nginx
  - dockerhub:node
  - dockerhub:alpine
```

You can also specify exact tags for Docker Hub images:

```yaml
repositories:
  - dockerhub:nginx:latest
  - dockerhub:nginx:stable-alpine
```

To include prereleases you can specify the repository as an object and use the `include-prereleases` property:

**Note: This feature is currently only available for GitHub repositories.**

```yaml
repositories:
  - gitlab:inkscape/inkscape
  - repository: glanceapp/glance
    include-prereleases: true
  - codeberg:redict/redict
```

##### `show-source-icon`
Shows an icon of the source (GitHub/GitLab/Codeberg/Docker Hub) next to the repository name when set to `true`.

##### `token`
Without authentication Github allows for up to 60 requests per hour. You can easily exceed this limit and start seeing errors if you're tracking lots of repositories or your cache time is low. To circumvent this you can [create a read only token from your Github account](https://github.com/settings/personal-access-tokens/new) and provide it here.

You can also specify the value for this token through an ENV variable using the syntax `${GITHUB_TOKEN}` where `GITHUB_TOKEN` is the name of the variable that holds the token. If you've installed Glance through docker you can specify the token in your docker-compose:

```yaml
services:
  glance:
    image: glanceapp/glance
    environment:
      - GITHUB_TOKEN=<your token>
```

and then use it in your `glance.yml` like this:

```yaml
- type: releases
  token: ${GITHUB_TOKEN}
  repositories: ...
```

This way you can safely check your `glance.yml` in version control without exposing the token.

##### `gitlab-token`
Same as the above but used when fetching GitLab releases.

##### `limit`
The maximum number of releases to show.

#### `collapse-after`
How many releases are visible before the "SHOW MORE" button appears. Set to `-1` to never collapse.

### Docker Containers

Display the status of your Docker containers along with an icon and an optional short description.

![](images/docker-containers-preview.png)

```yaml
- type: docker-containers
  hide-by-default: false
```

> [!NOTE]
>
> The widget requires access to `docker.sock`. If you're running Glance inside a container, this can be done by mounting the socket as a volume:
>
> ```yaml
> services:
>   glance:
>     image: glanceapp/glance
>     volumes:
>       - /var/run/docker.sock:/var/run/docker.sock
> ```

Configuration of the containers is done via labels applied to each container:

```yaml
  jellyfin:
    image: jellyfin/jellyfin:latest
    labels:
      glance.name: Jellyfin
      glance.icon: si:jellyfin
      glance.url: https://jellyfin.domain.com
      glance.description: Movies & shows
```

Alternatively, you can also define the values within your `glance.yml` via the `containers` property, where the key is the container name and each value is the same as the labels but without the "glance." prefix:

```yaml
- type: docker-containers
  containers:
    container_name_1:
      name: Container Name
      description: Description of the container
      url: https://container.domain.com
      icon: si:container-icon
      hide: false
```

For services with multiple containers you can specify a `glance.id` on the "main" container and `glance.parent` on each "child" container:

<details>
<summary>View <code>docker-compose.yml</code></summary>
<br>

```yaml
services:
  immich-server:
    image: ghcr.io/immich-app/immich-server
    labels:
      glance.name: Immich
      glance.icon: si:immich
      glance.url: https://immich.domain.com
      glance.description: Image & video management
      glance.id: immich

  redis:
    image: docker.io/redis:6.2-alpine
    labels:
      glance.parent: immich
      glance.name: Redis

  database:
    image: docker.io/tensorchord/pgvecto-rs:pg14-v0.2.0
    labels:
      glance.parent: immich
      glance.name: DB

  proxy:
    image: nginx:stable
    labels:
      glance.parent: immich
      glance.name: Proxy
```
</details>
<br>

This will place all child containers under the `Immich` container when hovering over its icon:

![](images/docker-container-parent.png)

If any of the child containers are down, their status will propagate up to the parent container:

![](images/docker-container-parent2.png)

#### Properties

| Name | Type | Required | Default |
| ---- | ---- | -------- | ------- |
| hide-by-default | boolean | no | false |
| format-container-names | boolean | no | false |
| sock-path | string | no | /var/run/docker.sock |
| category | string | no | |
| running-only | boolean | no | false |

##### `hide-by-default`
Whether to hide the containers by default. If set to `true` you'll have to manually add a `glance.hide: false` label to each container you want to display. By default all containers will be shown and if you want to hide a specific container you can add a `glance.hide: true` label.

##### `format-container-names`
When set to `true`, automatically converts container names such as `container_name_1` into `Container Name 1`.

##### `sock-path`
The path to the Docker socket. This can also be a [remote socket](https://docs.docker.com/engine/daemon/remote-access/) or proxied socket using something like [docker-socket-proxy](https://github.com/Tecnativa/docker-socket-proxy).

###### `category`
Filter to only the containers which have this category specified via the `glance.category` label. Useful if you want to have multiple containers widgets, each showing a different set of containers.

<details>
<summary>View example</summary>
<br>


```yaml
services:
  jellyfin:
    image: jellyfin/jellyfin:latest
    labels:
      glance.name: Jellyfin
      glance.icon: si:jellyfin
      glance.url: https://jellyfin.domain.com
      glance.category: media

  gitea:
    image: gitea/gitea:latest
    labels:
      glance.name: Gitea
      glance.icon: si:gitea
      glance.url: https://gitea.domain.com
      glance.category: dev-tools

  vaultwarden:
    image: vaultwarden/server:latest
    labels:
      glance.name: Vaultwarden
      glance.icon: si:vaultwarden
      glance.url: https://vaultwarden.domain.com
      glance.category: dev-tools
```

Then you can use the `category` property to filter the containers:

```yaml
- type: docker-containers
  title: Dev tool containers
  category: dev-tools

- type: docker-containers
  title: Media containers
  category: media
```

</details>

##### `running-only`
Whether to only show running containers. If set to `true` only containers that are currently running will be displayed. If set to `false` all containers will be displayed regardless of their state.

#### Labels
| Name | Description |
| ---- | ----------- |
| glance.name | The name displayed in the UI. If not specified, the name of the container will be used. |
| glance.icon | See [Icons](#icons) for more information on how to specify icons |
| glance.url | The URL that the user will be redirected to when clicking on the container. |
| glance.same-tab | Whether to open the link in the same or a new tab. Default is `false`. |
| glance.description | A short description displayed in the UI. Default is empty. |
| glance.hide | Whether to hide the container. If set to `true` the container will not be displayed. Defaults to `false`. |
| glance.id | The custom ID of the container. Used to group containers under a single parent. |
| glance.parent | The ID of the parent container. Used to group containers under a single parent. |
| glance.category | The category of the container. Used to filter containers by category. |

### DNS Stats
Display statistics from a self-hosted ad-blocking DNS resolver such as AdGuard Home, Pi-hole, or Technitium.

Example:

```yaml
- type: dns-stats
  service: adguard
  url: https://adguard.domain.com/
  username: admin
  password: ${ADGUARD_PASSWORD}
```

Preview:

![](images/dns-stats-widget-preview.png)

> [!NOTE]
>
> When using AdGuard Home the 3rd statistic on top will be the average latency and when using Pi-hole or Technitium it will be the total number of blocked domains from all adlists.

#### Properties

| Name | Type | Required | Default |
| ---- | ---- | -------- | ------- |
| service | string | no | pihole |
| allow-insecure | bool | no | false |
| url | string | yes |  |
| username | string | when service is `adguard` |  |
| password | string | when service is `adguard` or `pihole-v6` |  |
| token | string | when service is `pihole` |  |
| hide-graph | bool | no | false |
| hide-top-domains | bool | no | false |
| hour-format | string | no | 12h |

##### `service`
Either `adguard`, `technitium`, or `pihole` (major version 5 and below) or `pihole-v6` (major version 6 and above).

##### `allow-insecure`
Whether to allow invalid/self-signed certificates when making the request to the service.

##### `url`
The base URL of the service.

##### `username`
Only required when using AdGuard Home. The username used to log into the admin dashboard.

##### `password`
Required when using AdGuard Home, where the password is the one used to log into the admin dashboard.

Also required when using Pi-hole major version 6 and above, where the password is the one used to log into the admin dashboard or the application password, which can be found in `Settings -> Web Interface / API -> Configure app password`.

##### `token`
Required when using Pi-hole major version 5 or earlier. The API token which can be found in `Settings -> API -> Show API token`.

Also required when using Technitium, an API token can be generated at `Administration -> Sessions -> Create Token`.

##### `hide-graph`
Whether to hide the graph showing the number of queries over time.

##### `hide-top-domains`
Whether to hide the list of top blocked domains.

##### `hour-format`
Whether to display the relative time in the graph in `12h` or `24h` format.

### Server Stats
Display statistics such as CPU usage, memory usage and disk usage of the server Glance is running on or other servers.

Example:

```yaml
- type: server-stats
  servers:
    - type: local
      name: Services
```

Preview:

![](images/server-stats-preview.gif)

> [!NOTE]
>
> This widget is currently under development, some features might not function as expected or may change.

To display data from a remote server you need to have the Glance Agent running on that server. You can download the agent from [here](https://github.com/glanceapp/agent), though keep in mind that it is still in development and may not work as expected. Support for other providers such as Glances will be added in the future.

In the event that the CPU temperature goes over 80°C, a flame icon will appear next to the CPU. The progress indicators will also turn red (or the equivalent of your negative color) to hopefully grab your attention if anything is unusually high:

![](images/server-stats-flame-icon.png)

#### Properties
| Name | Type | Required | Default |
| ---- | ---- | -------- | ------- |
| servers | array | no |  |

##### `servers`
If not provided it will display the statistics of the server Glance is running on.

##### Properties for both `local` and `remote` servers
| Name | Type | Required | Default |
| ---- | ---- | -------- | ------- |
| type | string | yes |  |
| name | string | no |  |
| hide-swap | boolean | no | false |

###### `type`
Whether to display statistics for the local server or a remote server. Possible values are `local` and `remote`.

###### `name`
The name of the server which will be displayed on the widget. If not provided it will default to the server's hostname.

###### `hide-swap`
Whether to hide the swap usage.

##### Properties for the `local` server
| Name | Type | Required | Default |
| ---- | ---- | -------- | ------- |
| cpu-temp-sensor | string | no |  |
| hide-mountpoints-by-default | boolean | no | false |
| mountpoints | map\[string\]object | no |  |

###### `cpu-temp-sensor`
The name of the sensor to use for the CPU temperature. When not provided the widget will attempt to find the correct one, if it fails to do so the temperature will not be displayed. To view the available sensors you can use `sensors` command.

###### `hide-mountpoints-by-default`
If set to `true` you'll have to manually make each mountpoint visible by adding a `hide: false` property to it like so:

```yaml
- type: server-stats
  servers:
    - type: local
      hide-mountpoints-by-default: true
      mountpoints:
        "/":
          hide: false
        "/mnt/data":
          hide: false
```

This is useful if you're running Glance inside of a container which usually mounts a lot of irrelevant filesystems.

###### `mountpoints`
A map of mountpoints to display disk usage for. The key is the path to the mountpoint and the value is an object with optional properties. Example:

```yaml
mountpoints:
  "/":
    name: Root
  "/mnt/data":
    name: Data
  "/boot/efi":
    hide: true
```

##### Properties for each `mountpoint`
| Name | Type | Required | Default |
| ---- | ---- | -------- | ------- |
| name | string | no |  |
| hide | boolean | no | false |

###### `name`
The name of the mountpoint which will be displayed on the widget. If not provided it will default to the mountpoint's path.

###### `hide`
Whether to hide this mountpoint from the widget.

##### Properties for `remote` servers
| Name | Type | Required | Default |
| ---- | ---- | -------- | ------- |
| url | string | yes |  |
| token | string | no |  |
| timeout | string | no | 3s |

###### `url`
The URL and port of the server to fetch the statistics from.

###### `token`
The authentication token to use when fetching the statistics.

###### `timeout`
The maximum time to wait for a response from the server. The value is a string and must be a number followed by one of s, m, h, d. Example: `10s` for 10 seconds, `1m` for 1 minute, etc

### Repository
Display general information about a repository as well as a list of the latest open pull requests and issues.

Example:

```yaml
- type: repository
  repository: glanceapp/glance
  pull-requests-limit: 5
  issues-limit: 3
  commits-limit: 3
```

Preview:

![](images/repository-preview.png)

#### Properties

| Name | Type | Required | Default |
| ---- | ---- | -------- | ------- |
| repository | string | yes |  |
| token | string | no | |
| pull-requests-limit | integer | no | 3 |
| issues-limit | integer | no | 3 |
| commits-limit | integer | no | -1 |

##### `repository`
The owner and repository name that will have their information displayed.

##### `token`
Without authentication Github allows for up to 60 requests per hour. You can easily exceed this limit and start seeing errors if your cache time is low or you have many instances of this widget. To circumvent this you can [create a read only token from your Github account](https://github.com/settings/personal-access-tokens/new) and provide it here.

##### `pull-requests-limit`
The maximum number of latest open pull requests to show. Set to `-1` to not show any.

##### `issues-limit`
The maximum number of latest open issues to show. Set to `-1` to not show any.

##### `commits-limit`
The maximum number of lastest commits to show from the default branch. Set to `-1` to not show any.

### Bookmarks
Display a list of links which can be grouped.

Example:

```yaml
- type: bookmarks
  groups:
    - links:
        - title: Gmail
          url: https://mail.google.com/mail/u/0/
        - title: Amazon
          url: https://www.amazon.com/
        - title: Github
          url: https://github.com/
        - title: Wikipedia
          url: https://en.wikipedia.org/
    - title: Entertainment
      color: 10 70 50
      links:
        - title: Netflix
          url: https://www.netflix.com/
        - title: Disney+
          url: https://www.disneyplus.com/
        - title: YouTube
          url: https://www.youtube.com/
        - title: Prime Video
          url: https://www.primevideo.com/
    - title: Social
      color: 200 50 50
      links:
        - title: Reddit
          url: https://www.reddit.com/
        - title: Twitter
          url: https://twitter.com/
        - title: Instagram
          url: https://www.instagram.com/
```

Preview:

![](images/bookmarks-widget-preview.png)


#### Properties

| Name | Type | Required |
| ---- | ---- | -------- |
| groups | array | yes |

##### `groups`
An array of groups which can optionally have a title and a custom color.

###### Properties for each group
| Name | Type | Required | Default |
| ---- | ---- | -------- | ------- |
| title | string | no | |
| color | HSL | no | the primary color of the theme |
| links | array | yes | |
| same-tab | boolean | no | false |
| hide-arrow | boolean | no | false |
| target | string | no | |

> [!TIP]
>
> You can set `same-tab`, `hide-arrow` and `target` either on the group which will apply them to all links in that group, or on each individual link which will override the value set on the group.

###### Properties for each link
| Name | Type | Required | Default |
| ---- | ---- | -------- | ------- |
| title | string | yes | |
| url | string | yes | |
| description | string | no | |
| icon | string | no | |
| same-tab | boolean | no | false |
| hide-arrow | boolean | no | false |
| target | string | no | |

`icon`

See [Icons](#icons) for more information on how to specify icons.

`same-tab`

Whether to open the link in the same tab or a new one.

`hide-arrow`

Whether to hide the colored arrow on each link.

`target`

Set a custom value for the link's `target` attribute. Possible values are `_blank`, `_self`, `_parent` and `_top`, you can read more about what they do [here](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/a#target). This property has precedence over `same-tab`.

### ChangeDetection.io
Display a list watches from changedetection.io.

Example

```yaml
- type: change-detection
  instance-url: https://changedetection.mydomain.com/
  token: ${CHANGE_DETECTION_TOKEN}
```

Preview:

![](images/change-detection-widget-preview.png)

#### Properties

| Name | Type | Required | Default |
| ---- | ---- | -------- | ------- |
| instance-url | string | no | `https://www.changedetection.io` |
| token | string | no |  |
| limit | integer | no | 10 |
| collapse-after | integer | no | 5 |
| watches | array of strings | no |  |

##### `instance-url`
The URL pointing to your instance of `changedetection.io`.

##### `token`
The API access token which can be found in `SETTINGS > API`. Optionally, you can specify this using an environment variable with the syntax `${VARIABLE_NAME}`.

##### `limit`
The maximum number of watches to show.

##### `collapse-after`
How many watches are visible before the "SHOW MORE" button appears. Set to `-1` to never collapse.

##### `watches`
By default all of the configured watches will be shown. Optionally, you can specify a list of UUIDs for the specific watches you want to have listed:

```yaml
  - type: change-detection
    watches:
      - 1abca041-6d4f-4554-aa19-809147f538d3
      - 705ed3e4-ea86-4d25-a064-822a6425be2c
```

### Clock
Display a clock showing the current time and date. Optionally, also display the the time in other timezones.

Example:

```yaml
- type: clock
  hour-format: 24h
  timezones:
    - timezone: Europe/Paris
      label: Paris
    - timezone: America/New_York
      label: New York
    - timezone: Asia/Tokyo
      label: Tokyo
```

Preview:

![](images/clock-widget-preview.png)

#### Properties

| Name | Type | Required | Default |
| ---- | ---- | -------- | ------- |
| hour-format | string | no | 24h |
| timezones | array | no |  |

##### `hour-format`
Whether to show the time in 12 or 24 hour format. Possible values are `12h` and `24h`.

#### Properties for each timezone

| Name | Type | Required | Default |
| ---- | ---- | -------- | ------- |
| timezone | string | yes | |
| label | string | no | |

##### `timezone`
A timezone identifier such as `Europe/London`, `America/New_York`, etc. The full list of available identifiers can be found [here](https://en.wikipedia.org/wiki/List_of_tz_database_time_zones).

##### `label`
Optionally, override the display value for the timezone to something more meaningful such as "Home", "Work" or anything else.


### Calendar
Display a calendar.

Example:

```yaml
- type: calendar
  first-day-of-week: monday
```

Preview:

![](images/calendar-widget-preview.png)

#### Properties

| Name | Type | Required | Default |
| ---- | ---- | -------- | ------- |
| first-day-of-week | string | no | monday |

##### `first-day-of-week`
The day of the week that the calendar starts on. All week days are available as possible values.

### Calendar (legacy)
Display a calendar.

Example:

```yaml
- type: calendar-legacy
  start-sunday: false
```

Preview:

![](images/calendar-legacy-widget-preview.png)

> [!NOTE]
>
> This widget is deprecated and may be removed in a future version.

#### Properties

| Name | Type | Required | Default |
| ---- | ---- | -------- | ------- |
| start-sunday | boolean | no | false |

##### `start-sunday`
Whether calendar weeks start on Sunday or Monday.

> [!NOTE]
>
> There is currently little customizability available for the calendar. Extra features will be added in the future.

### Markets
Display a list of markets, their current value, change for the day and a small 21d chart. Data is taken from Yahoo Finance.

Example:

```yaml
- type: markets
  markets:
    - symbol: SPY
      name: S&P 500
    - symbol: BTC-USD
      name: Bitcoin
      chart-link: https://www.tradingview.com/chart/?symbol=INDEX:BTCUSD
    - symbol: NVDA
      name: NVIDIA
    - symbol: AAPL
      symbol-link: https://www.google.com/search?tbm=nws&q=apple
      name: Apple
```

Preview:

![](images/markets-widget-preview.png)

#### Properties

| Name | Type | Required |
| ---- | ---- | -------- |
| markets | array | yes |
| sort-by | string | no |
| chart-link-template | string | no |
| symbol-link-template | string | no |

##### `markets`
An array of markets for which to display information about.

##### `sort-by`
By default the markets are displayed in the order they were defined. You can customize their ordering by setting the `sort-by` property to `change` for descending order based on the stock's percentage change (e.g. 1% would be sorted higher than -1%) or `absolute-change` for descending order based on the stock's absolute price change (e.g. -1% would be sorted higher than +0.5%).

##### `chart-link-template`
A template for the link to go to when clicking on the chart that will be applied to all markets. The value `{SYMBOL}` will be replaced with the symbol of the market. You can override this on a per-market basis by specifying a `chart-link` property. Example:

```yaml
chart-link-template: https://www.tradingview.com/chart/?symbol={SYMBOL}
```

##### `symbol-link-template`
A template for the link to go to when clicking on the symbol that will be applied to all markets. The value `{SYMBOL}` will be replaced with the symbol of the market. You can override this on a per-market basis by specifying a `symbol-link` property. Example:

```yaml
symbol-link-template: https://www.google.com/search?tbm=nws&q={SYMBOL}
```

###### Properties for each market
| Name | Type | Required |
| ---- | ---- | -------- |
| symbol | string | yes |
| name | string | no |
| symbol-link | string | no |
| chart-link | string | no |

`symbol`

The symbol, as seen in Yahoo Finance.

`name`

The name that will be displayed under the symbol.

`symbol-link`

The link to go to when clicking on the symbol.

`chart-link`

The link to go to when clicking on the chart.

### Twitch Channels
Display a list of channels from Twitch.

Example:

```yaml
- type: twitch-channels
  channels:
    - jembawls
    - giantwaffle
    - asmongold
    - cohhcarnage
    - j_blow
    - xQc
```

Preview:

![](images/twitch-channels-widget-preview.png)

#### Properties
| Name | Type | Required | Default |
| ---- | ---- | -------- | ------- |
| channels | array | yes | |
| collapse-after | integer | no | 5 |
| sort-by | string | no | viewers |

##### `channels`
A list of channels to display.

##### `collapse-after`
How many channels are visible before the "SHOW MORE" button appears. Set to `-1` to never collapse.

##### `sort-by`
Can be used to specify the order in which the channels are displayed. Possible values are `viewers` and `live`.

### Twitch top games
Display a list of games with the most viewers on Twitch.

Example:

```yaml
- type: twitch-top-games
  exclude:
    - just-chatting
    - pools-hot-tubs-and-beaches
    - music
    - art
    - asmr
```

Preview:

![](images/twitch-top-games-widget-preview.png)

#### Properties
| Name | Type | Required | Default |
| ---- | ---- | -------- | ------- |
| exclude | array | no | |
| limit | integer | no | 10 |
| collapse-after | integer | no | 5 |

##### `exclude`
A list of categories that will never be shown. You must provide the slug found by clicking on the category and looking at the URL:

```
https://www.twitch.tv/directory/category/grand-theft-auto-v
                                         ^^^^^^^^^^^^^^^^^^
```

##### `limit`
The maximum number of games to show.

##### `collapse-after`
How many games are visible before the "SHOW MORE" button appears. Set to `-1` to never collapse.

### iframe
Embed an iframe as a widget.

Example:

```yaml
- type: iframe
  source: <url>
  height: 400
```

#### Properties
| Name | Type | Required | Default |
| ---- | ---- | -------- | ------- |
| source | string | yes | |
| height | integer | no | 300 |

##### `source`
The source of the iframe.

##### `height`
The height of the iframe. The minimum allowed height is 50.

### HTML
Embed any HTML.

Example:

```yaml
- type: html
  source: |
    <p>Hello, <span class="color-primary">World</span>!</p>
```

Note the use of `|` after `source:`, this allows you to insert a multi-line string.


================================================
FILE: docs/custom-api.md
================================================
[Jump to function definitions](#functions)

## Examples

The best way to get an idea of how the templates work would be with a bunch examples. Here are the most common use cases:

JSON response:

```json
{
  "title": "My Title",
  "content": "My Content",
}
```

To access the two fields in the JSON response, you would use the following:

```html
<div>{{ .JSON.String "title" }}</div>
<div>{{ .JSON.String "content" }}</div>
```

Output:

```html
<div>My Title</div>
<div>My Content</div>
```

<hr>

JSON response:

```json
{
  "author": "John Doe",
  "posts": [
    {
      "title": "My Title",
      "content": "My Content"
    },
    {
      "title": "My Title 2",
      "content": "My Content 2"
    }
  ]
}
```

To loop through the array of posts, you would use the following:

```html
{{ range .JSON.Array "posts" }}
  <div>{{ .String "title" }}</div>
  <div>{{ .String "content" }}</div>
{{ end }}
```

Output:

```html
<div>My Title</div>
<div>My Content</div>
<div>My Title 2</div>
<div>My Content 2</div>
```

Notice the missing `.JSON` when accessing the title and content, this is because the range function sets the context to the current array element.

If you want to access the top-level context within the range, you can use the following:

```html
{{ range .JSON.Array "posts" }}
  <div>{{ .String "title" }}</div>
  <div>{{ .String "content" }}</div>
  <div>{{ $.JSON.String "author" }}</div>
{{ end }}
```

Output:

```html
<div>My Title</div>
<div>My Content</div>
<div>John Doe</div>
<div>My Title 2</div>
<div>My Content 2</div>
<div>John Doe</div>
```

<hr>

JSON response:

```json
[
    "Apple",
    "Banana",
    "Cherry",
    "Watermelon"
]
```

Somewhat awkwardly, when the current context is a basic type that isn't an object, the way you specify its type is to use an empty string as the key. So, to loop through the array of strings, you would use the following:

```html
{{ range .JSON.Array "" }}
  <div>{{ .String "" }}</div>
{{ end }}
```

Output:

```html
<div>Apple</div>
<div>Banana</div>
<div>Cherry</div>
<div>Watermelon</div>
```

To access an item at a specific index, you could use the following:

```html
<div>{{ .JSON.String "0" }}</div>
```

Output:

```html
<div>Apple</div>
```

<hr>

JSON response:

```json
{
    "user": {
        "address": {
            "city": "New York",
            "state": "NY"
        }
    }
}
```

To easily access deeply nested objects, you can use the following dot notation:

```html
<div>{{ .JSON.String "user.address.city" }}</div>
<div>{{ .JSON.String "user.address.state" }}</div>
```

Output:

```html
<div>New York</div>
<div>NY</div>
```

Using indexes anywhere in the path is also supported:

```json
{
    "users": [
        {
            "name": "John Doe"
        },
        {
            "name": "Jane Doe"
        }
    ]
}
```

```html
<div>{{ .JSON.String "users.0.name" }}</div>
<div>{{ .JSON.String "users.1.name" }}</div>
```

Output:

```html
<div>John Doe</div>
<div>Jane Doe</div>
```

<hr>

JSON response:

```json
{
    "user": {
        "name": "John Doe",
        "age": 30
    }
}
```

To check if a field exists, you can use the following:

```html
{{ if .JSON.Exists "user.age" }}
  <div>{{ .JSON.Int "user.age" }}</div>
{{ else }}
  <div>Age not provided</div>
{{ end }}
```

Output:

```html
<div>30</div>
```

<hr>

JSON response:

```json
{
    "price": 100,
    "discount": 10
}
```

Calculations can be performed on either ints or floats. If both numbers are ints, an int will be returned, otherwise a float will be returned. If you try to divide by zero, 0 will be returned. If you provide non-numeric values, `NaN` will be returned.

```html
<div>{{ sub (.JSON.Int "price") (.JSON.Int "discount") }}</div>
```

Output:

```html
<div>90</div>
```

Other operations include `add`, `mul`, `div` and `mod`.

<hr>

JSON response:

```json
{
  "posts": [
    {
      "title": "Exploring the Depths of Quantum Computing",
      "date": "2023-10-27T10:00:00Z"
    },
    {
      "title": "A Beginner's Guide to Sustainable Living",
      "date": "2023-11-15T14:30:00+01:00"
    },
    {
      "title": "The Art of Baking Sourdough Bread",
      "date": "2023-12-03T08:45:22-08:00"
    }
  ]
}
```

To parse the date and display the relative time (e.g. 2h, 1d, etc), you would use the following:

```
{{ range .JSON.Array "posts" }}
  <div>{{ .String "title" }}</div>
  <div {{ .String "date" | parseTime "rfc3339" | toRelativeTime }}></div>
{{ end }}
```

The `parseTime` function takes two arguments: the layout of the date string and the date string itself. The layout can be one of the following: "RFC3339", "RFC3339Nano", "DateTime", "DateOnly", "TimeOnly" or a custom layout in Go's [date format](https://pkg.go.dev/time#pkg-constants).

Output:

```html
<div>Exploring the Depths of Quantum Computing</div>
<div data-dynamic-relative-time="1698400800"></div>

<div>A Beginner's Guide to Sustainable Living</div>
<div data-dynamic-relative-time="1700055000"></div>

<div>The Art of Baking Sourdough Bread</div>
<div data-dynamic-relative-time="1701621922"></div>
```

You don't have to worry about the internal implementation, this will then be dynamically populated by Glance on the client side to show the correct relative time.

The important thing to notice here is that the return value of `toRelativeTime` must be used as an attribute in an HTML tag, be it a `div`, `li`, `span`, etc.

<hr>

In some instances, you may want to know the status code of the response. This can be done using the following:

```html
{{ if eq .Response.StatusCode 200 }}
  <p>Success!</p>
{{ else }}
  <p>Failed to fetch data</p>
{{ end }}
```

You can also access the response headers:

```html
<div>{{ .Response.Header.Get "Content-Type" }}</div>
```

<hr>

JSON response:

```json
{"name": "Steve", "age": 30}
{"name": "Alex", "age": 25}
{"name": "John", "age": 35}
```

The above format is "[ndjson](https://docs.mulesoft.com/dataweave/latest/dataweave-formats-ndjson)" or "[JSON Lines](https://jsonlines.org/)", where each line is a separate JSON object. To parse this format, you must first disable the JSON validation check in your config, since by default the response is expected to be a single valid JSON object:

```yaml
- type: custom-api
  skip-json-validation: true
```

Then, to iterate over each object you can use `.JSONLines`:

```html
{{ range .JSONLines }}
  <p>{{ .String "name" }} is {{ .Int "age" }} years old</p>
{{ end }}
```

Output:

```html
<p>Steve is 30 years old</p>
<p>Alex is 25 years old</p>
<p>John is 35 years old</p>
```

For other ways of selecting data from a JSON Lines response, have a look at the docs for [tidwall/gjson](https://github.com/tidwall/gjson/tree/master?tab=readme-ov-file#json-lines). For example, to  get an array of all names, you can use the following:

```html
{{ range .JSON.Array "..#.name" }}
  <p>{{ .String "" }}</p>
{{ end }}
```

Output:

```html
<p>Steve</p>
<p>Alex</p>
<p>John</p>
```

<hr>

In some instances, you may need to make two consecutive API calls, where you use the result of the first call in the second call. To achieve this, you can make additional HTTP requests from within the template itself using the following syntax:

```yaml
- type: custom-api
  url: https://api.example.com/get-id-of-something
  template: |
    {{ $theID := .JSON.String "id" }}

    {{
      $something := newRequest (concat "https://api.example.com/something/" $theID)
        | withParameter "key" "value"
        | withHeader "Authorization" "Bearer token"
        | getResponse
    }}

    {{ $something.JSON.String "title" }}
```

Here, `$theID` gets retrieved from the result of the first API call and used in the second API call. The `newRequest` function creates a new request, and the `getResponse` function executes it. You can also use `withParameter` and `withHeader` to optionally add parameters and headers to the request.

If you need to make a request to a URL that requires dynamic parameters, you can omit the `url` property in the YAML and run the request entirely from within the template itself:

```yaml
- type: custom-api
  title: Events from the last 24h
  template: |
    {{
      $events := newRequest "https://api.example.com/events"
        | withParameter "after" (offsetNow "-24h" | formatTime "rfc3339")
        | getResponse
    }}

    {{ if eq $events.Response.StatusCode 200 }}
      {{ range $events.JSON.Array "events" }}
        <div>{{ .String "title" }}</div>
        <div {{ .String "date" | parseTime "rfc3339" | toRelativeTime }}></div>
      {{ end }}
    {{ else }}
      <p>Failed to fetch data: {{ $events.Response.Status }}</p>
    {{ end }}
```

*Note that you need to manually check for the correct status code.*

## Functions

The following functions are available on the `JSON` object:

- `String(key string) string`: Returns the value of the key as a string.
- `Int(key string) int`: Returns the value of the key as an integer.
- `Float(key string) float`: Returns the value of the key as a float.
- `Bool(key string) bool`: Returns the value of the key as a boolean.
- `Array(key string) []JSON`: Returns the value of the key as an array of `JSON` objects.
- `Exists(key string) bool`: Returns true if the key exists in the JSON object.

The following functions are available on the `Options` object:

- `StringOr(key string, default string) string`: Returns the value of the key as a string, or the default value if the key does not exist.
- `IntOr(key string, default int) int`: Returns the value of the key as an integer, or the default value if the key does not exist.
- `FloatOr(key string, default float) float`: Returns the value of the key as a float, or the default value if the key does not exist.
- `BoolOr(key string, default bool) bool`: Returns the value of the key as a boolean, or the default value if the key does not exist.
- `JSON(key string) JSON`: Returns the value of the key as a stringified `JSON` object, or throws an error if the key does not exist.

The following helper functions provided by Glance are available:

- `toFloat(i int) float`: Converts an integer to a float.
- `toInt(f float) int`: Converts a float to an integer.
- `toRelativeTime(t time.Time) template.HTMLAttr`: Converts Time to a relative time such as 2h, 1d, etc which dynamically updates. **NOTE:** the value of this function should be used as an attribute in an HTML tag, e.g. `<span {{ toRelativeTime .Time }}></span>`.
- `now() time.Time`: Returns the current time.
- `offsetNow(offset string) time.Time`: Returns the current time with an offset. The offset can be positive or negative and must be in the format "3h" "-1h" or "2h30m10s".
- `duration(str string) time.Duration`: Parses a string such as `1h`, `24h`, `5h30m`, etc into a `time.Duration`.
- `parseTime(layout string, s string) time.Time`: Parses a string into time.Time. The layout must be provided in Go's [date format](https://pkg.go.dev/time#pkg-constants). You can alternatively use these values instead of the literal format: "unix", "RFC3339", "RFC3339Nano", "DateTime", "DateOnly".
- `formatTime(layout string, s string) time.Time`: Formats a `time.Time` into a string. The layout uses the same format as `parseTime`.
- `parseLocalTime(layout string, s string) time.Time`: Same as the above, except in the absence of a timezone, it will use the local timezone instead of UTC.
- `parseRelativeTime(layout string, s string) time.Time`: A shorthand for `{{ .String "date" | parseTime "rfc3339" | toRelativeTime }}`.
- `add(a, b float) float`: Adds two numbers.
- `sub(a, b float) float`: Subtracts two numbers.
- `mul(a, b float) float`: Multiplies two numbers.
- `div(a, b float) float`: Divides two numbers.
- `mod(a, b int) int`: Remainder after dividing a by b (a % b).
- `formatApproxNumber(n int) string`: Formats a number to be more human-readable, e.g. 1000 -> 1k.
- `formatNumber(n float|int) string`: Formats a number with commas, e.g. 1000 -> 1,000.
- `trimPrefix(prefix string, str string) string`: Trims the prefix from a string.
- `trimSuffix(suffix string, str string) string`: Trims the suffix from a string.
- `trimSpace(str string) string`: Trims whitespace from a string on both ends.
- `replaceAll(old string, new string, str string) string`: Replaces all occurrences of a string in a string.
- `replaceMatches(pattern string, replacement string, str string) string`: Replaces all occurrences of a regular expression in a string.
- `findMatch(pattern string, str string) string`: Finds the first match of a regular expression in a string.
- `findSubmatch(pattern string, str string) string`: Finds the first submatch of a regular expression in a string.
- `sortByString(key string, order string, arr []JSON): []JSON`: Sorts an array of JSON objects by a string key in either ascending or descending order.
- `sortByInt(key string, order string, arr []JSON): []JSON`: Sorts an array of JSON objects by an integer key in either ascending or descending order.
- `sortByFloat(key string, order string, arr []JSON): []JSON`: Sorts an array of JSON objects by a float key in either ascending or descending order.
- `sortByTime(key string, layout string, order string, arr []JSON): []JSON`: Sorts an array of JSON objects by a time key in either ascending or descending order. The format must be provided in Go's [date format](https://pkg.go.dev/time#pkg-constants).
- `concat(strings ...string) string`: Concatenates multiple strings together.
- `unique(key string, arr []JSON) []JSON`: Returns a unique array of JSON objects based on the given key.
- `percentChange(current float, previous float) float`: Calculates the percentage change between two numbers.
- `startOfDay(t time.Time) time.Time`: Returns the start of the day for a given time.
- `endOfDay(t time.Time) time.Time`: Returns the end of the day for a given time.

The following helper functions provided by Go's `text/template` are available:

- `eq(a, b any) bool`: Compares two values for equality.
- `ne(a, b any) bool`: Compares two values for inequality.
- `lt(a, b any) bool`: Compares two values for less than.
- `le(a, b any) bool`: Compares two values for less than or equal to.
- `gt(a, b any) bool`: Compares two values for greater than.
- `ge(a, b any) bool`: Compares two values for greater than or equal to.
- `and(args ...bool) bool`: Returns true if **all** arguments are true; accepts two or more boolean values.
- `or(args ...bool) bool`: Returns true if **any** argument is true; accepts two or more boolean values.
- `not(a bool) bool`: Returns the opposite of the value.
- `index(a any, b int) any`: Returns the value at the specified index of an array.
- `len(a any) int`: Returns the length of an array.
- `printf(format string, a ...any) string`: Returns a formatted string.


================================================
FILE: docs/extensions.md
================================================
# Extensions

> [!IMPORTANT]
>
> **This document as well as the extensions feature are a work in progress. The API may change in the future. You are responsible for maintaining your own extensions.**

## Overview

With the intention of requiring minimal knowledge in order to develop extensions, rather than being a convoluted protocol they are nothing more than an HTTP request to a server that returns a few special headers. The exchange between Glance and extensions can be seen in the following diagram:

![](images/extension-overview.png)

If you know how to setup an HTTP server and a bit of HTML and CSS you're ready to start building your own extensions.

> [!TIP]
>
> By default, the extension widget has a cache time of 30 minutes. To avoid having to restart Glance after every extension change you can set the cache time of the widget to 1 second:
> ```yaml
> - type: extension
>   url: http://localhost:8081
>   cache: 1s
> ```

## Headers

### `Widget-Title`
Used to specify the title of the widget. If not provided, the widget's title will be "Extension".

### `Widget-Title-URL`
Used to specify the URL that will be opened when the widget's title is clicked. If the user has specified a `title-url` in their config, it will take precedence over this header.

### `Widget-Content-Type`
Used to specify the content type that will be returned by the extension. If not provided, the content will be shown as plain text.

### `Widget-Content-Frameless`
When set to `true`, the widget's content will be displayed without the default background or "frame".

## Content Types

> [!NOTE]
>
> Currently, `html` is the only supported content type. The long-term goal is to have generic content types such as `videos`, `forum-posts`, `markets`, `streams`, etc. which will be returned in JSON format and 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.

### `html`
Displays the content as HTML. This requires the user to have the `allow-potentially-dangerous-html` property set to `true`, otherwise the content will be shown as plain text.


#### Using existing classes and functionality
Most of the features seen throughout Glance can easily be used in your custom HTML extensions. Below is an example of some of these features:

```html
<p class="color-subdue">Text with subdued color</p>
<p>Text with base color</p>
<p class="color-highlight">Text with highlighted color</p>
<p class="color-primary">Text with primary color</p>
<p class="color-positive">Text with positive color</p>
<p class="color-negative">Text with negative color</p>

<hr class="margin-block-15">

<p class="size-h1">Font size 1</p>
<p class="size-h2">Font size 2</p>
<p class="size-h3">Font size 3</p>
<p class="size-h4">Font size 4</p>
<p class="size-base">Font size base</p>
<p class="size-h5">Font size 5</p>
<p class="size-h6">Font size 6</p>

<hr class="margin-block-15">

<a class="visited-indicator" href="#notvisitedprobably">Link with visited indicator</a>

<hr class="margin-block-15">

<a class="color-primary-if-not-visited" href="#notvisitedprobably">Link with primary color if not visited</a>

<hr class="margin-block-15">

<p>Event happened <span data-dynamic-relative-time="<unix timestamp>"></span> ago</p>

<hr class="margin-block-15">

<ul class="list-horizontal-text">
    <li>horizontal</li>
    <li>list</li>
    <li>with</li>
    <li>multiple</li>
    <li>text</li>
    <li>items</li>
</ul>

<hr class="margin-block-15">

<ul class="list list-gap-10 list-with-separator">
    <li>list</li>
    <li>with</li>
    <li>gap</li>
    <li>and</li>
    <li>horizontal</li>
    <li>lines</li>
</ul>

<hr class="margin-block-15">

<ul class="list collapsible-container" data-collapse-after="3">
    <li>collapsible</li>
    <li>list</li>
    <li>with</li>
    <li>many</li>
    <li>items</li>
    <li>that</li>
    <li>will</li>
    <li>appear</li>
    <li>when</li>
    <li>you</li>
    <li>click</li>
    <li>the</li>
    <li>button</li>
    <li>below</li>
</ul>

<hr class="margin-bottom-15">

<p class="margin-bottom-10">Lazily loaded image:</p>

<img src="https://picsum.photos/200" alt="" loading="lazy">

<hr class="margin-block-15">

<p class="margin-bottom-10">List of posts:</p>

<ul class="list list-gap-14 collapsible-container" data-collapse-after="5">
    <li>
        <a class="size-h3 color-primary-if-not-visited" href="#link">Lorem ipsum dolor, sit amet consectetur adipisicing elit. Voluptatum, ipsa?</a>
        <ul class="list-horizontal-text">
            <li data-dynamic-relative-time="<unix timestamp>"></li>
            <li>3,321 points</li>
            <li>139 comments</li>
        </ul>
    </li>
    <li>
        <a class="size-h3 color-primary-if-not-visited" href="#link">Lorem ipsum dolor, sit amet consectetur adipisicing elit. Voluptatum, ipsa?</a>
        <ul class="list-horizontal-text">
            <li data-dynamic-relative-time="<unix timestamp>"></li>
            <li>3,321 points</li>
            <li>139 comments</li>
        </ul>
    </li>
    <li>
        <a class="size-h3 color-primary-if-not-visited" href="#link">Lorem ipsum dolor, sit amet consectetur adipisicing elit. Voluptatum, ipsa?</a>
        <ul class="list-horizontal-text">
            <li data-dynamic-relative-time="<unix timestamp>"></li>
            <li>3,321 points</li>
            <li>139 comments</li>
        </ul>
    </li>
</ul>
```

All of that will result in the following:

![](images/extension-html-reusing-existing-features-preview.png)

**Class names or features may change, once again, you are responsible for maintaining your own extensions.**


================================================
FILE: docs/glance.yml
================================================
pages:
  - name: Home
    # Optionally, if you only have a single page you can hide the desktop navigation for a cleaner look
    # hide-desktop-navigation: true
    columns:
      - size: small
        widgets:
          - type: calendar
            first-day-of-week: monday

          - type: rss
            limit: 10
            collapse-after: 3
            cache: 12h
            feeds:
              - url: https://selfh.st/rss/
                title: selfh.st
                limit: 4
              - url: https://ciechanow.ski/atom.xml
              - url: https://www.joshwcomeau.com/rss.xml
                title: Josh Comeau
              - url: https://samwho.dev/rss.xml
              - url: https://ishadeed.com/feed.xml
                title: Ahmad Shadeed

          - type: twitch-channels
            channels:
              - theprimeagen
              - j_blow
              - giantwaffle
              - cohhcarnage
              - christitustech
              - EJ_SA

      - size: full
        widgets:
          - type: group
            widgets:
              - type: hacker-news
              - type: lobsters

          - type: videos
            channels:
              - UCXuqSBlHAE6Xw-yeJA0Tunw # Linus Tech Tips
              - UCR-DXc1voovS8nhAvccRZhg # Jeff Geerling
              - UCsBjURrPoezykLs9EqgamOA # Fireship
              - UCBJycsmduvYEL83R_U4JriQ # Marques Brownlee
              - UCHnyfMqiRRG1u-2MsSQLbXA # Veritasium

          - type: group
            widgets:
              - type: reddit
                subreddit: technology
                show-thumbnails: true
              - type: reddit
                subreddit: selfhosted
                show-thumbnails: true

      - size: small
        widgets:
          - type: weather
            location: London, United Kingdom
            units: metric # alternatively "imperial"
            hour-format: 12h # alternatively "24h"
            # Optionally hide the location from being displayed in the widget
            # hide-location: true

          - type: markets
            markets:
              - symbol: SPY
                name: S&P 500
              - symbol: BTC-USD
                name: Bitcoin
              - symbol: NVDA
                name: NVIDIA
              - symbol: AAPL
                name: Apple
              - symbol: MSFT
                name: Microsoft

          - type: releases
            cache: 1d
            # Without authentication the Github API allows for up to 60 requests per hour. You can create a
            # read-only token from your Github account settings and use it here to increase the limit.
            # token: ...
            repositories:
              - glanceapp/glance
              - go-gitea/gitea
              - immich-app/immich
              - syncthing/syncthing

  # Add more pages here:
  # - name: Your page name
  #   columns:
  #     - size: small
  #       widgets:
  #         # Add widgets here

  #     - size: full
  #       widgets:
  #         # Add widgets here

  #     - size: small
  #       widgets:
  #         # Add widgets here


================================================
FILE: docs/preconfigured-pages.md
================================================
# Preconfigured pages

Don't want to spend time configuring pages from scratch? No problem! Simply copy the config from the ones below.

Pull requests with your page configurations are welcome!

> [!NOTE]
>
> Pages must be placed under a top level `pages:` key, you can read more about that [here](configuration.md#pages).

## Startpage

![](images/startpage-preview.png)

<details>
<summary>View config (requires Glance <code>v0.6.0</code> or higher)</summary>

```yaml
- name: Startpage
  width: slim
  hide-desktop-navigation: true
  center-vertically: true
  columns:
    - size: full
      widgets:
        - type: search
          autofocus: true

        - type: monitor
          cache: 1m
          title: Services
          sites:
            - title: Jellyfin
              url: https://yourdomain.com/
              icon: si:jellyfin
            - title: Gitea
              url: https://yourdomain.com/
              icon: si:gitea
            - title: qBittorrent # only for Linux ISOs, of course
              url: https://yourdomain.com/
              icon: si:qbittorrent
            - title: Immich
              url: https://yourdomain.com/
              icon: si:immich
            - title: AdGuard Home
              url: https://yourdomain.com/
              icon: si:adguard
            - title: Vaultwarden
              url: https://yourdomain.com/
              icon: si:vaultwarden

        - type: bookmarks
          groups:
            - title: General
              links:
                - title: Gmail
                  url: https://mail.google.com/mail/u/0/
                - title: Amazon
                  url: https://www.amazon.com/
                - title: Github
                  url: https://github.com/
            - title: Entertainment
              links:
                - title: YouTube
                  url: https://www.youtube.com/
                - title: Prime Video
                  url: https://www.primevideo.com/
                - title: Disney+
                  url: https://www.disneyplus.com/
            - title: Social
              links:
                - title: Reddit
                  url: https://www.reddit.com/
                - title: Twitter
                  url: https://twitter.com/
                - title: Instagram
                  url: https://www.instagram.com/
```
</details>

## Markets

![](images/markets-page-preview.png)

<details>
<summary>View config (requires Glance <code>v0.6.0</code> or higher)</summary>

```yaml
- name: Markets
  columns:
    - size: small
      widgets:
        - type: markets
          title: Indices
          markets:
            - symbol: SPY
              name: S&P 500
            - symbol: DX-Y.NYB
              name: Dollar Index

        - type: markets
          title: Crypto
          markets:
            - symbol: BTC-USD
              name: Bitcoin
            - symbol: ETH-USD
              name: Ethereum

        - type: markets
          title: Stocks
          sort-by: absolute-change
          markets:
            - symbol: NVDA
              name: NVIDIA
            - symbol: AAPL
              name: Apple
            - symbol: MSFT
              name: Microsoft
            - symbol: GOOGL
              name: Google
            - symbol: AMD
              name: AMD
            - symbol: RDDT
              name: Reddit
            - symbol: AMZN
              name: Amazon
            - symbol: TSLA
              name: Tesla
            - symbol: INTC
              name: Intel
            - symbol: META
              name: Meta

    - size: full
      widgets:
        - type: rss
          title: News
          style: horizontal-cards
          feeds:
            - url: https://feeds.bloomberg.com/markets/news.rss
              title: Bloomberg
            - url: https://moxie.foxbusiness.com/google-publisher/markets.xml
              title: Fox Business
            - url: https://moxie.foxbusiness.com/google-publisher/technology.xml
              title: Fox Business

        - type: group
          widgets:
            - type: reddit
              show-thumbnails: true
              subreddit: technology
            - type: reddit
              show-thumbnails: true
              subreddit: wallstreetbets

        - type: videos
          style: grid-cards
          collapse-after-rows: 3
          channels:
            - UCvSXMi2LebwJEM1s4bz5IBA # New Money
            - UCV6KDgJskWaEckne5aPA0aQ # Graham Stephan
            - UCAzhpt9DmG6PnHXjmJTvRGQ # Federal Reserve

    - size: small
      widgets:
        - type: rss
          title: News
          limit: 30
          collapse-after: 13
          feeds:
            - url: https://www.ft.com/technology?format=rss
              title: Financial Times
            - url: https://feeds.a.dj.com/rss/RSSMarketsMain.xml
              title: Wall Street Journal
```
</details>

## Gaming

![](images/gaming-page-preview.png)

<details>
<summary>View config (requires Glance <code>v0.6.0</code> or higher)</summary>

```yaml
- name: Gaming
  columns:
    - size: small
      widgets:
        - type: twitch-top-games
          limit: 20
          collapse-after: 13
          exclude:
            - just-chatting
            - pools-hot-tubs-and-beaches
            - music
            - art
            - asmr

    - size: full
      widgets:
        - type: group
          widgets:
            - type: reddit
              show-thumbnails: true
              subreddit: pcgaming
            - type: reddit
              subreddit: games

        - type: videos
          style: grid-cards
          collapse-after-rows: 3
          channels:
            - UCNvzD7Z-g64bPXxGzaQaa4g # gameranx
            - UCZ7AeeVbyslLM_8-nVy2B8Q # Skill Up
            - UCHDxYLv8iovIbhrfl16CNyg # GameLinked
            - UC9PBzalIcEQCsiIkq36PyUA # Digital Foundry

    - size: small
      widgets:
        - type: reddit
          subreddit: gamingnews
          limit: 7
          style: vertical-cards
```
</details>


================================================
FILE: docs/themes.md
================================================
# Themes

## Dark

### Teal City
![screenshot](images/themes/teal-city.png)
```yaml
theme:
  background-color: 225 14 15
  primary-color: 157 47 65
  contrast-multiplier: 1.1
```

### Catppuccin Frappe
![screenshot](images/themes/catppuccin-frappe.png)
```yaml
theme:
  background-color: 229 19 23
  contrast-multiplier: 1.2
  primary-color: 222 74 74
  positive-color: 96 44 68
  negative-color: 359 68 71
```

### Catppuccin Macchiato
![screenshot](images/themes/catppuccin-macchiato.png)
```yaml
theme:
  background-color: 232 23 18
  contrast-multiplier: 1.2
  primary-color: 220 83 75
  positive-color: 105 48 72
  negative-color: 351 74 73
```

### Catppuccin Mocha
![screenshot](images/themes/catppuccin-mocha.png)
```yaml
theme:
  background-color: 240 21 15
  contrast-multiplier: 1.2
  primary-color: 217 92 83
  positive-color: 115 54 76
  negative-color: 347 70 65
```

### Camouflage
![screenshot](images/themes/camouflage.png)
```yaml
theme:
  background-color: 186 21 20
  contrast-multiplier: 1.2
  primary-color: 97 13 80
```

### Gruvbox Dark
![screenshot](images/themes/gruvbox.png)
```yaml
theme:
  background-color: 0 0 16
  primary-color: 43 59 81
  positive-color: 61 66 44
  negative-color: 6 96 59
```

### Kanagawa Dark
![screenshot](images/themes/kanagawa-dark.png)
```yaml
theme:
  background-color: 240 13 14
  primary-color: 51 33 68
  negative-color: 358 100 68
  contrast-multiplier: 1.2
```

### Tucan
![screenshot](images/themes/tucan.png)
```yaml
theme:
  background-color: 50 1 6
  primary-color: 24 97 58
  negative-color: 209 88 54
```

### Dracula
![screenshot](images/themes/dracula.png)
```yaml
theme:
  background-color: 231 15 21
  primary-color: 265 89 79
  contrast-multiplier: 1.2
  positive-color: 135 94 66
  negative-color: 0 100 67
```

### Shades of Purple
![screenshot](images/themes/shades-of-purple.png)
```yaml
theme:
  background-color: 243 33 25
  contrast-multiplier: 1.2
  primary-color: 50 100 49
  positive-color: 98 82 71
  negative-color: 12 77 52
```

### Neon Pink 
![screenshot](images/themes/neon-pink.png)
```yaml
theme:
  background-color: 240 27 11
  contrast-multiplier: 1.5
  primary-color: 321 100 71
  positive-color: 165 78 51
  negative-color: 360 100 71
```

## Light

### Catppuccin Latte
![screenshot](images/themes/catppuccin-latte.png)
```yaml
theme:
  light: true
  background-color: 220 23 95
  contrast-multiplier: 1.0
  primary-color: 220 91 54
  positive-color: 109 58 40
  negative-color: 347 87 44
```

### Peachy
![screenshot](images/themes/peachy.png)
```yaml
theme:
  light: true
  background-color: 28 40 77
  primary-color: 155 100 20
  negative-color: 0 100 60
  contrast-multiplier: 1.1
  text-saturation-multiplier: 0.5
```

### Zebra
![screenshot](images/themes/zebra.png)
```yaml
theme:
  light: true
  background-color: 0 0 95
  primary-color: 0 0 10
  negative-color: 0 90 50
```


================================================
FILE: docs/v0.7.0-upgrade.md
================================================
## Upgrading to v0.7.0 from previous versions

In essence, the `glance.yml` file has been moved from the root of the project to a `config/` directory and you now need to mount that directory to `/app/config` in the container.

### Before

Versions before v0.7.0 used a `docker-compose.yml` that looked like the following:

```yaml
services:
  glance:
    image: glanceapp/glance
    volumes:
      - ./glance.yml:/app/glance.yml
    ports:
      - 8080:8080
```

And expected you to have the following directory structure:

```plaintext
glance/
    docker-compose.yml
    glance.yml
```

### After

With the release of v0.7.0, the recommended `docker-compose.yml` looks like the following:

```yaml
services:
  glance:
    container_name: glance
    image: glanceapp/glance
    volumes:
      - ./config:/app/config
    ports:
      - 8080:8080
```

And expects you to have the following directory structure:

```plaintext
glance/
    docker-compose.yml
    config/
        glance.yml
```

## Why this change was necessary

1. Mounting a file rather than a directory is not common practice and leads to some issues, such as creating a directory if the file is not present, which has tripped up multiple people and caused unnecessary confusion
2. v0.7.0 added automatic reloads when the configuration file changes, which based on testing didn't work when mounting a single file
3. v0.7.0 added the ability to include config files, so you'd have to make this change anyways if you wanted to take advantage of that feature

Taking all of these into account, it felt like the right time to implement the change.


================================================
FILE: go.mod
================================================
module github.com/glanceapp/glance

go 1.24.3

require (
	github.com/fsnotify/fsnotify v1.9.0
	github.com/mmcdole/gofeed v1.3.0
	github.com/shirou/gopsutil/v4 v4.25.4
	github.com/tidwall/gjson v1.18.0
	golang.org/x/crypto v0.38.0
	golang.org/x/text v0.25.0
	gopkg.in/yaml.v3 v3.0.1
)

require (
	github.com/PuerkitoBio/goquery v1.10.3 // indirect
	github.com/andybalholm/cascadia v1.3.3 // indirect
	github.com/ebitengine/purego v0.8.4 // indirect
	github.com/go-ole/go-ole v1.3.0 // indirect
	github.com/json-iterator/go v1.1.12 // indirect
	github.com/lufia/plan9stats v0.0.0-20250317134145-8bc96cf8fc35 // indirect
	github.com/mmcdole/goxpp v1.1.1 // indirect
	github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd // indirect
	github.com/modern-go/reflect2 v1.0.2 // indirect
	github.com/power-devops/perfstat v0.0.0-20240221224432-82ca36839d55 // indirect
	github.com/tidwall/match v1.1.1 // indirect
	github.com/tidwall/pretty v1.2.1 // indirect
	github.com/tklauser/go-sysconf v0.3.15 // indirect
	github.com/tklauser/numcpus v0.10.0 // indirect
	github.com/yusufpapurcu/wmi v1.2.4 // indirect
	golang.org/x/net v0.40.0 // indirect
	golang.org/x/sys v0.33.0 // indirect
)


================================================
FILE: go.sum
================================================
github.com/PuerkitoBio/goquery v1.10.3 h1:pFYcNSqHxBD06Fpj/KsbStFRsgRATgnf3LeXiUkhzPo=
github.com/PuerkitoBio/goquery v1.10.3/go.mod h1:tMUX0zDMHXYlAQk6p35XxQMqMweEKB7iK7iLNd4RH4Y=
github.com/andybalholm/cascadia v1.3.3 h1:AG2YHrzJIm4BZ19iwJ/DAua6Btl3IwJX+VI4kktS1LM=
github.com/andybalholm/cascadia v1.3.3/go.mod h1:xNd9bqTn98Ln4DwST8/nG+H0yuB8Hmgu1YHNnWw0GeA=
github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c=
github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
github.com/ebitengine/purego v0.8.4 h1:CF7LEKg5FFOsASUj0+QwaXf8Ht6TlFxg09+S9wz0omw=
github.com/ebitengine/purego v0.8.4/go.mod h1:iIjxzd6CiRiOG0UyXP+V1+jWqUXVjPKLAI0mRfJZTmQ=
github.com/fsnotify/fsnotify v1.9.0 h1:2Ml+OJNzbYCTzsxtv8vKSFD9PbJjmhYF14k/jKC7S9k=
github.com/fsnotify/fsnotify v1.9.0/go.mod h1:8jBTzvmWwFyi3Pb8djgCCO5IBqzKJ/Jwo8TRcHyHii0=
github.com/go-ole/go-ole v1.2.6/go.mod h1:pprOEPIfldk/42T2oK7lQ4v4JSDwmV0As9GaiUsvbm0=
github.com/go-ole/go-ole v1.3.0 h1:Dt6ye7+vXGIKZ7Xtk4s6/xVdGDQynvom7xCFEdWr6uE=
github.com/go-ole/go-ole v1.3.0/go.mod h1:5LS6F96DhAwUc7C+1HLexzMXY1xGRSryjyPPKW6zv78=
github.com/google/go-cmp v0.6.0/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY=
github.com/google/go-cmp v0.7.0 h1:wk8382ETsv4JYUZwIsn6YpYiWiBsYLSJiTsyBybVuN8=
github.com/google/go-cmp v0.7.0/go.mod h1:pXiqmnSA92OHEEa9HXL2W4E7lf9JzCmGVUdgjX3N/iU=
github.com/google/gofuzz v1.0.0/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/M65Eg=
github.com/json-iterator/go v1.1.12 h1:PV8peI4a0ysnczrg+LtxykD8LfKY9ML6u2jnxaEnrnM=
github.com/json-iterator/go v1.1.12/go.mod h1:e30LSqwooZae/UwlEbR2852Gd8hjQvJoHmT4TnhNGBo=
github.com/lufia/plan9stats v0.0.0-20250317134145-8bc96cf8fc35 h1:PpXWgLPs+Fqr325bN2FD2ISlRRztXibcX6e8f5FR5Dc=
github.com/lufia/plan9stats v0.0.0-20250317134145-8bc96cf8fc35/go.mod h1:autxFIvghDt3jPTLoqZ9OZ7s9qTGNAWmYCjVFWPX/zg=
github.com/mmcdole/gofeed v1.3.0 h1:5yn+HeqlcvjMeAI4gu6T+crm7d0anY85+M+v6fIFNG4=
github.com/mmcdole/gofeed v1.3.0/go.mod h1:9TGv2LcJhdXePDzxiuMnukhV2/zb6VtnZt1mS+SjkLE=
github.com/mmcdole/goxpp v1.1.1 h1:RGIX+D6iQRIunGHrKqnA2+700XMCnNv0bAOOv5MUhx8=
github.com/mmcdole/goxpp v1.1.1/go.mod h1:v+25+lT2ViuQ7mVxcncQ8ch1URund48oH+jhjiwEgS8=
github.com/modern-go/concurrent v0.0.0-20180228061459-e0a39a4cb421/go.mod h1:6dJC0mAP4ikYIbvyc7fijjWJddQyLn8Ig3JB5CqoB9Q=
github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd h1:TRLaZ9cD/w8PVh93nsPXa1VrQ6jlwL5oN8l14QlcNfg=
github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd/go.mod h1:6dJC0mAP4ikYIbvyc7fijjWJddQyLn8Ig3JB5CqoB9Q=
github.com/modern-go/reflect2 v1.0.2 h1:xBagoLtFs94CBntxluKeaWgTMpvLxC4ur3nMaC9Gz0M=
github.com/modern-go/reflect2 v1.0.2/go.mod h1:yWuevngMOJpCy52FWWMvUC8ws7m/LJsjYzDa0/r8luk=
github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM=
github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4=
github.com/power-devops/perfstat v0.0.0-20240221224432-82ca36839d55 h1:o4JXh1EVt9k/+g42oCprj/FisM4qX9L3sZB3upGN2ZU=
github.com/power-devops/perfstat v0.0.0-20240221224432-82ca36839d55/go.mod h1:OmDBASR4679mdNQnz2pUhc2G8CO2JrUAVFDRBDP/hJE=
github.com/shirou/gopsutil/v4 v4.25.4 h1:cdtFO363VEOOFrUCjZRh4XVJkb548lyF0q0uTeMqYPw=
github.com/shirou/gopsutil/v4 v4.25.4/go.mod h1:xbuxyoZj+UsgnZrENu3lQivsngRR5BdjbJwf2fv4szA=
github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME=
github.com/stretchr/testify v1.3.0/go.mod h1:M5WIy9Dh21IEIfnGCwXGc5bZfKNJtfHm1UVUgZn+9EI=
github.com/stretchr/testify v1.10.0 h1:Xv5erBjTwe/5IxqUQTdXv5kgmIvbHo3QQyRwhJsOfJA=
github.com/stretchr/testify v1.10.0/go.mod h1:r2ic/lqez/lEtzL7wO/rwa5dbSLXVDPFyf8C91i36aY=
github.com/tidwall/gjson v1.18.0 h1:FIDeeyB800efLX89e5a8Y0BNH+LOngJyGrIWxG2FKQY=
github.com/tidwall/gjson v1.18.0/go.mod h1:/wbyibRr2FHMks5tjHJ5F8dMZh3AcwJEMf5vlfC0lxk=
github.com/tidwall/match v1.1.1 h1:+Ho715JplO36QYgwN9PGYNhgZvoUSc9X2c80KVTi+GA=
github.com/tidwall/match v1.1.1/go.mod h1:eRSPERbgtNPcGhD8UCthc6PmLEQXEWd3PRB5JTxsfmM=
github.com/tidwall/pretty v1.2.0/go.mod h1:ITEVvHYasfjBbM0u2Pg8T2nJnzm8xPwvNhhsoaGGjNU=
github.com/tidwall/pretty v1.2.1 h1:qjsOFOWWQl+N3RsoF5/ssm1pHmJJwhjlSbZ51I6wMl4=
github.com/tidwall/pretty v1.2.1/go.mod h1:ITEVvHYasfjBbM0u2Pg8T2nJnzm8xPwvNhhsoaGGjNU=
github.com/tklauser/go-sysconf v0.3.15 h1:VE89k0criAymJ/Os65CSn1IXaol+1wrsFHEB8Ol49K4=
github.com/tklauser/go-sysconf v0.3.15/go.mod h1:Dmjwr6tYFIseJw7a3dRLJfsHAMXZ3nEnL/aZY+0IuI4=
github.com/tklauser/numcpus v0.10.0 h1:18njr6LDBk1zuna922MgdjQuJFjrdppsZG60sHGfjso=
github.com/tklauser/numcpus v0.10.0/go.mod h1:BiTKazU708GQTYF4mB+cmlpT2Is1gLk7XVuEeem8LsQ=
github.com/yuin/goldmark v1.4.13/go.mod h1:6yULJ656Px+3vBD8DxQVa3kxgyrAnzto9xy5taEt/CY=
github.com/yusufpapurcu/wmi v1.2.4 h1:zFUKzehAFReQwLys1b/iSMl+JQGSCSjtVqQn9bBrPo0=
github.com/yusufpapurcu/wmi v1.2.4/go.mod h1:SBZ9tNy3G9/m5Oi98Zks0QjeHVDvuK0qfxQmPyzfmi0=
golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w=
golang.org/x/crypto v0.0.0-20210921155107-089bfa567519/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc=
golang.org/x/crypto v0.13.0/go.mod h1:y6Z2r+Rw4iayiXXAIxJIDAJ1zMW4yaTpebo8fPOliYc=
golang.org/x/crypto v0.19.0/go.mod h1:Iy9bg/ha4yyC70EfRS8jz+B6ybOBKMaSxLj6P6oBDfU=
golang.org/x/crypto v0.23.0/go.mod h1:CKFgDieR+mRhux2Lsu27y0fO304Db0wZe70UKqHu0v8=
golang.org/x/crypto v0.31.0/go.mod h1:kDsLvtWBEx7MV9tJOj9bnXsPbxwJQ6csT/x4KIN4Ssk=
golang.org/x/crypto v0.38.0 h1:jt+WWG8IZlBnVbomuhg2Mdq0+BBQaHbtqHEFEigjUV8=
golang.org/x/crypto v0.38.0/go.mod h1:MvrbAqul58NNYPKnOra203SB9vpuZW0e+RRZV+Ggqjw=
golang.org/x/mod v0.6.0-dev.0.20220419223038-86c51ed26bb4/go.mod h1:jJ57K6gSWd91VN4djpZkiMVwK6gcyfeH4XE8wZrZaV4=
golang.org/x/mod v0.8.0/go.mod h1:iBbtSCu2XBx23ZKBPSOrRkjjQPZFPuis4dIYUhu/chs=
golang.org/x/mod v0.12.0/go.mod h1:iBbtSCu2XBx23ZKBPSOrRkjjQPZFPuis4dIYUhu/chs=
golang.org/x/mod v0.15.0/go.mod h1:hTbmBsO62+eylJbnUtE2MGJUyE7QWk4xUqPFrRgJ+7c=
golang.org/x/mod v0.17.0/go.mod h1:hTbmBsO62+eylJbnUtE2MGJUyE7QWk4xUqPFrRgJ+7c=
golang.org/x/net v0.0.0-20190620200207-3b0461eec859/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s=
golang.org/x/net v0.0.0-20210226172049-e18ecbb05110/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg=
golang.org/x/net v0.0.0-20220722155237-a158d28d115b/go.mod h1:XRhObCWvk6IyKnWLug+ECip1KBveYUHfp+8e9klMJ9c=
golang.org/x/net v0.6.0/go.mod h1:2Tu9+aMcznHK/AK1HMvgo6xiTLG5rD5rZLDS+rp2Bjs=
golang.org/x/net v0.10.0/go.mod h1:0qNGK6F8kojg2nk9dLZ2mShWaEBan6FAoqfSigmmuDg=
golang.org/x/net v0.15.0/go.mod h1:idbUs1IY1+zTqbi8yxTbhexhEEk5ur9LInksu6HrEpk=
golang.org/x/net v0.21.0/go.mod h1:bIjVDfnllIU7BJ2DNgfnXvpSvtn8VRwhlsaeUTyUS44=
golang.org/x/net v0.25.0/go.mod h1:JkAGAh7GEvH74S6FOH42FLoXpXbE/aqXSrIQjXgsiwM=
golang.org/x/net v0.33.0/go.mod h1:HXLR5J+9DxmrqMwG9qjGCxZ+zKXxBru04zlTvWlWuN4=
golang.org/x/net v0.40.0 h1:79Xs7wF06Gbdcg4kdCCIQArK11Z1hr5POQ6+fIYHNuY=
golang.org/x/net v0.40.0/go.mod h1:y0hY0exeL2Pku80/zKK7tpntoX23cqL3Oa6njdgRtds=
golang.org/x/sync v0.0.0-20190423024810-112230192c58/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
golang.org/x/sync v0.0.0-20220722155255-886fb9371eb4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
golang.org/x/sync v0.1.0/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
golang.org/x/sync v0.3.0/go.mod h1:FU7BRWz2tNW+3quACPkgCx/L+uEAv1htQ0V83Z9Rj+Y=
golang.org/x/sync v0.6.0/go.mod h1:Czt+wKu1gCyEFDUtn0jG5QVvpJ6rzVqr5aXyt9drQfk=
golang.org/x/sync v0.7.0/go.mod h1:Czt+wKu1gCyEFDUtn0jG5QVvpJ6rzVqr5aXyt9drQfk=
golang.org/x/sync v0.10.0/go.mod h1:Czt+wKu1gCyEFDUtn0jG5QVvpJ6rzVqr5aXyt9drQfk=
golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
golang.org/x/sys v0.0.0-20190916202348-b4ddaad3f8a3/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
golang.org/x/sys v0.0.0-20201119102817-f84b799fce68/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
golang.org/x/sys v0.0.0-20201204225414-ed752295db88/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
golang.org/x/sys v0.0.0-20210615035016-665e8c7367d1/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
golang.org/x/sys v0.0.0-20220520151302-bc2c85ada10a/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
golang.org/x/sys v0.0.0-20220722155257-8c9f86f7a55f/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
golang.org/x/sys v0.1.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
golang.org/x/sys v0.5.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
golang.org/x/sys v0.8.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
golang.org/x/sys v0.12.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
golang.org/x/sys v0.17.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA=
golang.org/x/sys v0.20.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA=
golang.org/x/sys v0.28.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA=
golang.org/x/sys v0.33.0 h1:q3i8TbbEz+JRD9ywIRlyRAQbM0qF7hu24q3teo2hbuw=
golang.org/x
Download .txt
gitextract_g8m113ra/

├── .dockerignore
├── .github/
│   ├── CODE_OF_CONDUCT.md
│   ├── FUNDING.yml
│   ├── ISSUE_TEMPLATE/
│   │   ├── bug_report.yml
│   │   ├── config.yml
│   │   └── feature_request.yml
│   ├── PULL_REQUEST_TEMPLATE.md
│   ├── SECURITY.md
│   └── workflows/
│       └── release.yaml
├── .gitignore
├── .goreleaser.yaml
├── Dockerfile
├── Dockerfile.goreleaser
├── LICENSE
├── README.md
├── docs/
│   ├── configuration.md
│   ├── custom-api.md
│   ├── extensions.md
│   ├── glance.yml
│   ├── preconfigured-pages.md
│   ├── themes.md
│   └── v0.7.0-upgrade.md
├── go.mod
├── go.sum
├── internal/
│   └── glance/
│       ├── auth.go
│       ├── auth_test.go
│       ├── cli.go
│       ├── config-fields.go
│       ├── config.go
│       ├── diagnose.go
│       ├── embed.go
│       ├── glance.go
│       ├── main.go
│       ├── static/
│       │   ├── css/
│       │   │   ├── forum-posts.css
│       │   │   ├── login.css
│       │   │   ├── main.css
│       │   │   ├── mobile.css
│       │   │   ├── popover.css
│       │   │   ├── site.css
│       │   │   ├── utils.css
│       │   │   ├── widget-bookmarks.css
│       │   │   ├── widget-calendar.css
│       │   │   ├── widget-clock.css
│       │   │   ├── widget-dns-stats.css
│       │   │   ├── widget-docker-containers.css
│       │   │   ├── widget-group.css
│       │   │   ├── widget-markets.css
│       │   │   ├── widget-monitor.css
│       │   │   ├── widget-reddit.css
│       │   │   ├── widget-releases.css
│       │   │   ├── widget-rss.css
│       │   │   ├── widget-search.css
│       │   │   ├── widget-server-stats.css
│       │   │   ├── widget-todo.css
│       │   │   ├── widget-twitch.css
│       │   │   ├── widget-videos.css
│       │   │   ├── widget-weather.css
│       │   │   └── widgets.css
│       │   └── js/
│       │       ├── animations.js
│       │       ├── calendar.js
│       │       ├── login.js
│       │       ├── masonry.js
│       │       ├── page.js
│       │       ├── popover.js
│       │       ├── templating.js
│       │       ├── todo.js
│       │       └── utils.js
│       ├── templates/
│       │   ├── bookmarks.html
│       │   ├── calendar.html
│       │   ├── change-detection.html
│       │   ├── clock.html
│       │   ├── custom-api.html
│       │   ├── dns-stats.html
│       │   ├── docker-containers.html
│       │   ├── document.html
│       │   ├── extension.html
│       │   ├── footer.html
│       │   ├── forum-posts.html
│       │   ├── group.html
│       │   ├── iframe.html
│       │   ├── login.html
│       │   ├── manifest.json
│       │   ├── markets.html
│       │   ├── monitor-compact.html
│       │   ├── monitor.html
│       │   ├── old-calendar.html
│       │   ├── page-content.html
│       │   ├── page.html
│       │   ├── reddit-horizontal-cards.html
│       │   ├── reddit-vertical-cards.html
│       │   ├── releases.html
│       │   ├── repository.html
│       │   ├── rss-detailed-list.html
│       │   ├── rss-horizontal-cards-2.html
│       │   ├── rss-horizontal-cards.html
│       │   ├── rss-list.html
│       │   ├── search.html
│       │   ├── server-stats.html
│       │   ├── split-column.html
│       │   ├── theme-preset-preview.html
│       │   ├── theme-style.gotmpl
│       │   ├── todo.html
│       │   ├── twitch-channels.html
│       │   ├── twitch-games-list.html
│       │   ├── v0.7-update-notice-page.html
│       │   ├── video-card-contents.html
│       │   ├── videos-grid.html
│       │   ├── videos-vertical-list.html
│       │   ├── videos.html
│       │   ├── weather.html
│       │   └── widget-base.html
│       ├── templates.go
│       ├── theme.go
│       ├── utils.go
│       ├── widget-bookmarks.go
│       ├── widget-calendar.go
│       ├── widget-changedetection.go
│       ├── widget-clock.go
│       ├── widget-container.go
│       ├── widget-custom-api.go
│       ├── widget-dns-stats.go
│       ├── widget-docker-containers.go
│       ├── widget-extension.go
│       ├── widget-group.go
│       ├── widget-hacker-news.go
│       ├── widget-html.go
│       ├── widget-iframe.go
│       ├── widget-lobsters.go
│       ├── widget-markets.go
│       ├── widget-monitor.go
│       ├── widget-old-calendar.go
│       ├── widget-reddit.go
│       ├── widget-releases.go
│       ├── widget-repository.go
│       ├── widget-rss.go
│       ├── widget-search.go
│       ├── widget-server-stats.go
│       ├── widget-shared.go
│       ├── widget-split-column.go
│       ├── widget-todo.go
│       ├── widget-twitch-channels.go
│       ├── widget-twitch-top-games.go
│       ├── widget-utils.go
│       ├── widget-videos.go
│       ├── widget-weather.go
│       └── widget.go
├── main.go
└── pkg/
    └── sysinfo/
        └── sysinfo.go
Download .txt
SYMBOL INDEX (581 symbols across 55 files)

FILE: internal/glance/auth.go
  constant AUTH_SESSION_COOKIE_NAME (line 23) | AUTH_SESSION_COOKIE_NAME = "session_token"
  constant AUTH_RATE_LIMIT_WINDOW (line 24) | AUTH_RATE_LIMIT_WINDOW = 5 * time.Minute
  constant AUTH_RATE_LIMIT_MAX_ATTEMPTS (line 25) | AUTH_RATE_LIMIT_MAX_ATTEMPTS = 5
  constant AUTH_TOKEN_SECRET_LENGTH (line 27) | AUTH_TOKEN_SECRET_LENGTH = 32
  constant AUTH_USERNAME_HASH_LENGTH (line 28) | AUTH_USERNAME_HASH_LENGTH = 32
  constant AUTH_SECRET_KEY_LENGTH (line 29) | AUTH_SECRET_KEY_LENGTH = AUTH_TOKEN_SECRET_LENGTH + AUTH_USERNAME_HASH_L...
  constant AUTH_TIMESTAMP_LENGTH (line 30) | AUTH_TIMESTAMP_LENGTH = 4
  constant AUTH_TOKEN_DATA_LENGTH (line 31) | AUTH_TOKEN_DATA_LENGTH = AUTH_USERNAME_HASH_LENGTH + AUTH_TIMESTAMP_LENGTH
  constant AUTH_TOKEN_VALID_PERIOD (line 34) | AUTH_TOKEN_VALID_PERIOD = 14 * 24 * time.Hour
  constant AUTH_TOKEN_REGEN_BEFORE (line 36) | AUTH_TOKEN_REGEN_BEFORE = 7 * 24 * time.Hour
  type doWhenUnauthorized (line 40) | type doWhenUnauthorized
  constant redirectToLogin (line 43) | redirectToLogin doWhenUnauthorized = iota
  constant showUnauthorizedJSON (line 44) | showUnauthorizedJSON
  type failedAuthAttempt (line 47) | type failedAuthAttempt struct
  function generateSessionToken (line 52) | func generateSessionToken(username string, secret []byte, now time.Time)...
  function computeUsernameHash (line 77) | func computeUsernameHash(username string, secret []byte) ([]byte, error) {
  function verifySessionToken (line 88) | func verifySessionToken(token string, secretBytes []byte, now time.Time)...
  function makeAuthSecretKey (line 125) | func makeAuthSecretKey(length int) (string, error) {
  method handleAuthenticationAttempt (line 134) | func (a *application) handleAuthenticationAttempt(w http.ResponseWriter,...
  method isAuthorized (line 250) | func (a *application) isAuthorized(w http.ResponseWriter, r *http.Reques...
  method handleUnauthorizedResponse (line 289) | func (a *application) handleUnauthorizedResponse(w http.ResponseWriter, ...
  method handleLogoutRequest (line 306) | func (a *application) handleLogoutRequest(w http.ResponseWriter, r *http...
  method setAuthSessionCookie (line 311) | func (a *application) setAuthSessionCookie(w http.ResponseWriter, r *htt...
  method handleLoginPageRequest (line 323) | func (a *application) handleLoginPageRequest(w http.ResponseWriter, r *h...

FILE: internal/glance/auth_test.go
  function TestAuthTokenGenerationAndVerification (line 10) | func TestAuthTokenGenerationAndVerification(t *testing.T) {

FILE: internal/glance/cli.go
  type cliIntent (line 13) | type cliIntent
  constant cliIntentVersionPrint (line 16) | cliIntentVersionPrint cliIntent = iota
  constant cliIntentServe (line 17) | cliIntentServe
  constant cliIntentConfigValidate (line 18) | cliIntentConfigValidate
  constant cliIntentConfigPrint (line 19) | cliIntentConfigPrint
  constant cliIntentDiagnose (line 20) | cliIntentDiagnose
  constant cliIntentSensorsPrint (line 21) | cliIntentSensorsPrint
  constant cliIntentMountpointInfo (line 22) | cliIntentMountpointInfo
  constant cliIntentSecretMake (line 23) | cliIntentSecretMake
  constant cliIntentPasswordHash (line 24) | cliIntentPasswordHash
  type cliOptions (line 27) | type cliOptions struct
  function parseCliOptions (line 33) | func parseCliOptions() (*cliOptions, error) {
  function cliSensorsPrint (line 109) | func cliSensorsPrint() int {
  function cliMountpointInfo (line 137) | func cliMountpointInfo(requestedPath string) int {

FILE: internal/glance/config-fields.go
  constant hslHueMax (line 20) | hslHueMax        = 360
  constant hslSaturationMax (line 21) | hslSaturationMax = 100
  constant hslLightnessMax (line 22) | hslLightnessMax  = 100
  type hslColorField (line 25) | type hslColorField struct
    method String (line 31) | func (c *hslColorField) String() string {
    method ToHex (line 35) | func (c *hslColorField) ToHex() string {
    method SameAs (line 39) | func (c1 *hslColorField) SameAs(c2 *hslColorField) bool {
    method UnmarshalYAML (line 49) | func (c *hslColorField) UnmarshalYAML(node *yaml.Node) error {
  type durationField (line 98) | type durationField
    method UnmarshalYAML (line 100) | func (d *durationField) UnmarshalYAML(node *yaml.Node) error {
  type customIconField (line 132) | type customIconField struct
    method UnmarshalYAML (line 180) | func (i *customIconField) UnmarshalYAML(node *yaml.Node) error {
  function newCustomIconField (line 137) | func newCustomIconField(value string) customIconField {
  type proxyOptionsField (line 190) | type proxyOptionsField struct
    method UnmarshalYAML (line 197) | func (p *proxyOptionsField) UnmarshalYAML(node *yaml.Node) error {
  type queryParametersField (line 237) | type queryParametersField
    method UnmarshalYAML (line 239) | func (q *queryParametersField) UnmarshalYAML(node *yaml.Node) error {
    method toQueryString (line 280) | func (q *queryParametersField) toQueryString() string {

FILE: internal/glance/config.go
  constant CONFIG_INCLUDE_RECURSION_DEPTH_LIMIT (line 22) | CONFIG_INCLUDE_RECURSION_DEPTH_LIMIT = 20
  constant configVarTypeEnv (line 25) | configVarTypeEnv         = "env"
  constant configVarTypeSecret (line 26) | configVarTypeSecret      = "secret"
  constant configVarTypeFileFromEnv (line 27) | configVarTypeFileFromEnv = "readFileFromEnv"
  type config (line 30) | type config struct
  type user (line 71) | type user struct
  type page (line 77) | type page struct
  function newConfigFromYAML (line 94) | func newConfigFromYAML(contents []byte) (*config, error) {
  function parseConfigVariables (line 142) | func parseConfigVariables(contents []byte) ([]byte, error) {
  function parseConfigVariableOfType (line 190) | func parseConfigVariableOfType(variableType, variableName string) (strin...
  function formatWidgetInitError (line 236) | func formatWidgetInitError(err error, w widget) error {
  function parseYAMLIncludes (line 242) | func parseYAMLIncludes(mainFilePath string) ([]byte, map[string]struct{}...
  function recursiveParseYAMLIncludes (line 246) | func recursiveParseYAMLIncludes(mainFilePath string, includes map[string...
  function configFilesWatcher (line 305) | func configFilesWatcher(
  function isConfigStateValid (line 451) | func isConfigStateValid(config *config) error {
  type orderedYAMLMap (line 540) | type orderedYAMLMap struct
  function newOrderedYAMLMap (line 545) | func newOrderedYAMLMap[K comparable, V any](keys []K, values []V) (*orde...
  method Items (line 564) | func (om *orderedYAMLMap[K, V]) Items() iter.Seq2[K, V] {
  method Get (line 578) | func (om *orderedYAMLMap[K, V]) Get(key K) (V, bool) {
  method Merge (line 583) | func (self *orderedYAMLMap[K, V]) Merge(other *orderedYAMLMap[K, V]) *or...
  method UnmarshalYAML (line 602) | func (om *orderedYAMLMap[K, V]) UnmarshalYAML(node *yaml.Node) error {

FILE: internal/glance/diagnose.go
  constant httpTestRequestTimeout (line 15) | httpTestRequestTimeout = 15 * time.Second
  function runDiagnostic (line 105) | func runDiagnostic() {
  type diagnosticStep (line 149) | type diagnosticStep struct
  function testHttpRequest (line 157) | func testHttpRequest(method, url string, expectedStatusCode int) (string...
  function testHttpRequestWithHeaders (line 161) | func testHttpRequestWithHeaders(method, url string, headers map[string]s...
  function testDNSResolution (line 198) | func testDNSResolution(domain string) (string, error) {

FILE: internal/glance/embed.go
  function readAllFromStaticFS (line 29) | func readAllFromStaticFS(path string) ([]byte, error) {
  function computeFSHash (line 52) | func computeFSHash(files fs.FS) (string, error) {

FILE: internal/glance/glance.go
  constant STATIC_ASSETS_CACHE_DURATION (line 26) | STATIC_ASSETS_CACHE_DURATION = 24 * time.Hour
  type application (line 30) | type application struct
    method resolveUserDefinedAssetPath (line 272) | func (a *application) resolveUserDefinedAssetPath(path string) string {
    method populateTemplateRequestData (line 290) | func (a *application) populateTemplateRequestData(data *templateReques...
    method handlePageRequest (line 306) | func (a *application) handlePageRequest(w http.ResponseWriter, r *http...
    method handlePageContentRequest (line 334) | func (a *application) handlePageContentRequest(w http.ResponseWriter, ...
    method addressOfRequest (line 369) | func (a *application) addressOfRequest(r *http.Request) string {
    method handleNotFound (line 398) | func (a *application) handleNotFound(w http.ResponseWriter, _ *http.Re...
    method handleWidgetRequest (line 404) | func (a *application) handleWidgetRequest(w http.ResponseWriter, r *ht...
    method StaticAssetPath (line 427) | func (a *application) StaticAssetPath(asset string) string {
    method VersionedAssetPath (line 431) | func (a *application) VersionedAssetPath(asset string) string {
    method server (line 436) | func (a *application) server() (func() error, func() error) {
  function newApplication (line 47) | func newApplication(c *config) (*application, error) {
  method updateOutdatedWidgets (line 233) | func (p *page) updateOutdatedWidgets() {
  type templateRequestData (line 280) | type templateRequestData struct
  type templateData (line 284) | type templateData struct

FILE: internal/glance/main.go
  function Main (line 15) | func Main() int {
  function serveApp (line 93) | func serveApp(configPath string) error {
  function serveUpdateNoticeIfConfigLocationNotMigrated (line 183) | func serveUpdateNoticeIfConfigLocationNotMigrated(configPath string) bool {

FILE: internal/glance/static/js/animations.js
  function directions (line 3) | function directions(anim, opt, ...dirs) {
  function slideFade (line 7) | function slideFade({
  function animateReposition (line 36) | function animateReposition(

FILE: internal/glance/static/js/calendar.js
  constant FULL_MONTH_SLOTS (line 4) | const FULL_MONTH_SLOTS = 7*6;
  constant WEEKDAY_ABBRS (line 5) | const WEEKDAY_ABBRS = ["Su", "Mo", "Tu", "We", "Th", "Fr", "Sa"];
  constant MONTH_NAMES (line 6) | const MONTH_NAMES = ["January", "February", "March", "April", "May", "Ju...
  function Calendar (line 39) | function Calendar(firstDay) {
  function Header (line 77) | function Header(nextClicked, prevClicked, undoClicked) {
  function Dates (line 130) | function Dates(firstDay) {
  function datesWithinSameMonth (line 195) | function datesWithinSameMonth(d1, d2) {
  function daysInMonth (line 199) | function daysInMonth(year, month) {
  function msTillNextDay (line 203) | function msTillNextDay(now) {

FILE: internal/glance/static/js/login.js
  constant AUTH_ENDPOINT (line 3) | const AUTH_ENDPOINT = pageData.baseURL + "/api/authenticate";
  function enableLoginButtonIfCriteriaMet (line 53) | function enableLoginButtonIfCriteriaMet() {
  function handleLoginAttempt (line 76) | async function handleLoginAttempt() {

FILE: internal/glance/static/js/masonry.js
  function setupMasonries (line 4) | function setupMasonries() {

FILE: internal/glance/static/js/page.js
  function fetchPageContent (line 6) | async function fetchPageContent(pageData) {
  function setupCarousels (line 15) | function setupCarousels() {
  function timestampToRelativeTime (line 56) | function timestampToRelativeTime(timestamp) {
  function updateRelativeTimeForElements (line 84) | function updateRelativeTimeForElements(elements)
  function setupSearchBoxes (line 98) | function setupSearchBoxes() {
  function setupDynamicRelativeTime (line 209) | function setupDynamicRelativeTime() {
  function setupGroups (line 251) | function setupGroups() {
  function setupLazyImages (line 311) | function setupLazyImages() {
  function attachExpandToggleButton (line 342) | function attachExpandToggleButton(collapsibleContainer) {
  function setupCollapsibleLists (line 386) | function setupCollapsibleLists() {
  function setupCollapsibleGrids (line 420) | function setupCollapsibleGrids() {
  function afterContentReady (line 497) | function afterContentReady(callback) {
  function makeSettableTimeElement (line 504) | function makeSettableTimeElement(element, hourFormat) {
  function timeInZone (line 532) | function timeInZone(now, zone) {
  function zoneDiffText (line 548) | function zoneDiffText(diffInMinutes) {
  function setupClocks (line 573) | function setupClocks() {
  function setupCalendars (line 634) | async function setupCalendars() {
  function setupTodos (line 645) | async function setupTodos() {
  function setupTruncatedElementTitles (line 656) | function setupTruncatedElementTitles() {
  function changeTheme (line 670) | async function changeTheme(key, onChanged) {
  function initThemePicker (line 694) | function initThemePicker() {
  function setupPage (line 746) | async function setupPage() {

FILE: internal/glance/static/js/popover.js
  function handleMouseEnter (line 31) | function handleMouseEnter(event) {
  function handleMouseLeave (line 51) | function handleMouseLeave(event) {
  function clearTogglePopoverTimeout (line 57) | function clearTogglePopoverTimeout() {
  function showPopover (line 61) | function showPopover() {
  function repositionContainer (line 110) | function repositionContainer() {
  function hidePopover (line 160) | function hidePopover() {
  function handleHidePopoverOnEscape (line 181) | function handleHidePopoverOnEscape(event) {
  function setupPopovers (line 187) | function setupPopovers() {

FILE: internal/glance/static/js/templating.js
  function elem (line 1) | function elem(tag = "div") {
  function fragment (line 5) | function fragment(...children) {
  function text (line 11) | function text(str = "") {
  function repeat (line 15) | function repeat(n, fn) {
  function find (line 24) | function find(selector) {
  function findAll (line 28) | function findAll(selector) {

FILE: internal/glance/static/js/todo.js
  function itemAnim (line 15) | function itemAnim(height, entrance = true) {
  function inputMarginAnim (line 28) | function inputMarginAnim(entrance = true) {
  function loadFromLocalStorage (line 40) | function loadFromLocalStorage(id) {
  function saveToLocalStorage (line 44) | function saveToLocalStorage(id, data) {
  function Item (line 48) | function Item(unserialize = {}, onUpdate, onDelete, onEscape, onDragStar...
  function Todo (line 104) | function Todo(id) {
  function autoScalingTextarea (line 210) | function autoScalingTextarea(yieldTextarea = null) {
  function verticallyReorderable (line 229) | function verticallyReorderable(itemsContainer, onItemRepositioned, onDra...

FILE: internal/glance/static/js/utils.js
  function throttledDebounce (line 1) | function throttledDebounce(callback, maxDebounceTimes, debounceDelay) {
  function isElementVisible (line 23) | function isElementVisible(element) {
  function clamp (line 27) | function clamp(value, min, max) {
  function openURLInNewTab (line 34) | function openURLInNewTab(url, focus = true) {
  class Vec2 (line 41) | class Vec2 {
    method constructor (line 42) | constructor(x, y) {
    method new (line 47) | static new(x = 0, y = 0) {
    method fromEvent (line 51) | static fromEvent(event) {
    method setFromEvent (line 55) | setFromEvent(event) {
    method set (line 61) | set(x, y) {
  function toggleableEvents (line 68) | function toggleableEvents(element, eventToHandlerMap) {

FILE: internal/glance/templates.go
  function mustParseTemplate (line 61) | func mustParseTemplate(primary string, dependencies ...string) *template...
  function formatApproxNumber (line 73) | func formatApproxNumber(count int) string {
  function dynamicRelativeTimeAttrs (line 89) | func dynamicRelativeTimeAttrs(t interface{ Unix() int64 }) template.HTML...

FILE: internal/glance/theme.go
  method handleThemeChangeRequest (line 15) | func (a *application) handleThemeChangeRequest(w http.ResponseWriter, r ...
  type themeProperties (line 41) | type themeProperties struct
    method init (line 56) | func (t *themeProperties) init() error {
    method SameAs (line 78) | func (t1 *themeProperties) SameAs(t2 *themeProperties) bool {

FILE: internal/glance/utils.go
  function percentChange (line 20) | func percentChange(current, previous float64) float64 {
  function extractDomainFromUrl (line 31) | func extractDomainFromUrl(u string) string {
  function svgPolylineCoordsFromYValues (line 44) | func svgPolylineCoordsFromYValues(width float64, height float64, values ...
  function maybeCopySliceWithoutZeroValues (line 67) | func maybeCopySliceWithoutZeroValues[T int | float64](values []T) []T {
  function stripURLScheme (line 93) | func stripURLScheme(url string) string {
  function isRunningInsideDockerContainer (line 97) | func isRunningInsideDockerContainer() bool {
  function prefixStringLines (line 102) | func prefixStringLines(prefix string, s string) string {
  function limitStringLength (line 112) | func limitStringLength(s string, max int) (string, bool) {
  function parseRFC3339Time (line 122) | func parseRFC3339Time(t string) time.Time {
  function normalizeVersionFormat (line 131) | func normalizeVersionFormat(version string) string {
  function titleToSlug (line 141) | func titleToSlug(s string) string {
  function fileServerWithCache (line 149) | func fileServerWithCache(fs http.FileSystem, cacheDuration time.Duration...
  function executeTemplateToString (line 160) | func executeTemplateToString(t *template.Template, data any) (string, er...
  function stringToBool (line 170) | func stringToBool(s string) bool {
  function itemAtIndexOrDefault (line 174) | func itemAtIndexOrDefault[T any](items []T, index int, def T) T {
  function ternary (line 182) | func ternary[T any](condition bool, a, b T) T {
  function ItsUsedTrustMeBro (line 192) | func ItsUsedTrustMeBro(...any) {}
  function hslToHex (line 194) | func hslToHex(h, s, l float64) string {

FILE: internal/glance/widget-bookmarks.go
  type bookmarksWidget (line 9) | type bookmarksWidget struct
    method initialize (line 37) | func (widget *bookmarksWidget) initialize() error {
    method Render (line 75) | func (widget *bookmarksWidget) Render() template.HTML {

FILE: internal/glance/widget-calendar.go
  type calendarWidget (line 21) | type calendarWidget struct
    method initialize (line 28) | func (widget *calendarWidget) initialize() error {
    method Render (line 43) | func (widget *calendarWidget) Render() template.HTML {

FILE: internal/glance/widget-changedetection.go
  type changeDetectionWidget (line 16) | type changeDetectionWidget struct
    method initialize (line 26) | func (widget *changeDetectionWidget) initialize() error {
    method update (line 44) | func (widget *changeDetectionWidget) update(ctx context.Context) {
    method Render (line 68) | func (widget *changeDetectionWidget) Render() template.HTML {
  type changeDetectionWatch (line 72) | type changeDetectionWatch struct
  type changeDetectionWatchList (line 80) | type changeDetectionWatchList
    method sortByNewest (line 82) | func (r changeDetectionWatchList) sortByNewest() changeDetectionWatchL...
  type changeDetectionResponseJson (line 90) | type changeDetectionResponseJson struct
  function fetchWatchUUIDsFromChangeDetection (line 98) | func fetchWatchUUIDsFromChangeDetection(instanceURL string, token string...
  function fetchWatchesFromChangeDetection (line 119) | func fetchWatchesFromChangeDetection(instanceURL string, requestedWatchI...

FILE: internal/glance/widget-clock.go
  type clockWidget (line 12) | type clockWidget struct
    method initialize (line 22) | func (widget *clockWidget) initialize() error {
    method Render (line 46) | func (widget *clockWidget) Render() template.HTML {

FILE: internal/glance/widget-container.go
  type containerWidgetBase (line 9) | type containerWidgetBase struct
    method _initializeWidgets (line 13) | func (widget *containerWidgetBase) _initializeWidgets() error {
    method _update (line 23) | func (widget *containerWidgetBase) _update(ctx context.Context) {
    method _setProviders (line 44) | func (widget *containerWidgetBase) _setProviders(providers *widgetProv...
    method _requiresUpdate (line 50) | func (widget *containerWidgetBase) _requiresUpdate(now *time.Time) bool {

FILE: internal/glance/widget-custom-api.go
  type CustomAPIRequest (line 27) | type CustomAPIRequest struct
    method initialize (line 134) | func (req *CustomAPIRequest) initialize() error {
  type customAPIWidget (line 40) | type customAPIWidget struct
    method initialize (line 51) | func (widget *customAPIWidget) initialize() error {
    method update (line 78) | func (widget *customAPIWidget) update(ctx context.Context) {
    method Render (line 89) | func (widget *customAPIWidget) Render() template.HTML {
  type customAPIOptions (line 93) | type customAPIOptions
    method StringOr (line 95) | func (o *customAPIOptions) StringOr(key, defaultValue string) string {
    method IntOr (line 99) | func (o *customAPIOptions) IntOr(key string, defaultValue int) int {
    method FloatOr (line 103) | func (o *customAPIOptions) FloatOr(key string, defaultValue float64) f...
    method BoolOr (line 107) | func (o *customAPIOptions) BoolOr(key string, defaultValue bool) bool {
    method JSON (line 111) | func (o *customAPIOptions) JSON(key string) string {
  function customAPIGetOptionOrDefault (line 125) | func customAPIGetOptionOrDefault[T any](o customAPIOptions, key string, ...
  type customAPIResponseData (line 195) | type customAPIResponseData struct
  type customAPITemplateData (line 200) | type customAPITemplateData struct
    method JSONLines (line 206) | func (data *customAPITemplateData) JSONLines() []decoratedGJSONResult {
    method Subrequest (line 217) | func (data *customAPITemplateData) Subrequest(key string) *customAPIRe...
  function fetchCustomAPIResponse (line 231) | func fetchCustomAPIResponse(ctx context.Context, req *CustomAPIRequest) ...
  function fetchAndRenderCustomAPIRequest (line 278) | func fetchAndRenderCustomAPIRequest(
  type decoratedGJSONResult (line 356) | type decoratedGJSONResult struct
    method Exists (line 370) | func (r *decoratedGJSONResult) Exists(key string) bool {
    method Array (line 374) | func (r *decoratedGJSONResult) Array(key string) []decoratedGJSONResult {
    method String (line 382) | func (r *decoratedGJSONResult) String(key string) string {
    method Int (line 390) | func (r *decoratedGJSONResult) Int(key string) int {
    method Float (line 398) | func (r *decoratedGJSONResult) Float(key string) float64 {
    method Bool (line 406) | func (r *decoratedGJSONResult) Bool(key string) bool {
    method Get (line 414) | func (r *decoratedGJSONResult) Get(key string) *decoratedGJSONResult {
  function gJsonResultArrayToDecoratedResultArray (line 360) | func gJsonResultArrayToDecoratedResultArray(results []gjson.Result) []de...
  function customAPIDoMathOp (line 418) | func customAPIDoMathOp[T int | float64](a, b T, op string) T {
  function customAPIFuncFormatTime (line 692) | func customAPIFuncFormatTime(layout string, t time.Time) string {
  function customAPIFuncParseTimeInLocation (line 709) | func customAPIFuncParseTimeInLocation(layout, value string, loc *time.Lo...

FILE: internal/glance/widget-dns-stats.go
  constant dnsStatsBars (line 22) | dnsStatsBars            = 8
  constant dnsStatsHoursSpan (line 23) | dnsStatsHoursSpan       = 24
  constant dnsStatsHoursPerBar (line 24) | dnsStatsHoursPerBar int = dnsStatsHoursSpan / dnsStatsBars
  type dnsStatsWidget (line 27) | type dnsStatsWidget struct
    method initialize (line 63) | func (widget *dnsStatsWidget) initialize() error {
    method update (line 87) | func (widget *dnsStatsWidget) update(ctx context.Context) {
    method Render (line 126) | func (widget *dnsStatsWidget) Render() template.HTML {
  constant dnsServiceAdguard (line 46) | dnsServiceAdguard    = "adguard"
  constant dnsServicePihole (line 47) | dnsServicePihole     = "pihole"
  constant dnsServiceTechnitium (line 48) | dnsServiceTechnitium = "technitium"
  constant dnsServicePiholeV6 (line 49) | dnsServicePiholeV6   = "pihole-v6"
  function makeDNSWidgetTimeLabels (line 52) | func makeDNSWidgetTimeLabels(format string) [8]string {
  type dnsStats (line 130) | type dnsStats struct
  type dnsStatsSeries (line 140) | type dnsStatsSeries struct
  type dnsStatsBlockedDomain (line 147) | type dnsStatsBlockedDomain struct
  type adguardStatsResponse (line 152) | type adguardStatsResponse struct
  function fetchAdguardStats (line 161) | func fetchAdguardStats(instanceURL string, allowInsecure bool, username,...
  type pihole5StatsResponse (line 266) | type pihole5StatsResponse struct
  type pihole5QueriesSeries (line 280) | type pihole5QueriesSeries
    method UnmarshalJSON (line 282) | func (p *pihole5QueriesSeries) UnmarshalJSON(data []byte) error {
  type pihole5TopBlockedDomains (line 297) | type pihole5TopBlockedDomains
    method UnmarshalJSON (line 299) | func (p *pihole5TopBlockedDomains) UnmarshalJSON(data []byte) error {
  function fetchPihole5Stats (line 314) | func fetchPihole5Stats(instanceURL string, allowInsecure bool, token str...
  function fetchPiholeStats (line 412) | func fetchPiholeStats(
  function fetchPiholeSessionID (line 618) | func fetchPiholeSessionID(instanceURL string, client *http.Client, passw...
  function checkPiholeSessionIDIsValid (line 666) | func checkPiholeSessionIDIsValid(instanceURL string, client *http.Client...
  type technitiumStatsResponse (line 686) | type technitiumStatsResponse struct
  function fetchTechnitiumStats (line 707) | func fetchTechnitiumStats(instanceUrl string, allowInsecure bool, token ...

FILE: internal/glance/widget-docker-containers.go
  type dockerContainersWidget (line 18) | type dockerContainersWidget struct
    method initialize (line 29) | func (widget *dockerContainersWidget) initialize() error {
    method update (line 39) | func (widget *dockerContainersWidget) update(ctx context.Context) {
    method Render (line 56) | func (widget *dockerContainersWidget) Render() template.HTML {
  constant dockerContainerLabelHide (line 61) | dockerContainerLabelHide        = "glance.hide"
  constant dockerContainerLabelName (line 62) | dockerContainerLabelName        = "glance.name"
  constant dockerContainerLabelURL (line 63) | dockerContainerLabelURL         = "glance.url"
  constant dockerContainerLabelDescription (line 64) | dockerContainerLabelDescription = "glance.description"
  constant dockerContainerLabelSameTab (line 65) | dockerContainerLabelSameTab     = "glance.same-tab"
  constant dockerContainerLabelIcon (line 66) | dockerContainerLabelIcon        = "glance.icon"
  constant dockerContainerLabelID (line 67) | dockerContainerLabelID          = "glance.id"
  constant dockerContainerLabelParent (line 68) | dockerContainerLabelParent      = "glance.parent"
  constant dockerContainerLabelCategory (line 69) | dockerContainerLabelCategory    = "glance.category"
  constant dockerContainerStateIconOK (line 73) | dockerContainerStateIconOK     = "ok"
  constant dockerContainerStateIconPaused (line 74) | dockerContainerStateIconPaused = "paused"
  constant dockerContainerStateIconWarn (line 75) | dockerContainerStateIconWarn   = "warn"
  constant dockerContainerStateIconOther (line 76) | dockerContainerStateIconOther  = "other"
  type dockerContainerJsonResponse (line 86) | type dockerContainerJsonResponse struct
  type dockerContainerLabels (line 94) | type dockerContainerLabels
    method getOrDefault (line 96) | func (l *dockerContainerLabels) getOrDefault(label, def string) string {
  type dockerContainer (line 113) | type dockerContainer struct
  type dockerContainerList (line 126) | type dockerContainerList
    method sortByStateIconThenTitle (line 128) | func (containers dockerContainerList) sortByStateIconThenTitle() {
  function dockerContainerStateToStateIcon (line 140) | func dockerContainerStateToStateIcon(state string) string {
  function fetchDockerContainers (line 153) | func fetchDockerContainers(
  function deriveDockerContainerName (line 216) | func deriveDockerContainerName(container *dockerContainerJsonResponse, f...
  function groupDockerContainerChildren (line 243) | func groupDockerContainerChildren(
  function isDockerContainerHidden (line 273) | func isDockerContainerHidden(container *dockerContainerJsonResponse, hid...
  function fetchDockerContainersFromSource (line 282) | func fetchDockerContainersFromSource(

FILE: internal/glance/widget-extension.go
  constant extensionWidgetDefaultTitle (line 18) | extensionWidgetDefaultTitle = "Extension"
  type extensionWidget (line 20) | type extensionWidget struct
    method initialize (line 31) | func (widget *extensionWidget) initialize() error {
    method update (line 45) | func (widget *extensionWidget) update(ctx context.Context) {
    method Render (line 69) | func (widget *extensionWidget) Render() template.HTML {
  type extensionType (line 73) | type extensionType
  constant extensionContentHTML (line 76) | extensionContentHTML extensionType = iota
  constant extensionContentUnknown (line 77) | extensionContentUnknown
  constant extensionHeaderTitle (line 85) | extensionHeaderTitle            = "Widget-Title"
  constant extensionHeaderTitleURL (line 86) | extensionHeaderTitleURL         = "Widget-Title-URL"
  constant extensionHeaderContentType (line 87) | extensionHeaderContentType      = "Widget-Content-Type"
  constant extensionHeaderContentFrameless (line 88) | extensionHeaderContentFrameless = "Widget-Content-Frameless"
  type extensionRequestOptions (line 91) | type extensionRequestOptions struct
  type extension (line 99) | type extension struct
  function convertExtensionContent (line 106) | func convertExtensionContent(options extensionRequestOptions, content []...
  function fetchExtension (line 119) | func fetchExtension(options extensionRequestOptions) (extension, error) {

FILE: internal/glance/widget-group.go
  type groupWidget (line 12) | type groupWidget struct
    method initialize (line 17) | func (widget *groupWidget) initialize() error {
    method update (line 38) | func (widget *groupWidget) update(ctx context.Context) {
    method setProviders (line 42) | func (widget *groupWidget) setProviders(providers *widgetProviders) {
    method requiresUpdate (line 46) | func (widget *groupWidget) requiresUpdate(now *time.Time) bool {
    method Render (line 50) | func (widget *groupWidget) Render() template.HTML {

FILE: internal/glance/widget-hacker-news.go
  type hackerNewsWidget (line 14) | type hackerNewsWidget struct
    method initialize (line 25) | func (widget *hackerNewsWidget) initialize() error {
    method update (line 46) | func (widget *hackerNewsWidget) update(ctx context.Context) {
    method Render (line 65) | func (widget *hackerNewsWidget) Render() template.HTML {
  type hackerNewsPostResponseJson (line 69) | type hackerNewsPostResponseJson struct
  function fetchHackerNewsPostIds (line 78) | func fetchHackerNewsPostIds(sort string) ([]int, error) {
  function fetchHackerNewsPostsFromIds (line 88) | func fetchHackerNewsPostsFromIds(postIds []int, commentsUrlTemplate stri...
  function fetchHackerNewsPosts (line 141) | func fetchHackerNewsPosts(sort string, limit int, commentsUrlTemplate st...

FILE: internal/glance/widget-html.go
  type htmlWidget (line 7) | type htmlWidget struct
    method initialize (line 12) | func (widget *htmlWidget) initialize() error {
    method Render (line 18) | func (widget *htmlWidget) Render() template.HTML {

FILE: internal/glance/widget-iframe.go
  type iframeWidget (line 12) | type iframeWidget struct
    method initialize (line 19) | func (widget *iframeWidget) initialize() error {
    method Render (line 41) | func (widget *iframeWidget) Render() template.HTML {

FILE: internal/glance/widget-lobsters.go
  type lobstersWidget (line 11) | type lobstersWidget struct
    method initialize (line 23) | func (widget *lobstersWidget) initialize() error {
    method update (line 47) | func (widget *lobstersWidget) update(ctx context.Context) {
    method Render (line 61) | func (widget *lobstersWidget) Render() template.HTML {
  type lobstersPostResponseJson (line 65) | type lobstersPostResponseJson struct
  type lobstersFeedResponseJson (line 75) | type lobstersFeedResponseJson
  function fetchLobstersPostsFromFeed (line 77) | func fetchLobstersPostsFromFeed(feedUrl string) (forumPostList, error) {
  function fetchLobstersPosts (line 112) | func fetchLobstersPosts(customURL string, instanceURL string, sortBy str...

FILE: internal/glance/widget-markets.go
  type marketsWidget (line 17) | type marketsWidget struct
    method initialize (line 27) | func (widget *marketsWidget) initialize() error {
    method update (line 50) | func (widget *marketsWidget) update(ctx context.Context) {
    method Render (line 66) | func (widget *marketsWidget) Render() template.HTML {
  type marketRequest (line 70) | type marketRequest struct
  type market (line 77) | type market struct
  type marketList (line 87) | type marketList
    method sortByAbsChange (line 89) | func (t marketList) sortByAbsChange() {
    method sortByChange (line 95) | func (t marketList) sortByChange() {
  type marketResponseJson (line 101) | type marketResponseJson struct
  constant marketChartDays (line 122) | marketChartDays = 21
  function fetchMarketsDataFromYahoo (line 124) | func fetchMarketsDataFromYahoo(marketRequests []marketRequest) (marketLi...

FILE: internal/glance/widget-monitor.go
  type monitorWidget (line 18) | type monitorWidget struct
    method initialize (line 37) | func (widget *monitorWidget) initialize() error {
    method update (line 43) | func (widget *monitorWidget) update(ctx context.Context) {
    method Render (line 78) | func (widget *monitorWidget) Render() template.HTML {
  function statusCodeToText (line 86) | func statusCodeToText(status int, altStatusCodes []int) string {
  function statusCodeToStyle (line 109) | func statusCodeToStyle(status int, altStatusCodes []int) string {
  type SiteStatusRequest (line 117) | type SiteStatusRequest struct
  type siteStatus (line 128) | type siteStatus struct
  function fetchSiteStatusTask (line 135) | func fetchSiteStatusTask(statusRequest *SiteStatusRequest) (siteStatus, ...
  function fetchStatusForSites (line 185) | func fetchStatusForSites(requests []*SiteStatusRequest) ([]siteStatus, e...

FILE: internal/glance/widget-old-calendar.go
  type oldCalendarWidget (line 11) | type oldCalendarWidget struct
    method initialize (line 17) | func (widget *oldCalendarWidget) initialize() error {
    method update (line 23) | func (widget *oldCalendarWidget) update(ctx context.Context) {
    method Render (line 28) | func (widget *oldCalendarWidget) Render() template.HTML {
  type calendar (line 32) | type calendar struct
  function newCalendar (line 42) | func newCalendar(now time.Time, startSunday bool) *calendar {
  function daysInMonth (line 84) | func daysInMonth(m time.Month, year int) int {

FILE: internal/glance/widget-reddit.go
  type redditWidget (line 21) | type redditWidget struct
    method initialize (line 49) | func (widget *redditWidget) initialize() error {
    method update (line 94) | func (widget *redditWidget) update(ctx context.Context) {
    method Render (line 112) | func (widget *redditWidget) Render() template.HTML {
    method parseCustomCommentsURL (line 152) | func (widget *redditWidget) parseCustomCommentsURL(subreddit, postId, ...
    method fetchSubredditPosts (line 160) | func (widget *redditWidget) fetchSubredditPosts() (forumPostList, erro...
    method fetchNewAppAccessToken (line 283) | func (widget *redditWidget) fetchNewAppAccessToken() error {
  type subredditResponseJson (line 125) | type subredditResponseJson struct

FILE: internal/glance/widget-releases.go
  type releasesWidget (line 20) | type releasesWidget struct
    method initialize (line 31) | func (widget *releasesWidget) initialize() error {
    method update (line 55) | func (widget *releasesWidget) update(ctx context.Context) {
    method Render (line 73) | func (widget *releasesWidget) Render() template.HTML {
  type releaseSource (line 77) | type releaseSource
  constant releaseSourceCodeberg (line 80) | releaseSourceCodeberg  releaseSource = "codeberg"
  constant releaseSourceGithub (line 81) | releaseSourceGithub    releaseSource = "github"
  constant releaseSourceGitlab (line 82) | releaseSourceGitlab    releaseSource = "gitlab"
  constant releaseSourceDockerHub (line 83) | releaseSourceDockerHub releaseSource = "dockerhub"
  type appRelease (line 86) | type appRelease struct
  type appReleaseList (line 96) | type appReleaseList
    method sortByNewest (line 98) | func (r appReleaseList) sortByNewest() appReleaseList {
  type releaseRequest (line 106) | type releaseRequest struct
    method UnmarshalYAML (line 114) | func (r *releaseRequest) UnmarshalYAML(node *yaml.Node) error {
  function fetchLatestReleases (line 156) | func fetchLatestReleases(requests []*releaseRequest) (appReleaseList, er...
  function fetchLatestReleaseTask (line 190) | func fetchLatestReleaseTask(request *releaseRequest) (*appRelease, error) {
  type githubReleaseResponseJson (line 205) | type githubReleaseResponseJson struct
  function fetchLatestGithubRelease (line 214) | func fetchLatestGithubRelease(request *releaseRequest) (*appRelease, err...
  type dockerHubRepositoryTagsResponse (line 261) | type dockerHubRepositoryTagsResponse struct
  type dockerHubRepositoryTagResponse (line 265) | type dockerHubRepositoryTagResponse struct
  constant dockerHubOfficialRepoTagURLFormat (line 270) | dockerHubOfficialRepoTagURLFormat = "https://hub.docker.com/_/%s/tags?na...
  constant dockerHubRepoTagURLFormat (line 271) | dockerHubRepoTagURLFormat = "https://hub.docker.com/r/%s/tags?name=%s"
  constant dockerHubTagsURLFormat (line 272) | dockerHubTagsURLFormat = "https://hub.docker.com/v2/namespaces/%s/reposi...
  constant dockerHubSpecificTagURLFormat (line 273) | dockerHubSpecificTagURLFormat = "https://hub.docker.com/v2/namespaces/%s...
  function fetchLatestDockerHubRelease (line 275) | func fetchLatestDockerHubRelease(request *releaseRequest) (*appRelease, ...
  type gitlabReleaseResponseJson (line 351) | type gitlabReleaseResponseJson struct
  function fetchLatestGitLabRelease (line 359) | func fetchLatestGitLabRelease(request *releaseRequest) (*appRelease, err...
  type codebergReleaseResponseJson (line 390) | type codebergReleaseResponseJson struct
  function fetchLatestCodebergRelease (line 396) | func fetchLatestCodebergRelease(request *releaseRequest) (*appRelease, e...

FILE: internal/glance/widget-repository.go
  type repositoryWidget (line 15) | type repositoryWidget struct
    method initialize (line 25) | func (widget *repositoryWidget) initialize() error {
    method update (line 43) | func (widget *repositoryWidget) update(ctx context.Context) {
    method Render (line 59) | func (widget *repositoryWidget) Render() template.HTML {
  type repository (line 63) | type repository struct
  type githubTicket (line 75) | type githubTicket struct
  type githubCommitDetails (line 81) | type githubCommitDetails struct
  type githubRepositoryResponseJson (line 88) | type githubRepositoryResponseJson struct
  type githubTicketResponseJson (line 94) | type githubTicketResponseJson struct
  type gitHubCommitResponseJson (line 103) | type gitHubCommitResponseJson struct
  function fetchRepositoryDetailsFromGithub (line 114) | func fetchRepositoryDetailsFromGithub(repo string, token string, maxPRs ...

FILE: internal/glance/widget-rss.go
  type rssWidget (line 31) | type rssWidget struct
    method initialize (line 49) | func (widget *rssWidget) initialize() error {
    method update (line 80) | func (widget *rssWidget) update(ctx context.Context) {
    method Render (line 98) | func (widget *rssWidget) Render() template.HTML {
    method fetchItemsFromFeeds (line 152) | func (widget *rssWidget) fetchItemsFromFeeds() (rssFeedItemList, error) {
    method fetchItemsFromFeedTask (line 192) | func (widget *rssWidget) fetchItemsFromFeedTask(request rssFeedRequest...
  type cachedRSSFeed (line 114) | type cachedRSSFeed struct
  type rssFeedItem (line 120) | type rssFeedItem struct
  type rssFeedRequest (line 131) | type rssFeedRequest struct
  type rssFeedItemList (line 142) | type rssFeedItemList
    method sortByNewest (line 144) | func (f rssFeedItemList) sortByNewest() rssFeedItemList {
  function findThumbnailInItemExtensions (line 346) | func findThumbnailInItemExtensions(item *gofeed.Item) string {
  function recursiveFindThumbnailInExtensions (line 356) | func recursiveFindThumbnailInExtensions(extensions map[string][]gofeedex...
  function sanitizeFeedDescription (line 378) | func sanitizeFeedDescription(description string) string {
  function shortenFeedDescriptionLen (line 392) | func shortenFeedDescriptionLen(description string, maxLen int) string {

FILE: internal/glance/widget-search.go
  type SearchBang (line 11) | type SearchBang struct
  type searchWidget (line 17) | type searchWidget struct
    method initialize (line 43) | func (widget *searchWidget) initialize() error {
    method Render (line 76) | func (widget *searchWidget) Render() template.HTML {
  function convertSearchUrl (line 28) | func convertSearchUrl(url string) string {

FILE: internal/glance/widget-server-stats.go
  type serverStatsWidget (line 18) | type serverStatsWidget struct
    method initialize (line 23) | func (widget *serverStatsWidget) initialize() error {
    method update (line 42) | func (widget *serverStatsWidget) update(context.Context) {
    method Render (line 83) | func (widget *serverStatsWidget) Render() template.HTML {
  type serverStatsRequest (line 87) | type serverStatsRequest struct
  function fetchRemoteServerInfo (line 102) | func fetchRemoteServerInfo(infoReq *serverStatsRequest) (*sysinfo.System...

FILE: internal/glance/widget-shared.go
  constant twitchGqlEndpoint (line 9) | twitchGqlEndpoint = "https://gql.twitch.tv/gql"
  constant twitchGqlClientId (line 10) | twitchGqlClientId = "kimne78kx3ncx6brgo4mv6wki5h1ko"
  type forumPost (line 14) | type forumPost struct
  type forumPostList (line 28) | type forumPostList
    method calculateEngagement (line 34) | func (p forumPostList) calculateEngagement() {
    method sortByEngagement (line 60) | func (p forumPostList) sortByEngagement() {
  constant depreciatePostsOlderThanHours (line 30) | depreciatePostsOlderThanHours = 7
  constant maxDepreciation (line 31) | maxDepreciation = 0.9
  constant maxDepreciationAfterHours (line 32) | maxDepreciationAfterHours = 24

FILE: internal/glance/widget-split-column.go
  type splitColumnWidget (line 11) | type splitColumnWidget struct
    method initialize (line 17) | func (widget *splitColumnWidget) initialize() error {
    method update (line 31) | func (widget *splitColumnWidget) update(ctx context.Context) {
    method setProviders (line 35) | func (widget *splitColumnWidget) setProviders(providers *widgetProvide...
    method requiresUpdate (line 39) | func (widget *splitColumnWidget) requiresUpdate(now *time.Time) bool {
    method Render (line 43) | func (widget *splitColumnWidget) Render() template.HTML {

FILE: internal/glance/widget-todo.go
  type todoWidget (line 9) | type todoWidget struct
    method initialize (line 15) | func (widget *todoWidget) initialize() error {
    method Render (line 22) | func (widget *todoWidget) Render() template.HTML {

FILE: internal/glance/widget-twitch-channels.go
  type twitchChannelsWidget (line 17) | type twitchChannelsWidget struct
    method initialize (line 25) | func (widget *twitchChannelsWidget) initialize() error {
    method update (line 42) | func (widget *twitchChannelsWidget) update(ctx context.Context) {
    method Render (line 58) | func (widget *twitchChannelsWidget) Render() template.HTML {
  type twitchChannel (line 62) | type twitchChannel struct
  type twitchChannelList (line 75) | type twitchChannelList
    method sortByViewers (line 77) | func (channels twitchChannelList) sortByViewers() {
    method sortByLive (line 83) | func (channels twitchChannelList) sortByLive() {
  type twitchOperationResponse (line 89) | type twitchOperationResponse struct
  type twitchChannelShellOperationResponse (line 96) | type twitchChannelShellOperationResponse struct
  type twitchStreamMetadataOperationResponse (line 107) | type twitchStreamMetadataOperationResponse struct
  constant twitchChannelStatusOperationRequestBody (line 122) | twitchChannelStatusOperationRequestBody = `[
  function fetchChannelFromTwitchTask (line 133) | func fetchChannelFromTwitchTask(channel string) (twitchChannel, error) {
  function fetchChannelsFromTwitch (line 208) | func fetchChannelsFromTwitch(channelLogins []string) (twitchChannelList,...

FILE: internal/glance/widget-twitch-top-games.go
  type twitchGamesWidget (line 16) | type twitchGamesWidget struct
    method initialize (line 24) | func (widget *twitchGamesWidget) initialize() error {
    method update (line 41) | func (widget *twitchGamesWidget) update(ctx context.Context) {
    method Render (line 51) | func (widget *twitchGamesWidget) Render() template.HTML {
  type twitchCategory (line 55) | type twitchCategory struct
  type twitchDirectoriesOperationResponse (line 67) | type twitchDirectoriesOperationResponse struct
  constant twitchDirectoriesOperationRequestBody (line 77) | twitchDirectoriesOperationRequestBody = `[
  function fetchTopGamesFromTwitch (line 81) | func fetchTopGamesFromTwitch(exclude []string, limit int) ([]twitchCateg...

FILE: internal/glance/widget-utils.go
  constant defaultClientTimeout (line 24) | defaultClientTimeout = 5 * time.Second
  type requestDoer (line 42) | type requestDoer interface
  function getBrowserUserAgentHeader (line 49) | func getBrowserUserAgentHeader() string {
  function setBrowserUserAgentHeader (line 58) | func setBrowserUserAgentHeader(request *http.Request) {
  function decodeJsonFromRequest (line 62) | func decodeJsonFromRequest[T any](client requestDoer, request *http.Requ...
  function decodeJsonFromRequestTask (line 95) | func decodeJsonFromRequestTask[T any](client requestDoer) func(*http.Req...
  function decodeXmlFromRequest (line 102) | func decodeXmlFromRequest[T any](client requestDoer, request *http.Reque...
  function decodeXmlFromRequestTask (line 135) | func decodeXmlFromRequestTask[T any](client requestDoer) func(*http.Requ...
  type workerPoolTask (line 141) | type workerPoolTask struct
  type workerPoolJob (line 148) | type workerPoolJob struct
  constant defaultNumWorkers (line 155) | defaultNumWorkers = 10
  method withWorkers (line 157) | func (job *workerPoolJob[I, O]) withWorkers(workers int) *workerPoolJob[...
  function newJob (line 175) | func newJob[I any, O any](task func(I) (O, error), data []I) *workerPool...
  function workerPoolDo (line 184) | func workerPoolDo[I any, O any](job *workerPoolJob[I, O]) ([]O, []error,...

FILE: internal/glance/widget-videos.go
  constant videosWidgetPlaylistPrefix (line 15) | videosWidgetPlaylistPrefix = "playlist:"
  type videosWidget (line 23) | type videosWidget struct
    method initialize (line 36) | func (widget *videosWidget) initialize() error {
    method update (line 66) | func (widget *videosWidget) update(ctx context.Context) {
    method Render (line 80) | func (widget *videosWidget) Render() template.HTML {
  type youtubeFeedResponseXml (line 95) | type youtubeFeedResponseXml struct
  function parseYoutubeFeedTime (line 113) | func parseYoutubeFeedTime(t string) time.Time {
  type video (line 122) | type video struct
  type videoList (line 131) | type videoList
    method sortByNewest (line 133) | func (v videoList) sortByNewest() videoList {
  function fetchYoutubeChannelUploads (line 141) | func fetchYoutubeChannelUploads(channelOrPlaylistIDs []string, videoUrlT...

FILE: internal/glance/widget-weather.go
  type weatherWidget (line 20) | type weatherWidget struct
    method initialize (line 35) | func (widget *weatherWidget) initialize() error {
    method update (line 59) | func (widget *weatherWidget) update(ctx context.Context) {
    method Render (line 79) | func (widget *weatherWidget) Render() template.HTML {
  type weather (line 83) | type weather struct
    method WeatherCodeAsString (line 93) | func (w *weather) WeatherCodeAsString() string {
  type openMeteoPlacesResponseJson (line 101) | type openMeteoPlacesResponseJson struct
  type openMeteoPlaceResponseJson (line 105) | type openMeteoPlaceResponseJson struct
  type openMeteoWeatherResponseJson (line 115) | type openMeteoWeatherResponseJson struct
  type weatherColumn (line 133) | type weatherColumn struct
  function expandCountryAbbreviations (line 145) | func expandCountryAbbreviations(name string) string {
  function parsePlaceName (line 157) | func parsePlaceName(name string) (string, string) {
  function fetchOpenMeteoPlaceFromName (line 171) | func fetchOpenMeteoPlaceFromName(location string) (*openMeteoPlaceRespon...
  function fetchWeatherForOpenMeteoPlace (line 213) | func fetchWeatherForOpenMeteoPlace(place *openMeteoPlaceResponseJson, un...

FILE: internal/glance/widget.go
  function newWidget (line 20) | func newWidget(widgetType string) (widget, error) {
  type widgets (line 93) | type widgets
    method UnmarshalYAML (line 95) | func (w *widgets) UnmarshalYAML(node *yaml.Node) error {
  type widget (line 126) | type widget interface
  type cacheType (line 141) | type cacheType
  constant cacheTypeInfinite (line 144) | cacheTypeInfinite cacheType = iota
  constant cacheTypeDuration (line 145) | cacheTypeDuration
  constant cacheTypeOnTheHour (line 146) | cacheTypeOnTheHour
  type widgetBase (line 149) | type widgetBase struct
    method requiresUpdate (line 173) | func (w *widgetBase) requiresUpdate(now *time.Time) bool {
    method IsWIP (line 185) | func (w *widgetBase) IsWIP() bool {
    method update (line 189) | func (w *widgetBase) update(ctx context.Context) {
    method GetID (line 193) | func (w *widgetBase) GetID() uint64 {
    method setID (line 197) | func (w *widgetBase) setID(id uint64) {
    method setHideHeader (line 201) | func (w *widgetBase) setHideHeader(value bool) {
    method handleRequest (line 205) | func (widget *widgetBase) handleRequest(w http.ResponseWriter, r *http...
    method GetType (line 209) | func (w *widgetBase) GetType() string {
    method setProviders (line 213) | func (w *widgetBase) setProviders(providers *widgetProviders) {
    method renderTemplate (line 217) | func (w *widgetBase) renderTemplate(data any, t *template.Template) te...
    method withTitle (line 243) | func (w *widgetBase) withTitle(title string) *widgetBase {
    method withTitleURL (line 251) | func (w *widgetBase) withTitleURL(titleURL string) *widgetBase {
    method withCacheDuration (line 259) | func (w *widgetBase) withCacheDuration(duration time.Duration) *widget...
    method withCacheOnTheHour (line 271) | func (w *widgetBase) withCacheOnTheHour() *widgetBase {
    method withNotice (line 277) | func (w *widgetBase) withNotice(err error) *widgetBase {
    method withError (line 283) | func (w *widgetBase) withError(err error) *widgetBase {
    method canContinueUpdateAfterHandlingErr (line 293) | func (w *widgetBase) canContinueUpdateAfterHandlingErr(err error) bool {
    method getNextUpdateTime (line 327) | func (w *widgetBase) getNextUpdateTime() time.Time {
    method scheduleNextUpdate (line 343) | func (w *widgetBase) scheduleNextUpdate() *widgetBase {
    method scheduleEarlyUpdate (line 350) | func (w *widgetBase) scheduleEarlyUpdate() *widgetBase {
  type widgetProviders (line 169) | type widgetProviders struct

FILE: main.go
  function main (line 9) | func main() {

FILE: pkg/sysinfo/sysinfo.go
  type timestampJSON (line 20) | type timestampJSON struct
    method MarshalJSON (line 24) | func (t timestampJSON) MarshalJSON() ([]byte, error) {
    method UnmarshalJSON (line 28) | func (t *timestampJSON) UnmarshalJSON(data []byte) error {
  type SystemInfo (line 38) | type SystemInfo struct
  type MountpointInfo (line 68) | type MountpointInfo struct
  type SystemInfoRequest (line 76) | type SystemInfoRequest struct
  type MointpointRequest (line 82) | type MointpointRequest struct
  type cacheableHostInfo (line 90) | type cacheableHostInfo struct
  function getHostInfo (line 99) | func getHostInfo() (cacheableHostInfo, error) {
  function Collect (line 124) | func Collect(req *SystemInfoRequest) (*SystemInfo, []error) {
  function inferCPUTempSensor (line 284) | func inferCPUTempSensor(sensors []sensors.TemperatureStat) *sensors.Temp...
Condensed preview — 148 files, each showing path, character count, and a content snippet. Download the .json file or copy for the full structured content (716K chars).
[
  {
    "path": ".dockerignore",
    "chars": 257,
    "preview": "# https://docs.docker.com/build/building/context/#dockerignore-files\n# Ignore all files by default\n*\n\n# Only add necessa"
  },
  {
    "path": ".github/CODE_OF_CONDUCT.md",
    "chars": 5220,
    "preview": "# Contributor Covenant Code of Conduct\n\n## Our Pledge\n\nWe as members, contributors, and leaders pledge to make participa"
  },
  {
    "path": ".github/FUNDING.yml",
    "chars": 39,
    "preview": "github: [glanceapp]\npatreon: glanceapp\n"
  },
  {
    "path": ".github/ISSUE_TEMPLATE/bug_report.yml",
    "chars": 1479,
    "preview": "name: Bug report\ndescription: Let us know if something isn't working as expected\nlabels: [\"bug report\"]\nbody:\n  - type: "
  },
  {
    "path": ".github/ISSUE_TEMPLATE/config.yml",
    "chars": 298,
    "preview": "blank_issues_enabled: false\ncontact_links:\n  - name: Discussions\n    url: https://github.com/glanceapp/glance/discussion"
  },
  {
    "path": ".github/ISSUE_TEMPLATE/feature_request.yml",
    "chars": 1199,
    "preview": "name: Feature request\ndescription: Share your ideas for new features or improvements\nlabels: [\"feature request\"]\nbody:\n "
  },
  {
    "path": ".github/PULL_REQUEST_TEMPLATE.md",
    "chars": 159,
    "preview": "<!-- If your pull request adds new features, changes existing ones or fixes any bugs, please use the dev branch as the b"
  },
  {
    "path": ".github/SECURITY.md",
    "chars": 455,
    "preview": "# Security Policy\n\n## Supported Versions\n\nSecurity updates will be applied to the latest as well as previous minor versi"
  },
  {
    "path": ".github/workflows/release.yaml",
    "chars": 828,
    "preview": "name: Create release\n\npermissions:\n  contents: write\n\non:\n  push:\n    tags:\n      - 'v*'\n\njobs:\n  release:\n    runs-on: "
  },
  {
    "path": ".gitignore",
    "chars": 47,
    "preview": "/assets\n/build\n/playground\n/.idea\n/glance*.yml\n"
  },
  {
    "path": ".goreleaser.yaml",
    "chars": 1509,
    "preview": "project_name: glanceapp/glance\n\nchecksum:\n  disable: true\n\nbuilds:\n  - binary: glance\n    env:\n      - CGO_ENABLED=0\n   "
  },
  {
    "path": "Dockerfile",
    "chars": 244,
    "preview": "FROM golang:1.24.3-alpine3.21 AS builder\n\nWORKDIR /app\nCOPY . /app\nRUN CGO_ENABLED=0 go build .\n\nFROM alpine:3.21\n\nWORKD"
  },
  {
    "path": "Dockerfile.goreleaser",
    "chars": 127,
    "preview": "FROM alpine:3.21\n\nWORKDIR /app\nCOPY glance .\n\nEXPOSE 8080/tcp\nENTRYPOINT [\"/app/glance\", \"--config\", \"/app/config/glance"
  },
  {
    "path": "LICENSE",
    "chars": 34523,
    "preview": "                    GNU AFFERO GENERAL PUBLIC LICENSE\n                       Version 3, 19 November 2007\n\n Copyright (C)"
  },
  {
    "path": "README.md",
    "chars": 14511,
    "preview": "<p align=\"center\"><img src=\"docs/logo.png\"></p>\n<h1 align=\"center\">Glance</h1>\n<p align=\"center\">\n  <a href=\"#installati"
  },
  {
    "path": "docs/configuration.md",
    "chars": 91669,
    "preview": "# Configuring Glance\n\n- [Preconfigured page](#preconfigured-page)\n- [The config file](#the-config-file)\n  - [Auto reload"
  },
  {
    "path": "docs/custom-api.md",
    "chars": 14760,
    "preview": "[Jump to function definitions](#functions)\n\n## Examples\n\nThe best way to get an idea of how the templates work would be "
  },
  {
    "path": "docs/extensions.md",
    "chars": 5700,
    "preview": "# Extensions\n\n> [!IMPORTANT]\n>\n> **This document as well as the extensions feature are a work in progress. The API may c"
  },
  {
    "path": "docs/glance.yml",
    "chars": 3125,
    "preview": "pages:\n  - name: Home\n    # Optionally, if you only have a single page you can hide the desktop navigation for a cleaner"
  },
  {
    "path": "docs/preconfigured-pages.md",
    "chars": 6030,
    "preview": "# Preconfigured pages\n\nDon't want to spend time configuring pages from scratch? No problem! Simply copy the config from "
  },
  {
    "path": "docs/themes.md",
    "chars": 2880,
    "preview": "# Themes\n\n## Dark\n\n### Teal City\n![screenshot](images/themes/teal-city.png)\n```yaml\ntheme:\n  background-color: 225 14 15"
  },
  {
    "path": "docs/v0.7.0-upgrade.md",
    "chars": 1608,
    "preview": "## Upgrading to v0.7.0 from previous versions\n\nIn essence, the `glance.yml` file has been moved from the root of the pro"
  },
  {
    "path": "go.mod",
    "chars": 1192,
    "preview": "module github.com/glanceapp/glance\n\ngo 1.24.3\n\nrequire (\n\tgithub.com/fsnotify/fsnotify v1.9.0\n\tgithub.com/mmcdole/gofeed"
  },
  {
    "path": "go.sum",
    "chars": 11910,
    "preview": "github.com/PuerkitoBio/goquery v1.10.3 h1:pFYcNSqHxBD06Fpj/KsbStFRsgRATgnf3LeXiUkhzPo=\ngithub.com/PuerkitoBio/goquery v1"
  },
  {
    "path": "internal/glance/auth.go",
    "chars": 9266,
    "preview": "package glance\n\nimport (\n\t\"bytes\"\n\t\"crypto/hmac\"\n\t\"crypto/rand\"\n\t\"crypto/sha256\"\n\t\"encoding/base64\"\n\t\"encoding/binary\"\n\t"
  },
  {
    "path": "internal/glance/auth_test.go",
    "chars": 2449,
    "preview": "package glance\n\nimport (\n\t\"bytes\"\n\t\"encoding/base64\"\n\t\"testing\"\n\t\"time\"\n)\n\nfunc TestAuthTokenGenerationAndVerification(t"
  },
  {
    "path": "internal/glance/cli.go",
    "chars": 3754,
    "preview": "package glance\n\nimport (\n\t\"flag\"\n\t\"fmt\"\n\t\"os\"\n\t\"strings\"\n\n\t\"github.com/shirou/gopsutil/v4/disk\"\n\t\"github.com/shirou/gops"
  },
  {
    "path": "internal/glance/config-fields.go",
    "chars": 6351,
    "preview": "package glance\n\nimport (\n\t\"crypto/tls\"\n\t\"fmt\"\n\t\"html/template\"\n\t\"net/http\"\n\t\"net/url\"\n\t\"regexp\"\n\t\"strconv\"\n\t\"strings\"\n\t\""
  },
  {
    "path": "internal/glance/config.go",
    "chars": 17653,
    "preview": "package glance\n\nimport (\n\t\"bytes\"\n\t\"errors\"\n\t\"fmt\"\n\t\"html/template\"\n\t\"iter\"\n\t\"log\"\n\t\"maps\"\n\t\"os\"\n\t\"path/filepath\"\n\t\"rege"
  },
  {
    "path": "internal/glance/diagnose.go",
    "chars": 5437,
    "preview": "package glance\n\nimport (\n\t\"context\"\n\t\"fmt\"\n\t\"io\"\n\t\"net\"\n\t\"net/http\"\n\t\"runtime\"\n\t\"strings\"\n\t\"sync\"\n\t\"time\"\n)\n\nconst httpT"
  },
  {
    "path": "internal/glance/embed.go",
    "chars": 3561,
    "preview": "package glance\n\nimport (\n\t\"bytes\"\n\t\"crypto/md5\"\n\t\"embed\"\n\t\"encoding/hex\"\n\t\"errors\"\n\t\"fmt\"\n\t\"io\"\n\t\"io/fs\"\n\t\"log\"\n\t\"path/f"
  },
  {
    "path": "internal/glance/glance.go",
    "chars": 12662,
    "preview": "package glance\n\nimport (\n\t\"bytes\"\n\t\"context\"\n\t\"encoding/base64\"\n\t\"fmt\"\n\t\"log\"\n\t\"net/http\"\n\t\"path/filepath\"\n\t\"slices\"\n\t\"s"
  },
  {
    "path": "internal/glance/main.go",
    "chars": 5241,
    "preview": "package glance\n\nimport (\n\t\"fmt\"\n\t\"io\"\n\t\"log\"\n\t\"net/http\"\n\t\"os\"\n\n\t\"golang.org/x/crypto/bcrypt\"\n)\n\nvar buildVersion = \"dev"
  },
  {
    "path": "internal/glance/static/css/forum-posts.css",
    "chars": 389,
    "preview": ".forum-post-list-thumbnail {\n    flex-shrink: 0;\n    width: 6rem;\n    height: 4.1rem;\n    border-radius: var(--border-ra"
  },
  {
    "path": "internal/glance/static/css/login.css",
    "chars": 3168,
    "preview": ".login-bounds {\n    max-width: 500px;\n    padding: 0 2rem;\n}\n\n.form-label {\n    text-transform: uppercase;\n    margin-bo"
  },
  {
    "path": "internal/glance/static/css/main.css",
    "chars": 2912,
    "preview": "@font-face {\n    font-family: 'JetBrains Mono';\n    font-style: normal;\n    font-weight: 400;\n    font-display: swap;\n  "
  },
  {
    "path": "internal/glance/static/css/mobile.css",
    "chars": 6400,
    "preview": "@media (max-width: 1190px) {\n    .header-container {\n        display: none;\n    }\n\n    .page-column-small .size-title-dy"
  },
  {
    "path": "internal/glance/static/css/popover.css",
    "chars": 1904,
    "preview": ".popover-container, [data-popover-html] {\n    display: none;\n}\n\n.popover-container {\n    --triangle-size: 10px;\n    --tr"
  },
  {
    "path": "internal/glance/static/css/site.css",
    "chars": 7625,
    "preview": ":root[data-scheme=light] {\n    --scheme: 100% -;\n}\n\n.page {\n    height: 100%;\n    padding-block: var(--widget-gap);\n}\n\n."
  },
  {
    "path": "internal/glance/static/css/utils.css",
    "chars": 16615,
    "preview": ".masonry {\n    display: flex;\n    gap: var(--widget-gap);\n}\n\n.masonry-column {\n    flex: 1;\n    display: flex;\n    flex-"
  },
  {
    "path": "internal/glance/static/css/widget-bookmarks.css",
    "chars": 650,
    "preview": ".bookmarks-group {\n    --bookmarks-group-color: var(--color-primary);\n}\n\n.bookmarks-group-title {\n    color: var(--bookm"
  },
  {
    "path": "internal/glance/static/css/widget-calendar.css",
    "chars": 1471,
    "preview": ".old-calendar-day {\n    width: calc(100% / 7);\n    text-align: center;\n    padding: 0.6rem 0;\n}\n\n.old-calendar-day-today"
  },
  {
    "path": "internal/glance/static/css/widget-clock.css",
    "chars": 98,
    "preview": ".clock-time {\n    min-width: 8ch;\n}\n\n.clock-time span {\n    color: var(--color-text-highlight);\n}\n"
  },
  {
    "path": "internal/glance/static/css/widget-dns-stats.css",
    "chars": 2663,
    "preview": ".dns-stats-totals {\n    transition: opacity .3s;\n    transition-delay: 50ms;\n}\n\n.dns-stats:has(.dns-stats-graph .popover"
  },
  {
    "path": "internal/glance/static/css/widget-docker-containers.css",
    "chars": 493,
    "preview": ".docker-container-icon {\n    display: block;\n    filter: grayscale(0.4);\n    object-fit: contain;\n    aspect-ratio: 1 / "
  },
  {
    "path": "internal/glance/static/css/widget-group.css",
    "chars": 1083,
    "preview": ".widget-group-header {\n    overflow-x: auto;\n    scrollbar-width: thin;\n}\n\n.widget-group-title {\n    background: none;\n "
  },
  {
    "path": "internal/glance/static/css/widget-markets.css",
    "chars": 161,
    "preview": ".market-chart {\n    margin-left: auto;\n    width: 6.5rem;\n    flex-shrink: 0;\n}\n\n.market-chart svg {\n    width: 100%;\n}\n"
  },
  {
    "path": "internal/glance/static/css/widget-monitor.css",
    "chars": 648,
    "preview": ".monitor-site-icon {\n    display: block;\n    opacity: 0.8;\n    filter: grayscale(0.4);\n    object-fit: contain;\n    aspe"
  },
  {
    "path": "internal/glance/static/css/widget-reddit.css",
    "chars": 483,
    "preview": ".reddit-card-thumbnail {\n    width: 100%;\n    height: 100%;\n    object-fit: cover;\n    object-position: 0% 20%;\n    opac"
  },
  {
    "path": "internal/glance/static/css/widget-releases.css",
    "chars": 98,
    "preview": ".release-source-icon {\n    width: 16px;\n    height: 16px;\n    flex-shrink: 0;\n    opacity: 0.4;\n}\n"
  },
  {
    "path": "internal/glance/static/css/widget-rss.css",
    "chars": 1235,
    "preview": ".rss-card-image {\n    height: var(--rss-thumbnail-height, 10rem);\n    object-fit: cover;\n    border-radius: var(--border"
  },
  {
    "path": "internal/glance/static/css/widget-search.css",
    "chars": 1551,
    "preview": ".search-icon {\n    width: 2.3rem;\n}\n\n.search-icon-container {\n    position: relative;\n    flex-shrink: 0;\n}\n\n/* gives a "
  },
  {
    "path": "internal/glance/static/css/widget-server-stats.css",
    "chars": 1269,
    "preview": ".widget-type-server-info {\n    position: relative;\n}\n\n.server + .server {\n    margin-top: 3rem;\n}\n\n.server {\n    gap: 1r"
  },
  {
    "path": "internal/glance/static/css/widget-todo.css",
    "chars": 2420,
    "preview": ".todo-widget {\n    padding-top: 4rem;\n}\n\n.todo-plus-icon {\n    --icon-color: var(--color-text-subdue);\n    position: rel"
  },
  {
    "path": "internal/glance/static/css/widget-twitch.css",
    "chars": 1101,
    "preview": ".twitch-category-thumbnail {\n    width: 5rem;\n    aspect-ratio: 3 / 4;\n    border-radius: var(--border-radius);\n}\n\n.twit"
  },
  {
    "path": "internal/glance/static/css/widget-videos.css",
    "chars": 303,
    "preview": ".video-thumbnail {\n    width: 100%;\n    aspect-ratio: 16 / 8.9;\n    object-fit: cover;\n    border-radius: var(--border-r"
  },
  {
    "path": "internal/glance/static/css/widget-weather.css",
    "chars": 3886,
    "preview": ".weather-column {\n    position: relative;\n    display: flex;\n    align-items: center;\n    justify-content: end;\n    flex"
  },
  {
    "path": "internal/glance/static/css/widgets.css",
    "chars": 2344,
    "preview": "@import \"widget-bookmarks.css\";\n@import \"widget-calendar.css\";\n@import \"widget-clock.css\";\n@import \"widget-dns-stats.css"
  },
  {
    "path": "internal/glance/static/js/animations.js",
    "chars": 1479,
    "preview": "export const easeOutQuint = 'cubic-bezier(0.22, 1, 0.36, 1)';\n\nexport function directions(anim, opt, ...dirs) {\n    retu"
  },
  {
    "path": "internal/glance/static/js/calendar.js",
    "chars": 7477,
    "preview": "import { directions, easeOutQuint, slideFade } from \"./animations.js\";\nimport { elem, repeat, text } from \"./templating."
  },
  {
    "path": "internal/glance/static/js/login.js",
    "chars": 4851,
    "preview": "import { find } from \"./templating.js\";\n\nconst AUTH_ENDPOINT = pageData.baseURL + \"/api/authenticate\";\n\nconst showPasswo"
  },
  {
    "path": "internal/glance/static/js/masonry.js",
    "chars": 1612,
    "preview": "\nimport { clamp } from \"./utils.js\";\n\nexport function setupMasonries() {\n    const masonryContainers = document.getEleme"
  },
  {
    "path": "internal/glance/static/js/page.js",
    "chars": 24737,
    "preview": "import { setupPopovers } from './popover.js';\nimport { setupMasonries } from './masonry.js';\nimport { throttledDebounce,"
  },
  {
    "path": "internal/glance/static/js/popover.js",
    "chars": 7953,
    "preview": "const defaultShowDelayMs = 200;\nconst defaultHideDelayMs = 500;\nconst defaultMaxWidth = \"300px\";\nconst defaultDistanceFr"
  },
  {
    "path": "internal/glance/static/js/templating.js",
    "chars": 4243,
    "preview": "export function elem(tag = \"div\") {\n    return document.createElement(tag);\n}\n\nexport function fragment(...children) {\n "
  },
  {
    "path": "internal/glance/static/js/todo.js",
    "chars": 14899,
    "preview": "import { elem, fragment } from \"./templating.js\";\nimport { animateReposition } from \"./animations.js\";\nimport { clamp, V"
  },
  {
    "path": "internal/glance/static/js/utils.js",
    "chars": 2054,
    "preview": "export function throttledDebounce(callback, maxDebounceTimes, debounceDelay) {\n    let debounceTimeout;\n    let timesDeb"
  },
  {
    "path": "internal/glance/templates/bookmarks.html",
    "chars": 1285,
    "preview": "{{ template \"widget-base.html\" . }}\n\n{{ define \"widget-content\" }}\n<div class=\"dynamic-columns list-gap-24 list-with-sep"
  },
  {
    "path": "internal/glance/templates/calendar.html",
    "chars": 200,
    "preview": "{{ template \"widget-base.html\" . }}\n\n{{ define \"widget-content\" }}\n<div class=\"widget-small-content-bounds\">\n    <div cl"
  },
  {
    "path": "internal/glance/templates/change-detection.html",
    "chars": 708,
    "preview": "{{ template \"widget-base.html\" . }}\n\n{{ define \"widget-content\" }}\n<ul class=\"list list-gap-14 collapsible-container\" da"
  },
  {
    "path": "internal/glance/templates/clock.html",
    "chars": 1085,
    "preview": "{{ template \"widget-base.html\" . }}\n\n{{ define \"widget-content\" }}\n<div class=\"clock\" data-hour-format=\"{{ .HourFormat }"
  },
  {
    "path": "internal/glance/templates/custom-api.html",
    "chars": 197,
    "preview": "{{ template \"widget-base.html\" . }}\n\n{{ define \"widget-content-classes\" }}{{ if .Frameless }}widget-content-frameless{{ "
  },
  {
    "path": "internal/glance/templates/dns-stats.html",
    "chars": 4347,
    "preview": "{{ template \"widget-base.html\" . }}\n\n{{ define \"widget-content\" }}\n<div class=\"widget-small-content-bounds dns-stats\">\n "
  },
  {
    "path": "internal/glance/templates/docker-containers.html",
    "chars": 4062,
    "preview": "{{ template \"widget-base.html\" . }}\n\n{{- define \"widget-content\" }}\n<ul class=\"dynamic-columns list-gap-20 list-with-sep"
  },
  {
    "path": "internal/glance/templates/document.html",
    "chars": 1885,
    "preview": "<!DOCTYPE html>\n<html lang=\"en\" id=\"top\" data-theme=\"{{ .Request.Theme.Key }}\" data-scheme=\"{{ if .Request.Theme.Light }"
  },
  {
    "path": "internal/glance/templates/extension.html",
    "chars": 212,
    "preview": "{{ template \"widget-base.html\" . }}\n\n{{ define \"widget-content-classes\" }}{{ if .Extension.Frameless }}widget-content-fr"
  },
  {
    "path": "internal/glance/templates/footer.html",
    "chars": 619,
    "preview": "{{ if not .App.Config.Branding.HideFooter }}\n<footer class=\"footer flex items-center flex-column\">\n{{ if eq \"\" .App.Conf"
  },
  {
    "path": "internal/glance/templates/forum-posts.html",
    "chars": 3328,
    "preview": "{{ template \"widget-base.html\" . }}\n\n{{- define \"widget-content\" }}\n<ul class=\"list list-gap-14 collapsible-container\" d"
  },
  {
    "path": "internal/glance/templates/group.html",
    "chars": 1078,
    "preview": "{{ template \"widget-base.html\" . }}\n\n{{ define \"widget-content-classes\" }}widget-content-frameless{{ end }}\n\n{{ define \""
  },
  {
    "path": "internal/glance/templates/iframe.html",
    "chars": 241,
    "preview": "{{ template \"widget-base.html\" . }}\n\n{{ define \"widget-content-classes\" }}widget-content-frameless{{ end }}\n\n{{ define \""
  },
  {
    "path": "internal/glance/templates/login.html",
    "chars": 3187,
    "preview": "{{- template \"document.html\" . }}\n\n{{- define \"document-title\" }}Login{{ end }}\n\n{{- define \"document-head-before\" }}\n<l"
  },
  {
    "path": "internal/glance/templates/manifest.json",
    "chars": 429,
    "preview": "{\n    \"name\": \"{{ .App.Config.Branding.AppName }}\",\n    \"display\": \"standalone\",\n    \"background_color\": \"{{ .App.Config"
  },
  {
    "path": "internal/glance/templates/markets.html",
    "chars": 1314,
    "preview": "{{ template \"widget-base.html\" . }}\n\n{{ define \"widget-content\" }}\n<div class=\"dynamic-columns list-gap-20 list-with-sep"
  },
  {
    "path": "internal/glance/templates/monitor-compact.html",
    "chars": 2268,
    "preview": "{{ template \"widget-base.html\" . }}\n\n{{ define \"widget-content\" }}\n{{ if not (and .ShowFailingOnly (not .HasFailing)) }}"
  },
  {
    "path": "internal/glance/templates/monitor.html",
    "chars": 2662,
    "preview": "{{ template \"widget-base.html\" . }}\n\n{{ define \"widget-content\" }}\n{{ if not (and .ShowFailingOnly (not .HasFailing)) }}"
  },
  {
    "path": "internal/glance/templates/old-calendar.html",
    "chars": 1243,
    "preview": "{{ template \"widget-base.html\" . }}\n\n{{ define \"widget-content\" }}\n<div class=\"widget-small-content-bounds\">\n    <div cl"
  },
  {
    "path": "internal/glance/templates/page-content.html",
    "chars": 457,
    "preview": "{{ if .Page.ShowMobileHeader }}\n<div class=\"mobile-reachability-header\">{{ .Page.Title }}</div>\n{{ end }}\n\n{{ if .Page.H"
  },
  {
    "path": "internal/glance/templates/page.html",
    "chars": 7334,
    "preview": "{{ template \"document.html\" . }}\n\n{{ define \"document-title\" }}{{ .Page.Title }}{{ end }}\n\n{{ define \"document-head-afte"
  },
  {
    "path": "internal/glance/templates/reddit-horizontal-cards.html",
    "chars": 1480,
    "preview": "{{ template \"widget-base.html\" . }}\n\n{{ define \"widget-content-classes\" }}widget-content-frameless{{ end }}\n\n{{ define \""
  },
  {
    "path": "internal/glance/templates/reddit-vertical-cards.html",
    "chars": 1281,
    "preview": "{{ template \"widget-base.html\" . }}\n\n{{ define \"widget-content-classes\" }}widget-content-frameless{{ end }}\n\n{{ define \""
  },
  {
    "path": "internal/glance/templates/releases.html",
    "chars": 889,
    "preview": "{{ template \"widget-base.html\" . }}\n\n{{ define \"widget-content\" }}\n<ul class=\"list list-gap-10 collapsible-container\" da"
  },
  {
    "path": "internal/glance/templates/repository.html",
    "chars": 2811,
    "preview": "{{ template \"widget-base.html\" . }}\n\n{{ define \"widget-content\" }}\n<a class=\"size-h4 color-highlight\" href=\"https://gith"
  },
  {
    "path": "internal/glance/templates/rss-detailed-list.html",
    "chars": 2095,
    "preview": "{{ template \"widget-base.html\" . }}\n\n{{ define \"widget-content\" }}\n<ul class=\"list list-gap-24 collapsible-container\" da"
  },
  {
    "path": "internal/glance/templates/rss-horizontal-cards-2.html",
    "chars": 1904,
    "preview": "{{ template \"widget-base.html\" . }}\n\n{{ define \"widget-content-classes\" }}widget-content-frameless{{ end }}\n\n{{ define \""
  },
  {
    "path": "internal/glance/templates/rss-horizontal-cards.html",
    "chars": 1915,
    "preview": "{{ template \"widget-base.html\" . }}\n\n{{ define \"widget-content-classes\" }}widget-content-frameless{{ end }}\n\n{{ define \""
  },
  {
    "path": "internal/glance/templates/rss-list.html",
    "chars": 797,
    "preview": "{{ template \"widget-base.html\" . }}\n\n{{ define \"widget-content\" }}\n<ul class=\"list list-gap-14 collapsible-container{{ i"
  },
  {
    "path": "internal/glance/templates/search.html",
    "chars": 1173,
    "preview": "{{ template \"widget-base.html\" . }}\n\n{{ define \"widget-content-classes\" }}widget-content-frameless{{ end }}\n\n{{ define \""
  },
  {
    "path": "internal/glance/templates/server-stats.html",
    "chars": 9219,
    "preview": "{{ template \"widget-base.html\" . }}\n\n{{- define \"widget-content\" }}\n{{- range .Servers }}\n<div class=\"server\">\n    <div "
  },
  {
    "path": "internal/glance/templates/split-column.html",
    "chars": 264,
    "preview": "{{ template \"widget-base.html\" . }}\n\n{{ define \"widget-content-classes\" }}widget-content-frameless{{ end }}\n\n{{ define \""
  },
  {
    "path": "internal/glance/templates/theme-preset-preview.html",
    "chars": 965,
    "preview": "{{- $background := \"hsl(240, 8%, 9%)\" | safeCSS }}\n{{- $primary := \"hsl(43, 50%, 70%)\" | safeCSS  }}\n{{- $positive := \"h"
  },
  {
    "path": "internal/glance/templates/theme-style.gotmpl",
    "chars": 618,
    "preview": ":root {\n    {{ if .BackgroundColor }}\n    --bgh: {{ .BackgroundColor.H }};\n    --bgs: {{ .BackgroundColor.S }}%;\n    --b"
  },
  {
    "path": "internal/glance/templates/todo.html",
    "chars": 131,
    "preview": "{{ template \"widget-base.html\" . }}\n\n{{ define \"widget-content\" }}\n<div class=\"todo\" data-todo-id=\"{{ .TodoID }}\"></div>"
  },
  {
    "path": "internal/glance/templates/twitch-channels.html",
    "chars": 2714,
    "preview": "{{ template \"widget-base.html\" . }}\n\n{{ define \"widget-content\" }}\n<ul class=\"list list-gap-14 collapsible-container\" da"
  },
  {
    "path": "internal/glance/templates/twitch-games-list.html",
    "chars": 1379,
    "preview": "{{ template \"widget-base.html\" . }}\n\n{{ define \"widget-content\" }}\n<ul class=\"list list-gap-14 collapsible-container\" da"
  },
  {
    "path": "internal/glance/templates/v0.7-update-notice-page.html",
    "chars": 1450,
    "preview": "<!DOCTYPE html>\n<html lang=\"en\">\n<head>\n    <meta charset=\"UTF-8\">\n    <meta name=\"viewport\" content=\"width=device-width"
  },
  {
    "path": "internal/glance/templates/video-card-contents.html",
    "chars": 712,
    "preview": "{{ define \"video-card-contents\" }}\n<img class=\"video-thumbnail thumbnail\" loading=\"lazy\" src=\"{{ .ThumbnailUrl }}\" alt=\""
  },
  {
    "path": "internal/glance/templates/videos-grid.html",
    "chars": 412,
    "preview": "{{ template \"widget-base.html\" . }}\n\n{{ define \"widget-content-classes\" }}widget-content-frameless{{ end }}\n\n{{ define \""
  },
  {
    "path": "internal/glance/templates/videos-vertical-list.html",
    "chars": 951,
    "preview": "{{ template \"widget-base.html\" . }}\n\n{{- define \"widget-content\" }}\n<ul class=\"list list-gap-14 collapsible-container\" d"
  },
  {
    "path": "internal/glance/templates/videos.html",
    "chars": 437,
    "preview": "{{ template \"widget-base.html\" . }}\n\n{{ define \"widget-content-classes\" }}widget-content-frameless{{ end }}\n\n{{ define \""
  },
  {
    "path": "internal/glance/templates/weather.html",
    "chars": 1724,
    "preview": "{{ template \"widget-base.html\" . }}\n\n{{ define \"widget-content\" }}\n<div class=\"widget-small-content-bounds\">\n    <div cl"
  },
  {
    "path": "internal/glance/templates/widget-base.html",
    "chars": 2744,
    "preview": "<div class=\"widget widget-type-{{ .GetType }}{{ if .CSSClass }} {{ .CSSClass }}{{ end }}\">\n    {{- if not .HideHeader }}"
  },
  {
    "path": "internal/glance/templates.go",
    "chars": 2197,
    "preview": "package glance\n\nimport (\n\t\"fmt\"\n\t\"html/template\"\n\t\"math\"\n\t\"strconv\"\n\n\t\"golang.org/x/text/language\"\n\t\"golang.org/x/text/m"
  },
  {
    "path": "internal/glance/theme.go",
    "chars": 2874,
    "preview": "package glance\n\nimport (\n\t\"fmt\"\n\t\"html/template\"\n\t\"net/http\"\n\t\"time\"\n)\n\nvar (\n\tthemeStyleTemplate         = mustParseTem"
  },
  {
    "path": "internal/glance/utils.go",
    "chars": 4830,
    "preview": "package glance\n\nimport (\n\t\"bytes\"\n\t\"fmt\"\n\t\"html/template\"\n\t\"math\"\n\t\"net/http\"\n\t\"net/url\"\n\t\"os\"\n\t\"regexp\"\n\t\"slices\"\n\t\"str"
  },
  {
    "path": "internal/glance/widget-bookmarks.go",
    "chars": 2094,
    "preview": "package glance\n\nimport (\n\t\"html/template\"\n)\n\nvar bookmarksWidgetTemplate = mustParseTemplate(\"bookmarks.html\", \"widget-b"
  },
  {
    "path": "internal/glance/widget-calendar.go",
    "chars": 1139,
    "preview": "package glance\n\nimport (\n\t\"errors\"\n\t\"html/template\"\n\t\"time\"\n)\n\nvar calendarWidgetTemplate = mustParseTemplate(\"calendar."
  },
  {
    "path": "internal/glance/widget-changedetection.go",
    "chars": 4941,
    "preview": "package glance\n\nimport (\n\t\"context\"\n\t\"fmt\"\n\t\"html/template\"\n\t\"log/slog\"\n\t\"net/http\"\n\t\"sort\"\n\t\"strings\"\n\t\"time\"\n)\n\nvar ch"
  },
  {
    "path": "internal/glance/widget-clock.go",
    "chars": 1156,
    "preview": "package glance\n\nimport (\n\t\"errors\"\n\t\"fmt\"\n\t\"html/template\"\n\t\"time\"\n)\n\nvar clockWidgetTemplate = mustParseTemplate(\"clock"
  },
  {
    "path": "internal/glance/widget-container.go",
    "chars": 1029,
    "preview": "package glance\n\nimport (\n\t\"context\"\n\t\"sync\"\n\t\"time\"\n)\n\ntype containerWidgetBase struct {\n\tWidgets widgets `yaml:\"widgets"
  },
  {
    "path": "internal/glance/widget-custom-api.go",
    "chars": 18864,
    "preview": "package glance\n\nimport (\n\t\"bytes\"\n\t\"context\"\n\t\"encoding/json\"\n\t\"errors\"\n\t\"fmt\"\n\t\"html/template\"\n\t\"io\"\n\t\"log/slog\"\n\t\"math"
  },
  {
    "path": "internal/glance/widget-dns-stats.go",
    "chars": 23224,
    "preview": "package glance\n\nimport (\n\t\"bytes\"\n\t\"context\"\n\t\"encoding/json\"\n\t\"errors\"\n\t\"fmt\"\n\t\"html/template\"\n\t\"io\"\n\t\"log/slog\"\n\t\"net/"
  },
  {
    "path": "internal/glance/widget-docker-containers.go",
    "chars": 10168,
    "preview": "package glance\n\nimport (\n\t\"context\"\n\t\"encoding/json\"\n\t\"fmt\"\n\t\"html/template\"\n\t\"net\"\n\t\"net/http\"\n\t\"net/url\"\n\t\"sort\"\n\t\"str"
  },
  {
    "path": "internal/glance/widget-extension.go",
    "chars": 4680,
    "preview": "package glance\n\nimport (\n\t\"context\"\n\t\"errors\"\n\t\"fmt\"\n\t\"html\"\n\t\"html/template\"\n\t\"io\"\n\t\"log/slog\"\n\t\"net/http\"\n\t\"net/url\"\n\t"
  },
  {
    "path": "internal/glance/widget-group.go",
    "chars": 1242,
    "preview": "package glance\n\nimport (\n\t\"context\"\n\t\"errors\"\n\t\"html/template\"\n\t\"time\"\n)\n\nvar groupWidgetTemplate = mustParseTemplate(\"g"
  },
  {
    "path": "internal/glance/widget-hacker-news.go",
    "chars": 4066,
    "preview": "package glance\n\nimport (\n\t\"context\"\n\t\"fmt\"\n\t\"html/template\"\n\t\"log/slog\"\n\t\"net/http\"\n\t\"strconv\"\n\t\"strings\"\n\t\"time\"\n)\n\ntyp"
  },
  {
    "path": "internal/glance/widget-html.go",
    "chars": 319,
    "preview": "package glance\n\nimport (\n\t\"html/template\"\n)\n\ntype htmlWidget struct {\n\twidgetBase `yaml:\",inline\"`\n\tSource     template."
  },
  {
    "path": "internal/glance/widget-iframe.go",
    "chars": 875,
    "preview": "package glance\n\nimport (\n\t\"errors\"\n\t\"fmt\"\n\t\"html/template\"\n\t\"net/url\"\n)\n\nvar iframeWidgetTemplate = mustParseTemplate(\"i"
  },
  {
    "path": "internal/glance/widget-lobsters.go",
    "chars": 3410,
    "preview": "package glance\n\nimport (\n\t\"context\"\n\t\"html/template\"\n\t\"net/http\"\n\t\"strings\"\n\t\"time\"\n)\n\ntype lobstersWidget struct {\n\twid"
  },
  {
    "path": "internal/glance/widget-markets.go",
    "chars": 5612,
    "preview": "package glance\n\nimport (\n\t\"context\"\n\t\"fmt\"\n\t\"html/template\"\n\t\"log/slog\"\n\t\"math\"\n\t\"net/http\"\n\t\"sort\"\n\t\"strings\"\n\t\"time\"\n)"
  },
  {
    "path": "internal/glance/widget-monitor.go",
    "chars": 4743,
    "preview": "package glance\n\nimport (\n\t\"context\"\n\t\"errors\"\n\t\"html/template\"\n\t\"net/http\"\n\t\"slices\"\n\t\"strconv\"\n\t\"time\"\n)\n\nvar (\n\tmonito"
  },
  {
    "path": "internal/glance/widget-old-calendar.go",
    "chars": 2027,
    "preview": "package glance\n\nimport (\n\t\"context\"\n\t\"html/template\"\n\t\"time\"\n)\n\nvar oldCalendarWidgetTemplate = mustParseTemplate(\"old-c"
  },
  {
    "path": "internal/glance/widget-reddit.go",
    "chars": 8817,
    "preview": "package glance\n\nimport (\n\t\"context\"\n\t\"errors\"\n\t\"fmt\"\n\t\"html\"\n\t\"html/template\"\n\t\"net/http\"\n\t\"net/url\"\n\t\"strconv\"\n\t\"string"
  },
  {
    "path": "internal/glance/widget-releases.go",
    "chars": 10768,
    "preview": "package glance\n\nimport (\n\t\"context\"\n\t\"errors\"\n\t\"fmt\"\n\t\"html/template\"\n\t\"log/slog\"\n\t\"net/http\"\n\t\"net/url\"\n\t\"sort\"\n\t\"strin"
  },
  {
    "path": "internal/glance/widget-repository.go",
    "chars": 6684,
    "preview": "package glance\n\nimport (\n\t\"context\"\n\t\"fmt\"\n\t\"html/template\"\n\t\"net/http\"\n\t\"strings\"\n\t\"sync\"\n\t\"time\"\n)\n\nvar repositoryWidg"
  },
  {
    "path": "internal/glance/widget-rss.go",
    "chars": 9794,
    "preview": "package glance\n\nimport (\n\t\"context\"\n\t\"fmt\"\n\t\"html\"\n\t\"html/template\"\n\t\"io\"\n\t\"log/slog\"\n\t\"net/http\"\n\t\"net/url\"\n\t\"regexp\"\n\t"
  },
  {
    "path": "internal/glance/widget-search.go",
    "chars": 2100,
    "preview": "package glance\n\nimport (\n\t\"fmt\"\n\t\"html/template\"\n\t\"strings\"\n)\n\nvar searchWidgetTemplate = mustParseTemplate(\"search.html"
  },
  {
    "path": "internal/glance/widget-server-stats.go",
    "chars": 3148,
    "preview": "package glance\n\nimport (\n\t\"context\"\n\t\"html/template\"\n\t\"log/slog\"\n\t\"net/http\"\n\t\"strconv\"\n\t\"strings\"\n\t\"sync\"\n\t\"time\"\n\n\t\"gi"
  },
  {
    "path": "internal/glance/widget-shared.go",
    "chars": 1534,
    "preview": "package glance\n\nimport (\n\t\"math\"\n\t\"sort\"\n\t\"time\"\n)\n\nconst twitchGqlEndpoint = \"https://gql.twitch.tv/gql\"\nconst twitchGq"
  },
  {
    "path": "internal/glance/widget-split-column.go",
    "chars": 1092,
    "preview": "package glance\n\nimport (\n\t\"context\"\n\t\"html/template\"\n\t\"time\"\n)\n\nvar splitColumnWidgetTemplate = mustParseTemplate(\"split"
  },
  {
    "path": "internal/glance/widget-todo.go",
    "chars": 509,
    "preview": "package glance\n\nimport (\n\t\"html/template\"\n)\n\nvar todoWidgetTemplate = mustParseTemplate(\"todo.html\", \"widget-base.html\")"
  },
  {
    "path": "internal/glance/widget-twitch-channels.go",
    "chars": 6781,
    "preview": "package glance\n\nimport (\n\t\"context\"\n\t\"encoding/json\"\n\t\"fmt\"\n\t\"html/template\"\n\t\"log/slog\"\n\t\"net/http\"\n\t\"sort\"\n\t\"strings\"\n"
  },
  {
    "path": "internal/glance/widget-twitch-top-games.go",
    "chars": 3345,
    "preview": "package glance\n\nimport (\n\t\"context\"\n\t\"errors\"\n\t\"fmt\"\n\t\"html/template\"\n\t\"net/http\"\n\t\"slices\"\n\t\"strings\"\n\t\"time\"\n)\n\nvar tw"
  },
  {
    "path": "internal/glance/widget-utils.go",
    "chars": 5074,
    "preview": "package glance\n\nimport (\n\t\"context\"\n\t\"crypto/tls\"\n\t\"encoding/json\"\n\t\"encoding/xml\"\n\t\"errors\"\n\t\"fmt\"\n\t\"io\"\n\t\"math/rand/v2"
  },
  {
    "path": "internal/glance/widget-videos.go",
    "chars": 5840,
    "preview": "package glance\n\nimport (\n\t\"context\"\n\t\"fmt\"\n\t\"html/template\"\n\t\"log/slog\"\n\t\"net/http\"\n\t\"net/url\"\n\t\"sort\"\n\t\"strings\"\n\t\"time"
  },
  {
    "path": "internal/glance/widget-weather.go",
    "chars": 8678,
    "preview": "package glance\n\nimport (\n\t\"context\"\n\t\"errors\"\n\t\"fmt\"\n\t\"html/template\"\n\t\"math\"\n\t\"net/http\"\n\t\"net/url\"\n\t\"slices\"\n\t\"strings"
  },
  {
    "path": "internal/glance/widget.go",
    "chars": 8257,
    "preview": "package glance\n\nimport (\n\t\"bytes\"\n\t\"context\"\n\t\"errors\"\n\t\"fmt\"\n\t\"html/template\"\n\t\"log/slog\"\n\t\"math\"\n\t\"net/http\"\n\t\"sync/at"
  },
  {
    "path": "main.go",
    "chars": 120,
    "preview": "package main\n\nimport (\n\t\"os\"\n\n\t\"github.com/glanceapp/glance/internal/glance\"\n)\n\nfunc main() {\n\tos.Exit(glance.Main())\n}\n"
  },
  {
    "path": "pkg/sysinfo/sysinfo.go",
    "chars": 8489,
    "preview": "package sysinfo\n\nimport (\n\t\"fmt\"\n\t\"math\"\n\t\"os\"\n\t\"runtime\"\n\t\"sort\"\n\t\"strconv\"\n\t\"time\"\n\n\t\"github.com/shirou/gopsutil/v4/cp"
  }
]

About this extraction

This page contains the full source code of the glanceapp/glance GitHub repository, extracted and formatted as plain text for AI agents and large language models (LLMs). The extraction includes 148 files (647.6 KB), approximately 180.8k tokens, and a symbol index with 581 extracted functions, classes, methods, constants, and types. Use this with OpenClaw, Claude, ChatGPT, Cursor, Windsurf, or any other AI tool that accepts text input. You can copy the full output to your clipboard or download it as a .txt file.

Extracted by GitExtract — free GitHub repo to text converter for AI. Built by Nikandr Surkov.

Copied to clipboard!