-->
import Quickshell
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
).
The per-shell cache directory.
Usually ~/.cache/quickshell/by-shell/<shell-id>
The system clipboard.
WARNING
Under wayland the clipboard will be empty unless a quickshell window is focused.
WARNING
Deprecated: Renamed to shellDir for clarity.
Quickshell’s process id.
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
.
All currently connected screens.
This property updates as connected screens change.
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.
WARNING
Deprecated: Renamed to shellDir for consistency.
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
).
Quickshell’s working directory. Defaults to whereever quickshell was launched from.
If true then the configuration will be reloaded whenever any files change. Defaults to true.
Equivalent to ${Quickshell.cacheDir}/${path}
WARNING
Deprecated: Renamed to shellPath() for clarity.
Equivalent to ${Quickshell.dataDir}/${path}
Returns the string value of an environment variable or null if it is not set.
Launch a process detached from Quickshell.
The context parameter can either be a list of command arguments or a JS object with the following fields:
command
: A list containing the command and all its arguments. See Process.command.environment
: Changes to make to the process environment. See Process.environment.clearEnvironment
: Removes all variables from the environment if true.workingDirectory
: The working directory the command should run in.WARNING
This does not run command in a shell. All arguments to the command
must be in separate values in the list, e.g. ["echo", "hello"]
and not ["echo hello"]
.
Additionally, shell scripts must be run by your shell,
e.g. ["sh", "script.sh"]
instead of ["script.sh"]
unless the script
has a shebang.
NOTE
You can use ["sh", "-c", <your command>]
to execute your command with
the system shell.
This function is equivalent to Process.startDetached().
Returns a string usable for a 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.
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.
Setting the fallback
parameter of iconPath
will attempt to load the fallback
icon if the requested one could not be loaded.
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 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.
Equivalent to ${Quickshell.configDir}/${path}
Equivalent to ${Quickshell.stateDir}/${path}
The reload sequence has completed successfully.
The reload sequence has failed.
Sent when the last window is closed.
To make the application exit when the last window is closed run Qt.quit()
.