Full Code of caelestia-dots/shell for AI

main b64421d614e9 cached
367 files
1.5 MB
329.7k tokens
232 symbols
1 requests
Download .txt
Showing preview only (1,661K chars total). Download the full file or copy to clipboard to get everything.
Repository: caelestia-dots/shell
Branch: main
Commit: b64421d614e9
Files: 367
Total size: 1.5 MB

Directory structure:
gitextract_jcsh79_s/

├── .clang-format
├── .envrc
├── .github/
│   ├── CONTRIBUTING.md
│   ├── FUNDING.yml
│   ├── ISSUE_TEMPLATE/
│   │   ├── config.yml
│   │   ├── feature.yml
│   │   └── issue.yml
│   └── workflows/
│       ├── check-format.yml
│       ├── release.yml
│       ├── update-flake-inputs.yml
│       └── update-image.yml
├── .gitignore
├── .vscode/
│   └── settings.json
├── CMakeLists.txt
├── LICENSE
├── README.md
├── assets/
│   ├── pam.d/
│   │   ├── fprint
│   │   └── passwd
│   ├── shaders/
│   │   ├── fade.frag
│   │   ├── fade.frag.qsb
│   │   ├── opacitymask.frag
│   │   └── opacitymask.frag.qsb
│   └── wrap_term_launch.sh
├── components/
│   ├── Anim.qml
│   ├── CAnim.qml
│   ├── ConnectionHeader.qml
│   ├── ConnectionInfoSection.qml
│   ├── DashboardState.qml
│   ├── DrawerVisibilities.qml
│   ├── Logo.qml
│   ├── MaterialIcon.qml
│   ├── PropertyRow.qml
│   ├── SectionContainer.qml
│   ├── SectionHeader.qml
│   ├── StateLayer.qml
│   ├── StyledClippingRect.qml
│   ├── StyledRect.qml
│   ├── StyledText.qml
│   ├── containers/
│   │   ├── StyledFlickable.qml
│   │   ├── StyledListView.qml
│   │   └── StyledWindow.qml
│   ├── controls/
│   │   ├── CircularIndicator.qml
│   │   ├── CircularProgress.qml
│   │   ├── CollapsibleSection.qml
│   │   ├── CustomMouseArea.qml
│   │   ├── CustomSpinBox.qml
│   │   ├── FilledSlider.qml
│   │   ├── IconButton.qml
│   │   ├── IconTextButton.qml
│   │   ├── Menu.qml
│   │   ├── MenuItem.qml
│   │   ├── SpinBoxRow.qml
│   │   ├── SplitButton.qml
│   │   ├── SplitButtonRow.qml
│   │   ├── StyledInputField.qml
│   │   ├── StyledRadioButton.qml
│   │   ├── StyledScrollBar.qml
│   │   ├── StyledSlider.qml
│   │   ├── StyledSwitch.qml
│   │   ├── StyledTextField.qml
│   │   ├── SwitchRow.qml
│   │   ├── TextButton.qml
│   │   ├── ToggleButton.qml
│   │   ├── ToggleRow.qml
│   │   └── Tooltip.qml
│   ├── effects/
│   │   ├── ColouredIcon.qml
│   │   ├── Colouriser.qml
│   │   ├── Elevation.qml
│   │   ├── InnerBorder.qml
│   │   └── OpacityMask.qml
│   ├── filedialog/
│   │   ├── CurrentItem.qml
│   │   ├── DialogButtons.qml
│   │   ├── FileDialog.qml
│   │   ├── FolderContents.qml
│   │   ├── HeaderBar.qml
│   │   ├── Sidebar.qml
│   │   └── Sizes.qml
│   ├── images/
│   │   ├── CachingIconImage.qml
│   │   └── CachingImage.qml
│   ├── misc/
│   │   ├── CustomShortcut.qml
│   │   └── Ref.qml
│   └── widgets/
│       └── ExtraIndicator.qml
├── config/
│   ├── Appearance.qml
│   ├── AppearanceConfig.qml
│   ├── BackgroundConfig.qml
│   ├── BarConfig.qml
│   ├── BorderConfig.qml
│   ├── Config.qml
│   ├── ControlCenterConfig.qml
│   ├── DashboardConfig.qml
│   ├── GeneralConfig.qml
│   ├── LauncherConfig.qml
│   ├── LockConfig.qml
│   ├── NotifsConfig.qml
│   ├── OsdConfig.qml
│   ├── ServiceConfig.qml
│   ├── SessionConfig.qml
│   ├── SidebarConfig.qml
│   ├── UserPaths.qml
│   ├── UtilitiesConfig.qml
│   └── WInfoConfig.qml
├── extras/
│   ├── CMakeLists.txt
│   └── version.cpp
├── flake.nix
├── modules/
│   ├── BatteryMonitor.qml
│   ├── IdleMonitors.qml
│   ├── Shortcuts.qml
│   ├── areapicker/
│   │   ├── AreaPicker.qml
│   │   └── Picker.qml
│   ├── background/
│   │   ├── Background.qml
│   │   ├── DesktopClock.qml
│   │   ├── Visualiser.qml
│   │   └── Wallpaper.qml
│   ├── bar/
│   │   ├── Bar.qml
│   │   ├── BarWrapper.qml
│   │   ├── components/
│   │   │   ├── ActiveWindow.qml
│   │   │   ├── Clock.qml
│   │   │   ├── OsIcon.qml
│   │   │   ├── Power.qml
│   │   │   ├── Settings.qml
│   │   │   ├── SettingsIcon.qml
│   │   │   ├── StatusIcons.qml
│   │   │   ├── Tray.qml
│   │   │   ├── TrayItem.qml
│   │   │   └── workspaces/
│   │   │       ├── ActiveIndicator.qml
│   │   │       ├── OccupiedBg.qml
│   │   │       ├── SpecialWorkspaces.qml
│   │   │       ├── Workspace.qml
│   │   │       └── Workspaces.qml
│   │   └── popouts/
│   │       ├── ActiveWindow.qml
│   │       ├── Audio.qml
│   │       ├── Background.qml
│   │       ├── Battery.qml
│   │       ├── Bluetooth.qml
│   │       ├── Content.qml
│   │       ├── LockStatus.qml
│   │       ├── Network.qml
│   │       ├── PopoutState.qml
│   │       ├── TrayMenu.qml
│   │       ├── WirelessPassword.qml
│   │       ├── Wrapper.qml
│   │       └── kblayout/
│   │           ├── KbLayout.qml
│   │           └── KbLayoutModel.qml
│   ├── controlcenter/
│   │   ├── ControlCenter.qml
│   │   ├── NavRail.qml
│   │   ├── PaneRegistry.qml
│   │   ├── Panes.qml
│   │   ├── Session.qml
│   │   ├── WindowFactory.qml
│   │   ├── WindowTitle.qml
│   │   ├── appearance/
│   │   │   ├── AppearancePane.qml
│   │   │   └── sections/
│   │   │       ├── AnimationsSection.qml
│   │   │       ├── BackgroundSection.qml
│   │   │       ├── BorderSection.qml
│   │   │       ├── ColorSchemeSection.qml
│   │   │       ├── ColorVariantSection.qml
│   │   │       ├── FontsSection.qml
│   │   │       ├── ScalesSection.qml
│   │   │       ├── ThemeModeSection.qml
│   │   │       └── TransparencySection.qml
│   │   ├── audio/
│   │   │   └── AudioPane.qml
│   │   ├── bluetooth/
│   │   │   ├── BtPane.qml
│   │   │   ├── Details.qml
│   │   │   ├── DeviceList.qml
│   │   │   └── Settings.qml
│   │   ├── components/
│   │   │   ├── ConnectedButtonGroup.qml
│   │   │   ├── DeviceDetails.qml
│   │   │   ├── DeviceList.qml
│   │   │   ├── PaneTransition.qml
│   │   │   ├── ReadonlySlider.qml
│   │   │   ├── SettingsHeader.qml
│   │   │   ├── SliderInput.qml
│   │   │   ├── SplitPaneLayout.qml
│   │   │   ├── SplitPaneWithDetails.qml
│   │   │   └── WallpaperGrid.qml
│   │   ├── dashboard/
│   │   │   ├── DashboardPane.qml
│   │   │   ├── GeneralSection.qml
│   │   │   └── PerformanceSection.qml
│   │   ├── launcher/
│   │   │   ├── LauncherPane.qml
│   │   │   └── Settings.qml
│   │   ├── network/
│   │   │   ├── EthernetDetails.qml
│   │   │   ├── EthernetList.qml
│   │   │   ├── EthernetPane.qml
│   │   │   ├── EthernetSettings.qml
│   │   │   ├── NetworkSettings.qml
│   │   │   ├── NetworkingPane.qml
│   │   │   ├── VpnDetails.qml
│   │   │   ├── VpnList.qml
│   │   │   ├── VpnSettings.qml
│   │   │   ├── WirelessDetails.qml
│   │   │   ├── WirelessList.qml
│   │   │   ├── WirelessPane.qml
│   │   │   ├── WirelessPasswordDialog.qml
│   │   │   └── WirelessSettings.qml
│   │   ├── state/
│   │   │   ├── BluetoothState.qml
│   │   │   ├── EthernetState.qml
│   │   │   ├── LauncherState.qml
│   │   │   ├── NetworkState.qml
│   │   │   └── VpnState.qml
│   │   └── taskbar/
│   │       └── TaskbarPane.qml
│   ├── dashboard/
│   │   ├── Background.qml
│   │   ├── Content.qml
│   │   ├── Dash.qml
│   │   ├── LyricMenu.qml
│   │   ├── LyricsView.qml
│   │   ├── Media.qml
│   │   ├── MediaWrapper.qml
│   │   ├── Performance.qml
│   │   ├── Tabs.qml
│   │   ├── Weather.qml
│   │   ├── Wrapper.qml
│   │   └── dash/
│   │       ├── Calendar.qml
│   │       ├── DateTime.qml
│   │       ├── Media.qml
│   │       ├── Resources.qml
│   │       ├── User.qml
│   │       └── Weather.qml
│   ├── drawers/
│   │   ├── Backgrounds.qml
│   │   ├── Border.qml
│   │   ├── Drawers.qml
│   │   ├── Exclusions.qml
│   │   ├── Interactions.qml
│   │   └── Panels.qml
│   ├── launcher/
│   │   ├── AppList.qml
│   │   ├── Background.qml
│   │   ├── Content.qml
│   │   ├── ContentList.qml
│   │   ├── WallpaperList.qml
│   │   ├── Wrapper.qml
│   │   ├── items/
│   │   │   ├── ActionItem.qml
│   │   │   ├── AppItem.qml
│   │   │   ├── CalcItem.qml
│   │   │   ├── SchemeItem.qml
│   │   │   ├── VariantItem.qml
│   │   │   └── WallpaperItem.qml
│   │   └── services/
│   │       ├── Actions.qml
│   │       ├── Apps.qml
│   │       ├── M3Variants.qml
│   │       └── Schemes.qml
│   ├── lock/
│   │   ├── Center.qml
│   │   ├── Content.qml
│   │   ├── Fetch.qml
│   │   ├── InputField.qml
│   │   ├── Lock.qml
│   │   ├── LockSurface.qml
│   │   ├── Media.qml
│   │   ├── NotifDock.qml
│   │   ├── NotifGroup.qml
│   │   ├── Pam.qml
│   │   ├── Resources.qml
│   │   └── WeatherInfo.qml
│   ├── notifications/
│   │   ├── Background.qml
│   │   ├── Content.qml
│   │   ├── Notification.qml
│   │   └── Wrapper.qml
│   ├── osd/
│   │   ├── Background.qml
│   │   ├── Content.qml
│   │   └── Wrapper.qml
│   ├── session/
│   │   ├── Background.qml
│   │   ├── Content.qml
│   │   └── Wrapper.qml
│   ├── sidebar/
│   │   ├── Background.qml
│   │   ├── Content.qml
│   │   ├── Notif.qml
│   │   ├── NotifActionList.qml
│   │   ├── NotifDock.qml
│   │   ├── NotifDockList.qml
│   │   ├── NotifGroup.qml
│   │   ├── NotifGroupList.qml
│   │   ├── Props.qml
│   │   └── Wrapper.qml
│   ├── utilities/
│   │   ├── Background.qml
│   │   ├── Content.qml
│   │   ├── RecordingDeleteModal.qml
│   │   ├── Wrapper.qml
│   │   ├── cards/
│   │   │   ├── IdleInhibit.qml
│   │   │   ├── Record.qml
│   │   │   ├── RecordingList.qml
│   │   │   └── Toggles.qml
│   │   └── toasts/
│   │       ├── ToastItem.qml
│   │       └── Toasts.qml
│   └── windowinfo/
│       ├── Buttons.qml
│       ├── Details.qml
│       ├── Preview.qml
│       └── WindowInfo.qml
├── nix/
│   ├── default.nix
│   └── hm-module.nix
├── plugin/
│   ├── CMakeLists.txt
│   └── src/
│       └── Caelestia/
│           ├── CMakeLists.txt
│           ├── Internal/
│           │   ├── CMakeLists.txt
│           │   ├── arcgauge.cpp
│           │   ├── arcgauge.hpp
│           │   ├── cachingimagemanager.cpp
│           │   ├── cachingimagemanager.hpp
│           │   ├── circularbuffer.cpp
│           │   ├── circularbuffer.hpp
│           │   ├── circularindicatormanager.cpp
│           │   ├── circularindicatormanager.hpp
│           │   ├── hyprdevices.cpp
│           │   ├── hyprdevices.hpp
│           │   ├── hyprextras.cpp
│           │   ├── hyprextras.hpp
│           │   ├── logindmanager.cpp
│           │   ├── logindmanager.hpp
│           │   ├── sparklineitem.cpp
│           │   └── sparklineitem.hpp
│           ├── Models/
│           │   ├── CMakeLists.txt
│           │   ├── filesystemmodel.cpp
│           │   └── filesystemmodel.hpp
│           ├── Services/
│           │   ├── CMakeLists.txt
│           │   ├── audiocollector.cpp
│           │   ├── audiocollector.hpp
│           │   ├── audioprovider.cpp
│           │   ├── audioprovider.hpp
│           │   ├── beattracker.cpp
│           │   ├── beattracker.hpp
│           │   ├── cavaprovider.cpp
│           │   ├── cavaprovider.hpp
│           │   ├── service.cpp
│           │   ├── service.hpp
│           │   ├── serviceref.cpp
│           │   └── serviceref.hpp
│           ├── appdb.cpp
│           ├── appdb.hpp
│           ├── cutils.cpp
│           ├── cutils.hpp
│           ├── imageanalyser.cpp
│           ├── imageanalyser.hpp
│           ├── qalculator.cpp
│           ├── qalculator.hpp
│           ├── requests.cpp
│           ├── requests.hpp
│           ├── toaster.cpp
│           └── toaster.hpp
├── scripts/
│   └── qml-lint-conventions.py
├── services/
│   ├── Audio.qml
│   ├── Brightness.qml
│   ├── Colours.qml
│   ├── GameMode.qml
│   ├── Hypr.qml
│   ├── IdleInhibitor.qml
│   ├── LyricsService.qml
│   ├── Network.qml
│   ├── NetworkUsage.qml
│   ├── Nmcli.qml
│   ├── NotifData.qml
│   ├── Notifs.qml
│   ├── Players.qml
│   ├── Recorder.qml
│   ├── Screens.qml
│   ├── SystemUsage.qml
│   ├── Time.qml
│   ├── VPN.qml
│   ├── Visibilities.qml
│   ├── Wallpapers.qml
│   └── Weather.qml
├── shell.qml
└── utils/
    ├── Icons.qml
    ├── Images.qml
    ├── NetworkConnection.qml
    ├── Paths.qml
    ├── Searcher.qml
    ├── Strings.qml
    ├── SysInfo.qml
    └── scripts/
        ├── fuzzysort.js
        ├── fzf.js
        └── lrcparser.js

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

================================================
FILE: .clang-format
================================================
---
BasedOnStyle: LLVM
IndentWidth: 4
ColumnLimit: 120
---
Language: Cpp
DerivePointerAlignment: false
PointerAlignment: Left
AccessModifierOffset: -4
AlignAfterOpenBracket: DontAlign
AllowShortEnumsOnASingleLine: false
AllowShortFunctionsOnASingleLine: Inline
AllowShortLambdasOnASingleLine: None
BinPackArguments: true
BreakBeforeBraces: Attach
BreakConstructorInitializers: BeforeComma
Cpp11BracedListStyle: false
EmptyLineAfterAccessModifier: Never
EmptyLineBeforeAccessModifier: Always
IndentAccessModifiers: false
IndentCaseLabels: false
InsertNewlineAtEOF: true
SeparateDefinitionBlocks: Always
WrapNamespaceBodyWithEmptyLines: Always
...


================================================
FILE: .envrc
================================================
if has nix; then
    use flake
fi

shopt -s globstar
watch_file assets/cpp/**/*.cpp
watch_file assets/cpp/**/*.hpp
watch_file plugin/**/*.cpp
watch_file plugin/**/*.hpp
watch_file **/CMakeLists.txt

cmake -B build -G Ninja -DCMAKE_BUILD_TYPE=RelWithDebInfo -DCMAKE_CXX_COMPILER=clazy -DCMAKE_EXPORT_COMPILE_COMMANDS=ON -DDISTRIBUTOR=direnv
cmake --build build
export CAELESTIA_LIB_DIR="$PWD/build/lib"
export QML2_IMPORT_PATH="$PWD/build/qml:${QML2_IMPORT_PATH:-}"


================================================
FILE: .github/CONTRIBUTING.md
================================================
# Contributing

There are only a few rules:
- Follow the commit convention as follows:
  - The name of the commit should be `module: change`
  - Try to be consistent with the module names; you can look at existing commits for the module names I use
  - If there is more than one change, the change in the commit name should be the most impactful change
  - Put other changes in the description
- Format your code
  - I use the vscode qml extension with default arguments to format the code, however you do not have to use it
  - Just try to follow the code style of the rest of the code and ensure that there is:
    - no trailing whitespace on any lines
    - a single space between operators
- No AI slop allowed
  - AI readme/docs slop = instant block
- PLEASE TEST YOUR PRS
  - I can't believe I have to put this here, but please test your PRs before submitting them
  - Your PR must not break anything currently existing, or specify in the description if it does
- PR descriptions should be descriptive
  - Please explain what the PR does and how to use it in your PR description
  - Also include any breaking changes and/or side effects of the PR


================================================
FILE: .github/FUNDING.yml
================================================
# These are supported funding model platforms

github: soramanew
patreon: # Replace with a single Patreon username
open_collective: # Replace with a single Open Collective username
ko_fi: soramane
tidelift: # Replace with a single Tidelift platform-name/package-name e.g., npm/babel
community_bridge: # Replace with a single Community Bridge project-name e.g., cloud-foundry
liberapay: # Replace with a single Liberapay username
issuehunt: # Replace with a single IssueHunt username
lfx_crowdfunding: # Replace with a single LFX Crowdfunding project-name e.g., cloud-foundry
polar: # Replace with a single Polar username
buy_me_a_coffee: soramane
thanks_dev: # Replace with a single thanks.dev username
custom: # Replace with up to 4 custom sponsorship URLs e.g., ['link1', 'link2']


================================================
FILE: .github/ISSUE_TEMPLATE/config.yml
================================================
blank_issues_enabled: false


================================================
FILE: .github/ISSUE_TEMPLATE/feature.yml
================================================
name: Feature request
description: Suggest a new feature
labels: ["enhancement"]
type: "Feature"
title: "[FEATURE] "
body:
    - type: markdown
      attributes:
          value: "NOTE: Please write in **English**."

    - type: textarea
      attributes:
          label: "What would you like to be added?"
          description: "Can be a suggestion for an existing feature. You can suggest a widget, minor user interaction changes.. whatever."

    - type: textarea
      attributes:
          label: "How will it help?"
          description: "It's helpful to include examples (like in your use case)."

    - type: textarea
      attributes:
          label: "Extra info"
          description: "If you want a new widget, a pic of the inspiration (if available) would be awesome."


================================================
FILE: .github/ISSUE_TEMPLATE/issue.yml
================================================
name: Issue
description: Report an issue with the dots
labels: ["bug"]
type: "Bug"
title: "[BUG] "
body:
    - type: markdown
      attributes:
          value: "**Welcome to submit a new issue!**\n- It takes only 3 steps, so please be patient :)\n- Tip: If your issue is not a feature request and is not an issue with the dots (e.g. \"how do I use X feature\"), please use [Discussions](https://github.com/caelestia-dots/shell/discussions) instead."
    - type: checkboxes
      attributes:
          label: "Step 1. Before you submit"
          description: "Hint: The 2nd and 3rd checkbox is **not** forcely required as you may have failed to do so."
          options:
              - label: I have read the above instructions and am sure that this is supposed to be posted here.
                required: true
              - label: I've successfully updated to the latest versions following the [updating guide](https://github.com/caelestia-dots/caelestia?tab=readme-ov-file#updating).
                required: false # Not required cuz user may have failed to do so
              - label: I've successfully updated the system packages to the latest.
                required: false # Not required cuz user may have failed to do so
              - label: I've ticked the checkboxes without reading their contents
                required: false # Obviously

    - type: textarea
      attributes:
          label: "Step 2. Version info"
          description: "Run `caelestia -v` and paste the result below."
          value: "<details><summary>Version info</summary>\n\n```\n<!-- Run `caelestia -v` and paste the result here! -->\n```\n\n</details>"
      validations:
          required: true

    - type: markdown
      attributes:
          value: |
              **Tips for the following Step 3**
              1. Use `LANG=C LC_ALL=C` to get the output of a command in English, eg. `LANG=C LC_ALL=C date` displays time in English.
              2. If it throws errors, **PLEASE**, attach logs and describe in detail if possible.
                 - Something happened to the shell (bar, dashboard, etc)? Run `caelestia shell -l` WITHOUT exiting the shell for logs.
                 - Installation failed? Run installation again for logs.
                 - You may use more code blocks when needed.
              3. In case you are confused, the `<details>`, `<summary>`, `</summary>`, `</details>` are HTML tags for folding the logs (typically very long) inside. Please do not touch them (unless you know what you are doing).
              4. If the logs are suuuuuuper long, consider using an online pastebin service instead.

    - type: textarea
      attributes:
          label: "Step 3. Describe the issue"
          value: "\n<!-- Firstly describe your issue here! -->\n\n<details><summary>Logs</summary>\n\n```\n<!-- Put your log content here!-->\n```\n\n</details>"
      validations:
          required: true

    - type: checkboxes
      attributes:
          label: Reminder
          options:
              - label: I agree that it's usually impossible for others to help me without my logs.
                required: true


================================================
FILE: .github/workflows/check-format.yml
================================================
name: Check formatting

on:
  push:
    branches:
      - main
  pull_request:

jobs:
  check-format:
    runs-on: ubuntu-latest

    container:
      image: ghcr.io/${{ github.repository_owner }}/shell-arch-env:latest

    steps:
      - uses: actions/checkout@v6

      - name: Check QML format
        shell: fish {0}
        run: |
          for file in (string match -v 'build/*' **.qml)
            /usr/lib/qt6/bin/qmlformat $file | diff -u $file - || exit 1
          end
          python3 scripts/qml-lint-conventions.py

      - name: Check C++ format
        shell: fish {0}
        run: |
          for file in (string match -v 'build/*' **.cpp **.hpp)
            clang-format $file | diff -u $file - || exit 1
          end


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

on:
  push:
    tags:
      - "v*"

jobs:
  build-and-release:
    runs-on: ubuntu-latest

    permissions:
      contents: write

    steps:
      - uses: actions/checkout@v6

      - name: Create packages
        run: |
          mkdir -p release
          rsync -av \
            --exclude='release' \
            --exclude='.*' \
            --exclude='nix' \
            --exclude='flake.lock' \
            --exclude='flake.nix' \
            . release
          tar -czf caelestia-shell-${{ github.ref_name }}.tar.gz release
          cp caelestia-shell-${{ github.ref_name }}.tar.gz caelestia-shell-latest.tar.gz

      - name: Create release
        uses: softprops/action-gh-release@v2
        with:
          files: |
            caelestia-shell-${{ github.ref_name }}.tar.gz
            caelestia-shell-latest.tar.gz
          generate_release_notes: true


================================================
FILE: .github/workflows/update-flake-inputs.yml
================================================
name: Update flake inputs

on:
  workflow_dispatch:
  schedule:
    - cron: "0 0 * * 0"

jobs:
  update-flake:
    runs-on: ubuntu-latest

    steps:
      - name: Generate app token
        id: app-token
        uses: actions/create-github-app-token@v3
        with:
          app-id: ${{ secrets.APP_ID }}
          private-key: ${{ secrets.APP_PRIVATE_KEY }}

      - uses: actions/checkout@v6
        with:
          token: ${{ steps.app-token.outputs.token }}
          persist-credentials: false

      - name: Install Nix
        uses: nixbuild/nix-quick-install-action@v31
        with:
          nix_conf: |
            keep-env-derivations = true
            keep-outputs = true

      - name: Restore and save Nix store
        uses: nix-community/cache-nix-action@v6
        with:
          # restore and save a cache using this key
          primary-key: nix-${{ hashFiles('**/*.nix', '**/flake.lock') }}
          # if there's no cache hit, restore a cache by this prefix
          restore-prefixes-first-match: nix-
          # collect garbage until the Nix store size (in bytes) is at most this number
          # before trying to save a new cache
          # 1G = 1073741824
          gc-max-store-size-linux: 1G
          # do purge caches
          purge: true
          # purge all versions of the cache
          purge-prefixes: nix-
          # created more than this number of seconds ago
          purge-created: 0
          # or, last accessed more than this number of seconds ago
          # relative to the start of the `Post Restore and save Nix store` phase
          purge-last-accessed: 0
          # except any version with the key that is the same as the `primary-key`
          purge-primary-key: never

      - name: Update flake inputs
        run: nix flake update

      - name: Attempt to build flake
        run: nix build

      - name: Test on Sway
        env:
          XDG_RUNTIME_DIR: /home/runner/runtime
          WLR_BACKENDS: headless
          WLR_LIBINPUT_NO_DEVICES: 1
          WAYLAND_DISPLAY: wayland-1
        run: |
          mkdir $XDG_RUNTIME_DIR
          chown $USER $XDG_RUNTIME_DIR
          chmod 0700 $XDG_RUNTIME_DIR

          nix profile install 'nixpkgs#sway'
          sway &
          sleep 3  # Give Sway some time to start
          result/bin/caelestia-shell -d
          sleep 3  # Give the shell some time to start (and die)
          pgrep .quickshell-wra  # Fail job if shell died

          result/bin/caelestia-shell kill
          killall sway  # Screw using IPC

      - name: Check for changes
        id: check
        run: echo modified=$(git diff --exit-code flake.lock &>/dev/null && echo 'false' || echo 'true') >> $GITHUB_OUTPUT

      - name: Commit and push changes
        if: steps.check.outputs.modified == 'true'
        uses: EndBug/add-and-commit@v9
        with:
          github_token: ${{ steps.app-token.outputs.token }}
          add: flake.lock
          default_author: github_actions
          message: "[CI] chore: update flake"


================================================
FILE: .github/workflows/update-image.yml
================================================
name: Update Docker CI image

on:
  workflow_dispatch:
  schedule:
    - cron: "0 0 * * 0"

permissions:
  packages: write

jobs:
  build-image:
    runs-on: ubuntu-latest

    steps:
      - uses: docker/login-action@v4
        with:
          registry: ghcr.io
          username: ${{ github.actor }}
          password: ${{ secrets.GITHUB_TOKEN }}

      - name: Write Dockerfile
        run: |
          cat > /tmp/Dockerfile <<EOF
          FROM archlinux:latest
          RUN pacman -Syu --needed --noconfirm sudo base-devel cmake ninja fish git clang qt6-declarative python && \
              useradd -m builder && \
              echo 'builder ALL=(ALL) NOPASSWD:ALL' >> /etc/sudoers && \
              sudo -u builder git clone https://aur.archlinux.org/yay-bin.git /home/builder/yay-bin && \
              cd /home/builder/yay-bin && \
              sudo -u builder makepkg -si --noconfirm && \
              sudo -u builder yay -S --noconfirm quickshell-git && \
              sudo -u builder yay -Yc --noconfirm && \
              pacman -Rns --noconfirm yay-bin && \
              sed -i '/builder ALL=(ALL) NOPASSWD:ALL/d' /etc/sudoers && \
              userdel -r builder && \
              pacman -Scc --noconfirm
          EOF

      - name: Build and push
        uses: docker/build-push-action@v7
        with:
          context: .
          file: /tmp/Dockerfile
          push: true
          tags: ghcr.io/${{ github.repository_owner }}/shell-arch-env:latest


================================================
FILE: .gitignore
================================================
.direnv
/result
/.qmlls.ini
build/
.cache/
logs

================================================
FILE: .vscode/settings.json
================================================
{
    "editor.defaultFormatter": "theqtcompany.qt-qml",
    "[cpp]": {
        "editor.defaultFormatter": "llvm-vs-code-extensions.vscode-clangd"
    }
}


================================================
FILE: CMakeLists.txt
================================================
cmake_minimum_required(VERSION 3.19)

if(NOT DEFINED VERSION)
    execute_process(COMMAND git describe --tags --abbrev=0
        WORKING_DIRECTORY "${CMAKE_SOURCE_DIR}"
        OUTPUT_VARIABLE VERSION
        OUTPUT_STRIP_TRAILING_WHITESPACE
    )

    if("${VERSION}" STREQUAL "")
        message(FATAL_ERROR "VERSION is not set and failed to get from git")
    endif()
endif()

if(NOT DEFINED GIT_REVISION)
    execute_process(COMMAND git rev-parse HEAD
        WORKING_DIRECTORY "${CMAKE_SOURCE_DIR}"
        OUTPUT_VARIABLE GIT_REVISION
        OUTPUT_STRIP_TRAILING_WHITESPACE
    )

    if("${GIT_REVISION}" STREQUAL "")
        message(FATAL_ERROR "GIT_REVISION is not set and failed to get from git")
    endif()
endif()

string(REGEX REPLACE "^v" "" VERSION "${VERSION}")

project(caelestia-shell VERSION ${VERSION} LANGUAGES CXX)

set(CMAKE_CXX_STANDARD 20)
set(CMAKE_CXX_STANDARD_REQUIRED ON)
set(CMAKE_CXX_EXTENSIONS OFF)
set(CMAKE_RUNTIME_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}/lib")

set(DISTRIBUTOR "Unset" CACHE STRING "Distributor")
set(ENABLE_MODULES "extras;plugin;shell" CACHE STRING "Modules to build/install")
set(INSTALL_LIBDIR "usr/lib/caelestia" CACHE STRING "Library install dir")
set(INSTALL_QMLDIR "usr/lib/qt6/qml" CACHE STRING "QML install dir")
set(INSTALL_QSCONFDIR "etc/xdg/quickshell/caelestia" CACHE STRING "Quickshell config install dir")

add_compile_options(
    -Wall -Wextra -Wpedantic -Wshadow -Wconversion
    -Wold-style-cast -Wnull-dereference -Wdouble-promotion
    -Wformat=2 -Wfloat-equal -Woverloaded-virtual
    -Wsign-conversion -Wredundant-decls -Wswitch
    -Wunreachable-code
)

if(CMAKE_CXX_COMPILER_ID MATCHES "Clang")
    add_compile_options(-Wunused-lambda-capture)
endif()

if("extras" IN_LIST ENABLE_MODULES)
    add_subdirectory(extras)
endif()

if("plugin" IN_LIST ENABLE_MODULES)
    add_subdirectory(plugin)
endif()

if("shell" IN_LIST ENABLE_MODULES)
    foreach(dir assets components config modules services utils)
        install(DIRECTORY ${dir} DESTINATION "${INSTALL_QSCONFDIR}")
    endforeach()
    install(FILES shell.qml LICENSE DESTINATION "${INSTALL_QSCONFDIR}")
endif()


================================================
FILE: LICENSE
================================================
                    GNU GENERAL PUBLIC LICENSE
                       Version 3, 29 June 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 General Public License is a free, copyleft license for
software and other kinds of works.

  The licenses for most software and other practical works are designed
to take away your freedom to share and change the works.  By contrast,
the GNU General Public License is 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.  We, the Free Software Foundation, use the
GNU General Public License for most of our software; it applies also to
any other work released this way by its authors.  You can apply it to
your programs, too.

  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.

  To protect your rights, we need to prevent others from denying you
these rights or asking you to surrender the rights.  Therefore, you have
certain responsibilities if you distribute copies of the software, or if
you modify it: responsibilities to respect the freedom of others.

  For example, if you distribute copies of such a program, whether
gratis or for a fee, you must pass on to the recipients the same
freedoms that you received.  You must make sure that they, too, receive
or can get the source code.  And you must show them these terms so they
know their rights.

  Developers that use the GNU GPL protect your rights with two steps:
(1) assert copyright on the software, and (2) offer you this License
giving you legal permission to copy, distribute and/or modify it.

  For the developers' and authors' protection, the GPL clearly explains
that there is no warranty for this free software.  For both users' and
authors' sake, the GPL requires that modified versions be marked as
changed, so that their problems will not be attributed erroneously to
authors of previous versions.

  Some devices are designed to deny users access to install or run
modified versions of the software inside them, although the manufacturer
can do so.  This is fundamentally incompatible with the aim of
protecting users' freedom to change the software.  The systematic
pattern of such abuse occurs in the area of products for individuals to
use, which is precisely where it is most unacceptable.  Therefore, we
have designed this version of the GPL to prohibit the practice for those
products.  If such problems arise substantially in other domains, we
stand ready to extend this provision to those domains in future versions
of the GPL, as needed to protect the freedom of users.

  Finally, every program is threatened constantly by software patents.
States should not allow patents to restrict development and use of
software on general-purpose computers, but in those that do, we wish to
avoid the special danger that patents applied to a free program could
make it effectively proprietary.  To prevent this, the GPL assures that
patents cannot be used to render the program non-free.

  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 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. Use with the GNU Affero General Public License.

  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 Affero 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 special requirements of the GNU Affero General Public License,
section 13, concerning interaction through a network will apply to the
combination as such.

  14. Revised Versions of this License.

  The Free Software Foundation may publish revised and/or new versions of
the GNU 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 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 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 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 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 General Public License for more details.

    You should have received a copy of the GNU 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 the program does terminal interaction, make it output a short
notice like this when it starts in an interactive mode:

    <program>  Copyright (C) <year>  <name of author>
    This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
    This is free software, and you are welcome to redistribute it
    under certain conditions; type `show c' for details.

The hypothetical commands `show w' and `show c' should show the appropriate
parts of the General Public License.  Of course, your program's commands
might be different; for a GUI interface, you would use an "about box".

  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 GPL, see
<https://www.gnu.org/licenses/>.

  The GNU General Public License does not permit incorporating your program
into proprietary programs.  If your program is a subroutine library, you
may consider it more useful to permit linking proprietary applications with
the library.  If this is what you want to do, use the GNU Lesser General
Public License instead of this License.  But first, please read
<https://www.gnu.org/licenses/why-not-lgpl.html>.


================================================
FILE: README.md
================================================
<h1 align=center>caelestia-shell</h1>

<div align=center>

![GitHub last commit](https://img.shields.io/github/last-commit/caelestia-dots/shell?style=for-the-badge&labelColor=101418&color=9ccbfb)
![GitHub Repo stars](https://img.shields.io/github/stars/caelestia-dots/shell?style=for-the-badge&labelColor=101418&color=b9c8da)
![GitHub repo size](https://img.shields.io/github/repo-size/caelestia-dots/shell?style=for-the-badge&labelColor=101418&color=d3bfe6)
[![Ko-Fi donate](https://img.shields.io/badge/donate-kofi?style=for-the-badge&logo=ko-fi&logoColor=ffffff&label=ko-fi&labelColor=101418&color=f16061&link=https%3A%2F%2Fko-fi.com%2Fsoramane)](https://ko-fi.com/soramane)
[![Discord invite](https://img.shields.io/badge/dynamic/json?url=https%3A%2F%2Fdiscordapp.com%2Fapi%2Finvites%2FBGDCFCmMBk%3Fwith_counts%3Dtrue&query=approximate_member_count&style=for-the-badge&logo=discord&logoColor=ffffff&label=discord&labelColor=101418&color=96f1f1&link=https%3A%2F%2Fdiscord.gg%2FBGDCFCmMBk)](https://discord.gg/BGDCFCmMBk)

</div>

https://github.com/user-attachments/assets/0840f496-575c-4ca6-83a8-87bb01a85c5f

## Components

-   Widgets: [`Quickshell`](https://quickshell.outfoxxed.me)
-   Window manager: [`Hyprland`](https://hyprland.org)
-   Dots: [`caelestia`](https://github.com/caelestia-dots)

## Installation

> [!NOTE]
> This repo is for the desktop shell of the caelestia dots. If you want installation instructions
> for the entire dots, head to [the main repo](https://github.com/caelestia-dots/caelestia) instead.

### Arch linux

> [!NOTE]
> If you want to make your own changes/tweaks to the shell do NOT edit the files installed by the AUR
> package. Instead, follow the instructions in the [manual installation section](#manual-installation).

The shell is available from the AUR as `caelestia-shell`. You can install it with an AUR helper
like [`yay`](https://github.com/Jguer/yay) or manually downloading the PKGBUILD and running `makepkg -si`.

A package following the latest commit also exists as `caelestia-shell-git`. This is bleeding edge
and likely to be unstable/have bugs. Regular users are recommended to use the stable package
(`caelestia-shell`).

### Nix

You can run the shell directly via `nix run`:

```sh
nix run github:caelestia-dots/shell
```

Or add it to your system configuration:

```nix
{
  inputs = {
    nixpkgs.url = "github:nixos/nixpkgs/nixos-unstable";

    caelestia-shell = {
      url = "github:caelestia-dots/shell";
      inputs.nixpkgs.follows = "nixpkgs";
    };
  };
}
```

The package is available as `caelestia-shell.packages.<system>.default`, which can be added to your
`environment.systemPackages`, `users.users.<username>.packages`, `home.packages` if using home-manager,
or a devshell. The shell can then be run via `caelestia-shell`.

> [!TIP]
> The default package does not have the CLI enabled by default, which is required for full funcionality.
> To enable the CLI, use the `with-cli` package.

For home-manager, you can also use the Caelestia's home manager module (explained in [configuring](https://github.com/caelestia-dots/shell?tab=readme-ov-file#home-manager-module)) that installs and configures the shell and the CLI.

### Manual installation

Dependencies:

-   [`caelestia-cli`](https://github.com/caelestia-dots/cli)
-   [`quickshell-git`](https://quickshell.outfoxxed.me) - this has to be the git version, not the latest tagged version
-   [`ddcutil`](https://github.com/rockowitz/ddcutil)
-   [`brightnessctl`](https://github.com/Hummer12007/brightnessctl)
-   [`app2unit`](https://github.com/Vladimir-csp/app2unit)
-   [`libcava`](https://github.com/LukashonakV/cava)
-   [`networkmanager`](https://networkmanager.dev)
-   [`lm-sensors`](https://github.com/lm-sensors/lm-sensors)
-   [`fish`](https://github.com/fish-shell/fish-shell)
-   [`aubio`](https://github.com/aubio/aubio)
-   [`libpipewire`](https://pipewire.org)
-   `glibc`
-   `qt6-declarative`
-   `gcc-libs`
-   [`material-symbols`](https://fonts.google.com/icons)
-   [`caskaydia-cove-nerd`](https://www.nerdfonts.com/font-downloads)
-   [`swappy`](https://github.com/jtheoof/swappy)
-   [`libqalculate`](https://github.com/Qalculate/libqalculate)
-   [`bash`](https://www.gnu.org/software/bash)
-   `qt6-base`
-   `qt6-declarative`

Build dependencies:

-   [`cmake`](https://cmake.org)
-   [`ninja`](https://github.com/ninja-build/ninja)

To install the shell manually, install all dependencies and clone this repo to `$XDG_CONFIG_HOME/quickshell/caelestia`.
Then simply build and install using `cmake`.

```sh
cd $XDG_CONFIG_HOME/quickshell
git clone https://github.com/caelestia-dots/shell.git caelestia

cd caelestia
cmake -B build -G Ninja -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=/
cmake --build build
sudo cmake --install build
```

> [!TIP]
> You can customise the installation location via the `cmake` flags `INSTALL_LIBDIR`, `INSTALL_QMLDIR` and
> `INSTALL_QSCONFDIR` for the libraries (the beat detector), QML plugin and Quickshell config directories
> respectively. If changing the library directory, remember to set the `CAELESTIA_LIB_DIR` environment
> variable to the custom directory when launching the shell.
>
> e.g. installing to `~/.config/quickshell/caelestia` for easy local changes:
>
> ```sh
> mkdir -p ~/.config/quickshell/caelestia
> cmake -B build -G Ninja -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=/ -DINSTALL_QSCONFDIR=~/.config/quickshell/caelestia
> cmake --build build
> sudo cmake --install build
> sudo chown -R $USER ~/.config/quickshell/caelestia
> ```

## Usage

The shell can be started via the `caelestia shell -d` command or `qs -c caelestia`.
If the entire caelestia dots are installed, the shell will be autostarted on login
via an `exec-once` in the hyprland config.

### Shortcuts/IPC

All keybinds are accessible via Hyprland [global shortcuts](https://wiki.hyprland.org/Configuring/Binds/#dbus-global-shortcuts).
If using the entire caelestia dots, the keybinds are already configured for you.
Otherwise, [this file](https://github.com/caelestia-dots/caelestia/blob/main/hypr/hyprland/keybinds.conf#L1-L39)
contains an example on how to use global shortcuts.

All IPC commands can be accessed via `caelestia shell ...`. For example

```sh
caelestia shell mpris getActive trackTitle
```

The list of IPC commands can be shown via `caelestia shell -s`:

```
$ caelestia shell -s
target drawers
  function toggle(drawer: string): void
  function list(): string
target notifs
  function clear(): void
target lock
  function lock(): void
  function unlock(): void
  function isLocked(): bool
target mpris
  function playPause(): void
  function getActive(prop: string): string
  function next(): void
  function stop(): void
  function play(): void
  function list(): string
  function pause(): void
  function previous(): void
target picker
  function openFreeze(): void
  function open(): void
target wallpaper
  function set(path: string): void
  function get(): string
  function list(): string
```

### PFP/Wallpapers

The profile picture for the dashboard is read from the file `~/.face`, so to set
it you can copy your image to there or set it via the dashboard.

The wallpapers for the wallpaper switcher are read from `~/Pictures/Wallpapers`
by default. To change it, change the wallpapers path in `~/.config/caelestia/shell.json`.

To set the wallpaper, you can use the command `caelestia wallpaper`. Use `caelestia wallpaper -h` for more info about
the command.

## Updating

If installed via the AUR package, simply update your system (e.g. using `yay`).

If installed manually, you can update by running `git pull` in `$XDG_CONFIG_HOME/quickshell/caelestia`.

```sh
cd $XDG_CONFIG_HOME/quickshell/caelestia
git pull
```

## Configuring

All configuration options should be put in `~/.config/caelestia/shell.json`. This file is _not_ created by
default, you must create it manually.

### Example configuration

> [!NOTE]
> The example configuration only includes recommended configuration options. For more advanced customisation
> such as modifying the size of individual items or changing constants in the code, there are some other
> options which can be found in the source files in the `config` directory.

<details><summary>Example</summary>

```json
{
    "appearance": {
        "mediaGifSpeedAdjustment": 300,
        "sessionGifSpeed": 0.7,
        "anim": {
            "durations": {
                "scale": 1
            }
        },
        "font": {
            "family": {
                "clock": "Rubik",
                "material": "Material Symbols Rounded",
                "mono": "CaskaydiaCove NF",
                "sans": "Rubik"
            },
            "size": {
                "scale": 1
            }
        },
        "padding": {
            "scale": 1
        },
        "rounding": {
            "scale": 1
        },
        "spacing": {
            "scale": 1
        },
        "transparency": {
            "enabled": false,
            "base": 0.85,
            "layers": 0.4
        }
    },
    "general": {
        "logo": "caelestia",
        "apps": {
            "terminal": ["foot"],
            "audio": ["pavucontrol"],
            "playback": ["mpv"],
            "explorer": ["thunar"]
        },
        "battery": {
            "warnLevels": [
                {
                    "level": 20,
                    "title": "Low battery",
                    "message": "You might want to plug in a charger",
                    "icon": "battery_android_frame_2"
                },
                {
                    "level": 10,
                    "title": "Did you see the previous message?",
                    "message": "You should probably plug in a charger <b>now</b>",
                    "icon": "battery_android_frame_1"
                },
                {
                    "level": 5,
                    "title": "Critical battery level",
                    "message": "PLUG THE CHARGER RIGHT NOW!!",
                    "icon": "battery_android_alert",
                    "critical": true
                }
            ],
            "criticalLevel": 3
        },
        "idle": {
            "lockBeforeSleep": true,
            "inhibitWhenAudio": true,
            "timeouts": [
                {
                    "timeout": 180,
                    "idleAction": "lock"
                },
                {
                    "timeout": 300,
                    "idleAction": "dpms off",
                    "returnAction": "dpms on"
                },
                {
                    "timeout": 600,
                    "idleAction": ["systemctl", "suspend-then-hibernate"]
                }
            ]
        }
    },
    "background": {
        "desktopClock": {
            "enabled": false,
            "scale": 1.0,
            "position": "bottom-right",
            "shadow": {
                "enabled": true,
                "opacity": 0.7,
                "blur": 0.4
            },
            "background": {
                "enabled": false,
                "opacity": 0.7,
                "blur": true
            },
            "invertColors": false
        },
        "enabled": true,
        "visualiser": {
            "blur": false,
            "enabled": false,
            "autoHide": true,
            "rounding": 1,
            "spacing": 1
        }
    },
    "bar": {
        "activeWindow": {
            "compact": false,
            "inverted": false,
            "showOnHover": true
        },
        "clock": {
            "background": false,
            "showDate": false,
            "showIcon": true
        },
        "dragThreshold": 20,
        "entries": [
            {
                "id": "logo",
                "enabled": true
            },
            {
                "id": "workspaces",
                "enabled": true
            },
            {
                "id": "spacer",
                "enabled": true
            },
            {
                "id": "activeWindow",
                "enabled": true
            },
            {
                "id": "spacer",
                "enabled": true
            },
            {
                "id": "tray",
                "enabled": true
            },
            {
                "id": "clock",
                "enabled": true
            },
            {
                "id": "statusIcons",
                "enabled": true
            },
            {
                "id": "power",
                "enabled": true
            }
        ],
        "persistent": true,
        "popouts": {
            "activeWindow": true,
            "statusIcons": true,
            "tray": true
        },
        "scrollActions": {
            "brightness": true,
            "workspaces": true,
            "volume": true
        },
        "showOnHover": true,
        "status": {
            "showAudio": false,
            "showBattery": true,
            "showBluetooth": true,
            "showKbLayout": false,
            "showMicrophone": false,
            "showNetwork": true,
            "showWifi": true,
            "showLockStatus": true
        },
        "tray": {
            "background": false,
            "compact": false,
            "iconSubs": [],
            "recolour": false
        },
        "workspaces": {
            "activeIndicator": true,
            "activeLabel": "󰮯",
            "activeTrail": false,
            "label": "  ",
            "occupiedBg": false,
            "occupiedLabel": "󰮯",
            "perMonitorWorkspaces": true,
            "showWindows": true,
            "shown": 5,
            "specialWorkspaceIcons": [
                {
                    "name": "steam",
                    "icon": "sports_esports"
                }
            ],
            "windowIcons": [
                {
                    "regex": "steam(_app_(default|[0-9]+))?",
                    "icon": "sports_esports"
                }
            ]
        },
        "excludedScreens": [""],
        "activeWindow": {
            "inverted": false
        }
    },
    "border": {
        "rounding": 25,
        "thickness": 10
    },
    "dashboard": {
        "enabled": true,
        "dragThreshold": 50,
        "mediaUpdateInterval": 500,
        "showOnHover": true
    },
    "launcher": {
        "actionPrefix": ">",
        "actions": [
            {
                "name": "Calculator",
                "icon": "calculate",
                "description": "Do simple math equations (powered by Qalc)",
                "command": ["autocomplete", "calc"],
                "enabled": true,
                "dangerous": false
            },
            {
                "name": "Scheme",
                "icon": "palette",
                "description": "Change the current colour scheme",
                "command": ["autocomplete", "scheme"],
                "enabled": true,
                "dangerous": false
            },
            {
                "name": "Wallpaper",
                "icon": "image",
                "description": "Change the current wallpaper",
                "command": ["autocomplete", "wallpaper"],
                "enabled": true,
                "dangerous": false
            },
            {
                "name": "Variant",
                "icon": "colors",
                "description": "Change the current scheme variant",
                "command": ["autocomplete", "variant"],
                "enabled": true,
                "dangerous": false
            },
            {
                "name": "Transparency",
                "icon": "opacity",
                "description": "Change shell transparency",
                "command": ["autocomplete", "transparency"],
                "enabled": false,
                "dangerous": false
            },
            {
                "name": "Random",
                "icon": "casino",
                "description": "Switch to a random wallpaper",
                "command": ["caelestia", "wallpaper", "-r"],
                "enabled": true,
                "dangerous": false
            },
            {
                "name": "Light",
                "icon": "light_mode",
                "description": "Change the scheme to light mode",
                "command": ["setMode", "light"],
                "enabled": true,
                "dangerous": false
            },
            {
                "name": "Dark",
                "icon": "dark_mode",
                "description": "Change the scheme to dark mode",
                "command": ["setMode", "dark"],
                "enabled": true,
                "dangerous": false
            },
            {
                "name": "Shutdown",
                "icon": "power_settings_new",
                "description": "Shutdown the system",
                "command": ["systemctl", "poweroff"],
                "enabled": true,
                "dangerous": true
            },
            {
                "name": "Reboot",
                "icon": "cached",
                "description": "Reboot the system",
                "command": ["systemctl", "reboot"],
                "enabled": true,
                "dangerous": true
            },
            {
                "name": "Logout",
                "icon": "exit_to_app",
                "description": "Log out of the current session",
                "command": ["loginctl", "terminate-user", ""],
                "enabled": true,
                "dangerous": true
            },
            {
                "name": "Lock",
                "icon": "lock",
                "description": "Lock the current session",
                "command": ["loginctl", "lock-session"],
                "enabled": true,
                "dangerous": false
            },
            {
                "name": "Sleep",
                "icon": "bedtime",
                "description": "Suspend then hibernate",
                "command": ["systemctl", "suspend-then-hibernate"],
                "enabled": true,
                "dangerous": false
            },
            {
                "name": "Settings",
                "icon": "settings",
                "description": "Configure the shell",
                "command": ["caelestia", "shell", "controlCenter", "open"],
                "enabled": true,
                "dangerous": false
            }
        ],
        "dragThreshold": 50,
        "vimKeybinds": false,
        "enableDangerousActions": false,
        "maxShown": 7,
        "maxWallpapers": 9,
        "specialPrefix": "@",
        "useFuzzy": {
            "apps": false,
            "actions": false,
            "schemes": false,
            "variants": false,
            "wallpapers": false
        },
        "showOnHover": false,
        "favouriteApps": [],
        "hiddenApps": []
    },
    "lock": {
        "recolourLogo": false,
        "hideNotifs": false
    },
    "notifs": {
        "actionOnClick": false,
        "clearThreshold": 0.3,
        "defaultExpireTimeout": 5000,
        "expandThreshold": 20,
        "openExpanded": false,
        "expire": false
    },
    "osd": {
        "enabled": true,
        "enableBrightness": true,
        "enableMicrophone": false,
        "hideDelay": 2000
    },
    "paths": {
        "mediaGif": "root:/assets/bongocat.gif",
        "sessionGif": "root:/assets/kurukuru.gif",
        "wallpaperDir": "~/Pictures/Wallpapers",
        "lyricsDir": "~/Music/lyrics"
    },
    "services": {
        "audioIncrement": 0.1,
        "brightnessIncrement": 0.1,
        "maxVolume": 1.0,
        "defaultPlayer": "Spotify",
        "gpuType": "",
        "playerAliases": [{ "from": "com.github.th_ch.youtube_music", "to": "YT Music" }],
        "weatherLocation": "",
        "useFahrenheit": false,
        "useFahrenheitPerformance": false,
        "useTwelveHourClock": false,
        "smartScheme": true,
        "visualiserBars": 45
    },
    "session": {
        "dragThreshold": 30,
        "enabled": true,
        "vimKeybinds": false,
        "icons": {
            "logout": "logout",
            "shutdown": "power_settings_new",
            "hibernate": "downloading",
            "reboot": "cached"
        },
        "commands": {
            "logout": ["loginctl", "terminate-user", ""],
            "shutdown": ["systemctl", "poweroff"],
            "hibernate": ["systemctl", "hibernate"],
            "reboot": ["systemctl", "reboot"]
        }
    },
    "sidebar": {
        "dragThreshold": 80,
        "enabled": true
    },
    "utilities": {
        "enabled": true,
        "maxToasts": 4,
        "toasts": {
            "audioInputChanged": true,
            "audioOutputChanged": true,
            "capsLockChanged": true,
            "chargingChanged": true,
            "configLoaded": true,
            "dndChanged": true,
            "gameModeChanged": true,
            "kbLayoutChanged": true,
            "kbLimit": true,
            "numLockChanged": true,
            "vpnChanged": true,
            "nowPlaying": false
        },
        "vpn": {
            "enabled": true,
            "provider": [
                {
                    "name": "wireguard",
                    "interface": "your-connection-name",
                    "displayName": "Wireguard (Your VPN)",
                    "enabled": false
                }
            ]
        },
        "quickToggles": [
            {
                "id": "wifi",
                "enabled": true
            },
            {
                "id": "bluetooth",
                "enabled": true
            },
            {
                "id": "mic",
                "enabled": true
            },
            {
                "enabled": true,
                "id": "settings"
            },
            {
                "id": "gameMode",
                "enabled": true
            },
            {
                "id": "dnd",
                "enabled": true
            },
            {
                "id": "vpn",
                "enabled": true
            }
        ]
    }
}
```

</details>

### Home Manager Module

For NixOS users, a home manager module is also available.

<details><summary><code>home.nix</code></summary>

```nix
programs.caelestia = {
  enable = true;
  systemd = {
    enable = false; # if you prefer starting from your compositor
    target = "graphical-session.target";
    environment = [];
  };
  settings = {
    bar.status = {
      showBattery = false;
    };
    paths.wallpaperDir = "~/Images";
  };
  cli = {
    enable = true; # Also add caelestia-cli to path
    settings = {
      theme.enableGtk = false;
    };
  };
};
```

The module automatically adds Caelestia shell to the path with **full functionality**. The CLI is not required, however you have the option to enable and configure it.

</details>

## FAQ

### Need help or support?

You can join the community Discord server for assistance and discussion:
https://discord.gg/BGDCFCmMBk

### My screen is flickering, help pls!

Try disabling VRR in the hyprland config. You can do this by adding the following to `~/.config/caelestia/hypr-user.conf`:

```conf
misc {
    vrr = 0
}
```

### I want to make my own changes to the hyprland config!

You can add your custom hyprland configs to `~/.config/caelestia/hypr-user.conf`.

### I want to make my own changes to other stuff!

See the [manual installation](https://github.com/caelestia-dots/shell?tab=readme-ov-file#manual-installation) section
for the corresponding repo.

### I want to disable XXX feature!

Please read the [configuring](https://github.com/caelestia-dots/shell?tab=readme-ov-file#configuring) section in the readme.
If there is no corresponding option, make feature request.

### How do I make my colour scheme change with my wallpaper?

Set a wallpaper via the launcher or `caelestia wallpaper` and set the scheme to the dynamic scheme via the launcher
or `caelestia scheme set`. e.g.

```sh
caelestia wallpaper -f <path/to/file>
caelestia scheme set -n dynamic
```

### My wallpapers aren't showing up in the launcher!

The launcher pulls wallpapers from `~/Pictures/Wallpapers` by default. You can change this in the config. Additionally,
the launcher only shows an odd number of wallpapers at one time. If you only have 2 wallpapers, consider getting more
(or just putting one).

## Credits

Thanks to the Hyprland discord community (especially the homies in #rice-discussion) for all the help and suggestions
for improving these dots!

A special thanks to [@outfoxxed](https://github.com/outfoxxed) for making Quickshell and the effort put into fixing issues
and implementing various feature requests.

Another special thanks to [@end_4](https://github.com/end-4) for his [config](https://github.com/end-4/dots-hyprland)
which helped me a lot with learning how to use Quickshell.

Finally another thank you to all the configs I took inspiration from (only one for now):

-   [Axenide/Ax-Shell](https://github.com/Axenide/Ax-Shell)

## Stonks 📈

<a href="https://www.star-history.com/#caelestia-dots/shell&Date">
 <picture>
   <source media="(prefers-color-scheme: dark)" srcset="https://api.star-history.com/svg?repos=caelestia-dots/shell&type=Date&theme=dark" />
   <source media="(prefers-color-scheme: light)" srcset="https://api.star-history.com/svg?repos=caelestia-dots/shell&type=Date" />
   <img alt="Star History Chart" src="https://api.star-history.com/svg?repos=caelestia-dots/shell&type=Date" />
 </picture>
</a>


================================================
FILE: assets/pam.d/fprint
================================================
#%PAM-1.0

auth    required    pam_fprintd.so  max-tries=1


================================================
FILE: assets/pam.d/passwd
================================================
#%PAM-1.0

auth    required                    pam_faillock.so     preauth
auth    [success=1 default=bad]     pam_unix.so         nullok
auth    [default=die]               pam_faillock.so     authfail
auth    required                    pam_faillock.so     authsucc


================================================
FILE: assets/shaders/fade.frag
================================================
#version 440

layout(location = 0) in vec2 qt_TexCoord0;
layout(location = 0) out vec4 fragColor;

layout(std140, binding = 0) uniform buf {
    mat4 qt_Matrix;
    float qt_Opacity;
    float fadeMargin;
};

layout(binding = 1) uniform sampler2D source;

void main() {
    vec4 tex = texture(source, qt_TexCoord0);
    float factor = 1.0;
    float margin = 0.1;

    if (qt_TexCoord0.y < margin) {
        factor = qt_TexCoord0.y / margin;
    } else if (qt_TexCoord0.y > (1.0 - margin)) {
        factor = (1.0 - qt_TexCoord0.y) / margin;
    }

    fragColor = tex * factor * qt_Opacity;
}


================================================
FILE: assets/shaders/opacitymask.frag
================================================
#version 440

layout(location = 0) in vec2 qt_TexCoord0;
layout(location = 0) out vec4 fragColor;

layout(std140, binding = 0) uniform buf {
    // qt_Matrix and qt_Opacity must always be both present
    // if the built-in vertex shader is used.
    mat4 qt_Matrix;
    float qt_Opacity;
};

layout(binding = 1) uniform sampler2D source;
layout(binding = 2) uniform sampler2D maskSource;

void main()
{
    fragColor = texture(source, qt_TexCoord0.st) * (texture(maskSource, qt_TexCoord0.st).a) * qt_Opacity;
}


================================================
FILE: assets/wrap_term_launch.sh
================================================
#!/usr/bin/env sh

cat ~/.local/state/caelestia/sequences.txt 2>/dev/null

exec "$@"


================================================
FILE: components/Anim.qml
================================================
import qs.config
import QtQuick

NumberAnimation {
    duration: Appearance.anim.durations.normal
    easing.type: Easing.BezierSpline
    easing.bezierCurve: Appearance.anim.curves.standard
}


================================================
FILE: components/CAnim.qml
================================================
import qs.config
import QtQuick

ColorAnimation {
    duration: Appearance.anim.durations.normal
    easing.type: Easing.BezierSpline
    easing.bezierCurve: Appearance.anim.curves.standard
}


================================================
FILE: components/ConnectionHeader.qml
================================================
import qs.components
import qs.config
import QtQuick
import QtQuick.Layouts

ColumnLayout {
    id: root

    required property string icon
    required property string title

    spacing: Appearance.spacing.normal
    Layout.alignment: Qt.AlignHCenter

    MaterialIcon {
        Layout.alignment: Qt.AlignHCenter
        animate: true
        text: root.icon
        font.pointSize: Appearance.font.size.extraLarge * 3
        font.bold: true
    }

    StyledText {
        Layout.alignment: Qt.AlignHCenter
        animate: true
        text: root.title
        font.pointSize: Appearance.font.size.large
        font.bold: true
    }
}


================================================
FILE: components/ConnectionInfoSection.qml
================================================
import qs.components
import qs.services
import qs.config
import QtQuick
import QtQuick.Layouts

ColumnLayout {
    id: root

    required property var deviceDetails

    spacing: Appearance.spacing.small / 2

    StyledText {
        text: qsTr("IP Address")
    }

    StyledText {
        text: root.deviceDetails?.ipAddress || qsTr("Not available")
        color: Colours.palette.m3outline
        font.pointSize: Appearance.font.size.small
    }

    StyledText {
        Layout.topMargin: Appearance.spacing.normal
        text: qsTr("Subnet Mask")
    }

    StyledText {
        text: root.deviceDetails?.subnet || qsTr("Not available")
        color: Colours.palette.m3outline
        font.pointSize: Appearance.font.size.small
    }

    StyledText {
        Layout.topMargin: Appearance.spacing.normal
        text: qsTr("Gateway")
    }

    StyledText {
        text: root.deviceDetails?.gateway || qsTr("Not available")
        color: Colours.palette.m3outline
        font.pointSize: Appearance.font.size.small
    }

    StyledText {
        Layout.topMargin: Appearance.spacing.normal
        text: qsTr("DNS Servers")
    }

    StyledText {
        text: (root.deviceDetails && root.deviceDetails.dns && root.deviceDetails.dns.length > 0) ? root.deviceDetails.dns.join(", ") : qsTr("Not available")
        color: Colours.palette.m3outline
        font.pointSize: Appearance.font.size.small
        wrapMode: Text.Wrap
        Layout.maximumWidth: parent.width
    }
}


================================================
FILE: components/DashboardState.qml
================================================
import Quickshell

PersistentProperties {
    property int currentTab
    property date currentDate: new Date()
}


================================================
FILE: components/DrawerVisibilities.qml
================================================
import Quickshell

PersistentProperties {
    property bool bar
    property bool osd
    property bool session
    property bool launcher
    property bool dashboard
    property bool utilities
    property bool sidebar
}


================================================
FILE: components/Logo.qml
================================================
import QtQuick
import QtQuick.Shapes
import qs.services

Item {
    id: root

    readonly property real designWidth: 128
    readonly property real designHeight: 90.38

    property color topColour: Colours.palette.m3primary
    property color bottomColour: Colours.palette.m3onSurface

    implicitWidth: designWidth
    implicitHeight: designHeight

    Shape {
        anchors.centerIn: parent
        width: root.designWidth
        height: root.designHeight
        scale: Math.min(root.width / width, root.height / height)
        transformOrigin: Item.Center
        preferredRendererType: Shape.CurveRenderer

        ShapePath {
            fillColor: root.topColour
            strokeColor: "transparent"

            PathSvg {
                path: "m42.56,42.96c-7.76,1.6-16.36,4.22-22.44,6.22-.49.16-.88-.44-.53-.82,5.37-5.85,9.66-13.3,9.66-13.3,8.66-14.67,22.97-23.51,39.85-21.14,6.47.91,12.33,3.38,17.26,6.98.99.72,1.14,2.14.31,3.04-.4.44-.95.67-1.51.67-.34,0-.69-.09-1-.26-3.21-1.84-6.82-2.69-10.71-3.24-13.1-1.84-25.41,4.75-31.06,15.83-.94,1.84-.61,3.81.45,5.21.22.3.07.72-.29.8Z"
            }
        }

        ShapePath {
            fillColor: root.bottomColour
            strokeColor: "transparent"

            PathSvg {
                path: "m103.02,51.8c-.65.11-1.26-.37-1.28-1.03-.06-1.96.15-3.89-.2-5.78-.28-1.48-1.66-2.5-3.16-2.34h-.05c-6.53.73-24.63,3.1-48,9.32-6.89,1.83-9.83,10-5.67,15.79,4.62,6.44,11.84,10.93,20.41,12.13,11.82,1.66,22.99-3.36,29.21-12.65.54-.81,1.54-1.17,2.47-.86.91.3,1.47,1.15,1.47,2.04,0,.33-.08.66-.24.98-7.23,14.21-22.91,22.95-39.59,20.6-7.84-1.1-14.8-4.5-20.28-9.43,0,0,0,0-.02-.01-7.28-5.14-14.7-9.99-27.24-11.98-18.82-2.98-9.53-8.75.46-13.78,7.36-3.13,25.17-7.9,36.24-10.73.16-.03.31-.06.47-.1,1.52-.4,3.2-.83,5.02-1.29,1.06-.26,1.93-.48,2.58-.64.09-.02.18-.04.26-.06.31-.08.56-.14.73-.18.03,0,.06-.01.08-.02.03,0,.05-.01.07-.02.02,0,.04,0,.06-.01.01,0,.03,0,.04-.01,0,0,.02,0,.03,0,.01,0,.02,0,.02,0,10.62-2.58,24.63-5.62,37.74-7.34,1.02-.13,2.03-.26,3.03-.37,7.49-.87,14.58-1.26,20.42-.81,25.43,1.95-4.71,16.77-15.12,18.61Z"
            }
        }

        ShapePath {
            fillColor: root.topColour
            strokeColor: "transparent"

            PathSvg {
                path: "m98.12.06c-.29,2.08-1.72,8.42-8.36,9.19-.09,0-.09.13,0,.14,6.64.78,8.07,7.11,8.36,9.19.01.08.13.08.14,0,.29-2.08,1.72-8.42,8.36-9.19.09,0,.09-.13,0-.14-6.64-.78-8.07-7.11-8.36-9.19-.01-.08-.13-.08-.14,0Z"
            }
        }

        ShapePath {
            fillColor: root.topColour
            strokeColor: "transparent"

            PathSvg {
                path: "m113.36,15.5c-.22,1.29-1.08,4.35-4.38,4.87-.08.01-.08.13,0,.14,3.3.52,4.17,3.58,4.38,4.87.01.08.13.08.14,0,.22-1.29,1.08-4.35,4.38-4.87.08-.01.08-.13,0-.14-3.3-.52-4.17-3.58-4.38-4.87-.01-.08-.13-.08-.14,0Z"
            }
        }

        ShapePath {
            fillColor: root.topColour
            strokeColor: "transparent"

            PathSvg {
                path: "m112.69,65.22c-.19,1.01-.86,3.15-3.2,3.57-.08.01-.08.13,0,.14,2.34.42,3.01,2.56,3.2,3.57.01.08.13.08.14,0,.19-1.01.86-3.15,3.2-3.57.08-.01.08-.13,0-.14-2.34-.42-3.01-2.56-3.2-3.57-.01-.08-.13-.08-.14,0Z"
            }
        }
    }
}


================================================
FILE: components/MaterialIcon.qml
================================================
import qs.services
import qs.config

StyledText {
    property real fill
    property int grade: Colours.light ? 0 : -25

    font.family: Appearance.font.family.material
    font.pointSize: Appearance.font.size.larger
    font.variableAxes: ({
            FILL: fill.toFixed(1),
            GRAD: grade,
            opsz: fontInfo.pixelSize,
            wght: fontInfo.weight
        })
}


================================================
FILE: components/PropertyRow.qml
================================================
import qs.components
import qs.services
import qs.config
import QtQuick
import QtQuick.Layouts

ColumnLayout {
    id: root

    required property string label
    required property string value
    property bool showTopMargin: false

    spacing: Appearance.spacing.small / 2

    StyledText {
        Layout.topMargin: root.showTopMargin ? Appearance.spacing.normal : 0
        text: root.label
    }

    StyledText {
        text: root.value
        color: Colours.palette.m3outline
        font.pointSize: Appearance.font.size.small
    }
}


================================================
FILE: components/SectionContainer.qml
================================================
import qs.components
import qs.services
import qs.config
import QtQuick
import QtQuick.Layouts

StyledRect {
    id: root

    default property alias content: contentColumn.data
    property real contentSpacing: Appearance.spacing.larger
    property bool alignTop: false

    Layout.fillWidth: true
    implicitHeight: contentColumn.implicitHeight + Appearance.padding.large * 2

    radius: Appearance.rounding.normal
    color: Colours.transparency.enabled ? Colours.layer(Colours.palette.m3surfaceContainer, 2) : Colours.palette.m3surfaceContainerHigh

    ColumnLayout {
        id: contentColumn

        anchors.left: parent.left
        anchors.right: parent.right
        anchors.top: root.alignTop ? parent.top : undefined
        anchors.verticalCenter: root.alignTop ? undefined : parent.verticalCenter
        anchors.margins: Appearance.padding.large

        spacing: root.contentSpacing
    }
}


================================================
FILE: components/SectionHeader.qml
================================================
import qs.components
import qs.services
import qs.config
import QtQuick
import QtQuick.Layouts

ColumnLayout {
    id: root

    required property string title
    property string description: ""

    spacing: 0

    StyledText {
        Layout.topMargin: Appearance.spacing.large
        text: root.title
        font.pointSize: Appearance.font.size.larger
        font.weight: 500
    }

    StyledText {
        visible: root.description !== ""
        text: root.description
        color: Colours.palette.m3outline
    }
}


================================================
FILE: components/StateLayer.qml
================================================
import qs.services
import qs.config
import QtQuick

MouseArea {
    id: root

    property bool disabled
    property bool showHoverBackground: true
    property color color: Colours.palette.m3onSurface
    // Pick up radius from parent if it has one (parent can be anything with a radius property)
    property real radius: parent?.radius ?? 0 // qmllint disable missing-property
    property alias rect: hoverLayer

    function onClicked(): void {
    }

    anchors.fill: parent

    enabled: !disabled
    cursorShape: disabled ? undefined : Qt.PointingHandCursor
    hoverEnabled: true

    onPressed: event => {
        if (disabled)
            return;

        rippleAnim.x = event.x;
        rippleAnim.y = event.y;

        const dist = (ox, oy) => ox * ox + oy * oy;
        rippleAnim.radius = Math.sqrt(Math.max(dist(event.x, event.y), dist(event.x, height - event.y), dist(width - event.x, event.y), dist(width - event.x, height - event.y)));

        rippleAnim.restart();
    }

    onClicked: event => !disabled && onClicked(event)

    SequentialAnimation {
        id: rippleAnim

        property real x
        property real y
        property real radius

        PropertyAction {
            target: ripple
            property: "x"
            value: rippleAnim.x
        }
        PropertyAction {
            target: ripple
            property: "y"
            value: rippleAnim.y
        }
        PropertyAction {
            target: ripple
            property: "opacity"
            value: 0.08
        }
        Anim {
            target: ripple
            properties: "implicitWidth,implicitHeight"
            from: 0
            to: rippleAnim.radius * 2
            easing.bezierCurve: Appearance.anim.curves.standardDecel
        }
        Anim {
            target: ripple
            property: "opacity"
            to: 0
        }
    }

    StyledClippingRect {
        id: hoverLayer

        anchors.fill: parent

        color: Qt.alpha(root.color, root.disabled ? 0 : root.pressed ? 0.12 : (root.showHoverBackground && root.containsMouse) ? 0.08 : 0)
        radius: root.radius

        StyledRect {
            id: ripple

            radius: Appearance.rounding.full
            color: root.color
            opacity: 0

            transform: Translate {
                x: -ripple.width / 2
                y: -ripple.height / 2
            }
        }
    }
}


================================================
FILE: components/StyledClippingRect.qml
================================================
import Quickshell.Widgets
import QtQuick

ClippingRectangle {
    id: root

    color: "transparent"

    Behavior on color {
        CAnim {}
    }
}


================================================
FILE: components/StyledRect.qml
================================================
import QtQuick

Rectangle {
    id: root

    color: "transparent"

    Behavior on color {
        CAnim {}
    }
}


================================================
FILE: components/StyledText.qml
================================================
pragma ComponentBehavior: Bound

import qs.services
import qs.config
import QtQuick

Text {
    id: root

    property bool animate: false
    property string animateProp: "scale"
    property real animateFrom: 0
    property real animateTo: 1
    property int animateDuration: Appearance.anim.durations.normal

    renderType: Text.NativeRendering
    textFormat: Text.PlainText
    color: Colours.palette.m3onSurface
    font.family: Appearance.font.family.sans
    font.pointSize: Appearance.font.size.smaller

    Behavior on color {
        CAnim {}
    }

    Behavior on text {
        enabled: root.animate

        SequentialAnimation {
            Anim {
                to: root.animateFrom
                easing.bezierCurve: Appearance.anim.curves.standardAccel
            }
            PropertyAction {}
            Anim {
                to: root.animateTo
                easing.bezierCurve: Appearance.anim.curves.standardDecel
            }
        }
    }

    component Anim: NumberAnimation {
        target: root
        property: root.animateProp
        duration: root.animateDuration / 2
        easing.type: Easing.BezierSpline
    }
}


================================================
FILE: components/containers/StyledFlickable.qml
================================================
import ".."
import QtQuick

Flickable {
    id: root

    maximumFlickVelocity: 3000

    rebound: Transition {
        Anim {
            properties: "x,y"
        }
    }
}


================================================
FILE: components/containers/StyledListView.qml
================================================
import ".."
import QtQuick

ListView {
    id: root

    maximumFlickVelocity: 3000

    rebound: Transition {
        Anim {
            properties: "x,y"
        }
    }
}


================================================
FILE: components/containers/StyledWindow.qml
================================================
import Quickshell
import Quickshell.Wayland

PanelWindow {
    required property string name

    WlrLayershell.namespace: `caelestia-${name}`
    color: "transparent"
}


================================================
FILE: components/controls/CircularIndicator.qml
================================================
import ".."
import qs.services
import qs.config
import Caelestia.Internal
import QtQuick
import QtQuick.Templates

BusyIndicator {
    id: root

    enum AnimType {
        Advance = 0,
        Retreat
    }

    enum AnimState {
        Stopped,
        Running,
        Completing
    }

    property real implicitSize: Appearance.font.size.normal * 3
    property real strokeWidth: Appearance.padding.small * 0.8
    property color fgColour: Colours.palette.m3primary
    property color bgColour: Colours.palette.m3secondaryContainer

    property alias type: manager.indeterminateAnimationType
    readonly property alias progress: manager.progress

    property real internalStrokeWidth: strokeWidth
    property int animState

    padding: 0
    implicitWidth: implicitSize
    implicitHeight: implicitSize

    Component.onCompleted: {
        if (running) {
            running = false;
            running = true;
        }
    }

    onRunningChanged: {
        if (running) {
            manager.completeEndProgress = 0;
            animState = CircularIndicator.Running;
        } else {
            if (animState == CircularIndicator.Running)
                animState = CircularIndicator.Completing;
        }
    }

    states: State {
        name: "stopped"
        when: !root.running

        PropertyChanges {
            root.opacity: 0
            root.internalStrokeWidth: root.strokeWidth / 3
        }
    }

    transitions: Transition {
        Anim {
            properties: "opacity,internalStrokeWidth"
            duration: manager.completeEndDuration * Appearance.anim.durations.scale
        }
    }

    contentItem: CircularProgress {
        anchors.fill: parent
        strokeWidth: root.internalStrokeWidth
        fgColour: root.fgColour
        bgColour: root.bgColour
        padding: root.padding
        rotation: manager.rotation
        startAngle: manager.startFraction * 360
        value: manager.endFraction - manager.startFraction
    }

    CircularIndicatorManager {
        id: manager
    }

    NumberAnimation {
        running: root.animState !== CircularIndicator.Stopped
        loops: Animation.Infinite
        target: manager
        property: "progress"
        from: 0
        to: 1
        duration: manager.duration * Appearance.anim.durations.scale
    }

    NumberAnimation {
        running: root.animState === CircularIndicator.Completing
        target: manager
        property: "completeEndProgress"
        from: 0
        to: 1
        duration: manager.completeEndDuration * Appearance.anim.durations.scale
        onFinished: {
            if (root.animState === CircularIndicator.Completing)
                root.animState = CircularIndicator.Stopped;
        }
    }
}


================================================
FILE: components/controls/CircularProgress.qml
================================================
import ".."
import qs.services
import qs.config
import QtQuick
import QtQuick.Shapes

Shape {
    id: root

    property real value
    property int startAngle: -90
    property int strokeWidth: Appearance.padding.smaller
    property int padding: 0
    property int spacing: Appearance.spacing.small
    property color fgColour: Colours.palette.m3primary
    property color bgColour: Colours.palette.m3secondaryContainer

    readonly property real size: Math.min(width, height)
    readonly property real arcRadius: (size - padding - strokeWidth) / 2
    readonly property real vValue: value || 1 / 360
    readonly property real gapAngle: ((spacing + strokeWidth) / (arcRadius || 1)) * (180 / Math.PI)

    preferredRendererType: Shape.CurveRenderer
    asynchronous: true

    ShapePath {
        fillColor: "transparent"
        strokeColor: root.bgColour
        strokeWidth: root.strokeWidth
        capStyle: Appearance.rounding.scale === 0 ? ShapePath.SquareCap : ShapePath.RoundCap

        PathAngleArc {
            startAngle: root.startAngle + 360 * root.vValue + root.gapAngle
            sweepAngle: Math.max(-root.gapAngle, 360 * (1 - root.vValue) - root.gapAngle * 2)
            radiusX: root.arcRadius
            radiusY: root.arcRadius
            centerX: root.size / 2
            centerY: root.size / 2
        }

        Behavior on strokeColor {
            CAnim {
                duration: Appearance.anim.durations.large
            }
        }
    }

    ShapePath {
        fillColor: "transparent"
        strokeColor: root.fgColour
        strokeWidth: root.strokeWidth
        capStyle: Appearance.rounding.scale === 0 ? ShapePath.SquareCap : ShapePath.RoundCap

        PathAngleArc {
            startAngle: root.startAngle
            sweepAngle: 360 * root.vValue
            radiusX: root.arcRadius
            radiusY: root.arcRadius
            centerX: root.size / 2
            centerY: root.size / 2
        }

        Behavior on strokeColor {
            CAnim {
                duration: Appearance.anim.durations.large
            }
        }
    }
}


================================================
FILE: components/controls/CollapsibleSection.qml
================================================
import ".."
import qs.components
import qs.services
import qs.config
import QtQuick
import QtQuick.Layouts

ColumnLayout {
    id: root

    required property string title
    property string description: ""
    property bool expanded: false
    property bool showBackground: false
    property bool nested: false

    default property alias content: contentColumn.data

    signal toggleRequested

    spacing: Appearance.spacing.small
    Layout.fillWidth: true

    Item {
        id: sectionHeaderItem

        Layout.fillWidth: true
        Layout.preferredHeight: Math.max(titleRow.implicitHeight + Appearance.padding.normal * 2, 48)

        RowLayout {
            id: titleRow

            anchors.left: parent.left
            anchors.right: parent.right
            anchors.verticalCenter: parent.verticalCenter
            anchors.leftMargin: Appearance.padding.normal
            anchors.rightMargin: Appearance.padding.normal
            spacing: Appearance.spacing.normal

            StyledText {
                text: root.title
                font.pointSize: Appearance.font.size.larger
                font.weight: 500
            }

            Item {
                Layout.fillWidth: true
            }

            MaterialIcon {
                text: "expand_more"
                rotation: root.expanded ? 180 : 0
                color: Colours.palette.m3onSurfaceVariant
                font.pointSize: Appearance.font.size.normal

                Behavior on rotation {
                    Anim {
                        duration: Appearance.anim.durations.small
                        easing.bezierCurve: Appearance.anim.curves.standard
                    }
                }
            }
        }

        StateLayer {
            function onClicked(): void {
                root.toggleRequested();
                root.expanded = !root.expanded;
            }

            anchors.fill: parent
            color: Colours.palette.m3onSurface
            radius: Appearance.rounding.normal
            showHoverBackground: false
        }
    }

    Item {
        id: contentWrapper

        Layout.fillWidth: true
        Layout.preferredHeight: root.expanded ? (contentColumn.implicitHeight + Appearance.spacing.small * 2) : 0
        clip: true

        Behavior on Layout.preferredHeight {
            Anim {
                easing.bezierCurve: Appearance.anim.curves.standard
            }
        }

        StyledRect {
            id: backgroundRect

            anchors.fill: parent
            radius: Appearance.rounding.normal
            color: Colours.transparency.enabled ? Colours.layer(Colours.palette.m3surfaceContainer, root.nested ? 3 : 2) : (root.nested ? Colours.palette.m3surfaceContainerHigh : Colours.palette.m3surfaceContainer)
            opacity: root.showBackground && root.expanded ? 1.0 : 0.0
            visible: root.showBackground

            Behavior on opacity {
                Anim {
                    easing.bezierCurve: Appearance.anim.curves.standard
                }
            }
        }

        ColumnLayout {
            id: contentColumn

            anchors.left: parent.left
            anchors.right: parent.right
            y: Appearance.spacing.small
            anchors.leftMargin: Appearance.padding.normal
            anchors.rightMargin: Appearance.padding.normal
            anchors.bottomMargin: Appearance.spacing.small
            spacing: Appearance.spacing.small
            opacity: root.expanded ? 1.0 : 0.0

            Behavior on opacity {
                Anim {
                    easing.bezierCurve: Appearance.anim.curves.standard
                }
            }

            StyledText {
                id: descriptionText

                Layout.fillWidth: true
                Layout.topMargin: root.description !== "" ? Appearance.spacing.smaller : 0
                Layout.bottomMargin: root.description !== "" ? Appearance.spacing.small : 0
                visible: root.description !== ""
                text: root.description
                color: Colours.palette.m3onSurfaceVariant
                font.pointSize: Appearance.font.size.small
                wrapMode: Text.Wrap
            }
        }
    }
}


================================================
FILE: components/controls/CustomMouseArea.qml
================================================
import QtQuick

MouseArea {
    property int scrollAccumulatedY: 0

    function onWheel(event: WheelEvent): void {
    }

    onWheel: event => {
        // Update accumulated scroll
        if (Math.sign(event.angleDelta.y) !== Math.sign(scrollAccumulatedY))
            scrollAccumulatedY = 0;
        scrollAccumulatedY += event.angleDelta.y;

        // Trigger handler and reset if above threshold
        if (Math.abs(scrollAccumulatedY) >= 120) {
            onWheel(event);
            scrollAccumulatedY = 0;
        }
    }
}


================================================
FILE: components/controls/CustomSpinBox.qml
================================================
pragma ComponentBehavior: Bound

import ".."
import qs.services
import qs.config
import QtQuick
import QtQuick.Layouts

RowLayout {
    id: root

    property real value
    property real max: Infinity
    property real min: -Infinity
    property real step: 1
    property alias repeatRate: timer.interval

    property bool isEditing: false
    property string displayText: root.value.toString()

    signal valueModified(value: real)

    spacing: Appearance.spacing.small

    onValueChanged: {
        if (!root.isEditing) {
            root.displayText = root.value.toString();
        }
    }

    StyledTextField {
        id: textField

        inputMethodHints: Qt.ImhFormattedNumbersOnly
        text: root.isEditing ? text : root.displayText
        validator: DoubleValidator {
            bottom: root.min
            top: root.max
            decimals: root.step < 1 ? Math.max(1, Math.ceil(-Math.log10(root.step))) : 0
        }
        onActiveFocusChanged: {
            if (activeFocus) {
                root.isEditing = true;
            } else {
                root.isEditing = false;
                root.displayText = root.value.toString();
            }
        }
        onAccepted: {
            const numValue = parseFloat(text);
            if (!isNaN(numValue)) {
                const clampedValue = Math.max(root.min, Math.min(root.max, numValue));
                root.value = clampedValue;
                root.displayText = clampedValue.toString();
                root.valueModified(clampedValue);
            } else {
                text = root.displayText;
            }
            root.isEditing = false;
        }
        onEditingFinished: {
            if (text !== root.displayText) {
                const numValue = parseFloat(text);
                if (!isNaN(numValue)) {
                    const clampedValue = Math.max(root.min, Math.min(root.max, numValue));
                    root.value = clampedValue;
                    root.displayText = clampedValue.toString();
                    root.valueModified(clampedValue);
                } else {
                    text = root.displayText;
                }
            }
            root.isEditing = false;
        }

        padding: Appearance.padding.small
        leftPadding: Appearance.padding.normal
        rightPadding: Appearance.padding.normal

        background: StyledRect {
            implicitWidth: 100
            radius: Appearance.rounding.small
            color: Colours.tPalette.m3surfaceContainerHigh
        }
    }

    StyledRect {
        radius: Appearance.rounding.small
        color: Colours.palette.m3primary

        implicitWidth: implicitHeight
        implicitHeight: upIcon.implicitHeight + Appearance.padding.small * 2

        StateLayer {
            id: upState

            function onClicked(): void {
                let newValue = Math.min(root.max, root.value + root.step);
                // Round to avoid floating point precision errors
                const decimals = root.step < 1 ? Math.max(1, Math.ceil(-Math.log10(root.step))) : 0;
                newValue = Math.round(newValue * Math.pow(10, decimals)) / Math.pow(10, decimals);
                root.value = newValue;
                root.displayText = newValue.toString();
                root.valueModified(newValue);
            }

            color: Colours.palette.m3onPrimary

            onPressAndHold: timer.start()
            onReleased: timer.stop()
        }

        MaterialIcon {
            id: upIcon

            anchors.centerIn: parent
            text: "keyboard_arrow_up"
            color: Colours.palette.m3onPrimary
        }
    }

    StyledRect {
        radius: Appearance.rounding.small
        color: Colours.palette.m3primary

        implicitWidth: implicitHeight
        implicitHeight: downIcon.implicitHeight + Appearance.padding.small * 2

        StateLayer {
            id: downState

            function onClicked(): void {
                let newValue = Math.max(root.min, root.value - root.step);
                // Round to avoid floating point precision errors
                const decimals = root.step < 1 ? Math.max(1, Math.ceil(-Math.log10(root.step))) : 0;
                newValue = Math.round(newValue * Math.pow(10, decimals)) / Math.pow(10, decimals);
                root.value = newValue;
                root.displayText = newValue.toString();
                root.valueModified(newValue);
            }

            color: Colours.palette.m3onPrimary

            onPressAndHold: timer.start()
            onReleased: timer.stop()
        }

        MaterialIcon {
            id: downIcon

            anchors.centerIn: parent
            text: "keyboard_arrow_down"
            color: Colours.palette.m3onPrimary
        }
    }

    Timer {
        id: timer

        interval: 100
        repeat: true
        triggeredOnStart: true
        onTriggered: {
            if (upState.pressed)
                upState.onClicked();
            else if (downState.pressed)
                downState.onClicked();
        }
    }
}


================================================
FILE: components/controls/FilledSlider.qml
================================================
import ".."
import "../effects"
import qs.services
import qs.config
import QtQuick
import QtQuick.Templates

Slider {
    id: root

    required property string icon
    property real oldValue
    property bool initialized

    orientation: Qt.Vertical

    background: StyledRect {
        color: Colours.layer(Colours.palette.m3surfaceContainer, 2)
        radius: Appearance.rounding.full

        StyledRect {
            anchors.left: parent.left
            anchors.right: parent.right

            y: root.handle.y
            implicitHeight: parent.height - y

            color: Colours.palette.m3secondary
            radius: parent.radius
        }
    }

    handle: Item {
        id: handle

        property alias moving: icon.moving

        y: root.visualPosition * (root.availableHeight - height)
        implicitWidth: root.width
        implicitHeight: root.width

        Elevation {
            anchors.fill: parent
            radius: rect.radius
            level: handleInteraction.containsMouse ? 2 : 1
        }

        StyledRect {
            id: rect

            anchors.fill: parent

            color: Colours.palette.m3inverseSurface
            radius: Appearance.rounding.full

            MouseArea {
                id: handleInteraction

                anchors.fill: parent
                hoverEnabled: true
                cursorShape: Qt.PointingHandCursor
                acceptedButtons: Qt.NoButton
            }

            MaterialIcon {
                id: icon

                property bool moving

                function update(): void {
                    animate = !moving;
                    binding.when = moving;
                    font.pointSize = moving ? Appearance.font.size.small : Appearance.font.size.larger;
                    font.family = moving ? Appearance.font.family.sans : Appearance.font.family.material;
                }

                text: root.icon
                color: Colours.palette.m3inverseOnSurface
                anchors.centerIn: parent

                onMovingChanged: anim.restart()

                Binding {
                    id: binding

                    target: icon
                    property: "text"
                    value: Math.round(root.value * 100)
                    when: false
                }

                SequentialAnimation {
                    id: anim

                    Anim {
                        target: icon
                        property: "scale"
                        to: 0
                        duration: Appearance.anim.durations.normal / 2
                        easing.bezierCurve: Appearance.anim.curves.standardAccel
                    }
                    ScriptAction {
                        script: icon.update()
                    }
                    Anim {
                        target: icon
                        property: "scale"
                        to: 1
                        duration: Appearance.anim.durations.normal / 2
                        easing.bezierCurve: Appearance.anim.curves.standardDecel
                    }
                }
            }
        }
    }

    onPressedChanged: handle.moving = pressed

    onValueChanged: {
        if (!initialized) {
            initialized = true;
            return;
        }
        if (Math.abs(value - oldValue) < 0.01)
            return;
        oldValue = value;
        handle.moving = true;
        stateChangeDelay.restart();
    }

    Timer {
        id: stateChangeDelay

        interval: 500
        onTriggered: {
            if (!root.pressed)
                handle.moving = false;
        }
    }

    Behavior on value {
        Anim {
            duration: Appearance.anim.durations.large
        }
    }
}


================================================
FILE: components/controls/IconButton.qml
================================================
import ".."
import qs.services
import qs.config
import QtQuick

StyledRect {
    id: root

    enum Type {
        Filled,
        Tonal,
        Text
    }

    property alias icon: label.text
    property bool checked
    property bool toggle
    property real padding: type === IconButton.Text ? Appearance.padding.small / 2 : Appearance.padding.smaller
    property alias font: label.font
    property int type: IconButton.Filled
    property bool disabled

    property alias stateLayer: stateLayer
    property alias label: label
    property alias radiusAnim: radiusAnim

    property bool internalChecked
    property color activeColour: type === IconButton.Filled ? Colours.palette.m3primary : Colours.palette.m3secondary
    property color inactiveColour: {
        if (!toggle && type === IconButton.Filled)
            return Colours.palette.m3primary;
        return type === IconButton.Filled ? Colours.tPalette.m3surfaceContainer : Colours.palette.m3secondaryContainer;
    }
    property color activeOnColour: type === IconButton.Filled ? Colours.palette.m3onPrimary : type === IconButton.Tonal ? Colours.palette.m3onSecondary : Colours.palette.m3primary
    property color inactiveOnColour: {
        if (!toggle && type === IconButton.Filled)
            return Colours.palette.m3onPrimary;
        return type === IconButton.Tonal ? Colours.palette.m3onSecondaryContainer : Colours.palette.m3onSurfaceVariant;
    }
    property color disabledColour: Qt.alpha(Colours.palette.m3onSurface, 0.1)
    property color disabledOnColour: Qt.alpha(Colours.palette.m3onSurface, 0.38)

    signal clicked

    onCheckedChanged: internalChecked = checked

    radius: internalChecked ? Appearance.rounding.small : implicitHeight / 2 * Math.min(1, Appearance.rounding.scale)
    color: type === IconButton.Text ? "transparent" : disabled ? disabledColour : internalChecked ? activeColour : inactiveColour

    implicitWidth: implicitHeight
    implicitHeight: label.implicitHeight + padding * 2

    StateLayer {
        id: stateLayer

        function onClicked(): void {
            if (root.toggle)
                root.internalChecked = !root.internalChecked;
            root.clicked();
        }

        color: root.internalChecked ? root.activeOnColour : root.inactiveOnColour
        disabled: root.disabled
    }

    MaterialIcon {
        id: label

        anchors.centerIn: parent
        color: root.disabled ? root.disabledOnColour : root.internalChecked ? root.activeOnColour : root.inactiveOnColour
        fill: !root.toggle || root.internalChecked ? 1 : 0

        Behavior on fill {
            Anim {}
        }
    }

    Behavior on radius {
        Anim {
            id: radiusAnim
        }
    }
}


================================================
FILE: components/controls/IconTextButton.qml
================================================
import ".."
import qs.services
import qs.config
import QtQuick
import QtQuick.Layouts

StyledRect {
    id: root

    enum Type {
        Filled,
        Tonal,
        Text
    }

    property alias icon: iconLabel.text
    property alias text: label.text
    property bool checked
    property bool toggle
    property real horizontalPadding: Appearance.padding.normal
    property real verticalPadding: Appearance.padding.smaller
    property alias font: label.font
    property int type: IconTextButton.Filled

    property alias stateLayer: stateLayer
    property alias iconLabel: iconLabel
    property alias label: label

    property bool internalChecked
    property color activeColour: type === IconTextButton.Filled ? Colours.palette.m3primary : Colours.palette.m3secondary
    property color inactiveColour: type === IconTextButton.Filled ? Colours.tPalette.m3surfaceContainer : Colours.palette.m3secondaryContainer
    property color activeOnColour: type === IconTextButton.Filled ? Colours.palette.m3onPrimary : Colours.palette.m3onSecondary
    property color inactiveOnColour: type === IconTextButton.Filled ? Colours.palette.m3onSurface : Colours.palette.m3onSecondaryContainer

    signal clicked

    onCheckedChanged: internalChecked = checked

    radius: internalChecked ? Appearance.rounding.small : implicitHeight / 2 * Math.min(1, Appearance.rounding.scale)
    color: type === IconTextButton.Text ? "transparent" : internalChecked ? activeColour : inactiveColour

    implicitWidth: row.implicitWidth + horizontalPadding * 2
    implicitHeight: row.implicitHeight + verticalPadding * 2

    StateLayer {
        id: stateLayer

        function onClicked(): void {
            if (root.toggle)
                root.internalChecked = !root.internalChecked;
            root.clicked();
        }

        color: root.internalChecked ? root.activeOnColour : root.inactiveOnColour
    }

    RowLayout {
        id: row

        anchors.centerIn: parent
        spacing: Appearance.spacing.small

        MaterialIcon {
            id: iconLabel

            Layout.alignment: Qt.AlignVCenter
            Layout.topMargin: Math.round(fontInfo.pointSize * 0.0575)
            color: root.internalChecked ? root.activeOnColour : root.inactiveOnColour
            fill: root.internalChecked ? 1 : 0

            Behavior on fill {
                Anim {}
            }
        }

        StyledText {
            id: label

            Layout.alignment: Qt.AlignVCenter
            Layout.topMargin: -Math.round(iconLabel.fontInfo.pointSize * 0.0575)
            color: root.internalChecked ? root.activeOnColour : root.inactiveOnColour
        }
    }

    Behavior on radius {
        Anim {}
    }
}


================================================
FILE: components/controls/Menu.qml
================================================
pragma ComponentBehavior: Bound

import ".."
import "../effects"
import qs.services
import qs.config
import QtQuick
import QtQuick.Layouts

Elevation {
    id: root

    property list<MenuItem> items
    property MenuItem active: items[0] ?? null
    property bool expanded

    signal itemSelected(item: MenuItem)

    radius: Appearance.rounding.small / 2
    level: 2

    implicitWidth: Math.max(200, column.implicitWidth)
    implicitHeight: root.expanded ? column.implicitHeight : 0
    opacity: root.expanded ? 1 : 0

    StyledClippingRect {
        anchors.fill: parent
        radius: parent.radius
        color: Colours.palette.m3surfaceContainer

        ColumnLayout {
            id: column

            anchors.left: parent.left
            anchors.right: parent.right
            spacing: 0

            Repeater {
                model: root.items

                StyledRect {
                    id: item

                    required property int index
                    required property MenuItem modelData
                    readonly property bool active: modelData === root.active

                    Layout.fillWidth: true
                    implicitWidth: menuOptionRow.implicitWidth + Appearance.padding.normal * 2
                    implicitHeight: menuOptionRow.implicitHeight + Appearance.padding.normal * 2

                    color: Qt.alpha(Colours.palette.m3secondaryContainer, active ? 1 : 0)

                    StateLayer {
                        function onClicked(): void {
                            root.itemSelected(item.modelData);
                            root.active = item.modelData;
                            root.expanded = false;
                        }

                        color: item.active ? Colours.palette.m3onSecondaryContainer : Colours.palette.m3onSurface
                        disabled: !root.expanded
                    }

                    RowLayout {
                        id: menuOptionRow

                        anchors.fill: parent
                        anchors.margins: Appearance.padding.normal
                        spacing: Appearance.spacing.small

                        MaterialIcon {
                            Layout.alignment: Qt.AlignVCenter
                            text: item.modelData.icon
                            color: item.active ? Colours.palette.m3onSecondaryContainer : Colours.palette.m3onSurfaceVariant
                        }

                        StyledText {
                            Layout.alignment: Qt.AlignVCenter
                            Layout.fillWidth: true
                            text: item.modelData.text
                            color: item.active ? Colours.palette.m3onSecondaryContainer : Colours.palette.m3onSurface
                        }

                        Loader {
                            asynchronous: true
                            Layout.alignment: Qt.AlignVCenter
                            active: item.modelData.trailingIcon.length > 0
                            visible: active

                            sourceComponent: MaterialIcon {
                                text: item.modelData.trailingIcon
                                color: item.active ? Colours.palette.m3onSecondaryContainer : Colours.palette.m3onSurface
                            }
                        }
                    }
                }
            }
        }
    }

    Behavior on opacity {
        Anim {
            duration: Appearance.anim.durations.expressiveDefaultSpatial
        }
    }

    Behavior on implicitHeight {
        Anim {
            duration: Appearance.anim.durations.expressiveDefaultSpatial
            easing.bezierCurve: Appearance.anim.curves.expressiveDefaultSpatial
        }
    }
}


================================================
FILE: components/controls/MenuItem.qml
================================================
import QtQuick

QtObject {
    required property string text
    property string icon
    property string trailingIcon
    property string activeIcon: icon
    property string activeText: text

    signal clicked
}


================================================
FILE: components/controls/SpinBoxRow.qml
================================================
import ".."
import qs.components
import qs.services
import qs.config
import QtQuick
import QtQuick.Layouts

StyledRect {
    id: root

    required property string label
    required property real value
    required property real min
    required property real max
    property real step: 1
    property var onValueModified: function (value) {}

    Layout.fillWidth: true
    implicitHeight: row.implicitHeight + Appearance.padding.large * 2
    radius: Appearance.rounding.normal
    color: Colours.layer(Colours.palette.m3surfaceContainer, 2)

    Behavior on implicitHeight {
        Anim {}
    }

    RowLayout {
        id: row

        anchors.left: parent.left
        anchors.right: parent.right
        anchors.verticalCenter: parent.verticalCenter
        anchors.margins: Appearance.padding.large
        spacing: Appearance.spacing.normal

        StyledText {
            Layout.fillWidth: true
            text: root.label
        }

        CustomSpinBox {
            min: root.min
            max: root.max
            step: root.step
            value: root.value
            onValueModified: value => {
                root.onValueModified(value);
            }
        }
    }
}


================================================
FILE: components/controls/SplitButton.qml
================================================
import ".."
import qs.services
import qs.config
import QtQuick
import QtQuick.Layouts

Row {
    id: root

    enum Type {
        Filled,
        Tonal
    }

    property real horizontalPadding: Appearance.padding.normal
    property real verticalPadding: Appearance.padding.smaller
    property int type: SplitButton.Filled
    property bool disabled
    property bool menuOnTop
    property string fallbackIcon
    property string fallbackText

    property alias menuItems: menu.items
    property alias active: menu.active
    property alias expanded: menu.expanded
    property alias menu: menu
    property alias iconLabel: iconLabel
    property alias label: label
    property alias stateLayer: stateLayer

    property color colour: type == SplitButton.Filled ? Colours.palette.m3primary : Colours.palette.m3secondaryContainer
    property color textColour: type == SplitButton.Filled ? Colours.palette.m3onPrimary : Colours.palette.m3onSecondaryContainer
    property color disabledColour: Qt.alpha(Colours.palette.m3onSurface, 0.1)
    property color disabledTextColour: Qt.alpha(Colours.palette.m3onSurface, 0.38)

    spacing: Math.floor(Appearance.spacing.small / 2)

    StyledRect {
        radius: implicitHeight / 2 * Math.min(1, Appearance.rounding.scale)
        topRightRadius: Appearance.rounding.small / 2
        bottomRightRadius: Appearance.rounding.small / 2
        color: root.disabled ? root.disabledColour : root.colour

        implicitWidth: textRow.implicitWidth + root.horizontalPadding * 2
        implicitHeight: expandBtn.implicitHeight

        StateLayer {
            id: stateLayer

            function onClicked(): void {
                root.active?.clicked();
            }

            rect.topRightRadius: parent.topRightRadius
            rect.bottomRightRadius: parent.bottomRightRadius
            color: root.textColour
            disabled: root.disabled
        }

        RowLayout {
            id: textRow

            anchors.centerIn: parent
            anchors.horizontalCenterOffset: Math.floor(root.verticalPadding / 4)
            spacing: Appearance.spacing.small

            MaterialIcon {
                id: iconLabel

                Layout.alignment: Qt.AlignVCenter
                animate: true
                text: root.active?.activeIcon ?? root.fallbackIcon
                color: root.disabled ? root.disabledTextColour : root.textColour
                fill: 1
            }

            StyledText {
                id: label

                Layout.alignment: Qt.AlignVCenter
                Layout.preferredWidth: implicitWidth
                animate: true
                text: root.active?.activeText ?? root.fallbackText
                color: root.disabled ? root.disabledTextColour : root.textColour
                clip: true

                Behavior on Layout.preferredWidth {
                    Anim {
                        easing.bezierCurve: Appearance.anim.curves.emphasized
                    }
                }
            }
        }
    }

    StyledRect {
        id: expandBtn

        property real rad: root.expanded ? implicitHeight / 2 * Math.min(1, Appearance.rounding.scale) : Appearance.rounding.small / 2

        radius: implicitHeight / 2 * Math.min(1, Appearance.rounding.scale)
        topLeftRadius: rad
        bottomLeftRadius: rad
        color: root.disabled ? root.disabledColour : root.colour

        implicitWidth: implicitHeight
        implicitHeight: expandIcon.implicitHeight + root.verticalPadding * 2

        StateLayer {
            id: expandStateLayer

            function onClicked(): void {
                root.expanded = !root.expanded;
            }

            rect.topLeftRadius: parent.topLeftRadius
            rect.bottomLeftRadius: parent.bottomLeftRadius
            color: root.textColour
            disabled: root.disabled
        }

        MaterialIcon {
            id: expandIcon

            anchors.centerIn: parent
            anchors.horizontalCenterOffset: root.expanded ? 0 : -Math.floor(root.verticalPadding / 4)

            text: "expand_more"
            color: root.disabled ? root.disabledTextColour : root.textColour
            rotation: root.expanded ? 180 : 0

            Behavior on anchors.horizontalCenterOffset {
                Anim {}
            }

            Behavior on rotation {
                Anim {}
            }
        }

        Behavior on rad {
            Anim {}
        }

        Menu {
            id: menu

            states: State {
                when: root.menuOnTop

                AnchorChanges {
                    target: menu
                    anchors.top: undefined
                    anchors.bottom: expandBtn.top
                }
            }

            anchors.top: parent.bottom
            anchors.right: parent.right
            anchors.topMargin: Appearance.spacing.small
            anchors.bottomMargin: Appearance.spacing.small
        }
    }
}


================================================
FILE: components/controls/SplitButtonRow.qml
================================================
pragma ComponentBehavior: Bound

import ".."
import qs.components
import qs.services
import qs.config
import QtQuick
import QtQuick.Layouts

StyledRect {
    id: root

    required property string label
    property int expandedZ: 100
    property bool enabled: true

    property alias menuItems: splitButton.menuItems
    property alias active: splitButton.active
    property alias expanded: splitButton.expanded
    property alias type: splitButton.type

    signal selected(item: MenuItem)

    Layout.fillWidth: true
    implicitHeight: row.implicitHeight + Appearance.padding.large * 2
    radius: Appearance.rounding.normal
    color: Colours.layer(Colours.palette.m3surfaceContainer, 2)

    clip: false
    z: splitButton.menu.implicitHeight > 0 ? expandedZ : 1
    opacity: enabled ? 1.0 : 0.5

    RowLayout {
        id: row

        anchors.fill: parent
        anchors.margins: Appearance.padding.large
        spacing: Appearance.spacing.normal

        StyledText {
            Layout.fillWidth: true
            text: root.label
            color: root.enabled ? Colours.palette.m3onSurface : Colours.palette.m3onSurfaceVariant
        }

        SplitButton {
            id: splitButton

            enabled: root.enabled
            type: SplitButton.Filled

            menu.z: 1

            stateLayer.onClicked: {
                splitButton.expanded = !splitButton.expanded;
            }

            menu.onItemSelected: item => {
                root.selected(item);
            }
        }
    }
}


================================================
FILE: components/controls/StyledInputField.qml
================================================
pragma ComponentBehavior: Bound

import ".."
import qs.components
import qs.services
import qs.config
import QtQuick

Item {
    id: root

    property string text: ""
    property var validator: null
    property bool readOnly: false
    property int horizontalAlignment: TextInput.AlignHCenter
    property int implicitWidth: 70
    property bool enabled: true

    // Expose activeFocus through alias to avoid FINAL property override
    readonly property alias hasFocus: inputField.activeFocus

    signal textEdited(string text)
    signal editingFinished

    implicitHeight: inputField.implicitHeight + Appearance.padding.small * 2

    StyledRect {
        id: container

        anchors.fill: parent
        color: inputHover.containsMouse || inputField.activeFocus ? Colours.layer(Colours.palette.m3surfaceContainer, 3) : Colours.layer(Colours.palette.m3surfaceContainer, 2)
        radius: Appearance.rounding.small
        border.width: 1
        border.color: inputField.activeFocus ? Colours.palette.m3primary : Qt.alpha(Colours.palette.m3outline, 0.3)
        opacity: root.enabled ? 1 : 0.5

        Behavior on color {
            CAnim {}
        }
        Behavior on border.color {
            CAnim {}
        }

        MouseArea {
            id: inputHover

            anchors.fill: parent
            hoverEnabled: true
            cursorShape: Qt.IBeamCursor
            acceptedButtons: Qt.NoButton
            enabled: root.enabled
        }

        StyledTextField {
            id: inputField

            anchors.centerIn: parent
            width: parent.width - Appearance.padding.normal
            horizontalAlignment: root.horizontalAlignment
            validator: root.validator
            readOnly: root.readOnly
            enabled: root.enabled

            Binding {
                target: inputField
                property: "text"
                value: root.text
                when: !inputField.activeFocus
            }

            onTextChanged: {
                root.text = text;
                root.textEdited(text);
            }

            onEditingFinished: {
                root.editingFinished();
            }
        }
    }
}


================================================
FILE: components/controls/StyledRadioButton.qml
================================================
import qs.components
import qs.services
import qs.config
import QtQuick
import QtQuick.Templates

RadioButton {
    id: root

    font.pointSize: Appearance.font.size.smaller

    implicitWidth: implicitIndicatorWidth + implicitContentWidth + contentItem.anchors.leftMargin
    implicitHeight: Math.max(implicitIndicatorHeight, implicitContentHeight)

    indicator: Rectangle {
        id: outerCircle

        implicitWidth: 20
        implicitHeight: 20
        radius: Appearance.rounding.full
        color: "transparent"
        border.color: root.checked ? Colours.palette.m3primary : Colours.palette.m3onSurfaceVariant
        border.width: 2
        anchors.verticalCenter: parent.verticalCenter

        StateLayer {
            function onClicked(): void {
                root.click();
            }

            anchors.margins: -Appearance.padding.smaller
            color: root.checked ? Colours.palette.m3onSurface : Colours.palette.m3primary
            z: -1
        }

        StyledRect {
            anchors.centerIn: parent
            implicitWidth: 8
            implicitHeight: 8

            radius: Appearance.rounding.full
            color: Qt.alpha(Colours.palette.m3primary, root.checked ? 1 : 0)
        }

        Behavior on border.color {
            CAnim {}
        }
    }

    contentItem: StyledText {
        text: root.text
        font.pointSize: root.font.pointSize
        anchors.verticalCenter: parent.verticalCenter
        anchors.left: outerCircle.right
        anchors.leftMargin: Appearance.spacing.smaller
    }
}


================================================
FILE: components/controls/StyledScrollBar.qml
================================================
import ".."
import qs.services
import qs.config
import QtQuick
import QtQuick.Templates

ScrollBar {
    id: root

    required property Flickable flickable
    property bool shouldBeActive
    property real nonAnimPosition
    property bool animating
    property bool _updatingFromFlickable: false
    property bool _updatingFromUser: false

    onHoveredChanged: {
        if (hovered)
            shouldBeActive = true;
        else
            shouldBeActive = flickable.moving;
    }

    // Sync nonAnimPosition with Qt's automatic position binding
    onPositionChanged: {
        if (_updatingFromUser) {
            _updatingFromUser = false;
            return;
        }
        if (position === nonAnimPosition) {
            animating = false;
            return;
        }
        if (!animating && !_updatingFromFlickable && !fullMouse.pressed) {
            nonAnimPosition = position;
        }
    }

    Component.onCompleted: {
        if (flickable) {
            const contentHeight = flickable.contentHeight;
            const height = flickable.height;
            if (contentHeight > height) {
                nonAnimPosition = Math.max(0, Math.min(1, flickable.contentY / (contentHeight - height)));
            }
        }
    }
    implicitWidth: Appearance.padding.small

    contentItem: StyledRect {
        anchors.left: parent.left
        anchors.right: parent.right
        opacity: {
            if (root.size === 1)
                return 0;
            if (fullMouse.pressed)
                return 1;
            if (mouse.containsMouse)
                return 0.8;
            if (root.policy === ScrollBar.AlwaysOn || root.shouldBeActive)
                return 0.6;
            return 0;
        }
        radius: Appearance.rounding.full
        color: Colours.palette.m3secondary

        MouseArea {
            id: mouse

            anchors.fill: parent
            cursorShape: Qt.PointingHandCursor
            hoverEnabled: true
            acceptedButtons: Qt.NoButton
        }

        Behavior on opacity {
            Anim {}
        }
    }

    // Sync nonAnimPosition with flickable when not animating
    Connections {
        function onContentYChanged() {
            if (!root.animating && !fullMouse.pressed) {
                root._updatingFromFlickable = true;
                const contentHeight = root.flickable.contentHeight;
                const height = root.flickable.height;
                if (contentHeight > height) {
                    root.nonAnimPosition = Math.max(0, Math.min(1, root.flickable.contentY / (contentHeight - height)));
                } else {
                    root.nonAnimPosition = 0;
                }
                root._updatingFromFlickable = false;
            }
        }

        target: root.flickable
    }

    Connections {
        function onMovingChanged(): void {
            if (root.flickable.moving)
                root.shouldBeActive = true;
            else
                hideDelay.restart();
        }

        target: root.flickable
    }

    Timer {
        id: hideDelay

        interval: 600
        onTriggered: root.shouldBeActive = root.flickable.moving || root.hovered
    }

    CustomMouseArea {
        id: fullMouse

        function onWheel(event: WheelEvent): void {
            root.animating = true;
            root._updatingFromUser = true;
            let newPos = root.nonAnimPosition;
            if (event.angleDelta.y > 0)
                newPos = Math.max(0, root.nonAnimPosition - 0.1);
            else if (event.angleDelta.y < 0)
                newPos = Math.min(1 - root.size, root.nonAnimPosition + 0.1);
            root.nonAnimPosition = newPos;
            // Update flickable position
            // Map scrollbar position [0, 1-size] to contentY [0, maxContentY]
            if (root.flickable) {
                const contentHeight = root.flickable.contentHeight;
                const height = root.flickable.height;
                if (contentHeight > height) {
                    const maxContentY = contentHeight - height;
                    const maxPos = 1 - root.size;
                    const contentY = maxPos > 0 ? (newPos / maxPos) * maxContentY : 0;
                    root.flickable.contentY = Math.max(0, Math.min(maxContentY, contentY));
                }
            }
        }

        anchors.fill: parent
        preventStealing: true

        onPressed: event => {
            root.animating = true;
            root._updatingFromUser = true;
            const newPos = Math.max(0, Math.min(1 - root.size, event.y / root.height - root.size / 2));
            root.nonAnimPosition = newPos;
            // Update flickable position
            // Map scrollbar position [0, 1-size] to contentY [0, maxContentY]
            if (root.flickable) {
                const contentHeight = root.flickable.contentHeight;
                const height = root.flickable.height;
                if (contentHeight > height) {
                    const maxContentY = contentHeight - height;
                    const maxPos = 1 - root.size;
                    const contentY = maxPos > 0 ? (newPos / maxPos) * maxContentY : 0;
                    root.flickable.contentY = Math.max(0, Math.min(maxContentY, contentY));
                }
            }
        }

        onPositionChanged: event => {
            root._updatingFromUser = true;
            const newPos = Math.max(0, Math.min(1 - root.size, event.y / root.height - root.size / 2));
            root.nonAnimPosition = newPos;
            // Update flickable position
            // Map scrollbar position [0, 1-size] to contentY [0, maxContentY]
            if (root.flickable) {
                const contentHeight = root.flickable.contentHeight;
                const height = root.flickable.height;
                if (contentHeight > height) {
                    const maxContentY = contentHeight - height;
                    const maxPos = 1 - root.size;
                    const contentY = maxPos > 0 ? (newPos / maxPos) * maxContentY : 0;
                    root.flickable.contentY = Math.max(0, Math.min(maxContentY, contentY));
                }
            }
        }
    }

    Behavior on position {
        enabled: !fullMouse.pressed

        Anim {}
    }
}


================================================
FILE: components/controls/StyledSlider.qml
================================================
import qs.components
import qs.services
import qs.config
import QtQuick
import QtQuick.Templates

Slider {
    id: root

    background: Item {
        StyledRect {
            anchors.top: parent.top
            anchors.bottom: parent.bottom
            anchors.left: parent.left
            anchors.topMargin: root.implicitHeight / 3
            anchors.bottomMargin: root.implicitHeight / 3

            implicitWidth: root.handle.x - root.implicitHeight / 6

            color: Colours.palette.m3primary
            radius: Appearance.rounding.full
            topRightRadius: root.implicitHeight / 15
            bottomRightRadius: root.implicitHeight / 15
        }

        StyledRect {
            anchors.top: parent.top
            anchors.bottom: parent.bottom
            anchors.right: parent.right
            anchors.topMargin: root.implicitHeight / 3
            anchors.bottomMargin: root.implicitHeight / 3

            implicitWidth: parent.width - root.handle.x - root.handle.implicitWidth - root.implicitHeight / 6

            color: Colours.palette.m3surfaceContainerHighest
            radius: Appearance.rounding.full
            topLeftRadius: root.implicitHeight / 15
            bottomLeftRadius: root.implicitHeight / 15
        }
    }

    handle: StyledRect {
        x: root.visualPosition * root.availableWidth - implicitWidth / 2

        implicitWidth: root.implicitHeight / 4.5
        implicitHeight: root.implicitHeight

        color: Colours.palette.m3primary
        radius: Appearance.rounding.full

        MouseArea {
            anchors.fill: parent
            acceptedButtons: Qt.NoButton
            cursorShape: Qt.PointingHandCursor
        }
    }
}


================================================
FILE: components/controls/StyledSwitch.qml
================================================
import ".."
import qs.services
import qs.config
import QtQuick
import QtQuick.Templates
import QtQuick.Shapes

Switch {
    id: root

    property int cLayer: 1

    implicitWidth: implicitIndicatorWidth
    implicitHeight: implicitIndicatorHeight

    indicator: StyledRect {
        radius: Appearance.rounding.full
        color: root.checked ? Colours.palette.m3primary : Colours.layer(Colours.palette.m3surfaceContainerHighest, root.cLayer)

        implicitWidth: implicitHeight * 1.7
        implicitHeight: Appearance.font.size.normal + Appearance.padding.smaller * 2

        StyledRect {
            readonly property real nonAnimWidth: root.pressed ? implicitHeight * 1.3 : implicitHeight

            radius: Appearance.rounding.full
            color: root.checked ? Colours.palette.m3onPrimary : Colours.layer(Colours.palette.m3outline, root.cLayer + 1)

            x: root.checked ? parent.implicitWidth - nonAnimWidth - Appearance.padding.small / 2 : Appearance.padding.small / 2
            implicitWidth: nonAnimWidth
            implicitHeight: parent.implicitHeight - Appearance.padding.small
            anchors.verticalCenter: parent.verticalCenter

            StyledRect {
                anchors.fill: parent
                radius: parent.radius

                color: root.checked ? Colours.palette.m3primary : Colours.palette.m3onSurface
                opacity: root.pressed ? 0.1 : root.hovered ? 0.08 : 0

                Behavior on opacity {
                    Anim {}
                }
            }

            Shape {
                id: icon

                property point start1: {
                    if (root.pressed)
                        return Qt.point(width * 0.2, height / 2);
                    if (root.checked)
                        return Qt.point(width * 0.15, height / 2);
                    return Qt.point(width * 0.15, height * 0.15);
                }
                property point end1: {
                    if (root.pressed) {
                        if (root.checked)
                            return Qt.point(width * 0.4, height / 2);
                        return Qt.point(width * 0.8, height / 2);
                    }
                    if (root.checked)
                        return Qt.point(width * 0.4, height * 0.7);
                    return Qt.point(width * 0.85, height * 0.85);
                }
                property point start2: {
                    if (root.pressed) {
                        if (root.checked)
                            return Qt.point(width * 0.4, height / 2);
                        return Qt.point(width * 0.2, height / 2);
                    }
                    if (root.checked)
                        return Qt.point(width * 0.4, height * 0.7);
                    return Qt.point(width * 0.15, height * 0.85);
                }
                property point end2: {
                    if (root.pressed)
                        return Qt.point(width * 0.8, height / 2);
                    if (root.checked)
                        return Qt.point(width * 0.85, height * 0.2);
                    return Qt.point(width * 0.85, height * 0.15);
                }

                anchors.centerIn: parent
                width: height
                height: parent.implicitHeight - Appearance.padding.small * 2
                preferredRendererType: Shape.CurveRenderer
                asynchronous: true

                ShapePath {
                    strokeWidth: Appearance.font.size.larger * 0.15
                    strokeColor: root.checked ? Colours.palette.m3primary : Colours.palette.m3surfaceContainerHighest
                    fillColor: "transparent"
                    capStyle: Appearance.rounding.scale === 0 ? ShapePath.SquareCap : ShapePath.RoundCap

                    startX: icon.start1.x
                    startY: icon.start1.y

                    PathLine {
                        x: icon.end1.x
                        y: icon.end1.y
                    }
                    PathMove {
                        x: icon.start2.x
                        y: icon.start2.y
                    }
                    PathLine {
                        x: icon.end2.x
                        y: icon.end2.y
                    }

                    Behavior on strokeColor {
                        CAnim {}
                    }
                }

                Behavior on start1 {
                    PropAnim {}
                }
                Behavior on end1 {
                    PropAnim {}
                }
                Behavior on start2 {
                    PropAnim {}
                }
                Behavior on end2 {
                    PropAnim {}
                }
            }

            Behavior on x {
                Anim {}
            }

            Behavior on implicitWidth {
                Anim {}
            }
        }
    }

    MouseArea {
        anchors.fill: parent
        cursorShape: Qt.PointingHandCursor
        enabled: false
    }

    component PropAnim: PropertyAnimation {
        duration: Appearance.anim.durations.normal
        easing.type: Easing.BezierSpline
        easing.bezierCurve: Appearance.anim.curves.standard
    }
}


================================================
FILE: components/controls/StyledTextField.qml
================================================
pragma ComponentBehavior: Bound

import ".."
import qs.services
import qs.config
import QtQuick
import QtQuick.Controls

TextField {
    id: root

    color: Colours.palette.m3onSurface
    placeholderTextColor: Colours.palette.m3outline
    font.family: Appearance.font.family.sans
    font.pointSize: Appearance.font.size.smaller
    renderType: echoMode === TextField.Password ? TextField.QtRendering : TextField.NativeRendering
    cursorVisible: !readOnly

    background: null

    cursorDelegate: StyledRect {
        id: cursor

        property bool disableBlink

        implicitWidth: 2
        color: Colours.palette.m3primary
        radius: Appearance.rounding.normal

        Connections {
            function onCursorPositionChanged(): void {
                if (root.activeFocus && root.cursorVisible) {
                    cursor.opacity = 1;
                    cursor.disableBlink = true;
                    enableBlink.restart();
                }
            }

            target: root
        }

        Timer {
            id: enableBlink

            interval: 100
            onTriggered: cursor.disableBlink = false
        }

        Timer {
            running: root.activeFocus && root.cursorVisible && !cursor.disableBlink
            repeat: true
            triggeredOnStart: true
            interval: 500
            onTriggered: parent.opacity = parent.opacity === 1 ? 0 : 1
        }

        Binding {
            when: !root.activeFocus || !root.cursorVisible
            cursor.opacity: 0
        }

        Behavior on opacity {
            Anim {
                duration: Appearance.anim.durations.small
            }
        }
    }

    Behavior on color {
        CAnim {}
    }

    Behavior on placeholderTextColor {
        CAnim {}
    }
}


================================================
FILE: components/controls/SwitchRow.qml
================================================
import ".."
import qs.components
import qs.services
import qs.config
import QtQuick
import QtQuick.Layouts

StyledRect {
    id: root

    required property string label
    required property bool checked
    property bool enabled: true
    property var onToggled: function (checked) {}

    Layout.fillWidth: true
    implicitHeight: row.implicitHeight + Appearance.padding.large * 2
    radius: Appearance.rounding.normal
    color: Colours.layer(Colours.palette.m3surfaceContainer, 2)

    Behavior on implicitHeight {
        Anim {}
    }

    RowLayout {
        id: row

        anchors.left: parent.left
        anchors.right: parent.right
        anchors.verticalCenter: parent.verticalCenter
        anchors.margins: Appearance.padding.large
        spacing: Appearance.spacing.normal

        StyledText {
            Layout.fillWidth: true
            text: root.label
        }

        StyledSwitch {
            checked: root.checked
            enabled: root.enabled
            onToggled: {
                root.onToggled(checked);
            }
        }
    }
}


================================================
FILE: components/controls/TextButton.qml
================================================
import ".."
import qs.services
import qs.config
import QtQuick

StyledRect {
    id: root

    enum Type {
        Filled,
        Tonal,
        Text
    }

    property alias text: label.text
    property bool checked
    property bool toggle
    property real horizontalPadding: Appearance.padding.normal
    property real verticalPadding: Appearance.padding.smaller
    property alias font: label.font
    property int type: TextButton.Filled

    property alias stateLayer: stateLayer
    property alias label: label

    property bool internalChecked
    property color activeColour: type === TextButton.Filled ? Colours.palette.m3primary : Colours.palette.m3secondary
    property color inactiveColour: {
        if (!toggle && type === TextButton.Filled)
            return Colours.palette.m3primary;
        return type === TextButton.Filled ? Colours.tPalette.m3surfaceContainer : Colours.palette.m3secondaryContainer;
    }
    property color activeOnColour: {
        if (type === TextButton.Text)
            return Colours.palette.m3primary;
        return type === TextButton.Filled ? Colours.palette.m3onPrimary : Colours.palette.m3onSecondary;
    }
    property color inactiveOnColour: {
        if (!toggle && type === TextButton.Filled)
            return Colours.palette.m3onPrimary;
        if (type === TextButton.Text)
            return Colours.palette.m3primary;
        return type === TextButton.Filled ? Colours.palette.m3onSurface : Colours.palette.m3onSecondaryContainer;
    }

    signal clicked

    onCheckedChanged: internalChecked = checked

    radius: internalChecked ? Appearance.rounding.small : implicitHeight / 2 * Math.min(1, Appearance.rounding.scale)
    color: type === TextButton.Text ? "transparent" : internalChecked ? activeColour : inactiveColour

    implicitWidth: label.implicitWidth + horizontalPadding * 2
    implicitHeight: label.implicitHeight + verticalPadding * 2

    StateLayer {
        id: stateLayer

        function onClicked(): void {
            if (root.toggle)
                root.internalChecked = !root.internalChecked;
            root.clicked();
        }

        color: root.internalChecked ? root.activeOnColour : root.inactiveOnColour
    }

    StyledText {
        id: label

        anchors.centerIn: parent
        color: root.internalChecked ? root.activeOnColour : root.inactiveOnColour
    }

    Behavior on radius {
        Anim {}
    }
}


================================================
FILE: components/controls/ToggleButton.qml
================================================
pragma ComponentBehavior: Bound

import ".."
import qs.components
import qs.components.controls
import qs.services
import qs.config
import QtQuick
import QtQuick.Layouts

StyledRect {
    id: root

    required property bool toggled
    property string icon
    property string label
    property string accent: "Secondary"
    property real iconSize: Appearance.font.size.large
    property real horizontalPadding: Appearance.padding.large
    property real verticalPadding: Appearance.padding.normal
    property string tooltip: ""
    property bool hovered: false

    signal clicked

    Component.onCompleted: {
        hovered = toggleStateLayer.containsMouse;
    }
    Layout.preferredWidth: implicitWidth + (toggleStateLayer.pressed ? Appearance.padding.normal * 2 : toggled ? Appearance.padding.small * 2 : 0)
    implicitWidth: toggleBtnInner.implicitWidth + horizontalPadding * 2
    implicitHeight: toggleBtnIcon.implicitHeight + verticalPadding * 2
    radius: toggled || toggleStateLayer.pressed ? Appearance.rounding.small : Math.min(width, height) / 2 * Math.min(1, Appearance.rounding.scale)
    color: toggled ? Colours.palette[`m3${accent.toLowerCase()}`] : Colours.palette[`m3${accent.toLowerCase()}Container`]

    Connections {
        function onContainsMouseChanged() {
            const newHovered = toggleStateLayer.containsMouse;
            if (root.hovered !== newHovered) {
                root.hovered = newHovered;
            }
        }

        target: toggleStateLayer
    }

    StateLayer {
        id: toggleStateLayer

        function onClicked(): void {
            root.clicked();
        }

        color: root.toggled ? Colours.palette[`m3on${root.accent}`] : Colours.palette[`m3on${root.accent}Container`]
    }

    RowLayout {
        id: toggleBtnInner

        anchors.centerIn: parent
        spacing: Appearance.spacing.normal

        MaterialIcon {
            id: toggleBtnIcon

            visible: !!text
            fill: root.toggled ? 1 : 0
            text: root.icon
            color: root.toggled ? Colours.palette[`m3on${root.accent}`] : Colours.palette[`m3on${root.accent}Container`]
            font.pointSize: root.iconSize

            Behavior on fill {
                Anim {}
            }
        }

        Loader {
            asynchronous: true
            active: !!root.label
            visible: active

            sourceComponent: StyledText {
                text: root.label
                color: root.toggled ? Colours.palette[`m3on${root.accent}`] : Colours.palette[`m3on${root.accent}Container`]
            }
        }
    }

    Behavior on radius {
        Anim {
            duration: Appearance.anim.durations.expressiveFastSpatial
            easing.bezierCurve: Appearance.anim.curves.expressiveFastSpatial
        }
    }

    Behavior on Layout.preferredWidth {
        Anim {
            duration: Appearance.anim.durations.expressiveFastSpatial
            easing.bezierCurve: Appearance.anim.curves.expressiveFastSpatial
        }
    }

    // Tooltip - positioned absolutely, doesn't affect layout
    Loader {
        id: tooltipLoader

        asynchronous: true
        active: root.tooltip !== ""
        z: 10000
        width: 0
        height: 0
        sourceComponent: Component {
            Tooltip {
                target: root
                text: root.tooltip
            }
        }
        // Completely remove from layout
        Layout.fillWidth: false
        Layout.fillHeight: false
        Layout.preferredWidth: 0
        Layout.preferredHeight: 0
        Layout.maximumWidth: 0
        Layout.maximumHeight: 0
        Layout.minimumWidth: 0
        Layout.minimumHeight: 0
    }
}


================================================
FILE: components/controls/ToggleRow.qml
================================================
import qs.components
import qs.components.controls
import qs.config
import QtQuick
import QtQuick.Layouts

RowLayout {
    id: root

    required property string label
    property alias checked: toggle.checked
    property alias toggle: toggle

    Layout.fillWidth: true
    spacing: Appearance.spacing.normal

    StyledText {
        Layout.fillWidth: true
        text: root.label
    }

    StyledSwitch {
        id: toggle

        cLayer: 2
    }
}


================================================
FILE: components/controls/Tooltip.qml
================================================
import ".."
import qs.components.effects
import qs.services
import qs.config
import QtQuick
import QtQuick.Controls

Popup {
    id: root

    required property Item target
    required property string text
    property int delay: 500
    property int timeout: 0

    property bool tooltipVisible: false
    property Timer showTimer: Timer {
        interval: root.delay
        onTriggered: root.tooltipVisible = true
    }
    property Timer hideTimer: Timer {
        interval: root.timeout
        onTriggered: root.tooltipVisible = false
    }

    function updatePosition() {
        if (!target || !parent)
            return;

        // Wait for tooltipRect to have its size calculated
        Qt.callLater(() => {
            if (!target || !parent || !tooltipRect)
                return;

            // Get target position in parent's coordinate system
            const targetPos = target.mapToItem(parent, 0, 0);
            const targetCenterX = targetPos.x + target.width / 2;

            // Get tooltip size (use width/height if available, otherwise implicit)
            const tooltipWidth = tooltipRect.width > 0 ? tooltipRect.width : tooltipRect.implicitWidth;
            const tooltipHeight = tooltipRect.height > 0 ? tooltipRect.height : tooltipRect.implicitHeight;

            // Center tooltip horizontally on target
            let newX = targetCenterX - tooltipWidth / 2;

            // Position tooltip above target
            let newY = targetPos.y - tooltipHeight - Appearance.spacing.small;

            // Keep within bounds
            const padding = Appearance.padding.normal;
            if (newX < padding) {
                newX = padding;
            } else if (newX + tooltipWidth > (parent.width - padding)) {
                newX = parent.width - tooltipWidth - padding;
            }

            // Update popup position
            x = newX;
            y = newY;
        });
    }

    // Popup properties - doesn't affect layout
    parent: {
        let p = target;
        // Walk up to find the root Item (usually has anchors.fill: parent)
        while (p && p.parent) {
            const parentItem = p.parent;
            // Check if this looks like a root pane Item
            if (parentItem && parentItem.anchors && parentItem.anchors.fill !== undefined) {
                return parentItem;
            }
            p = parentItem;
        }
        // Fallback
        return target.parent?.parent?.parent ?? target.parent?.parent ?? target.parent ?? target;
    }

    visible: tooltipVisible
    modal: false
    closePolicy: Popup.NoAutoClose
    padding: 0
    margins: 0
    background: Item {}

    // Update position when target moves or tooltip becomes visible
    onTooltipVisibleChanged: {
        if (tooltipVisible) {
            Qt.callLater(updatePosition);
        }
    }
    Component.onCompleted: {
        if (tooltipVisible) {
            updatePosition();
        }
    }

    enter: Transition {
        Anim {
            property: "opacity"
            from: 0
            to: 1
            duration: Appearance.anim.durations.expressiveFastSpatial
            easing.bezierCurve: Appearance.anim.curves.expressiveFastSpatial
        }
    }

    exit: Transition {
        Anim {
            property: "opacity"
            from: 1
            to: 0
            duration: Appearance.anim.durations.expressiveFastSpatial
            easing.bezierCurve: Appearance.anim.curves.expressiveFastSpatial
        }
    }

    contentItem: StyledRect {
        id: tooltipRect

        implicitWidth: tooltipText.implicitWidth + Appearance.padding.normal * 2
        implicitHeight: tooltipText.implicitHeight + Appearance.padding.smaller * 2

        color: Colours.palette.m3surfaceContainerHighest
        radius: Appearance.rounding.small
        antialiasing: true

        // Add elevation for depth
        Elevation {
            anchors.fill: parent
            radius: parent.radius
            z: -1
            level: 3
        }

        StyledText {
            id: tooltipText

            anchors.centerIn: parent

            text: root.text
            color: Colours.palette.m3onSurface
            font.pointSize: Appearance.font.size.small
        }
    }

    Connections {
        function onXChanged() {
            if (root.tooltipVisible)
                root.updatePosition();
        }
        function onYChanged() {
            if (root.tooltipVisible)
                root.updatePosition();
        }
        function onWidthChanged() {
            if (root.tooltipVisible)
                root.updatePosition();
        }
        function onHeightChanged() {
            if (root.tooltipVisible)
                root.updatePosition();
        }

        target: root.target
    }

    // Monitor hover state
    Connections {
        function onHoveredChanged() {
            if (target.hovered) {
                showTimer.start();
                if (timeout > 0) {
                    hideTimer.stop();
                    hideTimer.start();
                }
            } else {
                showTimer.stop();
                hideTimer.stop();
                tooltipVisible = false;
            }
        }

        target: root.target
    }
}


================================================
FILE: components/effects/ColouredIcon.qml
================================================
pragma ComponentBehavior: Bound

import Caelestia
import Quickshell.Widgets
import QtQuick

IconImage {
    id: root

    required property color colour

    asynchronous: true

    layer.enabled: true
    layer.effect: Colouriser {
        sourceColor: analyser.dominantColour
        colorizationColor: root.colour
    }

    layer.onEnabledChanged: {
        if (layer.enabled && status === Image.Ready)
            analyser.requestUpdate();
    }

    onStatusChanged: {
        if (layer.enabled && status === Image.Ready)
            analyser.requestUpdate();
    }

    ImageAnalyser {
        id: analyser

        sourceItem: root
    }
}


================================================
FILE: components/effects/Colouriser.qml
================================================
import ".."
import QtQuick
import QtQuick.Effects

MultiEffect {
    property color sourceColor: "black"

    colorization: 1
    brightness: 1 - sourceColor.hslLightness

    Behavior on colorizationColor {
        CAnim {}
    }
}


================================================
FILE: components/effects/Elevation.qml
================================================
import ".."
import qs.services
import QtQuick
import QtQuick.Effects

RectangularShadow {
    property int level
    property real dp: [0, 1, 3, 6, 8, 12][level]

    color: Qt.alpha(Colours.palette.m3shadow, 0.7)
    blur: (dp * 5) ** 0.7
    spread: -dp * 0.3 + (dp * 0.1) ** 2
    offset.y: dp / 2

    Behavior on dp {
        Anim {}
    }
}


================================================
FILE: components/effects/InnerBorder.qml
================================================
pragma ComponentBehavior: Bound

import ".."
import qs.services
import qs.config
import QtQuick
import QtQuick.Effects

StyledRect {
    property alias innerRadius: maskInner.radius
    property alias thickness: maskInner.anchors.margins
    property alias leftThickness: maskInner.anchors.leftMargin
    property alias topThickness: maskInner.anchors.topMargin
    property alias rightThickness: maskInner.anchors.rightMargin
    property alias bottomThickness: maskInner.anchors.bottomMargin

    anchors.fill: parent
    color: Colours.tPalette.m3surfaceContainer

    layer.enabled: true
    layer.effect: MultiEffect {
        maskSource: mask
        maskEnabled: true
        maskInverted: true
        maskThresholdMin: 0.5
        maskSpreadAtMin: 1
    }

    Item {
        id: mask

        anchors.fill: parent
        layer.enabled: true
        visible: false

        Rectangle {
            id: maskInner

            anchors.fill: parent
            anchors.margins: Appearance.padding.normal
            radius: Appearance.rounding.small
        }
    }
}


================================================
FILE: components/effects/OpacityMask.qml
================================================
import Quickshell
import QtQuick

ShaderEffect {
    required property Item source
    required property Item maskSource

    fragmentShader: Quickshell.shellPath("assets/shaders/opacitymask.frag.qsb")
}


================================================
FILE: components/filedialog/CurrentItem.qml
================================================
import ".."
import qs.services
import qs.config
import QtQuick
import QtQuick.Shapes

Item {
    id: root

    required property var currentItem

    implicitWidth: content.implicitWidth + Appearance.padding.larger + content.anchors.rightMargin
    implicitHeight: currentItem ? content.implicitHeight + Appearance.padding.normal + content.anchors.bottomMargin : 0

    Shape {
        preferredRendererType: Shape.CurveRenderer

        ShapePath {
            id: path

            readonly property real rounding: Appearance.rounding.small
            readonly property bool flatten: root.implicitHeight < rounding * 2
            readonly property real roundingY: flatten ? root.implicitHeight / 2 : rounding

            strokeWidth: -1
            fillColor: Colours.tPalette.m3surfaceContainer

            startX: root.implicitWidth
            startY: root.implicitHeight

            PathLine {
                relativeX: -(root.implicitWidth + path.rounding)
                relativeY: 0
            }
            PathArc {
                relativeX: path.rounding
                relativeY: -path.roundingY
                radiusX: path.rounding
                radiusY: Math.min(path.rounding, root.implicitHeight)
                direction: PathArc.Counterclockwise
            }
            PathLine {
                relativeX: 0
                relativeY: -(root.implicitHeight - path.roundingY * 2)
            }
            PathArc {
                relativeX: path.rounding
                relativeY: -path.roundingY
                radiusX: path.rounding
                radiusY: Math.min(path.rounding, root.implicitHeight)
            }
            PathLine {
                relativeX: root.implicitHeight > 0 ? root.implicitWidth - path.rounding * 2 : root.implicitWidth
                relativeY: 0
            }
            PathArc {
                relativeX: path.rounding
                relativeY: -path.rounding
                radiusX: path.rounding
                radiusY: path.rounding
                direction: PathArc.Counterclockwise
            }

            Behavior on fillColor {
                CAnim {}
            }
        }
    }

    Item {
        anchors.fill: parent
        clip: true

        StyledText {
            id: content

            anchors.right: parent.right
            anchors.bottom: parent.bottom
            anchors.rightMargin: Appearance.padding.larger - Appearance.padding.small
            anchors.bottomMargin: Appearance.padding.normal - Appearance.padding.small

            Connections {
                function onCurrentItemChanged(): void {
                    if (root.currentItem)
                        content.text = qsTr(`"%1" selected`).arg(root.currentItem.modelData.name);
                }

                target: root
            }
        }
    }

    Behavior on implicitWidth {
        enabled: !!root.currentItem

        Anim {}
    }

    Behavior on implicitHeight {
        Anim {}
    }
}


================================================
FILE: components/filedialog/DialogButtons.qml
================================================
import qs.components
import qs.services
import qs.config
import QtQuick.Layouts

StyledRect {
    id: root

    required property var dialog
    required property FolderContents folder

    implicitHeight: inner.implicitHeight + Appearance.padding.normal * 2

    color: Colours.tPalette.m3surfaceContainer

    RowLayout {
        id: inner

        anchors.fill: parent
        anchors.margins: Appearance.padding.normal

        spacing: Appearance.spacing.small

        StyledText {
            text: qsTr("Filter:")
        }

        StyledRect {
            Layout.fillWidth: true
            Layout.fillHeight: true
            Layout.rightMargin: Appearance.spacing.normal

            color: Colours.tPalette.m3surfaceContainerHigh
            radius: Appearance.rounding.small

            StyledText {
                anchors.fill: parent
                anchors.margins: Appearance.padding.normal

                text: `${root.dialog.filterLabel} (${root.dialog.filters.map(f => `*.${f}`).join(", ")})`
            }
        }

        StyledRect {
            color: Colours.tPalette.m3surfaceContainerHigh
            radius: Appearance.rounding.small

            implicitWidth: cancelText.implicitWidth + Appearance.padding.normal * 2
            implicitHeight: cancelText.implicitHeight + Appearance.padding.normal * 2

            StateLayer {
                function onClicked(): void {
                    root.dialog.accepted(root.folder.currentItem.modelData.path);
                }

                disabled: !root.dialog.selectionValid
            }

            StyledText {
                id: selectText

                anchors.centerIn: parent
                anchors.margins: Appearance.padding.normal

                text: qsTr("Select")
                color: root.dialog.selectionValid ? Colours.palette.m3onSurface : Colours.palette.m3outline
            }
        }

        StyledRect {
            color: Colours.tPalette.m3surfaceContainerHigh
            radius: Appearance.rounding.small

            implicitWidth: cancelText.implicitWidth + Appearance.padding.normal * 2
            implicitHeight: cancelText.implicitHeight + Appearance.padding.normal * 2

            StateLayer {
                function onClicked(): void {
                    root.dialog.rejected();
                }
            }

            StyledText {
                id: cancelText

                anchors.centerIn: parent
                anchors.margins: Appearance.padding.normal

                text: qsTr("Cancel")
            }
        }
    }
}


================================================
FILE: components/filedialog/FileDialog.qml
================================================
pragma ComponentBehavior: Bound

import qs.components
import qs.services
import Quickshell
import QtQuick
import QtQuick.Layouts

LazyLoader {
    id: loader

    property list<string> cwd: ["Home"]
    property string filterLabel: "All files"
    property list<string> filters: ["*"]
    property string title: qsTr("Select a file")

    signal accepted(path: string)
    signal rejected

    function open(): void {
        activeAsync = true;
    }

    function close(): void {
        rejected();
    }

    onAccepted: activeAsync = false
    onRejected: activeAsync = false

    FloatingWindow {
        id: root

        property list<string> cwd: loader.cwd
        property string filterLabel: loader.filterLabel
        property list<string> filters: loader.filters

        readonly property bool selectionValid: {
            const file = folderContents.currentItem?.modelData;
            return (file && !file.isDir && (filters.includes("*") || filters.includes(file.suffix))) ?? false;
        }

        function accepted(path: string): void {
            loader.accepted(path);
        }

        function rejected(): void {
            loader.rejected();
        }

        implicitWidth: 1000
        implicitHeight: 600
        color: Colours.tPalette.m3surface
        title: loader.title

        onVisibleChanged: {
            if (!visible)
                rejected();
        }

        RowLayout {
            anchors.fill: parent

            spacing: 0

            Sidebar {
                Layout.fillHeight: true
                dialog: root
            }

            ColumnLayout {
                Layout.fillWidth: true
                Layout.fillHeight: true

                spacing: 0

                HeaderBar {
                    Layout.fillWidth: true
                    dialog: root
                }

                FolderContents {
                    id: folderContents

                    Layout.fillWidth: true
                    Layout.fillHeight: true
                    dialog: root
                }

                DialogButtons {
                    Layout.fillWidth: true
                    dialog: root
                    folder: folderContents
                }
            }
        }

        Behavior on color {
            CAnim {}
        }
    }
}


================================================
FILE: components/filedialog/FolderContents.qml
================================================
pragma ComponentBehavior: Bound

import qs.components
import qs.components.filedialog
import qs.components.controls
import qs.components.images
import qs.services
import qs.config
import qs.utils
import Caelestia.Models
import Quickshell
import QtQuick
import QtQuick.Layouts
import QtQuick.Effects

Item {
    id: root

    required property var dialog
    readonly property FileEntry currentItem: view.currentItem as FileEntry

    StyledRect {
        anchors.fill: parent
        color: Colours.tPalette.m3surfaceContainer

        layer.enabled: true
        layer.effect: MultiEffect {
            maskSource: mask
            maskEnabled: true
            maskInverted: true
            maskThresholdMin: 0.5
            maskSpreadAtMin: 1
        }
    }

    Item {
        id: mask

        anchors.fill: parent
        layer.enabled: true
        visible: false

        Rectangle {
            anchors.fill: parent
            anchors.margins: Appearance.padding.small
            radius: Appearance.rounding.small
        }
    }

    Loader {
        asynchronous: true
        anchors.centerIn: parent

        opacity: view.count === 0 ? 1 : 0
        active: opacity > 0

        sourceComponent: ColumnLayout {
            MaterialIcon {
                Layout.alignment: Qt.AlignHCenter
                text: "scan_delete"
                color: Colours.palette.m3outline
                font.pointSize: Appearance.font.size.extraLarge * 2
                font.weight: 500
            }

            StyledText {
                text: qsTr("This folder is empty")
                color: Colours.palette.m3outline
                font.pointSize: Appearance.font.size.large
                font.weight: 500
            }
        }

        Behavior on opacity {
            Anim {}
        }
    }

    GridView {
        id: view

        anchors.fill: parent
        anchors.margins: Appearance.padding.small + Appearance.padding.normal

        cellWidth: Sizes.itemWidth + Appearance.spacing.small
        cellHeight: Sizes.itemWidth + Appearance.spacing.small * 2 + Appearance.padding.normal * 2 + 1

        clip: true
        focus: true
        currentIndex: -1
        Keys.onEscapePressed: currentIndex = -1

        Keys.onReturnPressed: {
            if (root.dialog.selectionValid)
                root.dialog.accepted((currentItem as FileEntry).modelData.path);
        }
        Keys.onEnterPressed: {
            if (root.dialog.selectionValid)
                root.dialog.accepted((currentItem as FileEntry).modelData.path);
        }

        StyledScrollBar.vertical: StyledScrollBar {
            flickable: view
        }

        model: FileSystemModel {
            path: {
                if (root.dialog.cwd[0] === "Home")
                    return Paths.home + `/${root.dialog.cwd.slice(1).join("/")}`;
                else
                    return root.dialog.cwd.join("/");
            }
            onPathChanged: view.currentIndex = -1
        }

        delegate: FileEntry {}

        add: Transition {
            Anim {
                properties: "opacity,scale"
                from: 0
                to: 1
                duration: Appearance.anim.durations.expressiveDefaultSpatial
                easing.bezierCurve: Appearance.anim.curves.expressiveDefaultSpatial
            }
        }

        remove: Transition {
            Anim {
                property: "opacity"
                to: 0
            }
            Anim {
                property: "scale"
                to: 0.5
            }
        }

        displaced: Transition {
            Anim {
                properties: "opacity,scale"
                to: 1
                easing.bezierCurve: Appearance.anim.curves.standardDecel
            }
            Anim {
                properties: "x,y"
                duration: Appearance.anim.durations.expressiveDefaultSpatial
                easing.bezierCurve: Appearance.anim.curves.expressiveDefaultSpatial
            }
        }
    }

    CurrentItem {
        anchors.right: parent.right
        anchors.bottom: parent.bottom
        anchors.margins: Appearance.padding.small

        currentItem: view.currentItem
    }

    component FileEntry: StyledRect {
        id: item

        required property int index
        required property FileSystemEntry modelData

        readonly property real nonAnimHeight: icon.implicitHeight + name.anchors.topMargin + name.implicitHeight + Appearance.padding.normal * 2

        implicitWidth: Sizes.itemWidth
        implicitHeight: nonAnimHeight

        radius: Appearance.rounding.normal
        color: Qt.alpha(Colours.tPalette.m3surfaceContainerHighest, GridView.isCurrentItem ? Colours.tPalette.m3surfaceContainerHighest.a : 0)
        z: GridView.isCurrentItem || implicitHeight !== nonAnimHeight ? 1 : 0
        clip: true

        StateLayer {
            function onClicked(): void {
                view.currentIndex = item.index;
            }

            onDoubleClicked: {
                if (item.modelData.isDir)
                    root.dialog.cwd.push(item.modelData.name);
                else if (root.dialog.selectionValid)
                    root.dialog.accepted(item.modelData.path);
            }
        }

        CachingIconImage {
            id: icon

            anchors.horizontalCenter: parent.horizontalCenter
            anchors.top: parent.top
            anchors.topMargin: Appearance.padding.normal

            implicitSize: Sizes.itemWidth - Appearance.padding.normal * 2

            Component.onCompleted: {
                const file = item.modelData;
                if (file.isImage)
                    source = Qt.resolvedUrl(file.path);
                else if (!file.isDir)
                    source = Quickshell.iconPath(file.mimeType.replace("/", "-"), "application-x-zerosize");
                else if (root.dialog.cwd.length === 1 && ["Desktop", "Documents", "Downloads", "Music", "Pictures", "Public", "Templates", "Videos"].includes(file.name))
                    source = Quickshell.iconPath(`folder-${file.name.toLowerCase()}`);
                else
                    source = Quickshell.iconPath("inode-directory");
            }
        }

        StyledText {
            id: name

            anchors.left: parent.left
            anchors.right: parent.right
            anchors.top: icon.bottom
            anchors.topMargin: Appearance.spacing.small
            anchors.margins: Appearance.padding.normal

            horizontalAlignment: Text.AlignHCenter
            elide: item.GridView.isCurrentItem ? Text.ElideNone : Text.ElideRight
            wrapMode: item.GridView.isCurrentItem ? Text.WrapAtWordBoundaryOrAnywhere : Text.NoWrap

            Component.onCompleted: text = item.modelData.name
        }

        Behavior on implicitHeight {
            Anim {}
        }
    }
}


================================================
FILE: components/filedialog/HeaderBar.qml
================================================
pragma ComponentBehavior: Bound

import ".."
import qs.services
import qs.config
import QtQuick
import QtQuick.Layouts

StyledRect {
    id: root

    required property var dialog

    implicitWidth: inner.implicitWidth + Appearance.padding.normal * 2
    implicitHeight: inner.implicitHeight + Appearance.padding.normal * 2

    color: Colours.tPalette.m3surfaceContainer

    RowLayout {
        id: inner

        anchors.fill: parent
        anchors.margins: Appearance.padding.normal
        spacing: Appearance.spacing.small

        Item {
            implicitWidth: implicitHeight
            implicitHeight: upIcon.implicitHeight + Appearance.padding.small * 2

            StateLayer {
                function onClicked(): void {
                    root.dialog.cwd.pop();
                }

                radius: Appearance.rounding.small
                disabled: root.dialog.cwd.length === 1
            }

            MaterialIcon {
                id: upIcon

                anchors.centerIn: parent
                text: "drive_folder_upload"
                color: root.dialog.cwd.length === 1 ? Colours.palette.m3outline : Colours.palette.m3onSurface
                grade: 200
            }
        }

        StyledRect {
            Layout.fillWidth: true

            radius: Appearance.rounding.small
            color: Colours.tPalette.m3surfaceContainerHigh

            implicitHeight: pathComponents.implicitHeight + pathComponents.anchors.margins * 2

            RowLayout {
                id: pathComponents

                anchors.fill: parent
                anchors.margins: Appearance.padding.small / 2
                anchors.leftMargin: 0

                spacing: Appearance.spacing.small

                Repeater {
                    model: root.dialog.cwd

                    RowLayout {
                        id: folder

                        required property string modelData
                        required property int index

                        spacing: 0

                        Loader {
                            asynchronous: true
                            Layout.rightMargin: Appearance.spacing.small
                            active: folder.index > 0
                            sourceComponent: StyledText {
                                text: "/"
                                color: Colours.palette.m3onSurfaceVariant
                                font.bold: true
                            }
                        }

                        Item {
                            implicitWidth: homeIcon.implicitWidth + (homeIcon.active ? Appearance.padding.small : 0) + folderName.implicitWidth + Appearance.padding.normal * 2
                            implicitHeight: folderName.implicitHeight + Appearance.padding.small * 2

                            Loader {
                                asynchronous: true
                                anchors.fill: parent
                                active: folder.index < root.dialog.cwd.length - 1
                                sourceComponent: StateLayer {
                                    function onClicked(): void {
                                        root.dialog.cwd = root.dialog.cwd.slice(0, folder.index + 1);
                                    }

                                    radius: Appearance.rounding.small
                                }
                            }

                            Loader {
                                id: homeIcon

                                asynchronous: true

                                anchors.left: parent.left
                                anchors.verticalCenter: parent.verticalCenter
                                anchors.leftMargin: Appearance.padding.normal

                                active: folder.index === 0 && folder.modelData === "Home"
                                sourceComponent: MaterialIcon {
                                    text: "home"
                                    color: root.dialog.cwd.length === 1 ? Colours.palette.m3onSurface : Colours.palette.m3onSurfaceVariant
                                    fill: 1
                                }
                            }

                            StyledText {
                                id: folderName

                                anchors.left: homeIcon.right
                                anchors.verticalCenter: parent.verticalCenter
                                anchors.leftMargin: homeIcon.active ? Appearance.padding.small : 0

                                text: folder.modelData
                                color: folder.index < root.dialog.cwd.length - 1 ? Colours.palette.m3onSurfaceVariant : Colours.palette.m3onSurface
                                font.bold: true
                            }
                        }
                    }
                }

                Item {
                    Layout.fillWidth: true
                }
            }
        }
    }
}


================================================
FILE: components/filedialog/Sidebar.qml
================================================
pragma ComponentBehavior: Bound

import qs.components
import qs.components.filedialog
import qs.services
import qs.config
import QtQuick
import QtQuick.Layouts

StyledRect {
    id: root

    required property var dialog

    implicitWidth: Sizes.sidebarWidth
    implicitHeight: inner.implicitHeight + Appearance.padding.normal * 2

    color: Colours.tPalette.m3surfaceContainer

    ColumnLayout {
        id: inner

        anchors.left: parent.left
        anchors.right: parent.right
        anchors.top: parent.top
        anchors.margins: Appearance.padding.normal
        spacing: Appearance.spacing.small / 2

        StyledText {
            Layout.alignment: Qt.AlignHCenter
            Layout.topMargin: Appearance.padding.small / 2
            Layout.bottomMargin: Appearance.spacing.normal
            text: qsTr("Files")
            color: Colours.palette.m3onSurface
            font.pointSize: Appearance.font.size.larger
            font.bold: true
        }

        Repeater {
            model: ["Home", "Downloads", "Desktop", "Documents", "Music", "Pictures", "Videos"]

            StyledRect {
                id: place

                required property string modelData
                readonly property bool selected: modelData === root.dialog.cwd[root.dialog.cwd.length - 1]

                Layout.fillWidth: true
                implicitHeight: placeInner.implicitHeight + Appearance.padding.normal * 2

                radius: Appearance.rounding.full
                color: Qt.alpha(Colours.palette.m3secondaryContainer, selected ? 1 : 0)

                StateLayer {
                    function onClicked(): void {
                        if (place.modelData === "Home")
                            root.dialog.cwd = ["Home"];
                        else
                            root.dialog.cwd = ["Home", place.modelData];
                    }

                    color: place.selected ? Colours.palette.m3onSecondaryContainer : Colours.palette.m3onSurface
                }

                RowLayout {
                    id: placeInner

                    anchors.fill: parent
                    anchors.margins: Appearance.padding.normal
                    anchors.leftMargin: Appearance.padding.large
                    anchors.rightMargin: Appearance.padding.large

                    spacing: Appearance.spacing.normal

                    MaterialIcon {
                        text: {
                            const p = place.modelData;
                            if (p === "Home")
                                return "home";
                            if (p === "Downloads")
                                return "file_download";
                            if (p === "Desktop")
                                return "desktop_windows";
                            if (p === "Documents")
                                return "description";
                            if (p === "Music")
                                return "music_note";
                            if (p === "Pictures")
                                return "image";
                            if (p === "Videos")
                                return "video_library";
                            return "folder";
                        }
                        color: place.selected ? Colours.palette.m3onSecondaryContainer : Colours.palette.m3onSurface
                        font.pointSize: Appearance.font.size.large
                        fill: place.selected ? 1 : 0

                        Behavior on fill {
                            Anim {}
                        }
                    }

                    StyledText {
                        Layout.fillWidth: true
                        text: place.modelData
                        color: place.selected ? Colours.palette.m3onSecondaryContainer : Colours.palette.m3onSurface
                        font.pointSize: Appearance.font.size.normal
                        elide: Text.ElideRight
                    }
                }
            }
        }
    }
}


================================================
FILE: components/filedialog/Sizes.qml
================================================
pragma Singleton

import Quickshell

Singleton {
    property int itemWidth: 103
    property int sidebarWidth: 200
}


================================================
FILE: components/images/CachingIconImage.qml
================================================
pragma ComponentBehavior: Bound

import qs.utils
import Quickshell.Widgets
import QtQuick

Item {
    id: root

    // Easier (and more efficient) to ignore it than to check type and cast
    readonly property int status: loader.item?.status ?? Image.Null // qmllint disable missing-property
    readonly property real actualSize: Math.min(width, height)
    property real implicitSize
    property url source

    implicitWidth: implicitSize
    implicitHeight: implicitSize

    Loader {
        id: loader

        asynchronous: true
        anchors.fill: parent
        sourceComponent: root.source ? root.source.toString().startsWith("image://icon/") ? iconImage : cachingImage : null
    }

    Component {
        id: cachingImage

        CachingImage {
            path: Paths.toLocalFile(root.source)
            fillMode: Image.PreserveAspectFit
        }
    }

    Component {
        id: iconImage

        IconImage {
            source: root.source
            asynchronous: true
        }
    }
}


================================================
FILE: components/images/CachingImage.qml
================================================
import qs.utils
import Caelestia.Internal
import Quickshell
import QtQuick

Image {
    id: root

    property alias path: manager.path

    asynchronous: true
    fillMode: Image.PreserveAspectCrop

    Connections {
        function onDevicePixelRatioChanged(): void {
            manager.updateSource();
        }

        target: QsWindow.window
    }

    CachingImageManager {
        id: manager

        item: root
        cacheDir: Qt.resolvedUrl(Paths.imagecache)
    }
}


================================================
FILE: components/misc/CustomShortcut.qml
================================================
import Quickshell.Hyprland

GlobalShortcut {
    appid: "caelestia"
}


================================================
FILE: components/misc/Ref.qml
================================================
import QtQuick

QtObject {
    required property var service

    Component.onCompleted: service.refCount++
    Component.onDestruction: service.refCount--
}


================================================
FILE: components/widgets/ExtraIndicator.qml
================================================
import ".."
import "../effects"
import qs.services
import qs.config
import QtQuick

StyledRect {
    required property int extra

    anchors.right: parent.right
    anchors.margins: Appearance.padding.normal

    color: Colours.palette.m3tertiary
    radius: Appearance.rounding.small

    implicitWidth: count.implicitWidth + Appearance.padding.normal * 2
    implicitHeight: count.implicitHeight + Appearance.padding.small * 2

    opacity: extra > 0 ? 1 : 0
    scale: extra > 0 ? 1 : 0.5

    Elevation {
        anchors.fill: parent
        radius: parent.radius
        opacity: parent.opacity
        z: -1
        level: 2
    }

    StyledText {
        id: count

        anchors.centerIn: parent
        animate: parent.opacity > 0
        text: qsTr("+%1").arg(parent.extra)
        color: Colours.palette.m3onTertiary
    }

    Behavior on opacity {
        Anim {
            duration: Appearance.anim.durations.expressiveFastSpatial
        }
    }

    Behavior on scale {
        Anim {
            duration: Appearance.anim.durations.expressiveFastSpatial
            easing.bezierCurve: Appearance.anim.curves.expressiveFastSpatial
        }
    }
}


================================================
FILE: config/Appearance.qml
================================================
pragma Singleton

import Quickshell

Singleton {
    // Literally just here to shorten accessing stuff :woe:
    // Also kinda so I can keep accessing it with `Appearance.xxx` instead of `Config.appearance.xxx`
    readonly property AppearanceConfig.Rounding rounding: Config.appearance.rounding
    readonly property AppearanceConfig.Spacing spacing: Config.appearance.spacing
    readonly property AppearanceConfig.Padding padding: Config.appearance.padding
    readonly property AppearanceConfig.FontStuff font: Config.appearance.font
    readonly property AppearanceConfig.Anim anim: Config.appearance.anim
    readonly property AppearanceConfig.Transparency transparency: Config.appearance.transparency
}


================================================
FILE: config/AppearanceConfig.qml
================================================
import Quickshell.Io

JsonObject {
    property Rounding rounding: Rounding {}
    property Spacing spacing: Spacing {}
    property Padding padding: Padding {}
    property FontStuff font: FontStuff {}
    property Anim anim: Anim {}
    property Transparency transparency: Transparency {}

    component Rounding: JsonObject {
        property real scale: 1
        property int small: 12 * scale
        property int normal: 17 * scale
        property int large: 25 * scale
        property int full: 1000 * scale
    }

    component Spacing: JsonObject {
        propert
Download .txt
gitextract_jcsh79_s/

├── .clang-format
├── .envrc
├── .github/
│   ├── CONTRIBUTING.md
│   ├── FUNDING.yml
│   ├── ISSUE_TEMPLATE/
│   │   ├── config.yml
│   │   ├── feature.yml
│   │   └── issue.yml
│   └── workflows/
│       ├── check-format.yml
│       ├── release.yml
│       ├── update-flake-inputs.yml
│       └── update-image.yml
├── .gitignore
├── .vscode/
│   └── settings.json
├── CMakeLists.txt
├── LICENSE
├── README.md
├── assets/
│   ├── pam.d/
│   │   ├── fprint
│   │   └── passwd
│   ├── shaders/
│   │   ├── fade.frag
│   │   ├── fade.frag.qsb
│   │   ├── opacitymask.frag
│   │   └── opacitymask.frag.qsb
│   └── wrap_term_launch.sh
├── components/
│   ├── Anim.qml
│   ├── CAnim.qml
│   ├── ConnectionHeader.qml
│   ├── ConnectionInfoSection.qml
│   ├── DashboardState.qml
│   ├── DrawerVisibilities.qml
│   ├── Logo.qml
│   ├── MaterialIcon.qml
│   ├── PropertyRow.qml
│   ├── SectionContainer.qml
│   ├── SectionHeader.qml
│   ├── StateLayer.qml
│   ├── StyledClippingRect.qml
│   ├── StyledRect.qml
│   ├── StyledText.qml
│   ├── containers/
│   │   ├── StyledFlickable.qml
│   │   ├── StyledListView.qml
│   │   └── StyledWindow.qml
│   ├── controls/
│   │   ├── CircularIndicator.qml
│   │   ├── CircularProgress.qml
│   │   ├── CollapsibleSection.qml
│   │   ├── CustomMouseArea.qml
│   │   ├── CustomSpinBox.qml
│   │   ├── FilledSlider.qml
│   │   ├── IconButton.qml
│   │   ├── IconTextButton.qml
│   │   ├── Menu.qml
│   │   ├── MenuItem.qml
│   │   ├── SpinBoxRow.qml
│   │   ├── SplitButton.qml
│   │   ├── SplitButtonRow.qml
│   │   ├── StyledInputField.qml
│   │   ├── StyledRadioButton.qml
│   │   ├── StyledScrollBar.qml
│   │   ├── StyledSlider.qml
│   │   ├── StyledSwitch.qml
│   │   ├── StyledTextField.qml
│   │   ├── SwitchRow.qml
│   │   ├── TextButton.qml
│   │   ├── ToggleButton.qml
│   │   ├── ToggleRow.qml
│   │   └── Tooltip.qml
│   ├── effects/
│   │   ├── ColouredIcon.qml
│   │   ├── Colouriser.qml
│   │   ├── Elevation.qml
│   │   ├── InnerBorder.qml
│   │   └── OpacityMask.qml
│   ├── filedialog/
│   │   ├── CurrentItem.qml
│   │   ├── DialogButtons.qml
│   │   ├── FileDialog.qml
│   │   ├── FolderContents.qml
│   │   ├── HeaderBar.qml
│   │   ├── Sidebar.qml
│   │   └── Sizes.qml
│   ├── images/
│   │   ├── CachingIconImage.qml
│   │   └── CachingImage.qml
│   ├── misc/
│   │   ├── CustomShortcut.qml
│   │   └── Ref.qml
│   └── widgets/
│       └── ExtraIndicator.qml
├── config/
│   ├── Appearance.qml
│   ├── AppearanceConfig.qml
│   ├── BackgroundConfig.qml
│   ├── BarConfig.qml
│   ├── BorderConfig.qml
│   ├── Config.qml
│   ├── ControlCenterConfig.qml
│   ├── DashboardConfig.qml
│   ├── GeneralConfig.qml
│   ├── LauncherConfig.qml
│   ├── LockConfig.qml
│   ├── NotifsConfig.qml
│   ├── OsdConfig.qml
│   ├── ServiceConfig.qml
│   ├── SessionConfig.qml
│   ├── SidebarConfig.qml
│   ├── UserPaths.qml
│   ├── UtilitiesConfig.qml
│   └── WInfoConfig.qml
├── extras/
│   ├── CMakeLists.txt
│   └── version.cpp
├── flake.nix
├── modules/
│   ├── BatteryMonitor.qml
│   ├── IdleMonitors.qml
│   ├── Shortcuts.qml
│   ├── areapicker/
│   │   ├── AreaPicker.qml
│   │   └── Picker.qml
│   ├── background/
│   │   ├── Background.qml
│   │   ├── DesktopClock.qml
│   │   ├── Visualiser.qml
│   │   └── Wallpaper.qml
│   ├── bar/
│   │   ├── Bar.qml
│   │   ├── BarWrapper.qml
│   │   ├── components/
│   │   │   ├── ActiveWindow.qml
│   │   │   ├── Clock.qml
│   │   │   ├── OsIcon.qml
│   │   │   ├── Power.qml
│   │   │   ├── Settings.qml
│   │   │   ├── SettingsIcon.qml
│   │   │   ├── StatusIcons.qml
│   │   │   ├── Tray.qml
│   │   │   ├── TrayItem.qml
│   │   │   └── workspaces/
│   │   │       ├── ActiveIndicator.qml
│   │   │       ├── OccupiedBg.qml
│   │   │       ├── SpecialWorkspaces.qml
│   │   │       ├── Workspace.qml
│   │   │       └── Workspaces.qml
│   │   └── popouts/
│   │       ├── ActiveWindow.qml
│   │       ├── Audio.qml
│   │       ├── Background.qml
│   │       ├── Battery.qml
│   │       ├── Bluetooth.qml
│   │       ├── Content.qml
│   │       ├── LockStatus.qml
│   │       ├── Network.qml
│   │       ├── PopoutState.qml
│   │       ├── TrayMenu.qml
│   │       ├── WirelessPassword.qml
│   │       ├── Wrapper.qml
│   │       └── kblayout/
│   │           ├── KbLayout.qml
│   │           └── KbLayoutModel.qml
│   ├── controlcenter/
│   │   ├── ControlCenter.qml
│   │   ├── NavRail.qml
│   │   ├── PaneRegistry.qml
│   │   ├── Panes.qml
│   │   ├── Session.qml
│   │   ├── WindowFactory.qml
│   │   ├── WindowTitle.qml
│   │   ├── appearance/
│   │   │   ├── AppearancePane.qml
│   │   │   └── sections/
│   │   │       ├── AnimationsSection.qml
│   │   │       ├── BackgroundSection.qml
│   │   │       ├── BorderSection.qml
│   │   │       ├── ColorSchemeSection.qml
│   │   │       ├── ColorVariantSection.qml
│   │   │       ├── FontsSection.qml
│   │   │       ├── ScalesSection.qml
│   │   │       ├── ThemeModeSection.qml
│   │   │       └── TransparencySection.qml
│   │   ├── audio/
│   │   │   └── AudioPane.qml
│   │   ├── bluetooth/
│   │   │   ├── BtPane.qml
│   │   │   ├── Details.qml
│   │   │   ├── DeviceList.qml
│   │   │   └── Settings.qml
│   │   ├── components/
│   │   │   ├── ConnectedButtonGroup.qml
│   │   │   ├── DeviceDetails.qml
│   │   │   ├── DeviceList.qml
│   │   │   ├── PaneTransition.qml
│   │   │   ├── ReadonlySlider.qml
│   │   │   ├── SettingsHeader.qml
│   │   │   ├── SliderInput.qml
│   │   │   ├── SplitPaneLayout.qml
│   │   │   ├── SplitPaneWithDetails.qml
│   │   │   └── WallpaperGrid.qml
│   │   ├── dashboard/
│   │   │   ├── DashboardPane.qml
│   │   │   ├── GeneralSection.qml
│   │   │   └── PerformanceSection.qml
│   │   ├── launcher/
│   │   │   ├── LauncherPane.qml
│   │   │   └── Settings.qml
│   │   ├── network/
│   │   │   ├── EthernetDetails.qml
│   │   │   ├── EthernetList.qml
│   │   │   ├── EthernetPane.qml
│   │   │   ├── EthernetSettings.qml
│   │   │   ├── NetworkSettings.qml
│   │   │   ├── NetworkingPane.qml
│   │   │   ├── VpnDetails.qml
│   │   │   ├── VpnList.qml
│   │   │   ├── VpnSettings.qml
│   │   │   ├── WirelessDetails.qml
│   │   │   ├── WirelessList.qml
│   │   │   ├── WirelessPane.qml
│   │   │   ├── WirelessPasswordDialog.qml
│   │   │   └── WirelessSettings.qml
│   │   ├── state/
│   │   │   ├── BluetoothState.qml
│   │   │   ├── EthernetState.qml
│   │   │   ├── LauncherState.qml
│   │   │   ├── NetworkState.qml
│   │   │   └── VpnState.qml
│   │   └── taskbar/
│   │       └── TaskbarPane.qml
│   ├── dashboard/
│   │   ├── Background.qml
│   │   ├── Content.qml
│   │   ├── Dash.qml
│   │   ├── LyricMenu.qml
│   │   ├── LyricsView.qml
│   │   ├── Media.qml
│   │   ├── MediaWrapper.qml
│   │   ├── Performance.qml
│   │   ├── Tabs.qml
│   │   ├── Weather.qml
│   │   ├── Wrapper.qml
│   │   └── dash/
│   │       ├── Calendar.qml
│   │       ├── DateTime.qml
│   │       ├── Media.qml
│   │       ├── Resources.qml
│   │       ├── User.qml
│   │       └── Weather.qml
│   ├── drawers/
│   │   ├── Backgrounds.qml
│   │   ├── Border.qml
│   │   ├── Drawers.qml
│   │   ├── Exclusions.qml
│   │   ├── Interactions.qml
│   │   └── Panels.qml
│   ├── launcher/
│   │   ├── AppList.qml
│   │   ├── Background.qml
│   │   ├── Content.qml
│   │   ├── ContentList.qml
│   │   ├── WallpaperList.qml
│   │   ├── Wrapper.qml
│   │   ├── items/
│   │   │   ├── ActionItem.qml
│   │   │   ├── AppItem.qml
│   │   │   ├── CalcItem.qml
│   │   │   ├── SchemeItem.qml
│   │   │   ├── VariantItem.qml
│   │   │   └── WallpaperItem.qml
│   │   └── services/
│   │       ├── Actions.qml
│   │       ├── Apps.qml
│   │       ├── M3Variants.qml
│   │       └── Schemes.qml
│   ├── lock/
│   │   ├── Center.qml
│   │   ├── Content.qml
│   │   ├── Fetch.qml
│   │   ├── InputField.qml
│   │   ├── Lock.qml
│   │   ├── LockSurface.qml
│   │   ├── Media.qml
│   │   ├── NotifDock.qml
│   │   ├── NotifGroup.qml
│   │   ├── Pam.qml
│   │   ├── Resources.qml
│   │   └── WeatherInfo.qml
│   ├── notifications/
│   │   ├── Background.qml
│   │   ├── Content.qml
│   │   ├── Notification.qml
│   │   └── Wrapper.qml
│   ├── osd/
│   │   ├── Background.qml
│   │   ├── Content.qml
│   │   └── Wrapper.qml
│   ├── session/
│   │   ├── Background.qml
│   │   ├── Content.qml
│   │   └── Wrapper.qml
│   ├── sidebar/
│   │   ├── Background.qml
│   │   ├── Content.qml
│   │   ├── Notif.qml
│   │   ├── NotifActionList.qml
│   │   ├── NotifDock.qml
│   │   ├── NotifDockList.qml
│   │   ├── NotifGroup.qml
│   │   ├── NotifGroupList.qml
│   │   ├── Props.qml
│   │   └── Wrapper.qml
│   ├── utilities/
│   │   ├── Background.qml
│   │   ├── Content.qml
│   │   ├── RecordingDeleteModal.qml
│   │   ├── Wrapper.qml
│   │   ├── cards/
│   │   │   ├── IdleInhibit.qml
│   │   │   ├── Record.qml
│   │   │   ├── RecordingList.qml
│   │   │   └── Toggles.qml
│   │   └── toasts/
│   │       ├── ToastItem.qml
│   │       └── Toasts.qml
│   └── windowinfo/
│       ├── Buttons.qml
│       ├── Details.qml
│       ├── Preview.qml
│       └── WindowInfo.qml
├── nix/
│   ├── default.nix
│   └── hm-module.nix
├── plugin/
│   ├── CMakeLists.txt
│   └── src/
│       └── Caelestia/
│           ├── CMakeLists.txt
│           ├── Internal/
│           │   ├── CMakeLists.txt
│           │   ├── arcgauge.cpp
│           │   ├── arcgauge.hpp
│           │   ├── cachingimagemanager.cpp
│           │   ├── cachingimagemanager.hpp
│           │   ├── circularbuffer.cpp
│           │   ├── circularbuffer.hpp
│           │   ├── circularindicatormanager.cpp
│           │   ├── circularindicatormanager.hpp
│           │   ├── hyprdevices.cpp
│           │   ├── hyprdevices.hpp
│           │   ├── hyprextras.cpp
│           │   ├── hyprextras.hpp
│           │   ├── logindmanager.cpp
│           │   ├── logindmanager.hpp
│           │   ├── sparklineitem.cpp
│           │   └── sparklineitem.hpp
│           ├── Models/
│           │   ├── CMakeLists.txt
│           │   ├── filesystemmodel.cpp
│           │   └── filesystemmodel.hpp
│           ├── Services/
│           │   ├── CMakeLists.txt
│           │   ├── audiocollector.cpp
│           │   ├── audiocollector.hpp
│           │   ├── audioprovider.cpp
│           │   ├── audioprovider.hpp
│           │   ├── beattracker.cpp
│           │   ├── beattracker.hpp
│           │   ├── cavaprovider.cpp
│           │   ├── cavaprovider.hpp
│           │   ├── service.cpp
│           │   ├── service.hpp
│           │   ├── serviceref.cpp
│           │   └── serviceref.hpp
│           ├── appdb.cpp
│           ├── appdb.hpp
│           ├── cutils.cpp
│           ├── cutils.hpp
│           ├── imageanalyser.cpp
│           ├── imageanalyser.hpp
│           ├── qalculator.cpp
│           ├── qalculator.hpp
│           ├── requests.cpp
│           ├── requests.hpp
│           ├── toaster.cpp
│           └── toaster.hpp
├── scripts/
│   └── qml-lint-conventions.py
├── services/
│   ├── Audio.qml
│   ├── Brightness.qml
│   ├── Colours.qml
│   ├── GameMode.qml
│   ├── Hypr.qml
│   ├── IdleInhibitor.qml
│   ├── LyricsService.qml
│   ├── Network.qml
│   ├── NetworkUsage.qml
│   ├── Nmcli.qml
│   ├── NotifData.qml
│   ├── Notifs.qml
│   ├── Players.qml
│   ├── Recorder.qml
│   ├── Screens.qml
│   ├── SystemUsage.qml
│   ├── Time.qml
│   ├── VPN.qml
│   ├── Visibilities.qml
│   ├── Wallpapers.qml
│   └── Weather.qml
├── shell.qml
└── utils/
    ├── Icons.qml
    ├── Images.qml
    ├── NetworkConnection.qml
    ├── Paths.qml
    ├── Searcher.qml
    ├── Strings.qml
    ├── SysInfo.qml
    └── scripts/
        ├── fuzzysort.js
        ├── fzf.js
        └── lrcparser.js
Download .txt
SYMBOL INDEX (232 symbols across 47 files)

FILE: extras/version.cpp
  function main (line 3) | int main(int argc, char* argv[]) {

FILE: plugin/src/Caelestia/Internal/arcgauge.cpp
  type caelestia::internal (line 7) | namespace caelestia::internal {
    function qreal (line 47) | qreal ArcGauge::percentage() const {
    function QColor (line 59) | QColor ArcGauge::accentColor() const {
    function QColor (line 71) | QColor ArcGauge::trackColor() const {
    function qreal (line 83) | qreal ArcGauge::startAngle() const {
    function qreal (line 95) | qreal ArcGauge::sweepAngle() const {
    function qreal (line 107) | qreal ArcGauge::lineWidth() const {

FILE: plugin/src/Caelestia/Internal/arcgauge.hpp
  type caelestia::internal (line 8) | namespace caelestia::internal {
    class ArcGauge (line 10) | class ArcGauge : public QQuickPaintedItem {

FILE: plugin/src/Caelestia/Internal/cachingimagemanager.cpp
  type caelestia::internal (line 12) | namespace caelestia::internal {
    function qreal (line 14) | qreal CachingImageManager::effectiveScale() const {
    function QSize (line 22) | QSize CachingImageManager::effectiveSize() const {
    function QQuickItem (line 33) | QQuickItem* CachingImageManager::item() const {
    function QUrl (line 63) | QUrl CachingImageManager::cacheDir() const {
    function QString (line 79) | QString CachingImageManager::path() const {
    function QUrl (line 167) | QUrl CachingImageManager::cachePath() const {
    function QString (line 209) | QString CachingImageManager::sha256sum(const QString& path) {

FILE: plugin/src/Caelestia/Internal/cachingimagemanager.hpp
  type caelestia::internal (line 7) | namespace caelestia::internal {
    class CachingImageManager (line 9) | class CachingImageManager : public QObject {
      method CachingImageManager (line 20) | explicit CachingImageManager(QObject* parent = nullptr)

FILE: plugin/src/Caelestia/Internal/circularbuffer.cpp
  type caelestia::internal (line 5) | namespace caelestia::internal {
    function qreal (line 53) | qreal CircularBuffer::maximum() const {
    function qreal (line 86) | qreal CircularBuffer::at(int index) const {

FILE: plugin/src/Caelestia/Internal/circularbuffer.hpp
  type caelestia::internal (line 7) | namespace caelestia::internal {
    class CircularBuffer (line 9) | class CircularBuffer : public QObject {

FILE: plugin/src/Caelestia/Internal/circularindicatormanager.cpp
  type advance (line 7) | namespace advance {
  type retreat (line 23) | namespace retreat {
  function qreal (line 45) | inline qreal getFractionInRange(qreal playtime, qreal start, qreal durat...
  type caelestia::internal (line 52) | namespace caelestia::internal {
    function qreal (line 67) | qreal CircularIndicatorManager::startFraction() const {
    function qreal (line 71) | qreal CircularIndicatorManager::endFraction() const {
    function qreal (line 75) | qreal CircularIndicatorManager::rotation() const {
    function qreal (line 79) | qreal CircularIndicatorManager::progress() const {
    function qreal (line 87) | qreal CircularIndicatorManager::duration() const {
    function qreal (line 95) | qreal CircularIndicatorManager::completeEndDuration() const {
    function qreal (line 114) | qreal CircularIndicatorManager::completeEndProgress() const {

FILE: plugin/src/Caelestia/Internal/circularindicatormanager.hpp
  type caelestia::internal (line 7) | namespace caelestia::internal {
    class CircularIndicatorManager (line 9) | class CircularIndicatorManager : public QObject {
      type IndeterminateAnimationType (line 27) | enum IndeterminateAnimationType {

FILE: plugin/src/Caelestia/Internal/hyprdevices.cpp
  type caelestia::internal::hypr (line 5) | namespace caelestia::internal::hypr {
    function QVariantHash (line 11) | QVariantHash HyprKeyboard::lastIpcObject() const {
    function QString (line 15) | QString HyprKeyboard::address() const {
    function QString (line 19) | QString HyprKeyboard::name() const {
    function QString (line 23) | QString HyprKeyboard::layout() const {
    function QString (line 27) | QString HyprKeyboard::activeKeymap() const {

FILE: plugin/src/Caelestia/Internal/hyprdevices.hpp
  type caelestia::internal::hypr (line 8) | namespace caelestia::internal::hypr {

FILE: plugin/src/Caelestia/Internal/hyprextras.cpp
  type caelestia::internal::hypr (line 8) | namespace caelestia::internal::hypr {
    function QVariantHash (line 50) | QVariantHash HyprExtras::options() const {
    function HyprDevices (line 54) | HyprDevices* HyprExtras::devices() const {

FILE: plugin/src/Caelestia/Internal/hyprextras.hpp
  type caelestia::internal::hypr (line 8) | namespace caelestia::internal::hypr {
    class HyprExtras (line 10) | class HyprExtras : public QObject {

FILE: plugin/src/Caelestia/Internal/logindmanager.cpp
  type caelestia::internal (line 8) | namespace caelestia::internal {

FILE: plugin/src/Caelestia/Internal/logindmanager.hpp
  type caelestia::internal (line 6) | namespace caelestia::internal {
    class LogindManager (line 8) | class LogindManager : public QObject {

FILE: plugin/src/Caelestia/Internal/sparklineitem.cpp
  type caelestia::internal (line 7) | namespace caelestia::internal {
    function CircularBuffer (line 89) | CircularBuffer* SparklineItem::line1() const {
    function CircularBuffer (line 104) | CircularBuffer* SparklineItem::line2() const {
    function QColor (line 119) | QColor SparklineItem::line1Color() const {
    function QColor (line 131) | QColor SparklineItem::line2Color() const {
    function qreal (line 143) | qreal SparklineItem::line1FillAlpha() const {
    function qreal (line 155) | qreal SparklineItem::line2FillAlpha() const {
    function qreal (line 167) | qreal SparklineItem::maxValue() const {
    function qreal (line 179) | qreal SparklineItem::slideProgress() const {
    function qreal (line 203) | qreal SparklineItem::lineWidth() const {

FILE: plugin/src/Caelestia/Internal/sparklineitem.hpp
  type caelestia::internal (line 10) | namespace caelestia::internal {
    class SparklineItem (line 12) | class SparklineItem : public QQuickPaintedItem {

FILE: plugin/src/Caelestia/Models/filesystemmodel.cpp
  type caelestia::models (line 7) | namespace caelestia::models {
    function QString (line 17) | QString FileSystemEntry::path() const {
    function QString (line 21) | QString FileSystemEntry::relativePath() const {
    function QString (line 25) | QString FileSystemEntry::name() const {
    function QString (line 29) | QString FileSystemEntry::baseName() const {
    function QString (line 33) | QString FileSystemEntry::parentDir() const {
    function QString (line 37) | QString FileSystemEntry::suffix() const {
    function qint64 (line 41) | qint64 FileSystemEntry::size() const {
    function QString (line 58) | QString FileSystemEntry::mimeType() const {
    function QVariant (line 92) | QVariant FileSystemModel::data(const QModelIndex& index, int role) con...
    function QString (line 103) | QString FileSystemModel::path() const {
    function QStringList (line 199) | QStringList FileSystemModel::nameFilters() const {

FILE: plugin/src/Caelestia/Models/filesystemmodel.hpp
  type caelestia::models (line 13) | namespace caelestia::models {
  class FileSystemModel (line 63) | class FileSystemModel : public QAbstractListModel {
    type Filter (line 78) | enum Filter {

FILE: plugin/src/Caelestia/Services/audiocollector.cpp
  type caelestia::services (line 13) | namespace caelestia::services {
    function AudioCollector (line 165) | AudioCollector& AudioCollector::instance() {
    function quint32 (line 192) | quint32 AudioCollector::readChunk(float* out, quint32 count) {
    function quint32 (line 203) | quint32 AudioCollector::readChunk(double* out, quint32 count) {

FILE: plugin/src/Caelestia/Services/audiocollector.hpp
  type caelestia::services (line 13) | namespace caelestia::services {
    type ac (line 15) | namespace ac {
    class AudioCollector (line 22) | class AudioCollector
      method AudioCollector (line 51) | AudioCollector& operator=(const AudioCollector&) = delete;
    class PipeWireWorker (line 24) | class PipeWireWorker {
    class AudioCollector (line 46) | class AudioCollector : public Service {
      method AudioCollector (line 51) | AudioCollector& operator=(const AudioCollector&) = delete;

FILE: plugin/src/Caelestia/Services/audioprovider.cpp
  type caelestia::services (line 8) | namespace caelestia::services {

FILE: plugin/src/Caelestia/Services/audioprovider.hpp
  type caelestia::services (line 7) | namespace caelestia::services {
    class AudioProcessor (line 9) | class AudioProcessor : public QObject {
    class AudioProvider (line 29) | class AudioProvider : public Service {

FILE: plugin/src/Caelestia/Services/beattracker.cpp
  type caelestia::services (line 7) | namespace caelestia::services {
    function smpl_t (line 49) | smpl_t BeatTracker::bpm() const {

FILE: plugin/src/Caelestia/Services/beattracker.hpp
  type caelestia::services (line 7) | namespace caelestia::services {
    class BeatProcessor (line 9) | class BeatProcessor : public AudioProcessor {
    class BeatTracker (line 28) | class BeatTracker : public AudioProvider {

FILE: plugin/src/Caelestia/Services/cavaprovider.cpp
  type caelestia::services (line 9) | namespace caelestia::services {

FILE: plugin/src/Caelestia/Services/cavaprovider.hpp
  type caelestia::services (line 7) | namespace caelestia::services {
    class CavaProcessor (line 9) | class CavaProcessor : public AudioProcessor {
      type cava_plan (line 25) | struct cava_plan
    class CavaProvider (line 37) | class CavaProvider : public AudioProvider {

FILE: plugin/src/Caelestia/Services/service.cpp
  type caelestia::services (line 6) | namespace caelestia::services {

FILE: plugin/src/Caelestia/Services/service.hpp
  type caelestia::services (line 6) | namespace caelestia::services {
    class Service (line 8) | class Service : public QObject {

FILE: plugin/src/Caelestia/Services/serviceref.cpp
  type caelestia::services (line 5) | namespace caelestia::services {
    function Service (line 15) | Service* ServiceRef::service() const {

FILE: plugin/src/Caelestia/Services/serviceref.hpp
  type caelestia::services (line 7) | namespace caelestia::services {
    class ServiceRef (line 9) | class ServiceRef : public QObject {

FILE: plugin/src/Caelestia/appdb.cpp
  type caelestia (line 7) | namespace caelestia {
    function QObject (line 29) | QObject* AppEntry::entry() const {
    function quint32 (line 33) | quint32 AppEntry::frequency() const {
    function QString (line 49) | QString AppEntry::id() const {
    function QString (line 56) | QString AppEntry::name() const {
    function QString (line 63) | QString AppEntry::comment() const {
    function QString (line 70) | QString AppEntry::execString() const {
    function QString (line 77) | QString AppEntry::startupClass() const {
    function QString (line 84) | QString AppEntry::genericName() const {
    function QString (line 91) | QString AppEntry::categories() const {
    function QString (line 98) | QString AppEntry::keywords() const {
    function QString (line 121) | QString AppDb::uuid() const {
    function QString (line 125) | QString AppDb::path() const {
    function QObjectList (line 150) | QObjectList AppDb::entries() const {
    function QStringList (line 165) | QStringList AppDb::favouriteApps() const {
    function QString (line 190) | QString AppDb::regexifyString(const QString& original) const {
    function quint32 (line 257) | quint32 AppDb::getFrequency(const QString& id) const {

FILE: plugin/src/Caelestia/appdb.hpp
  type caelestia (line 10) | namespace caelestia {
  class AppDb (line 63) | class AppDb : public QObject {

FILE: plugin/src/Caelestia/cutils.cpp
  type caelestia (line 11) | namespace caelestia {
    function QString (line 122) | QString CUtils::toLocalFile(const QUrl& url) const {

FILE: plugin/src/Caelestia/cutils.hpp
  type caelestia (line 7) | namespace caelestia {
    class CUtils (line 9) | class CUtils : public QObject {

FILE: plugin/src/Caelestia/imageanalyser.cpp
  type caelestia (line 9) | namespace caelestia {
    function QString (line 36) | QString ImageAnalyser::source() const {
    function QQuickItem (line 56) | QQuickItem* ImageAnalyser::sourceItem() const {
    function QColor (line 91) | QColor ImageAnalyser::dominantColour() const {
    function qreal (line 95) | qreal ImageAnalyser::luminance() const {

FILE: plugin/src/Caelestia/imageanalyser.hpp
  type caelestia (line 9) | namespace caelestia {
    class ImageAnalyser (line 11) | class ImageAnalyser : public QObject {

FILE: plugin/src/Caelestia/qalculator.cpp
  type caelestia (line 7) | namespace caelestia {
    function QString (line 21) | QString Qalculator::eval(const QString& expr, bool printExpr) const {
    function QString (line 142) | QString Qalculator::result() const {
    function QString (line 146) | QString Qalculator::rawResult() const {

FILE: plugin/src/Caelestia/qalculator.hpp
  type caelestia (line 7) | namespace caelestia {
    class Qalculator (line 9) | class Qalculator : public QObject {

FILE: plugin/src/Caelestia/requests.cpp
  type caelestia (line 9) | namespace caelestia {

FILE: plugin/src/Caelestia/requests.hpp
  type caelestia (line 7) | namespace caelestia {
    class Requests (line 9) | class Requests : public QObject {

FILE: plugin/src/Caelestia/toaster.cpp
  type caelestia (line 7) | namespace caelestia {
    function QString (line 55) | QString Toast::title() const {
    function QString (line 59) | QString Toast::message() const {
    function QString (line 63) | QString Toast::icon() const {

FILE: plugin/src/Caelestia/toaster.hpp
  type caelestia (line 8) | namespace caelestia {
    type Type (line 23) | enum class Type {

FILE: scripts/qml-lint-conventions.py
  class Section (line 32) | class Section(IntEnum):
  class Violation (line 81) | class Violation:
    method __init__ (line 82) | def __init__(self, file: str, line: int, rule: str, msg: str):
    method __str__ (line 88) | def __str__(self):
  class ScopeTracker (line 93) | class ScopeTracker:
    method __init__ (line 96) | def __init__(self):
  function get_indent (line 102) | def get_indent(line: str) -> str:
  function classify_line (line 106) | def classify_line(stripped: str) -> Section | None:
  function check_file (line 133) | def check_file(filepath: Path) -> list[Violation]:
  function main (line 275) | def main():

FILE: utils/scripts/fuzzysort.js
  function push_result (line 54) | function push_result(result) {
  class Result (line 258) | class Result {
    method ['indexes'] (line 259) | get ['indexes']() { return this._indexes.slice(0, this._indexes.len).s...
    method ['indexes'] (line 260) | set ['indexes'](indexes) { return this._indexes = indexes }
    method ['highlight'] (line 261) | ['highlight'](open, close) { return highlight(this, open, close) }
    method ['score'] (line 262) | get ['score']() { return normalizeScore(this._score) }
    method ['score'] (line 263) | set ['score'](score) { this._score = denormalizeScore(score) }
  class KeysResult (line 266) | class KeysResult extends Array {
    method ['score'] (line 267) | get ['score']() { return normalizeScore(this._score) }
    method ['score'] (line 268) | set ['score'](score) { this._score = denormalizeScore(score) }

FILE: utils/scripts/fzf.js
  function normalizeRune (line 245) | function normalizeRune(rune) {
  function toShort (line 254) | function toShort(number) {
  function toInt (line 257) | function toInt(number) {
  function maxInt16 (line 260) | function maxInt16(num1, num2) {
  constant MAX_ASCII (line 292) | const MAX_ASCII = "\x7F".codePointAt(0);
  constant CAPITAL_A_RUNE (line 293) | const CAPITAL_A_RUNE = "A".codePointAt(0);
  constant CAPITAL_Z_RUNE (line 294) | const CAPITAL_Z_RUNE = "Z".codePointAt(0);
  constant SMALL_A_RUNE (line 295) | const SMALL_A_RUNE = "a".codePointAt(0);
  constant SMALL_Z_RUNE (line 296) | const SMALL_Z_RUNE = "z".codePointAt(0);
  constant NUMERAL_ZERO_RUNE (line 297) | const NUMERAL_ZERO_RUNE = "0".codePointAt(0);
  constant NUMERAL_NINE_RUNE (line 298) | const NUMERAL_NINE_RUNE = "9".codePointAt(0);
  function indexAt (line 299) | function indexAt(index, max, forward) {
  constant SCORE_MATCH (line 305) | const SCORE_MATCH = 16, SCORE_GAP_START = -3, SCORE_GAP_EXTENTION = -1, ...
  constant SCORE_GAP_START (line 305) | const SCORE_MATCH = 16, SCORE_GAP_START = -3, SCORE_GAP_EXTENTION = -1, ...
  constant SCORE_GAP_EXTENTION (line 305) | const SCORE_MATCH = 16, SCORE_GAP_START = -3, SCORE_GAP_EXTENTION = -1, ...
  constant BONUS_BOUNDARY (line 305) | const SCORE_MATCH = 16, SCORE_GAP_START = -3, SCORE_GAP_EXTENTION = -1, ...
  constant BONUS_NON_WORD (line 305) | const SCORE_MATCH = 16, SCORE_GAP_START = -3, SCORE_GAP_EXTENTION = -1, ...
  constant BONUS_CAMEL_123 (line 305) | const SCORE_MATCH = 16, SCORE_GAP_START = -3, SCORE_GAP_EXTENTION = -1, ...
  constant BONUS_CONSECUTIVE (line 305) | const SCORE_MATCH = 16, SCORE_GAP_START = -3, SCORE_GAP_EXTENTION = -1, ...
  constant BONUS_FIRST_CHAR_MULTIPLIER (line 305) | const SCORE_MATCH = 16, SCORE_GAP_START = -3, SCORE_GAP_EXTENTION = -1, ...
  function createPosSet (line 306) | function createPosSet(withPos) {
  function alloc16 (line 312) | function alloc16(offset, slab2, size) {
  function alloc32 (line 319) | function alloc32(offset, slab2, size) {
  function charClassOfAscii (line 326) | function charClassOfAscii(rune) {
  function charClassOfNonAscii (line 337) | function charClassOfNonAscii(rune) {
  function charClassOf (line 350) | function charClassOf(rune) {
  function bonusFor (line 356) | function bonusFor(prevClass, currClass) {
  function bonusAt (line 366) | function bonusAt(input, idx) {
  function trySkip (line 372) | function trySkip(input, caseSensitive, char, from) {
  function isAscii (line 392) | function isAscii(runes) {
  function asciiFuzzyIndex (line 400) | function asciiFuzzyIndex(input, pattern, caseSensitive) {
  function calculateScore (line 600) | function calculateScore(caseSensitive, normalize, text, pattern, sidx, e...
  function fuzzyMatchV1 (line 656) | function fuzzyMatchV1(caseSensitive, normalize, forward, text, pattern, ...
  constant SLAB_16_SIZE (line 910) | const SLAB_16_SIZE = 100 * 1024;
  constant SLAB_32_SIZE (line 911) | const SLAB_32_SIZE = 2048;
  function makeSlab (line 912) | function makeSlab(size16, size32) {
  function buildPatternForExtendedMatch (line 934) | function buildPatternForExtendedMatch(fuzzy, caseMode, normalize, str) {
  function parseTerms (line 970) | function parseTerms(fuzzy, caseMode, normalize, str) {
  function iter (line 1067) | function iter(algoFn, tokens, caseSensitive, normalize, forward, pattern...
  function computeExtendedMatch (line 1083) | function computeExtendedMatch(text, pattern, fuzzyAlgo, forward) {
  function getResultFromScoreMap (line 1141) | function getResultFromScoreMap(scoreMap, limit) {
  function getBasicMatchIter (line 1152) | function getBasicMatchIter(scoreMap, queryRunes, caseSensitive) {
  function getExtendedMatchIter (line 1184) | function getExtendedMatchIter(scoreMap, pattern) {
  function basicMatch (line 1208) | function basicMatch(query) {
  function extendedMatch (line 1225) | function extendedMatch(query) {
  class Finder (line 1250) | class Finder {
    method constructor (line 1251) | constructor(list, ...optionsTuple) {
    method find (line 1265) | find(query) {
  function createResultItemWithEmptyPos (line 1273) | function createResultItemWithEmptyPos(item) {
  function postProcessResultItems (line 1282) | function postProcessResultItems(result, opts) {
  function byLengthAsc (line 1302) | function byLengthAsc(a, b, selector) {
  function byStartAsc (line 1305) | function byStartAsc(a, b) {

FILE: utils/scripts/lrcparser.js
  function parseLrc (line 1) | function parseLrc(text) {
  function getCurrentLine (line 54) | function getCurrentLine(lyrics, position) {
Condensed preview — 367 files, each showing path, character count, and a content snippet. Download the .json file or copy for the full structured content (1,681K chars).
[
  {
    "path": ".clang-format",
    "chars": 646,
    "preview": "---\nBasedOnStyle: LLVM\nIndentWidth: 4\nColumnLimit: 120\n---\nLanguage: Cpp\nDerivePointerAlignment: false\nPointerAlignment:"
  },
  {
    "path": ".envrc",
    "chars": 465,
    "preview": "if has nix; then\n    use flake\nfi\n\nshopt -s globstar\nwatch_file assets/cpp/**/*.cpp\nwatch_file assets/cpp/**/*.hpp\nwatch"
  },
  {
    "path": ".github/CONTRIBUTING.md",
    "chars": 1153,
    "preview": "# Contributing\n\nThere are only a few rules:\n- Follow the commit convention as follows:\n  - The name of the commit should"
  },
  {
    "path": ".github/FUNDING.yml",
    "chars": 783,
    "preview": "# These are supported funding model platforms\n\ngithub: soramanew\npatreon: # Replace with a single Patreon username\nopen_"
  },
  {
    "path": ".github/ISSUE_TEMPLATE/config.yml",
    "chars": 28,
    "preview": "blank_issues_enabled: false\n"
  },
  {
    "path": ".github/ISSUE_TEMPLATE/feature.yml",
    "chars": 786,
    "preview": "name: Feature request\ndescription: Suggest a new feature\nlabels: [\"enhancement\"]\ntype: \"Feature\"\ntitle: \"[FEATURE] \"\nbod"
  },
  {
    "path": ".github/ISSUE_TEMPLATE/issue.yml",
    "chars": 3148,
    "preview": "name: Issue\ndescription: Report an issue with the dots\nlabels: [\"bug\"]\ntype: \"Bug\"\ntitle: \"[BUG] \"\nbody:\n    - type: mar"
  },
  {
    "path": ".github/workflows/check-format.yml",
    "chars": 738,
    "preview": "name: Check formatting\n\non:\n  push:\n    branches:\n      - main\n  pull_request:\n\njobs:\n  check-format:\n    runs-on: ubunt"
  },
  {
    "path": ".github/workflows/release.yml",
    "chars": 890,
    "preview": "name: Create release\n\non:\n  push:\n    tags:\n      - \"v*\"\n\njobs:\n  build-and-release:\n    runs-on: ubuntu-latest\n\n    per"
  },
  {
    "path": ".github/workflows/update-flake-inputs.yml",
    "chars": 3036,
    "preview": "name: Update flake inputs\n\non:\n  workflow_dispatch:\n  schedule:\n    - cron: \"0 0 * * 0\"\n\njobs:\n  update-flake:\n    runs-"
  },
  {
    "path": ".github/workflows/update-image.yml",
    "chars": 1482,
    "preview": "name: Update Docker CI image\n\non:\n  workflow_dispatch:\n  schedule:\n    - cron: \"0 0 * * 0\"\n\npermissions:\n  packages: wri"
  },
  {
    "path": ".gitignore",
    "chars": 47,
    "preview": ".direnv\n/result\n/.qmlls.ini\nbuild/\n.cache/\nlogs"
  },
  {
    "path": ".vscode/settings.json",
    "chars": 154,
    "preview": "{\n    \"editor.defaultFormatter\": \"theqtcompany.qt-qml\",\n    \"[cpp]\": {\n        \"editor.defaultFormatter\": \"llvm-vs-code-"
  },
  {
    "path": "CMakeLists.txt",
    "chars": 2145,
    "preview": "cmake_minimum_required(VERSION 3.19)\n\nif(NOT DEFINED VERSION)\n    execute_process(COMMAND git describe --tags --abbrev=0"
  },
  {
    "path": "LICENSE",
    "chars": 35149,
    "preview": "                    GNU GENERAL PUBLIC LICENSE\n                       Version 3, 29 June 2007\n\n Copyright (C) 2007 Free "
  },
  {
    "path": "README.md",
    "chars": 25580,
    "preview": "<h1 align=center>caelestia-shell</h1>\n\n<div align=center>\n\n![GitHub last commit](https://img.shields.io/github/last-comm"
  },
  {
    "path": "assets/pam.d/fprint",
    "chars": 59,
    "preview": "#%PAM-1.0\n\nauth    required    pam_fprintd.so  max-tries=1\n"
  },
  {
    "path": "assets/pam.d/passwd",
    "chars": 268,
    "preview": "#%PAM-1.0\n\nauth    required                    pam_faillock.so     preauth\nauth    [success=1 default=bad]     pam_unix."
  },
  {
    "path": "assets/shaders/fade.frag",
    "chars": 594,
    "preview": "#version 440\n\nlayout(location = 0) in vec2 qt_TexCoord0;\nlayout(location = 0) out vec4 fragColor;\n\nlayout(std140, bindin"
  },
  {
    "path": "assets/shaders/opacitymask.frag",
    "chars": 512,
    "preview": "#version 440\n\nlayout(location = 0) in vec2 qt_TexCoord0;\nlayout(location = 0) out vec4 fragColor;\n\nlayout(std140, bindin"
  },
  {
    "path": "assets/wrap_term_launch.sh",
    "chars": 85,
    "preview": "#!/usr/bin/env sh\n\ncat ~/.local/state/caelestia/sequences.txt 2>/dev/null\n\nexec \"$@\"\n"
  },
  {
    "path": "components/Anim.qml",
    "chars": 193,
    "preview": "import qs.config\nimport QtQuick\n\nNumberAnimation {\n    duration: Appearance.anim.durations.normal\n    easing.type: Easin"
  },
  {
    "path": "components/CAnim.qml",
    "chars": 192,
    "preview": "import qs.config\nimport QtQuick\n\nColorAnimation {\n    duration: Appearance.anim.durations.normal\n    easing.type: Easing"
  },
  {
    "path": "components/ConnectionHeader.qml",
    "chars": 641,
    "preview": "import qs.components\nimport qs.config\nimport QtQuick\nimport QtQuick.Layouts\n\nColumnLayout {\n    id: root\n\n    required p"
  },
  {
    "path": "components/ConnectionInfoSection.qml",
    "chars": 1487,
    "preview": "import qs.components\nimport qs.services\nimport qs.config\nimport QtQuick\nimport QtQuick.Layouts\n\nColumnLayout {\n    id: r"
  },
  {
    "path": "components/DashboardState.qml",
    "chars": 114,
    "preview": "import Quickshell\n\nPersistentProperties {\n    property int currentTab\n    property date currentDate: new Date()\n}\n"
  },
  {
    "path": "components/DrawerVisibilities.qml",
    "chars": 223,
    "preview": "import Quickshell\n\nPersistentProperties {\n    property bool bar\n    property bool osd\n    property bool session\n    prop"
  },
  {
    "path": "components/Logo.qml",
    "chars": 3242,
    "preview": "import QtQuick\nimport QtQuick.Shapes\nimport qs.services\n\nItem {\n    id: root\n\n    readonly property real designWidth: 12"
  },
  {
    "path": "components/MaterialIcon.qml",
    "chars": 390,
    "preview": "import qs.services\nimport qs.config\n\nStyledText {\n    property real fill\n    property int grade: Colours.light ? 0 : -25"
  },
  {
    "path": "components/PropertyRow.qml",
    "chars": 546,
    "preview": "import qs.components\nimport qs.services\nimport qs.config\nimport QtQuick\nimport QtQuick.Layouts\n\nColumnLayout {\n    id: r"
  },
  {
    "path": "components/SectionContainer.qml",
    "chars": 911,
    "preview": "import qs.components\nimport qs.services\nimport qs.config\nimport QtQuick\nimport QtQuick.Layouts\n\nStyledRect {\n    id: roo"
  },
  {
    "path": "components/SectionHeader.qml",
    "chars": 528,
    "preview": "import qs.components\nimport qs.services\nimport qs.config\nimport QtQuick\nimport QtQuick.Layouts\n\nColumnLayout {\n    id: r"
  },
  {
    "path": "components/StateLayer.qml",
    "chars": 2413,
    "preview": "import qs.services\nimport qs.config\nimport QtQuick\n\nMouseArea {\n    id: root\n\n    property bool disabled\n    property bo"
  },
  {
    "path": "components/StyledClippingRect.qml",
    "chars": 151,
    "preview": "import Quickshell.Widgets\nimport QtQuick\n\nClippingRectangle {\n    id: root\n\n    color: \"transparent\"\n\n    Behavior on co"
  },
  {
    "path": "components/StyledRect.qml",
    "chars": 117,
    "preview": "import QtQuick\n\nRectangle {\n    id: root\n\n    color: \"transparent\"\n\n    Behavior on color {\n        CAnim {}\n    }\n}\n"
  },
  {
    "path": "components/StyledText.qml",
    "chars": 1163,
    "preview": "pragma ComponentBehavior: Bound\n\nimport qs.services\nimport qs.config\nimport QtQuick\n\nText {\n    id: root\n\n    property b"
  },
  {
    "path": "components/containers/StyledFlickable.qml",
    "chars": 175,
    "preview": "import \"..\"\nimport QtQuick\n\nFlickable {\n    id: root\n\n    maximumFlickVelocity: 3000\n\n    rebound: Transition {\n        "
  },
  {
    "path": "components/containers/StyledListView.qml",
    "chars": 174,
    "preview": "import \"..\"\nimport QtQuick\n\nListView {\n    id: root\n\n    maximumFlickVelocity: 3000\n\n    rebound: Transition {\n        A"
  },
  {
    "path": "components/containers/StyledWindow.qml",
    "chars": 170,
    "preview": "import Quickshell\nimport Quickshell.Wayland\n\nPanelWindow {\n    required property string name\n\n    WlrLayershell.namespac"
  },
  {
    "path": "components/controls/CircularIndicator.qml",
    "chars": 2749,
    "preview": "import \"..\"\nimport qs.services\nimport qs.config\nimport Caelestia.Internal\nimport QtQuick\nimport QtQuick.Templates\n\nBusyI"
  },
  {
    "path": "components/controls/CircularProgress.qml",
    "chars": 2100,
    "preview": "import \"..\"\nimport qs.services\nimport qs.config\nimport QtQuick\nimport QtQuick.Shapes\n\nShape {\n    id: root\n\n    property"
  },
  {
    "path": "components/controls/CollapsibleSection.qml",
    "chars": 4234,
    "preview": "import \"..\"\nimport qs.components\nimport qs.services\nimport qs.config\nimport QtQuick\nimport QtQuick.Layouts\n\nColumnLayout"
  },
  {
    "path": "components/controls/CustomMouseArea.qml",
    "chars": 537,
    "preview": "import QtQuick\n\nMouseArea {\n    property int scrollAccumulatedY: 0\n\n    function onWheel(event: WheelEvent): void {\n    "
  },
  {
    "path": "components/controls/CustomSpinBox.qml",
    "chars": 5104,
    "preview": "pragma ComponentBehavior: Bound\n\nimport \"..\"\nimport qs.services\nimport qs.config\nimport QtQuick\nimport QtQuick.Layouts\n\n"
  },
  {
    "path": "components/controls/FilledSlider.qml",
    "chars": 3772,
    "preview": "import \"..\"\nimport \"../effects\"\nimport qs.services\nimport qs.config\nimport QtQuick\nimport QtQuick.Templates\n\nSlider {\n  "
  },
  {
    "path": "components/controls/IconButton.qml",
    "chars": 2734,
    "preview": "import \"..\"\nimport qs.services\nimport qs.config\nimport QtQuick\n\nStyledRect {\n    id: root\n\n    enum Type {\n        Fille"
  },
  {
    "path": "components/controls/IconTextButton.qml",
    "chars": 2723,
    "preview": "import \"..\"\nimport qs.services\nimport qs.config\nimport QtQuick\nimport QtQuick.Layouts\n\nStyledRect {\n    id: root\n\n    en"
  },
  {
    "path": "components/controls/Menu.qml",
    "chars": 3796,
    "preview": "pragma ComponentBehavior: Bound\n\nimport \"..\"\nimport \"../effects\"\nimport qs.services\nimport qs.config\nimport QtQuick\nimpo"
  },
  {
    "path": "components/controls/MenuItem.qml",
    "chars": 215,
    "preview": "import QtQuick\n\nQtObject {\n    required property string text\n    property string icon\n    property string trailingIcon\n "
  },
  {
    "path": "components/controls/SpinBoxRow.qml",
    "chars": 1201,
    "preview": "import \"..\"\nimport qs.components\nimport qs.services\nimport qs.config\nimport QtQuick\nimport QtQuick.Layouts\n\nStyledRect {"
  },
  {
    "path": "components/controls/SplitButton.qml",
    "chars": 4979,
    "preview": "import \"..\"\nimport qs.services\nimport qs.config\nimport QtQuick\nimport QtQuick.Layouts\n\nRow {\n    id: root\n\n    enum Type"
  },
  {
    "path": "components/controls/SplitButtonRow.qml",
    "chars": 1528,
    "preview": "pragma ComponentBehavior: Bound\n\nimport \"..\"\nimport qs.components\nimport qs.services\nimport qs.config\nimport QtQuick\nimp"
  },
  {
    "path": "components/controls/StyledInputField.qml",
    "chars": 2196,
    "preview": "pragma ComponentBehavior: Bound\n\nimport \"..\"\nimport qs.components\nimport qs.services\nimport qs.config\nimport QtQuick\n\nIt"
  },
  {
    "path": "components/controls/StyledRadioButton.qml",
    "chars": 1568,
    "preview": "import qs.components\nimport qs.services\nimport qs.config\nimport QtQuick\nimport QtQuick.Templates\n\nRadioButton {\n    id: "
  },
  {
    "path": "components/controls/StyledScrollBar.qml",
    "chars": 6318,
    "preview": "import \"..\"\nimport qs.services\nimport qs.config\nimport QtQuick\nimport QtQuick.Templates\n\nScrollBar {\n    id: root\n\n    r"
  },
  {
    "path": "components/controls/StyledSlider.qml",
    "chars": 1702,
    "preview": "import qs.components\nimport qs.services\nimport qs.config\nimport QtQuick\nimport QtQuick.Templates\n\nSlider {\n    id: root\n"
  },
  {
    "path": "components/controls/StyledSwitch.qml",
    "chars": 5247,
    "preview": "import \"..\"\nimport qs.services\nimport qs.config\nimport QtQuick\nimport QtQuick.Templates\nimport QtQuick.Shapes\n\nSwitch {\n"
  },
  {
    "path": "components/controls/StyledTextField.qml",
    "chars": 1793,
    "preview": "pragma ComponentBehavior: Bound\n\nimport \"..\"\nimport qs.services\nimport qs.config\nimport QtQuick\nimport QtQuick.Controls\n"
  },
  {
    "path": "components/controls/SwitchRow.qml",
    "chars": 1081,
    "preview": "import \"..\"\nimport qs.components\nimport qs.services\nimport qs.config\nimport QtQuick\nimport QtQuick.Layouts\n\nStyledRect {"
  },
  {
    "path": "components/controls/TextButton.qml",
    "chars": 2431,
    "preview": "import \"..\"\nimport qs.services\nimport qs.config\nimport QtQuick\n\nStyledRect {\n    id: root\n\n    enum Type {\n        Fille"
  },
  {
    "path": "components/controls/ToggleButton.qml",
    "chars": 3709,
    "preview": "pragma ComponentBehavior: Bound\n\nimport \"..\"\nimport qs.components\nimport qs.components.controls\nimport qs.services\nimpor"
  },
  {
    "path": "components/controls/ToggleRow.qml",
    "chars": 458,
    "preview": "import qs.components\nimport qs.components.controls\nimport qs.config\nimport QtQuick\nimport QtQuick.Layouts\n\nRowLayout {\n "
  },
  {
    "path": "components/controls/Tooltip.qml",
    "chars": 5265,
    "preview": "import \"..\"\nimport qs.components.effects\nimport qs.services\nimport qs.config\nimport QtQuick\nimport QtQuick.Controls\n\nPop"
  },
  {
    "path": "components/effects/ColouredIcon.qml",
    "chars": 648,
    "preview": "pragma ComponentBehavior: Bound\n\nimport Caelestia\nimport Quickshell.Widgets\nimport QtQuick\n\nIconImage {\n    id: root\n\n  "
  },
  {
    "path": "components/effects/Colouriser.qml",
    "chars": 233,
    "preview": "import \"..\"\nimport QtQuick\nimport QtQuick.Effects\n\nMultiEffect {\n    property color sourceColor: \"black\"\n\n    colorizati"
  },
  {
    "path": "components/effects/Elevation.qml",
    "chars": 347,
    "preview": "import \"..\"\nimport qs.services\nimport QtQuick\nimport QtQuick.Effects\n\nRectangularShadow {\n    property int level\n    pro"
  },
  {
    "path": "components/effects/InnerBorder.qml",
    "chars": 1075,
    "preview": "pragma ComponentBehavior: Bound\n\nimport \"..\"\nimport qs.services\nimport qs.config\nimport QtQuick\nimport QtQuick.Effects\n\n"
  },
  {
    "path": "components/effects/OpacityMask.qml",
    "chars": 204,
    "preview": "import Quickshell\nimport QtQuick\n\nShaderEffect {\n    required property Item source\n    required property Item maskSource"
  },
  {
    "path": "components/filedialog/CurrentItem.qml",
    "chars": 2994,
    "preview": "import \"..\"\nimport qs.services\nimport qs.config\nimport QtQuick\nimport QtQuick.Shapes\n\nItem {\n    id: root\n\n    required "
  },
  {
    "path": "components/filedialog/DialogButtons.qml",
    "chars": 2581,
    "preview": "import qs.components\nimport qs.services\nimport qs.config\nimport QtQuick.Layouts\n\nStyledRect {\n    id: root\n\n    required"
  },
  {
    "path": "components/filedialog/FileDialog.qml",
    "chars": 2320,
    "preview": "pragma ComponentBehavior: Bound\n\nimport qs.components\nimport qs.services\nimport Quickshell\nimport QtQuick\nimport QtQuick"
  },
  {
    "path": "components/filedialog/FolderContents.qml",
    "chars": 6887,
    "preview": "pragma ComponentBehavior: Bound\n\nimport qs.components\nimport qs.components.filedialog\nimport qs.components.controls\nimpo"
  },
  {
    "path": "components/filedialog/HeaderBar.qml",
    "chars": 5033,
    "preview": "pragma ComponentBehavior: Bound\n\nimport \"..\"\nimport qs.services\nimport qs.config\nimport QtQuick\nimport QtQuick.Layouts\n\n"
  },
  {
    "path": "components/filedialog/Sidebar.qml",
    "chars": 4080,
    "preview": "pragma ComponentBehavior: Bound\n\nimport qs.components\nimport qs.components.filedialog\nimport qs.services\nimport qs.confi"
  },
  {
    "path": "components/filedialog/Sizes.qml",
    "chars": 118,
    "preview": "pragma Singleton\n\nimport Quickshell\n\nSingleton {\n    property int itemWidth: 103\n    property int sidebarWidth: 200\n}\n"
  },
  {
    "path": "components/images/CachingIconImage.qml",
    "chars": 1014,
    "preview": "pragma ComponentBehavior: Bound\n\nimport qs.utils\nimport Quickshell.Widgets\nimport QtQuick\n\nItem {\n    id: root\n\n    // E"
  },
  {
    "path": "components/images/CachingImage.qml",
    "chars": 482,
    "preview": "import qs.utils\nimport Caelestia.Internal\nimport Quickshell\nimport QtQuick\n\nImage {\n    id: root\n\n    property alias pat"
  },
  {
    "path": "components/misc/CustomShortcut.qml",
    "chars": 70,
    "preview": "import Quickshell.Hyprland\n\nGlobalShortcut {\n    appid: \"caelestia\"\n}\n"
  },
  {
    "path": "components/misc/Ref.qml",
    "chars": 158,
    "preview": "import QtQuick\n\nQtObject {\n    required property var service\n\n    Component.onCompleted: service.refCount++\n    Componen"
  },
  {
    "path": "components/widgets/ExtraIndicator.qml",
    "chars": 1171,
    "preview": "import \"..\"\nimport \"../effects\"\nimport qs.services\nimport qs.config\nimport QtQuick\n\nStyledRect {\n    required property i"
  },
  {
    "path": "config/Appearance.qml",
    "chars": 710,
    "preview": "pragma Singleton\n\nimport Quickshell\n\nSingleton {\n    // Literally just here to shorten accessing stuff :woe:\n    // Also"
  },
  {
    "path": "config/AppearanceConfig.qml",
    "chars": 3283,
    "preview": "import Quickshell.Io\n\nJsonObject {\n    property Rounding rounding: Rounding {}\n    property Spacing spacing: Spacing {}\n"
  },
  {
    "path": "config/BackgroundConfig.qml",
    "chars": 1110,
    "preview": "import Quickshell.Io\n\nJsonObject {\n    property bool enabled: true\n    property bool wallpaperEnabled: true\n    property"
  },
  {
    "path": "config/BarConfig.qml",
    "chars": 3696,
    "preview": "import Quickshell.Io\n\nJsonObject {\n    property bool persistent: true\n    property bool showOnHover: true\n    property i"
  },
  {
    "path": "config/BorderConfig.qml",
    "chars": 296,
    "preview": "import Quickshell.Io\nimport qs.config\n\nJsonObject {\n    property int thickness: Config.appearance.padding.normal\n    pro"
  },
  {
    "path": "config/Config.qml",
    "chars": 17438,
    "preview": "pragma Singleton\n\nimport qs.utils\nimport Caelestia\nimport Quickshell\nimport Quickshell.Io\nimport QtQuick\n\nSingleton {\n  "
  },
  {
    "path": "config/ControlCenterConfig.qml",
    "chars": 187,
    "preview": "import Quickshell.Io\n\nJsonObject {\n    property Sizes sizes: Sizes {}\n\n    component Sizes: JsonObject {\n        propert"
  },
  {
    "path": "config/DashboardConfig.qml",
    "chars": 1447,
    "preview": "import Quickshell.Io\n\nJsonObject {\n    property bool enabled: true\n    property bool showOnHover: true\n    property int "
  },
  {
    "path": "config/GeneralConfig.qml",
    "chars": 1849,
    "preview": "import Quickshell.Io\n\nJsonObject {\n    property string logo: \"\"\n    property list<string> excludedScreens: []\n    proper"
  },
  {
    "path": "config/LauncherConfig.qml",
    "chars": 4522,
    "preview": "import Quickshell.Io\n\nJsonObject {\n    property bool enabled: true\n    property bool showOnHover: false\n    property int"
  },
  {
    "path": "config/LockConfig.qml",
    "chars": 371,
    "preview": "import Quickshell.Io\n\nJsonObject {\n    property bool recolourLogo: false\n    property bool enableFprint: true\n    proper"
  },
  {
    "path": "config/NotifsConfig.qml",
    "chars": 527,
    "preview": "import Quickshell.Io\n\nJsonObject {\n    property bool expire: true\n    property int defaultExpireTimeout: 5000\n    proper"
  },
  {
    "path": "config/OsdConfig.qml",
    "chars": 337,
    "preview": "import Quickshell.Io\n\nJsonObject {\n    property bool enabled: true\n    property int hideDelay: 2000\n    property bool en"
  },
  {
    "path": "config/ServiceConfig.qml",
    "chars": 975,
    "preview": "import Quickshell.Io\nimport QtQuick\n\nJsonObject {\n    property string weatherLocation: \"\" // A lat,long pair or empty fo"
  },
  {
    "path": "config/SessionConfig.qml",
    "chars": 869,
    "preview": "import Quickshell.Io\n\nJsonObject {\n    property bool enabled: true\n    property int dragThreshold: 30\n    property bool "
  },
  {
    "path": "config/SidebarConfig.qml",
    "chars": 212,
    "preview": "import Quickshell.Io\n\nJsonObject {\n    property bool enabled: true\n    property int dragThreshold: 80\n    property Sizes"
  },
  {
    "path": "config/UserPaths.qml",
    "chars": 297,
    "preview": "import qs.utils\nimport Quickshell.Io\n\nJsonObject {\n    property string wallpaperDir: `${Paths.pictures}/Wallpapers`\n    "
  },
  {
    "path": "config/UtilitiesConfig.qml",
    "chars": 1539,
    "preview": "import Quickshell.Io\n\nJsonObject {\n    property bool enabled: true\n    property int maxToasts: 4\n\n    property Sizes siz"
  },
  {
    "path": "config/WInfoConfig.qml",
    "chars": 191,
    "preview": "import Quickshell.Io\n\nJsonObject {\n    property Sizes sizes: Sizes {}\n\n    component Sizes: JsonObject {\n        propert"
  },
  {
    "path": "extras/CMakeLists.txt",
    "chars": 274,
    "preview": "# Version\nadd_executable(version version.cpp)\ntarget_compile_definitions(version PRIVATE\n    PROJECT_NAME=\"${PROJECT_NAM"
  },
  {
    "path": "extras/version.cpp",
    "chars": 1044,
    "preview": "#include <iostream>\n\nint main(int argc, char* argv[]) {\n    if (argc > 1) {\n        std::string arg = argv[1];\n\n        "
  },
  {
    "path": "flake.nix",
    "chars": 1840,
    "preview": "{\n  description = \"Desktop shell for Caelestia dots\";\n\n  inputs = {\n    nixpkgs.url = \"github:nixos/nixpkgs/nixos-unstab"
  },
  {
    "path": "modules/BatteryMonitor.qml",
    "chars": 1904,
    "preview": "import qs.config\nimport Caelestia\nimport Quickshell\nimport Quickshell.Services.UPower\nimport QtQuick\n\nScope {\n    id: ro"
  },
  {
    "path": "modules/IdleMonitors.qml",
    "chars": 1395,
    "preview": "pragma ComponentBehavior: Bound\n\nimport \"lock\"\nimport qs.config\nimport qs.services\nimport Caelestia.Internal\nimport Quic"
  },
  {
    "path": "modules/Shortcuts.qml",
    "chars": 4190,
    "preview": "import qs.components.misc\nimport qs.modules.controlcenter\nimport qs.services\nimport Caelestia\nimport Quickshell\nimport Q"
  },
  {
    "path": "modules/areapicker/AreaPicker.qml",
    "chars": 3174,
    "preview": "pragma ComponentBehavior: Bound\n\nimport qs.components.containers\nimport qs.components.misc\nimport qs.services\nimport Qui"
  },
  {
    "path": "modules/areapicker/Picker.qml",
    "chars": 7969,
    "preview": "pragma ComponentBehavior: Bound\n\nimport qs.components\nimport qs.services\nimport qs.config\nimport Caelestia\nimport Quicks"
  },
  {
    "path": "modules/background/Background.qml",
    "chars": 5429,
    "preview": "pragma ComponentBehavior: Bound\n\nimport qs.components.containers\nimport qs.services\nimport qs.config\nimport Quickshell\ni"
  },
  {
    "path": "modules/background/DesktopClock.qml",
    "chars": 5936,
    "preview": "pragma ComponentBehavior: Bound\n\nimport qs.components\nimport qs.services\nimport qs.config\nimport QtQuick\nimport QtQuick."
  },
  {
    "path": "modules/background/Visualiser.qml",
    "chars": 4453,
    "preview": "pragma ComponentBehavior: Bound\n\nimport qs.components\nimport qs.services\nimport qs.config\nimport Caelestia.Services\nimpo"
  },
  {
    "path": "modules/background/Wallpaper.qml",
    "chars": 3973,
    "preview": "pragma ComponentBehavior: Bound\n\nimport qs.components\nimport qs.components.images\nimport qs.components.filedialog\nimport"
  },
  {
    "path": "modules/bar/Bar.qml",
    "chars": 7399,
    "preview": "pragma ComponentBehavior: Bound\n\nimport qs.components\nimport qs.services\nimport qs.config\nimport \"popouts\" as BarPopouts"
  },
  {
    "path": "modules/bar/BarWrapper.qml",
    "chars": 2488,
    "preview": "pragma ComponentBehavior: Bound\n\nimport qs.components\nimport qs.config\nimport qs.modules.bar.popouts as BarPopouts\nimpor"
  },
  {
    "path": "modules/bar/components/ActiveWindow.qml",
    "chars": 4173,
    "preview": "pragma ComponentBehavior: Bound\n\nimport qs.components\nimport qs.services\nimport qs.utils\nimport qs.config\nimport QtQuick"
  },
  {
    "path": "modules/bar/components/Clock.qml",
    "chars": 2073,
    "preview": "pragma ComponentBehavior: Bound\n\nimport qs.components\nimport qs.services\nimport qs.config\nimport QtQuick\n\nStyledRect {\n "
  },
  {
    "path": "modules/bar/components/OsIcon.qml",
    "chars": 1127,
    "preview": "import qs.components\nimport qs.components.effects\nimport qs.services\nimport qs.config\nimport qs.utils\nimport QtQuick\n\nIt"
  },
  {
    "path": "modules/bar/components/Power.qml",
    "chars": 962,
    "preview": "import qs.components\nimport qs.services\nimport qs.config\nimport QtQuick\n\nItem {\n    id: root\n\n    required property Draw"
  },
  {
    "path": "modules/bar/components/Settings.qml",
    "chars": 956,
    "preview": "import qs.components\nimport qs.modules.controlcenter\nimport qs.services\nimport qs.config\nimport QtQuick\n\nItem {\n    id: "
  },
  {
    "path": "modules/bar/components/SettingsIcon.qml",
    "chars": 956,
    "preview": "import qs.components\nimport qs.modules.controlcenter\nimport qs.services\nimport qs.config\nimport QtQuick\n\nItem {\n    id: "
  },
  {
    "path": "modules/bar/components/StatusIcons.qml",
    "chars": 8776,
    "preview": "pragma ComponentBehavior: Bound\n\nimport qs.components\nimport qs.services\nimport qs.utils\nimport qs.config\nimport Quicksh"
  },
  {
    "path": "modules/bar/components/Tray.qml",
    "chars": 3492,
    "preview": "pragma ComponentBehavior: Bound\n\nimport qs.components\nimport qs.services\nimport qs.config\nimport Quickshell\nimport Quick"
  },
  {
    "path": "modules/bar/components/TrayItem.qml",
    "chars": 803,
    "preview": "pragma ComponentBehavior: Bound\n\nimport qs.components.effects\nimport qs.services\nimport qs.config\nimport qs.utils\nimport"
  },
  {
    "path": "modules/bar/components/workspaces/ActiveIndicator.qml",
    "chars": 2499,
    "preview": "import qs.components\nimport qs.components.effects\nimport qs.services\nimport qs.config\nimport QtQuick\n\nStyledRect {\n    i"
  },
  {
    "path": "modules/bar/components/workspaces/OccupiedBg.qml",
    "chars": 2965,
    "preview": "pragma ComponentBehavior: Bound\n\nimport qs.components\nimport qs.services\nimport qs.config\nimport Quickshell\nimport QtQui"
  },
  {
    "path": "modules/bar/components/workspaces/SpecialWorkspaces.qml",
    "chars": 10760,
    "preview": "pragma ComponentBehavior: Bound\n\nimport qs.components\nimport qs.components.effects\nimport qs.services\nimport qs.utils\nim"
  },
  {
    "path": "modules/bar/components/workspaces/Workspace.qml",
    "chars": 3889,
    "preview": "pragma ComponentBehavior: Bound\n\nimport qs.components\nimport qs.services\nimport qs.utils\nimport qs.config\nimport Quicksh"
  },
  {
    "path": "modules/bar/components/workspaces/Workspaces.qml",
    "chars": 3721,
    "preview": "pragma ComponentBehavior: Bound\n\nimport qs.services\nimport qs.config\nimport qs.components\nimport Quickshell\nimport QtQui"
  },
  {
    "path": "modules/bar/popouts/ActiveWindow.qml",
    "chars": 2891,
    "preview": "import qs.components\nimport qs.services\nimport qs.utils\nimport qs.config\nimport Quickshell.Widgets\nimport Quickshell.Way"
  },
  {
    "path": "modules/bar/popouts/Audio.qml",
    "chars": 3152,
    "preview": "pragma ComponentBehavior: Bound\n\nimport qs.components\nimport qs.components.controls\nimport qs.services\nimport qs.config\n"
  },
  {
    "path": "modules/bar/popouts/Background.qml",
    "chars": 2135,
    "preview": "import qs.components\nimport qs.services\nimport qs.config\nimport QtQuick\nimport QtQuick.Shapes\n\nShapePath {\n    id: root\n"
  },
  {
    "path": "modules/bar/popouts/Battery.qml",
    "chars": 7132,
    "preview": "pragma ComponentBehavior: Bound\n\nimport qs.components\nimport qs.services\nimport qs.config\nimport Quickshell.Services.UPo"
  },
  {
    "path": "modules/bar/popouts/Bluetooth.qml",
    "chars": 5983,
    "preview": "pragma ComponentBehavior: Bound\n\nimport qs.components\nimport qs.components.controls\nimport qs.services\nimport qs.config\n"
  },
  {
    "path": "modules/bar/popouts/Content.qml",
    "chars": 6590,
    "preview": "pragma ComponentBehavior: Bound\n\nimport qs.components\nimport qs.config\nimport Quickshell\nimport Quickshell.Services.Syst"
  },
  {
    "path": "modules/bar/popouts/LockStatus.qml",
    "chars": 340,
    "preview": "import qs.components\nimport qs.services\nimport qs.config\nimport QtQuick.Layouts\n\nColumnLayout {\n    spacing: Appearance."
  },
  {
    "path": "modules/bar/popouts/Network.qml",
    "chars": 13296,
    "preview": "pragma ComponentBehavior: Bound\n\nimport qs.components\nimport qs.components.controls\nimport qs.services\nimport qs.config\n"
  },
  {
    "path": "modules/bar/popouts/PopoutState.qml",
    "chars": 132,
    "preview": "import QtQuick\n\nQtObject {\n    property string currentName\n    property bool hasCurrent\n\n    signal detachRequested(mode"
  },
  {
    "path": "modules/bar/popouts/TrayMenu.qml",
    "chars": 7385,
    "preview": "pragma ComponentBehavior: Bound\n\nimport qs.components\nimport qs.services\nimport qs.config\nimport Quickshell\nimport Quick"
  },
  {
    "path": "modules/bar/popouts/WirelessPassword.qml",
    "chars": 22181,
    "preview": "pragma ComponentBehavior: Bound\n\nimport qs.components\nimport qs.components.controls\nimport qs.services\nimport qs.config\n"
  },
  {
    "path": "modules/bar/popouts/Wrapper.qml",
    "chars": 5612,
    "preview": "pragma ComponentBehavior: Bound\n\nimport qs.components\nimport qs.services\nimport qs.config\nimport qs.modules.windowinfo\ni"
  },
  {
    "path": "modules/bar/popouts/kblayout/KbLayout.qml",
    "chars": 5535,
    "preview": "pragma ComponentBehavior: Bound\n\nimport QtQuick\nimport QtQuick.Controls\nimport QtQuick.Layouts\nimport qs.components\nimpo"
  },
  {
    "path": "modules/bar/popouts/kblayout/KbLayoutModel.qml",
    "chars": 6226,
    "preview": "pragma ComponentBehavior: Bound\n\nimport QtQuick\n\nimport Quickshell.Io\n\nimport qs.config\nimport Caelestia\n\nItem {\n    id:"
  },
  {
    "path": "modules/controlcenter/ControlCenter.qml",
    "chars": 2692,
    "preview": "pragma ComponentBehavior: Bound\n\nimport qs.components\nimport qs.components.controls\nimport qs.services\nimport qs.config\n"
  },
  {
    "path": "modules/controlcenter/NavRail.qml",
    "chars": 7847,
    "preview": "pragma ComponentBehavior: Bound\n\nimport qs.components\nimport qs.services\nimport qs.config\nimport qs.modules.controlcente"
  },
  {
    "path": "modules/controlcenter/PaneRegistry.qml",
    "chars": 2962,
    "preview": "pragma Singleton\n\nimport QtQuick\n\nQtObject {\n    id: root\n\n    readonly property list<QtObject> panes: [\n        QtObjec"
  },
  {
    "path": "modules/controlcenter/Panes.qml",
    "chars": 4084,
    "preview": "pragma ComponentBehavior: Bound\n\nimport qs.components\nimport qs.config\nimport qs.modules.controlcenter\nimport Quickshell"
  },
  {
    "path": "modules/controlcenter/Session.qml",
    "chars": 764,
    "preview": "import QtQuick\nimport \"./state\"\nimport qs.modules.controlcenter\n\nQtObject {\n    readonly property list<string> panes: Pa"
  },
  {
    "path": "modules/controlcenter/WindowFactory.qml",
    "chars": 1368,
    "preview": "pragma Singleton\n\nimport qs.components\nimport qs.services\nimport Quickshell\nimport QtQuick\n\nSingleton {\n    id: root\n\n  "
  },
  {
    "path": "modules/controlcenter/WindowTitle.qml",
    "chars": 1199,
    "preview": "import qs.components\nimport qs.services\nimport qs.config\nimport Quickshell\nimport QtQuick\n\nStyledRect {\n    id: root\n\n  "
  },
  {
    "path": "modules/controlcenter/appearance/AppearancePane.qml",
    "chars": 10784,
    "preview": "pragma ComponentBehavior: Bound\n\nimport \"..\"\nimport \"../components\"\nimport \"./sections\"\nimport qs.components\nimport qs.c"
  },
  {
    "path": "modules/controlcenter/appearance/sections/AnimationsSection.qml",
    "chars": 908,
    "preview": "pragma ComponentBehavior: Bound\n\nimport \"../../components\"\nimport qs.components\nimport qs.components.controls\nimport qs."
  },
  {
    "path": "modules/controlcenter/appearance/sections/BackgroundSection.qml",
    "chars": 10030,
    "preview": "pragma ComponentBehavior: Bound\n\nimport \"../../components\"\nimport qs.components\nimport qs.components.controls\nimport qs."
  },
  {
    "path": "modules/controlcenter/appearance/sections/BorderSection.qml",
    "chars": 1487,
    "preview": "pragma ComponentBehavior: Bound\n\nimport \"../../components\"\nimport qs.components\nimport qs.components.controls\nimport qs."
  },
  {
    "path": "modules/controlcenter/appearance/sections/ColorSchemeSection.qml",
    "chars": 5138,
    "preview": "pragma ComponentBehavior: Bound\n\nimport \"../../../launcher/services\"\nimport qs.components\nimport qs.components.controls\n"
  },
  {
    "path": "modules/controlcenter/appearance/sections/ColorVariantSection.qml",
    "chars": 3048,
    "preview": "pragma ComponentBehavior: Bound\n\nimport \"../../../launcher/services\"\nimport qs.components\nimport qs.components.controls\n"
  },
  {
    "path": "modules/controlcenter/appearance/sections/FontsSection.qml",
    "chars": 10020,
    "preview": "pragma ComponentBehavior: Bound\n\nimport \"../../components\"\nimport qs.components\nimport qs.components.controls\nimport qs."
  },
  {
    "path": "modules/controlcenter/appearance/sections/ScalesSection.qml",
    "chars": 2066,
    "preview": "pragma ComponentBehavior: Bound\n\nimport \"../../components\"\nimport qs.components\nimport qs.components.controls\nimport qs."
  },
  {
    "path": "modules/controlcenter/appearance/sections/ThemeModeSection.qml",
    "chars": 415,
    "preview": "pragma ComponentBehavior: Bound\n\nimport qs.components.controls\nimport qs.services\nimport QtQuick\n\nCollapsibleSection {\n "
  },
  {
    "path": "modules/controlcenter/appearance/sections/TransparencySection.qml",
    "chars": 1971,
    "preview": "pragma ComponentBehavior: Bound\n\nimport \"../../components\"\nimport qs.components\nimport qs.components.controls\nimport qs."
  },
  {
    "path": "modules/controlcenter/audio/AudioPane.qml",
    "chars": 29432,
    "preview": "pragma ComponentBehavior: Bound\n\nimport \"..\"\nimport \"../components\"\nimport qs.components\nimport qs.components.controls\ni"
  },
  {
    "path": "modules/controlcenter/bluetooth/BtPane.qml",
    "chars": 1584,
    "preview": "pragma ComponentBehavior: Bound\n\nimport \"..\"\nimport \"../components\"\nimport \".\"\nimport qs.components.controls\nimport qs.c"
  },
  {
    "path": "modules/controlcenter/bluetooth/Details.qml",
    "chars": 28390,
    "preview": "pragma ComponentBehavior: Bound\n\nimport \"..\"\nimport \"../components\"\nimport qs.components\nimport qs.components.controls\ni"
  },
  {
    "path": "modules/controlcenter/bluetooth/DeviceList.qml",
    "chars": 10002,
    "preview": "pragma ComponentBehavior: Bound\n\nimport \"..\"\nimport \"../components\"\nimport qs.components\nimport qs.components.controls\ni"
  },
  {
    "path": "modules/controlcenter/bluetooth/Settings.qml",
    "chars": 19134,
    "preview": "pragma ComponentBehavior: Bound\n\nimport \"..\"\nimport \"../components\"\nimport qs.components\nimport qs.components.controls\ni"
  },
  {
    "path": "modules/controlcenter/components/ConnectedButtonGroup.qml",
    "chars": 4311,
    "preview": "pragma ComponentBehavior: Bound\n\nimport qs.components\nimport qs.components.controls\nimport qs.services\nimport qs.config\n"
  },
  {
    "path": "modules/controlcenter/components/DeviceDetails.qml",
    "chars": 1572,
    "preview": "pragma ComponentBehavior: Bound\n\nimport \"..\"\nimport qs.config\nimport QtQuick\nimport QtQuick.Layouts\n\nItem {\n    id: root"
  },
  {
    "path": "modules/controlcenter/components/DeviceList.qml",
    "chars": 1895,
    "preview": "pragma ComponentBehavior: Bound\n\nimport \"..\"\nimport qs.components\nimport qs.components.containers\nimport qs.services\nimp"
  },
  {
    "path": "modules/controlcenter/components/PaneTransition.qml",
    "chars": 2076,
    "preview": "pragma ComponentBehavior: Bound\n\nimport qs.config\nimport QtQuick\n\nSequentialAnimation {\n    id: root\n\n    required prope"
  },
  {
    "path": "modules/controlcenter/components/ReadonlySlider.qml",
    "chars": 1827,
    "preview": "import qs.components\nimport qs.services\nimport qs.config\nimport QtQuick\nimport QtQuick.Layouts\n\nColumnLayout {\n    id: r"
  },
  {
    "path": "modules/controlcenter/components/SettingsHeader.qml",
    "chars": 784,
    "preview": "pragma ComponentBehavior: Bound\n\nimport qs.components\nimport qs.config\nimport QtQuick\nimport QtQuick.Layouts\n\nItem {\n   "
  },
  {
    "path": "modules/controlcenter/components/SliderInput.qml",
    "chars": 5822,
    "preview": "pragma ComponentBehavior: Bound\n\nimport qs.components\nimport qs.components.controls\nimport qs.services\nimport qs.config\n"
  },
  {
    "path": "modules/controlcenter/components/SplitPaneLayout.qml",
    "chars": 2903,
    "preview": "pragma ComponentBehavior: Bound\n\nimport qs.components.effects\nimport qs.config\nimport Quickshell.Widgets\nimport QtQuick\n"
  },
  {
    "path": "modules/controlcenter/components/SplitPaneWithDetails.qml",
    "chars": 2487,
    "preview": "pragma ComponentBehavior: Bound\n\nimport QtQuick\n\nItem {\n    id: root\n\n    required property Component leftContent\n    re"
  },
  {
    "path": "modules/controlcenter/components/WallpaperGrid.qml",
    "chars": 7621,
    "preview": "pragma ComponentBehavior: Bound\n\nimport \"..\"\nimport qs.components\nimport qs.components.controls\nimport qs.components.ima"
  },
  {
    "path": "modules/controlcenter/dashboard/DashboardPane.qml",
    "chars": 4607,
    "preview": "pragma ComponentBehavior: Bound\n\nimport \"..\"\nimport qs.components\nimport qs.components.controls\nimport qs.components.eff"
  },
  {
    "path": "modules/controlcenter/dashboard/GeneralSection.qml",
    "chars": 3282,
    "preview": "import \"../components\"\nimport qs.components\nimport qs.components.controls\nimport qs.config\nimport QtQuick\nimport QtQuick"
  },
  {
    "path": "modules/controlcenter/dashboard/PerformanceSection.qml",
    "chars": 3292,
    "preview": "import \"../components\"\nimport QtQuick\nimport QtQuick.Layouts\nimport Quickshell.Services.UPower\nimport qs.components\nimpo"
  },
  {
    "path": "modules/controlcenter/launcher/LauncherPane.qml",
    "chars": 26299,
    "preview": "pragma ComponentBehavior: Bound\n\nimport \"..\"\nimport \"../components\"\nimport qs.components\nimport qs.components.controls\ni"
  },
  {
    "path": "modules/controlcenter/launcher/Settings.qml",
    "chars": 5741,
    "preview": "pragma ComponentBehavior: Bound\n\nimport \"..\"\nimport \"../components\"\nimport qs.components\nimport qs.components.controls\ni"
  },
  {
    "path": "modules/controlcenter/network/EthernetDetails.qml",
    "chars": 3603,
    "preview": "pragma ComponentBehavior: Bound\n\nimport \"..\"\nimport \"../components\"\nimport qs.components\nimport qs.components.controls\ni"
  },
  {
    "path": "modules/controlcenter/network/EthernetList.qml",
    "chars": 6439,
    "preview": "pragma ComponentBehavior: Bound\n\nimport \"..\"\nimport \"../components\"\nimport qs.components\nimport qs.components.controls\ni"
  },
  {
    "path": "modules/controlcenter/network/EthernetPane.qml",
    "chars": 990,
    "preview": "pragma ComponentBehavior: Bound\n\nimport \"..\"\nimport \"../components\"\nimport qs.components.containers\nimport QtQuick\n\nSpli"
  },
  {
    "path": "modules/controlcenter/network/EthernetSettings.qml",
    "chars": 1894,
    "preview": "pragma ComponentBehavior: Bound\n\nimport \"..\"\nimport \"../components\"\nimport qs.components\nimport qs.services\nimport qs.co"
  },
  {
    "path": "modules/controlcenter/network/NetworkSettings.qml",
    "chars": 4853,
    "preview": "pragma ComponentBehavior: Bound\n\nimport \"..\"\nimport \"../components\"\nimport qs.components\nimport qs.components.controls\ni"
  },
  {
    "path": "modules/controlcenter/network/NetworkingPane.qml",
    "chars": 13383,
    "preview": "pragma ComponentBehavior: Bound\n\nimport \"..\"\nimport \"../components\"\nimport \".\"\nimport qs.components\nimport qs.components"
  },
  {
    "path": "modules/controlcenter/network/VpnDetails.qml",
    "chars": 15243,
    "preview": "pragma ComponentBehavior: Bound\n\nimport \"..\"\nimport \"../components\"\nimport qs.components\nimport qs.components.controls\ni"
  },
  {
    "path": "modules/controlcenter/network/VpnList.qml",
    "chars": 27132,
    "preview": "pragma ComponentBehavior: Bound\n\nimport \"..\"\nimport qs.components\nimport qs.components.controls\nimport qs.components.eff"
  },
  {
    "path": "modules/controlcenter/network/VpnSettings.qml",
    "chars": 8245,
    "preview": "pragma ComponentBehavior: Bound\n\nimport \"..\"\nimport \"../components\"\nimport qs.components\nimport qs.components.controls\ni"
  },
  {
    "path": "modules/controlcenter/network/WirelessDetails.qml",
    "chars": 6958,
    "preview": "pragma ComponentBehavior: Bound\n\nimport \"..\"\nimport \"../components\"\nimport qs.components\nimport qs.components.controls\ni"
  },
  {
    "path": "modules/controlcenter/network/WirelessList.qml",
    "chars": 8060,
    "preview": "pragma ComponentBehavior: Bound\n\nimport \"..\"\nimport \"../components\"\nimport qs.components\nimport qs.components.controls\ni"
  },
  {
    "path": "modules/controlcenter/network/WirelessPane.qml",
    "chars": 1149,
    "preview": "pragma ComponentBehavior: Bound\n\nimport \"..\"\nimport \"../components\"\nimport qs.components.containers\nimport QtQuick\n\nSpli"
  },
  {
    "path": "modules/controlcenter/network/WirelessPasswordDialog.qml",
    "chars": 17616,
    "preview": "pragma ComponentBehavior: Bound\n\nimport \"..\"\nimport qs.components\nimport qs.components.controls\nimport qs.services\nimpor"
  },
  {
    "path": "modules/controlcenter/network/WirelessSettings.qml",
    "chars": 1792,
    "preview": "pragma ComponentBehavior: Bound\n\nimport \"..\"\nimport \"../components\"\nimport qs.components\nimport qs.components.controls\ni"
  },
  {
    "path": "modules/controlcenter/state/BluetoothState.qml",
    "chars": 308,
    "preview": "import Quickshell.Bluetooth\nimport QtQuick\n\nQtObject {\n    id: root\n\n    property BluetoothDevice active: null\n    prope"
  },
  {
    "path": "modules/controlcenter/state/EthernetState.qml",
    "chars": 73,
    "preview": "import QtQuick\n\nQtObject {\n    id: root\n\n    property var active: null\n}\n"
  },
  {
    "path": "modules/controlcenter/state/LauncherState.qml",
    "chars": 73,
    "preview": "import QtQuick\n\nQtObject {\n    id: root\n\n    property var active: null\n}\n"
  },
  {
    "path": "modules/controlcenter/state/NetworkState.qml",
    "chars": 155,
    "preview": "import QtQuick\n\nQtObject {\n    id: root\n\n    property var active: null\n    property bool showPasswordDialog: false\n    p"
  },
  {
    "path": "modules/controlcenter/state/VpnState.qml",
    "chars": 59,
    "preview": "import QtQuick\n\nQtObject {\n    property var active: null\n}\n"
  },
  {
    "path": "modules/controlcenter/taskbar/TaskbarPane.qml",
    "chars": 35413,
    "preview": "pragma ComponentBehavior: Bound\n\nimport \"..\"\nimport \"../components\"\nimport qs.components\nimport qs.components.controls\ni"
  },
  {
    "path": "modules/dashboard/Background.qml",
    "chars": 1603,
    "preview": "import qs.components\nimport qs.services\nimport qs.config\nimport QtQuick\nimport QtQuick.Shapes\n\nShapePath {\n    id: root\n"
  },
  {
    "path": "modules/dashboard/Content.qml",
    "chars": 6781,
    "preview": "pragma ComponentBehavior: Bound\n\nimport qs.components\nimport qs.components.filedialog\nimport qs.config\nimport Quickshell"
  }
]

// ... and 167 more files (download for full content)

About this extraction

This page contains the full source code of the caelestia-dots/shell GitHub repository, extracted and formatted as plain text for AI agents and large language models (LLMs). The extraction includes 367 files (1.5 MB), approximately 329.7k tokens, and a symbol index with 232 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!