Skip to content

Commit c84b7ab

Browse files
authored
Merge branch 'quickshell-mirror:master' into master
2 parents d328fc3 + c5319e3 commit c84b7ab

File tree

121 files changed

+2729
-1340
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

121 files changed

+2729
-1340
lines changed

.clang-tidy

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ Checks: >
66
bugprone-*,
77
-bugprone-easily-swappable-parameters,
88
-bugprone-forward-declararion-namespace,
9+
-bugprone-forward-declararion-namespace,
910
concurrency-*,
1011
cppcoreguidelines-*,
1112
-cppcoreguidelines-owning-memory,
@@ -42,6 +43,7 @@ Checks: >
4243
-readability-else-after-return,
4344
-readability-container-data-pointer,
4445
-readability-implicit-bool-conversion,
46+
-readability-avoid-nested-conditional-operator,
4547
tidyfox-*,
4648
CheckOptions:
4749
performance-for-range-copy.WarnOnAllAutoCopies: true

.editorconfig

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,3 +9,7 @@ indent_style = tab
99
[*.nix]
1010
indent_style = space
1111
indent_size = 2
12+
13+
[*.{yml,yaml}]
14+
indent_style = space
15+
indent_size = 2

.github/workflows/build.yml

Lines changed: 55 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,55 @@
1+
name: Build
2+
on: [push, pull_request]
3+
4+
jobs:
5+
nix:
6+
name: Nix
7+
strategy:
8+
matrix:
9+
qtver: [qt6.8.0, qt6.7.3, qt6.7.2, qt6.7.1, qt6.7.0, qt6.6.3, qt6.6.2, qt6.6.1, qt6.6.0]
10+
compiler: [clang, gcc]
11+
runs-on: ubuntu-latest
12+
steps:
13+
- uses: actions/checkout@v4
14+
# Use cachix action over detsys for testing with act.
15+
# - uses: cachix/install-nix-action@v27
16+
- uses: DeterminateSystems/nix-installer-action@main
17+
18+
- name: Download Dependencies
19+
run: nix-build --no-out-link --expr '((import ./ci/matrix.nix) { qtver = "${{ matrix.qtver }}"; compiler = "${{ matrix.compiler }}"; }).inputDerivation'
20+
21+
- name: Build
22+
run: nix-build --no-out-link --expr '(import ./ci/matrix.nix) { qtver = "${{ matrix.qtver }}"; compiler = "${{ matrix.compiler }}"; }'
23+
24+
archlinux:
25+
name: Archlinux
26+
runs-on: ubuntu-latest
27+
container: archlinux
28+
steps:
29+
- uses: actions/checkout@v4
30+
31+
- name: Download Dependencies
32+
run: |
33+
pacman --noconfirm --noprogressbar -Syyu
34+
pacman --noconfirm --noprogressbar -Sy \
35+
base-devel \
36+
cmake \
37+
ninja \
38+
pkgconf \
39+
qt6-base \
40+
qt6-declarative \
41+
qt6-svg \
42+
qt6-wayland \
43+
qt6-shadertools \
44+
wayland-protocols \
45+
wayland \
46+
libxcb \
47+
libpipewire \
48+
cli11 \
49+
jemalloc
50+
51+
- name: Build
52+
# breakpad is annoying to build in ci due to makepkg not running as root
53+
run: |
54+
cmake -GNinja -B build -DCRASH_REPORTER=OFF
55+
cmake --build build

.github/workflows/lint.yml

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
name: Lint
2+
on: [push, pull_request]
3+
4+
jobs:
5+
lint:
6+
name: Lint
7+
runs-on: ubuntu-latest
8+
steps:
9+
- uses: actions/checkout@v4
10+
# Use cachix action over detsys for testing with act.
11+
# - uses: cachix/install-nix-action@v27
12+
- uses: DeterminateSystems/nix-installer-action@main
13+
- uses: nicknovitski/nix-develop@v1
14+
15+
- name: Check formatting
16+
run: clang-format -Werror --dry-run src/**/*.{cpp,hpp}
17+
18+
# required for lint
19+
- name: Build
20+
run: |
21+
just configure debug -DNO_PCH=ON -DBUILD_TESTING=ON
22+
just build
23+
24+
- name: Run lints
25+
run: just lint

BUILD.md

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,9 +41,17 @@ Quickshell has a set of base dependencies you will always need, names vary by di
4141
- `cmake`
4242
- `qt6base`
4343
- `qt6declarative`
44-
- `pkg-config`
44+
- `qtshadertools` (build-time only)
45+
- `spirv-tools` (build-time only)
46+
- `pkg-config` (build-time only)
4547
- `cli11`
4648

49+
On some distros, private Qt headers are in separate packages which you may have to install.
50+
We currently require private headers for the following libraries:
51+
52+
- `qt6declarative`
53+
- `qt6wayland`
54+
4755
We recommend an implicit dependency on `qt6svg`. If it is not installed, svg images and
4856
svg icons will not work, including system ones.
4957

CMakeLists.txt

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -71,6 +71,9 @@ include(cmake/util.cmake)
7171

7272
add_compile_options(-Wall -Wextra)
7373

74+
# pipewire defines this, breaking PCH
75+
add_compile_definitions(_REENTRANT)
76+
7477
if (FRAME_POINTERS)
7578
add_compile_options(-fno-omit-frame-pointer)
7679
endif()
@@ -90,7 +93,7 @@ if (NOT CMAKE_BUILD_TYPE)
9093
set(CMAKE_BUILD_TYPE Debug)
9194
endif()
9295

93-
set(QT_FPDEPS Gui Qml Quick QuickControls2 Widgets)
96+
set(QT_FPDEPS Gui Qml Quick QuickControls2 Widgets ShaderTools)
9497

9598
include(cmake/pch.cmake)
9699

Justfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ fmt:
44
find src -type f \( -name "*.cpp" -o -name "*.hpp" \) -print0 | xargs -0 clang-format -i
55

66
lint:
7-
find src -type f -name "*.cpp" -print0 | parallel -q0 --eta clang-tidy --load={{ env_var("TIDYFOX") }}
7+
find src -type f -name "*.cpp" -print0 | parallel -q0 --tty --bar clang-tidy --load={{ env_var("TIDYFOX") }}
88

99
lint-changed:
1010
git diff --name-only HEAD | grep "^.*\.cpp\$" | parallel --eta clang-tidy --load={{ env_var("TIDYFOX") }}

ci/matrix.nix

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
{
2+
qtver,
3+
compiler,
4+
}: let
5+
nixpkgs = (import ./nix-checkouts.nix).${builtins.replaceStrings ["."] ["_"] qtver};
6+
compilerOverride = (nixpkgs.callPackage ./variations.nix {}).${compiler};
7+
pkg = (nixpkgs.callPackage ../default.nix {}).override compilerOverride;
8+
in pkg

ci/nix-checkouts.nix

Lines changed: 58 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,58 @@
1+
let
2+
byCommit = {
3+
commit,
4+
sha256,
5+
}: import (builtins.fetchTarball {
6+
name = "nixpkgs-${commit}";
7+
url = "https://github.com/nixos/nixpkgs/archive/${commit}.tar.gz";
8+
inherit sha256;
9+
}) {};
10+
in {
11+
# For old qt versions, grab the commit before the version bump that has all the patches
12+
# instead of the bumped version.
13+
14+
qt6_8_0 = byCommit {
15+
commit = "23e89b7da85c3640bbc2173fe04f4bd114342367";
16+
sha256 = "1b2v6y3bja4br5ribh9lj6xzz2k81dggz708b2mib83rwb509wyb";
17+
};
18+
19+
qt6_7_3 = byCommit {
20+
commit = "273673e839189c26130d48993d849a84199523e6";
21+
sha256 = "0aca369hdxb8j0vx9791anyzy4m65zckx0lriicqhp95kv9q6m7z";
22+
};
23+
24+
qt6_7_2 = byCommit {
25+
commit = "841f166ff96fc2f3ecd1c0cc08072633033d41bf";
26+
sha256 = "0d7p0cp7zjiadhpa6sdafxvrpw4lnmb1h673w17q615vm1yaasvy";
27+
};
28+
29+
qt6_7_1 = byCommit {
30+
commit = "69bee9866a4e2708b3153fdb61c1425e7857d6b8";
31+
sha256 = "1an4sha4jsa29dvc4n9mqxbq8jjwg7frl0rhy085g73m7l1yx0lj";
32+
};
33+
34+
qt6_7_0 = byCommit {
35+
commit = "4fbbc17ccf11bc80002b19b31387c9c80276f076";
36+
sha256 = "09lhgdqlx8j9a7vpdcf8sddlhbzjq0s208spfmxfjdn14fvx8k0j";
37+
};
38+
39+
qt6_6_3 = byCommit {
40+
commit = "8f1a3fbaa92f1d59b09f2d24af6a607b5a280071";
41+
sha256 = "0322zwxvmg8v2wkm03xpk6mqmmbfjgrhc9prcx0zd36vjl6jmi18";
42+
};
43+
44+
qt6_6_2 = byCommit {
45+
commit = "0bb9cfbd69459488576a0ef3c0e0477bedc3a29e";
46+
sha256 = "172ww486jm1mczk9id78s32p7ps9m9qgisml286flc8jffb6yad8";
47+
};
48+
49+
qt6_6_1 = byCommit {
50+
commit = "8eecc3342103c38eea666309a7c0d90d403a039a";
51+
sha256 = "1lakc0immsgrpz3basaysdvd0sx01r0mcbyymx6id12fk0404z5r";
52+
};
53+
54+
qt6_6_0 = byCommit {
55+
commit = "1ded005f95a43953112ffc54b39593ea2f16409f";
56+
sha256 = "1xvyd3lj81hak9j53mrhdsqx78x5v2ppv8m2s54qa2099anqgm0f";
57+
};
58+
}

ci/variations.nix

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
{
2+
clangStdenv,
3+
gccStdenv,
4+
}: {
5+
clang = { buildStdenv = clangStdenv; };
6+
gcc = { buildStdenv = gccStdenv; };
7+
}

0 commit comments

Comments
 (0)