Skip to content

Commit 403dc6d

Browse files
starchglazeroutfoxxed
authored andcommitted
proofreading and tweaks
1 parent 58eba03 commit 403dc6d

File tree

7 files changed

+206
-194
lines changed

7 files changed

+206
-194
lines changed

src/guide/distribution.mdx

Lines changed: 15 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -6,12 +6,15 @@ If you plan to distribute your configuration to a lot of users, you should keep
66
a couple things in mind:
77

88
### API Breaks
9-
Quickshell will have API breaks in future versions.
10-
You should have a way to track specific revisions with your distribution
11-
to avoid breakage if a user updates quickshell before you can update your configuration.
9+
As Quickshell is still in a somewhat early stage of development, Quickshell will
10+
have API breaks for future versions.
1211

13-
With Nix this should be as simple as tracking a specific revision.
14-
For Arch, and other distributions without a mechanism to do this, you may
12+
You should have a way to track specific revisions to avoid breakage if a user
13+
updates Quickshell before you can update your configuration.
14+
15+
With Nix, this should be as simple as tracking a specific revision.
16+
17+
For Arch, or any other distributions without a mechanism to do this, you may
1518
want to include a package that builds a specific Quickshell revision with
1619
your configuration.
1720

@@ -20,13 +23,14 @@ Quickshell can load configurations from a number of different paths.
2023
The ideal path depends on how you distribute your config.
2124

2225
#### As dotfiles
23-
If you distribute your config as a set of dotfiles, you should place
24-
the config in `$XDG_CONFIG_HOME/quickshell/<name>` (usually `~/.config/quickshell/<name>`).
25-
Named configurations can be used in the quickshell command by specifying `--config` or `-c`
26-
(`qs -c <name>`).
26+
If you distribute your config as a set of dotfiles, you should place it in
27+
`$XDG_CONFIG_HOME/quickshell/<name>` (usually `~/.config/quickshell/<name>`).
28+
29+
You should name your config and refrain from using the bare `$XDG_CONFIG_HOME/quickshell`
30+
directory, as that will make it harder for users to have any other configuration.
2731

28-
You should not use the bare `$XDG_CONFIG_HOME/quickshell` directory as that will
29-
make it harder for users to have any other configuration.
32+
Any directory in the `$XDG_CONFIG_HOME/quickshell` can be used using the Quickshell command
33+
by specifying `--config` or `-c`, like so: `qs -c <name>`.
3034

3135
#### As a package
3236
Some configurations are distributed as distro packages. These packages should use a

src/guide/faq.mdx

Lines changed: 42 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -3,10 +3,13 @@ title: "FAQ"
33
description: "Frequently Asked Questions"
44
index: 1000
55
---
6-
This page is being actively expanded as common questions come up again.
76

8-
Make sure to also read the [Item Size and Position](/docs/guide/size-position) and
9-
[QML Language](/docs/guide/qml-language) pages for questions related to
7+
> [!NOTE]
8+
> This page is being actively expanded upon as more common questions come up.
9+
>
10+
> Make sure to also read the [Item Size and Position](/docs/guide/size-position) and
11+
> [QML Language](/docs/guide/qml-language) pages for questions related to
12+
> item sizing/positioning and QML in general.
1013
1114
## Misc
1215

@@ -16,7 +19,7 @@ span the APIs exposed by Quickshell, as well as best practice across all
1619
APIs, but will not change the language syntax or anything exposed by Qt.
1720

1821
Most changes will be relatively trivial, though you may have to make the same
19-
trivial change a great number of times if you have a large configuration.
22+
trivial change a considerable amount of times if you have a large configuration.
2023

2124
Migration guides will be provided between each release version.
2225

@@ -27,7 +30,7 @@ single process.
2730
## How do I
2831

2932
### Make a rounded window
30-
Rounded windows are simply transparent square ones with a rounded rectangle
33+
Rounded windows are simply transparent, square windows, with a rounded rectangle
3134
inside of them.
3235

3336
```qml
@@ -46,11 +49,11 @@ inside of them.
4649

4750
### Make a list of widgets
4851
If you have a short list of items to display, such as a list of active music
49-
players or system tray items, you want a @@QtQuick.Repeater, usually combined
50-
with a @@QtQuick.Layouts.RowLayout or @@QtQuick.Layouts.ColumnLayout.
52+
players or system tray items, you want a @@QtQuick.Repeater, which is
53+
usually combined with a @@QtQuick.Layouts.RowLayout or @@QtQuick.Layouts.ColumnLayout.
5154

52-
If you have a longer list, such as a list of entries in an application launcher,
53-
or a list that needs to scroll, you may want a @@QtQuick.ListView instead.
55+
If you have a longer list, such as a list of entries in an application launcher
56+
or a list that needs to be scrolled, you want a @@QtQuick.ListView instead.
5457

5558
### Run a program or script
5659
Use @@Quickshell.Io.Process.
@@ -63,10 +66,15 @@ e.g. a command that listens to window manager IPC commands, use
6366
@@Quickshell.Io.SplitParser to return each datum as it arrives.
6467

6568
### Show widgets conditionally
66-
The @@QtQuick.Item.visible property can be used to change the visibility of an
67-
Item conditionally, as well as Loaders.
69+
Conditionally showing widgets can be done in two ways, simply using the @@QtQuick.Item.visible property,
70+
or by using a @@QtQuick.Loader.
71+
72+
Depending on your use case, both the @@QtQuick.Loader and the @@QtQuick.Item.visible property
73+
may make sense at equal complexity. If you want to unload a widget tree to save memory or
74+
speed up load times, then you should use Loaders.
75+
76+
Note that you can also change out a Loader's component conditionally:
6877

69-
Note that you can change out a loader's component conditionally:
7078
```qml
7179
@@QtQuick.Loader {
7280
readonly property Component thing1: ...
@@ -77,9 +85,9 @@ Note that you can change out a loader's component conditionally:
7785
```
7886

7987
### Round an image
80-
The easiest way to round an image is with @@Quickshell.Widgets.ClippingWrapperRectangle.
81-
ClippingWrapperRectangle is a [MarginWrapper] component, which will attempt to match
82-
the size of its contained item.
88+
The easiest way to round an image is with @@Quickshell.Widgets.ClippingWrapperRectangle,
89+
which is a [MarginWrapper] component. This component will attempt to match the size of
90+
its contained item.
8391

8492
```qml
8593
@@Quickshell.Widgets.ClippingWrapperRectangle {
@@ -97,7 +105,7 @@ the size of its contained item.
97105
### Reference images and resources
98106
By default, paths passed to components such as @@QtQuick.Image or
99107
@@Quickshell.Io.FileView as strings are relative to Quickshell's working
100-
directory. Usually this is not the desired behavior.
108+
directory. Usually, this is not the desired behavior.
101109

102110
To get a file path relative to the current QML file, you can use @@QtQml.Qt.resolvedUrl().
103111

@@ -106,12 +114,12 @@ you can use @@Quickshell.Quickshell.cachePath(), @@Quickshell.Quickshell.dataPat
106114
@@Quickshell.Quickshell.statePath(),
107115

108116
### Add a drop-shadow
109-
If you want a *rectangular*, *round rectangular*, or *circular* drop shadow,
110-
use @@QtQuick.Effects.RectangularShadow.
111-
For any other shape, you will have to use a @@QtQuick.Effects.MultiEffect.
117+
Use @@QtQuick.Effects.RectangularShadow if you want a *rectangular*, *round rectangular*,
118+
or *circular* drop shadow.
112119

113-
When using a MultiEffect, set @@QtQuick.Effects.MultiEffect.shadowEnabled,
114-
as well as its other shadow and blur related properties.
120+
For any other shape, you will have to use a @@QtQuick.Effects.MultiEffect and set
121+
@@QtQuick.Effects.MultiEffect.shadowEnabled, as well as its other shadow and blur
122+
related properties.
115123

116124
### Get rid of the purple/black icons
117125
The @@Quickshell.Quickshell.iconPath() function has three variants:
@@ -127,19 +135,20 @@ however you can implement your own using @@Quickshell.Io.Socket or @@Quickshell.
127135
which can be used to parse and send IPC messages.
128136

129137
### Open/close windows with commands
130-
Quickshell doesn't come with a command to open or close a window, however you can
131-
make your own using @@Quickshell.Io.IpcHandler, which allows you to call functions
138+
Quickshell doesn't come with a command to open or close a window; however, you can
139+
make your own using @@Quickshell.Io.IpcHandler, allowing you to call functions
132140
inside of Quickshell with a command. Said functions can change the
133141
@@Quickshell.QsWindow.visible property of a window, or load/unload it using a
134142
@@Quickshell.LazyLoader.
135143

136144
### Reduce memory usage
137145
The main thing you can do to reduce the memory usage of a given configuration
138-
is to use loaders. Loaders can be used to create objects only when needed,
139-
and destroy them when not needed.
146+
is to use Loaders.
140147

141-
- Use @@QtQuick.Loader when the component being loaded inherits from @@QtQuick.Item.
142-
- Use @@Quickshell.LazyLoader in other cases.
148+
Loaders can be used to create objects only when needed, and destroy them when not needed.
149+
150+
@@QtQuick.Loader should be used if the component being loaded inherits from @@QtQuick.Item,
151+
otherwise, a @@Quickshell.LazyLoader should be used.
143152

144153
## Something is broken
145154

@@ -153,9 +162,11 @@ if the only border property you wanted to set was radius.
153162

154163
### My window should not be opaque
155164
If a window is created with an opaque background color, Quickshell will use
156-
a window surface format that is opaque, which reduces the amount of processing
157-
the gpu must do to draw it. If you change the background color of your window
158-
between opaque and transparent colors, this may affect you.
165+
a window surface format that is opaque. This is done to reduce the amount of
166+
processing the gpu must do to draw it.
167+
168+
If you change the background color of your window between opaque and transparent colors,
169+
then this may affect you.
159170

160-
To tell Quickshell to always create a window capable of showing transparency,
171+
To tell Quickshell that you want to create a window capable of showing transparency,
161172
use @@Quickshell.QsWindow.surfaceFormat to set `opaque` to false.

src/guide/index.mdx

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,12 +6,12 @@ index: -1
66
See the [Installation and Setup](/docs/guide/install-setup) page to get started.
77

88
To write a Quickshell config, start by following the
9-
[Guided Introduction](/docs/guide/introduction) and skimming the
9+
[Guided Introduction](/docs/guide/introduction), and skimming the
1010
[QML Language Overview](/docs/guide/qml-language).
1111

12-
Before continuing on your own, read the [Item Size and Position](/docs/guide/size-position)
13-
page to learn how to lay out elements in QML. This is significantly different
14-
from many other layout systems such as CSS.
12+
After that, read the [Item Size and Position](/docs/guide/size-position) page before
13+
continuing on your own to learn how to lay out elements in QML. Laying out elements
14+
in QML is significantly different from many other layout systems such as CSS.
1515

1616
To learn what features Quickshell offers and how to use them, use the
1717
left sidebar and click through the `Quickshell Types` pages. The sidebar

src/guide/install-setup.mdx

Lines changed: 25 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,8 @@ index: 0
88
99
## Installation
1010

11-
All packages currently track quickshell's master branch. This may change in the future.
11+
Since Quickshell 0.1, you can now choose whether to install by tracking the master branch,
12+
or install by latest release.
1213

1314
Note that you may want to install some additional packages (names vary by distro):
1415
- `qtsvg`: support for SVG image loading (bundled with most packages)
@@ -17,12 +18,13 @@ Note that you may want to install some additional packages (names vary by distro
1718
- `qt5compat`: extra visual effects, notably gaussian blur. @@QtQuick.Effects.MultiEffect is usually preferable
1819

1920
### Nix
20-
Quickshell releases are packaged in nixpkgs as `quickshell`.
21+
The Quickshell repo has an embedded flake. You can use either of the two:
2122

22-
The Quickshell repo also has an embedded flake.
23-
You can use either `git+https://git.outfoxxed.me/outfoxxed/quickshell`
24-
or `github:quickshell-mirror/quickshell`. Use `?ref=` to specify a tag
25-
if you want a tagged release.
23+
- `git+https://git.outfoxxed.me/outfoxxed/quickshell`
24+
- `github:quickshell-mirror/quickshell`
25+
26+
> [!NOTE]
27+
> You can use `?ref=` to specify a tag if you want a tagged release.
2628
2729
```nix
2830
{
@@ -41,20 +43,19 @@ if you want a tagged release.
4143
}
4244
```
4345

44-
The package is available as `quickshell.packages.<system>.default`, which you can add to
45-
`environment.systemPackages` or `home.packages` if you use home-manager.
46+
The package is available as `quickshell.packages.<system>.default`, which can be added to
47+
your `environment.systemPackages` or `home.packages` if you use home-manager.
4648

4749
### Arch
48-
Quickshell is available from the aur under
49-
the [quickshell](https://aur.archlinux.org/packages/quickshell) package for the latest release,
50-
or the [quickshell-git](https://aur.archlinux.org/packages/quickshell-git) package
51-
which tracks the master branch.
50+
Quickshell is available from the aur under:
51+
- the [quickshell](https://aur.archlinux.org/packages/quickshell) package for the latest release
52+
- the [quickshell-git](https://aur.archlinux.org/packages/quickshell-git) package that tracks the master branch
5253

5354
> [!WARNING]
54-
> When using an AUR package, quickshell may break any time Qt is updated.
55+
> When using an AUR package, Quickshell may break whenever Qt is updated.
5556
> The AUR gives us no way to actually fix this, but Quickshell will attempt to
5657
> warn you if it detects a breakage when updating. If warned of a breakage,
57-
> please reinstall the package
58+
> please reinstall the package.
5859
5960
Install using the command below:
6061
```sh
@@ -65,9 +66,9 @@ yay -S quickshell-git
6566
(or your AUR helper of choice)
6667

6768
### Fedora
68-
Quickshell is available from the [errornointernet/quickshell] COPR, as either
69-
`quickshell` which tracks the latest release or `quickshell-git` which tracks
70-
the master branch.
69+
Quickshell is available from the [errornointernet/quickshell] COPR, as either:
70+
- `quickshell` that tracks the latest release
71+
- `quickshell-git` that tracks the master branch
7172

7273
[errornointernet/quickshell]: https://copr.fedorainfracloud.org/coprs/errornointernet/quickshell
7374

@@ -90,7 +91,8 @@ Quickshell's source repository works as a channel. Add the following to your cha
9091
(branch "master"))
9192
```
9293

93-
Then, you can install the package via `guix install quickshell-git` or by adding `quickshell-git` to your system or home definition.
94+
Then, you can install the package via `guix install quickshell-git` or by adding `quickshell-git`
95+
to your system or home definition.
9496

9597
You can also clone the repository and use `guix shell -f quickshell.scm` to try out the package.
9698

@@ -172,13 +174,13 @@ We are aware of the following issues:
172174
- Qmlls does not work well when a file is not correctly structured.
173175
This means that completions and lints won't work unless braces are closed
174176
correctly and such.
175-
- Qmlls cannot handle quickshell's singletons. This means you won't see
176-
completions, and usages of singleton members may show a warning.
177-
We're still investigating this problem and how to fix it.
177+
- Qmlls cannot handle Quickshell's Singleton, which means you won't see completions,
178+
and usages of Singleton members may show a warning. We're still investigating
179+
this problem and how to fix it.
178180
- The LSP cannot provide any documentation for Quickshell types.
179181

180-
Keeping in mind the above caveats, qmlls should be able to guide you towards
181-
more correct code should you chose to use it.
182+
Keeping in mind the above caveats, qmlls should be able to guide you towards a
183+
more correct code should you choose to use it.
182184

183185
> [!NOTE]
184186
> Nix users should note that qmlls will not be able to pick up qml modules

0 commit comments

Comments
 (0)