Quickshell


Quickshell: QtObject

singleton
import Quickshell
  • cacheDir string
    readonly

    The per-shell cache directory.

    Usually ~/.cache/quickshell/by-shell/<shell-id>

  • clipboardText string

    The system clipboard.

    WARNING

    Under wayland the clipboard will be empty unless a quickshell window is focused.

  • dataDir string
    readonly

    The per-shell data directory.

    Usually ~/.local/share/quickshell/by-shell/<shell-id>

    Can be overridden using //@ pragma DataDir $BASE/path in the root qml file, where $BASE corrosponds to $XDG_DATA_HOME (usually ~/.local/share).

  • processId int
    readonly

    Quickshell’s process id.

  • screens list <ShellScreen>
    readonly

    All currently connected screens.

    This property updates as connected screens change.

    Reusing a window on every screen

    ShellRoot {
      Variants {
        // see Variants for details
        variants: Quickshell.screens
        PanelWindow {
          property var modelData
          screen: modelData
        }
      }
    }

    This creates an instance of your window once on every screen. As screens are added or removed your window will be created or destroyed on those screens.

  • shellRoot string
    readonly

    The full path to the root directory of your shell.

    The root directory is the folder containing the entrypoint to your shell, often referred to as shell.qml.

  • stateDir string
    readonly

    The per-shell state directory.

    Usually ~/.local/state/quickshell/by-shell/<shell-id>

    Can be overridden using //@ pragma StateDir $BASE/path in the root qml file, where $BASE corrosponds to $XDG_STATE_HOME (usually ~/.local/state).

  • watchFiles bool

    If true then the configuration will be reloaded whenever any files change. Defaults to true.

  • workingDirectory string

    Quickshell’s working directory. Defaults to whereever quickshell was launched from.

  • cachePath(path) string

    Property pathstring

    Equivalent to ${Quickshell.cacheDir}/${path}

  • dataPath(path) string

    Property pathstring

    Equivalent to ${Quickshell.dataDir}/${path}

  • env(variable) variant

    Property variablestring

    Returns the string value of an environment variable or null if it is not set.

  • iconPath(icon) string

    Property iconstring

    Returns a string usable for a Go to Image.source for a given system icon.

    NOTE

    By default, icons are loaded from the theme selected by the qt platform theme, which means they should match with all other qt applications on your system.

    If you want to use a different icon theme, you can put //@ pragma IconTheme <name> at the top of your root config file or set the QS_ICON_THEME variable to the name of your icon theme.

  • iconPath(icon, check) string

    Property iconstring Property checkbool

    Setting the check parameter of iconPath to true will return an empty string if the icon does not exist, instead of an image showing a missing texture.

  • iconPath(icon, fallback) string

    Property iconstring Property fallbackstring

    Setting the fallback parameter of iconPath will attempt to load the fallback icon if the requested one could not be loaded.

  • inhibitReloadPopup() void

    When called from reloadCompleted() or reloadFailed(), prevents the default reload popup from displaying.

    The popup can also be blocked by setting QS_NO_RELOAD_POPUP=1.

  • reload(hard) void

    Property hardbool

    Reload the shell.

    hard - perform a hard reload. If this is false, Quickshell will attempt to reuse windows that already exist. If true windows will be recreated.

    See Reloadable for more information on what can be reloaded and how.

  • statePath(path) string

    Property pathstring

    Equivalent to ${Quickshell.stateDir}/${path}

  • lastWindowClosed()   ?

    Sent when the last window is closed.

    To make the application exit when the last window is closed run Qt.quit().

  • reloadCompleted()   ?

    The reload sequence has completed successfully.

  • reloadFailed(errorString)   ?

    Property errorStringstring

    The reload sequence has failed.