10 Commits
Author SHA1 Message Date
zach d3345906b9 Merge pull request 'Feat: LLM Chat' (#155) from feat/llm-chat-tab into main
Reviewed-on: #155
2026-10-18 17:05:05 +02:00
zach 08d42e1f8a chore: formatter & clangd lsp option
C++ / fmt (pull_request) Successful in 5s
C++ / build (pull_request) Failing after 10s
C++ / clang-tidy (pull_request) Failing after 10s
JS/TS / fmt (pull_request) Successful in 7s
JS/TS / lint (pull_request) Successful in 9s
Python / static (pull_request) Successful in 27s
Rust / build (pull_request) Successful in 50s
Python / verify (pull_request) Successful in 1m40s
Rust / fmt (pull_request) Successful in 28s
Rust / clippy (pull_request) Successful in 45s
2026-10-18 15:23:40 +02:00
zach 45aa6c9005 Merge branch 'main' into feat/llm-chat-tab
C++ / fmt (pull_request) Failing after 6s
C++ / build (pull_request) Failing after 20s
C++ / clang-tidy (pull_request) Failing after 12s
JS/TS / fmt (pull_request) Successful in 6s
JS/TS / lint (pull_request) Successful in 9s
Python / static (pull_request) Successful in 28s
Rust / build (pull_request) Successful in 48s
Rust / fmt (pull_request) Successful in 28s
Python / verify (pull_request) Successful in 1m45s
Rust / clippy (pull_request) Successful in 46s
2026-10-18 14:43:00 +02:00
zach 1763b03287 Merge pull request 'Chore/remove nix support' (#159) from chore/remove-nix-support into main
Reviewed-on: #159
2026-10-18 14:42:50 +02:00
zach 72ff6ad42a Merge branch 'main' into chore/remove-nix-support
C++ / fmt (pull_request) Failing after 4s
C++ / build (pull_request) Failing after 10s
C++ / clang-tidy (pull_request) Failing after 10s
JS/TS / fmt (pull_request) Successful in 9s
JS/TS / lint (pull_request) Successful in 9s
Python / static (pull_request) Successful in 28s
Rust / build (pull_request) Successful in 50s
Python / verify (pull_request) Successful in 1m35s
Rust / fmt (pull_request) Successful in 29s
Rust / clippy (pull_request) Successful in 55s
2026-10-18 14:42:43 +02:00
zach 2a45740020 Merge pull request 'fix(pr-template): adds an "Other" issue type' (#160) from fix/ci-pr-template into main
Reviewed-on: #160
2026-10-18 14:42:35 +02:00
AramJonghu ae25f33fc8 fix(pr-template): adds an "Other" issue type
C++ / fmt (pull_request) Failing after 5s
C++ / build (pull_request) Failing after 10s
C++ / clang-tidy (pull_request) Failing after 10s
Rust / fmt (pull_request) Successful in 48s
Rust / build (pull_request) Successful in 1m9s
Rust / clippy (pull_request) Successful in 52s
Python / static (pull_request) Successful in 55s
JS/TS / fmt (pull_request) Successful in 11s
JS/TS / lint (pull_request) Successful in 9s
Python / verify (pull_request) Successful in 1m26s
2026-10-14 00:22:33 +02:00
AramJonghu 02267ec9a6 docs(readme): adjust Nix support documentation
JS/TS / fmt (pull_request) Successful in 7s
JS/TS / lint (pull_request) Successful in 8s
Python / static (pull_request) Successful in 27s
Rust / build (pull_request) Successful in 50s
Rust / fmt (pull_request) Successful in 32s
Python / verify (pull_request) Successful in 2m16s
C++ / fmt (pull_request) Failing after 7s
C++ / build (pull_request) Failing after 12s
Rust / clippy (pull_request) Successful in 50s
C++ / clang-tidy (pull_request) Failing after 26s
2026-10-14 00:08:17 +02:00
AramJonghu 4b8d74a7e5 ci(cleanup): removed NixOS from issue template
Avoids confusion
2026-10-14 00:08:17 +02:00
AramJonghu 1fa3c84a56 chore(nix): remove all .nix files and flake.lock 2026-10-14 00:08:17 +02:00
23 changed files with 77 additions and 469 deletions
+5
View File
@@ -0,0 +1,5 @@
CompileFlags:
Remove:
# GCC-only flags from the system's default spec that clang/clangd cannot
# parse. They appear in compile_commands.json but are not set by the project.
- -mno-direct-extern-access
-1
View File
@@ -38,7 +38,6 @@ body:
attributes:
label: OS
options:
- NixOS
- Arch
- Debian / Ubuntu
- Fedora
+1
View File
@@ -30,6 +30,7 @@ body:
- Refactor / style
- CI / build / tooling
- Documentation
- Other (Describe in description box with header "Issue type")
validations:
required: true
+11 -2
View File
@@ -61,10 +61,12 @@ set(CMAKE_INSTALL_MESSAGE NEVER)
add_compile_options(
-Wall -Wextra -Wpedantic -Wshadow -Wconversion
-Wold-style-cast -Wnull-dereference -Wdouble-promotion
-Wformat=2 -Wfloat-equal -Woverloaded-virtual
-Wnull-dereference -Wdouble-promotion
-Wformat=2 -Wfloat-equal
-Wsign-conversion -Wredundant-decls -Wswitch
-Wunreachable-code
$<$<COMPILE_LANGUAGE:CXX>:-Wold-style-cast>
$<$<COMPILE_LANGUAGE:CXX>:-Woverloaded-virtual>
)
@@ -188,4 +190,11 @@ if("m3shapes" IN_LIST ENABLE_MODULES)
if(TARGET m3shapesplugin)
set_target_properties(m3shapesplugin PROPERTIES INSTALL_RPATH "$ORIGIN")
endif()
# Silence warnings that come from m3shapes files we do not manage.
foreach(m3shapes_target m3shapes_core m3shapes_morph m3shapes_shapes m3shapes m3shapesplugin)
if(TARGET ${m3shapes_target})
target_compile_options(${m3shapes_target} PRIVATE -Wno-shadow -Wno-float-equal)
endif()
endforeach()
endif()
+3 -7
View File
@@ -50,9 +50,9 @@ class BlobRect : public BlobShape {
[[nodiscard]] qreal damping() const { return m_damping; }
void setDamping(qreal d) {
if (!qFuzzyCompare(m_damping, d)) {
m_damping = d;
void setDamping(qreal value) {
if (!qFuzzyCompare(m_damping, value)) {
m_damping = value;
emit dampingChanged();
}
}
@@ -110,7 +110,6 @@ class BlobRect : public BlobShape {
void checkAtRest(float speed);
void beginRetire();
// Physics state
QPointF m_prevScenePos;
QElapsedTimer m_elapsed;
bool m_physicsActive = false;
@@ -122,13 +121,10 @@ class BlobRect : public BlobShape {
float m_retire01 = 0.0f;
float m_retire11 = 1.0f;
// Symmetric 2x2 deformation matrix components (3 independent: m00, m01,
// m11) Rest state is identity: m00=1, m01=0, m11=1
float m_dm00 = 1.0f;
float m_dm01 = 0.0f;
float m_dm11 = 1.0f;
// Spring velocities for each component
float m_dmVel00 = 0.0f;
float m_dmVel01 = 0.0f;
float m_dmVel11 = 0.0f;
+6 -10
View File
@@ -168,10 +168,6 @@ void BlobShape::updatePolish() {
if (other->width() <= 0 || other->height() <= 0) continue;
// Excluded shapes stay in the rect data. Exclusion only gates the smooth
// blend (via excludeMask below); ownership must still see every shape,
// otherwise two nodes can both believe they own a pixel and the pixel is
// blended twice.
const QPointF otherScene = other->mapToScene(QPointF(0, 0));
bool include = false;
@@ -196,7 +192,7 @@ void BlobShape::updatePolish() {
const QMatrix4x4& dm = other->m_deformMatrix;
const float a = dm(0, 0), b = dm(1, 0);
const float c = dm(0, 1), d = dm(1, 1);
const float c = dm(0, 1), e = dm(1, 1);
BlobRectData r;
r.cx = static_cast<float>(otherScene.x() + other->width() / 2.0);
@@ -207,19 +203,19 @@ void BlobShape::updatePolish() {
r.offsetX = dm(0, 3);
r.offsetY = dm(1, 3);
const float det = a * d - c * b;
const float det = a * e - c * b;
const float invDet = std::abs(det) > 1e-6f ? 1.0f / det : 1.0f;
r.invDeform[0] = d * invDet;
r.invDeform[0] = e * invDet;
r.invDeform[1] = -b * invDet;
r.invDeform[2] = -c * invDet;
r.invDeform[3] = a * invDet;
const float halfTr = 0.5f * (a + d);
const float halfDiff = 0.5f * (a - d);
const float halfTr = 0.5f * (a + e);
const float halfDiff = 0.5f * (a - e);
r.minEig = halfTr - std::sqrt(halfDiff * halfDiff + c * c);
r.screenHalfX = std::abs(a) * r.hw + std::abs(c) * r.hh;
r.screenHalfY = std::abs(b) * r.hw + std::abs(d) * r.hh;
r.screenHalfY = std::abs(b) * r.hw + std::abs(e) * r.hh;
m_cachedRects.append(r);
rectShapes.append(other);
+11 -11
View File
@@ -187,7 +187,7 @@ void CarouselView::setModel(const QVariantList& m) {
emit modelChanged();
const int newCount = m_model.size();
const int newCount = static_cast<int>(m_model.size());
if (newCount == 0) {
m_currentRealIndex = -1;
@@ -647,7 +647,7 @@ qreal CarouselView::sampleSize(qreal childLoc) const {
}
int CarouselView::realIndexOf(int virtualIndex) const {
const int count = m_model.size();
const int count = static_cast<int>(m_model.size());
if (count == 0) return -1;
@@ -668,7 +668,7 @@ qreal CarouselView::snapTargetX(qreal x) const {
}
void CarouselView::wrapContentIfNeeded() {
const int count = m_model.size();
const int count = static_cast<int>(m_model.size());
if (count == 0) return;
@@ -707,7 +707,7 @@ void CarouselView::wrapContentIfNeeded() {
}
void CarouselView::updateCurrentIndexFromContentX(bool emitPreview) {
const int count = m_model.size();
const int count = static_cast<int>(m_model.size());
if (count == 0) return;
@@ -856,8 +856,8 @@ void CarouselView::positionSlot(const Slot& slot) const {
return rightIndex == n ? m_arrangement.outerSpacing : m_itemSpacing;
};
const auto leftGap = [this, n](int leftIndex) {
return leftIndex == -n ? m_arrangement.outerSpacing : m_itemSpacing;
const auto leftGap = [this, n](int gapIndex) {
return gapIndex == -n ? m_arrangement.outerSpacing : m_itemSpacing;
};
qreal center = 0;
@@ -974,7 +974,7 @@ void CarouselView::releaseAllItems() {
}
void CarouselView::relayout() {
const int count = m_model.size();
const int count = static_cast<int>(m_model.size());
if (count == 0 || width() <= 0 || m_focalWidth <= 0) {
for (Slot& s : m_slots) {
@@ -1038,7 +1038,7 @@ void CarouselView::relayout() {
m_slots.append(Slot{});
slotUsedThisPass.append(false);
freeSlot = m_slots.size() - 1;
freeSlot = static_cast<int>(m_slots.size()) - 1;
}
updateSlotContent(m_slots[freeSlot], v);
@@ -1092,7 +1092,7 @@ void CarouselView::snapToNearest() {
}
void CarouselView::goToIndex(int realIndex) {
const int count = m_model.size();
const int count = static_cast<int>(m_model.size());
if (count == 0) return;
@@ -1126,7 +1126,7 @@ void CarouselView::decrementCurrentIndex() {
}
void CarouselView::centerInstantlyOnReal(int realIndex) {
const int count = m_model.size();
const int count = static_cast<int>(m_model.size());
if (count == 0) return;
@@ -1220,7 +1220,7 @@ qreal CarouselView::sampledVelocity() const {
const VelocitySample& oldest = m_velocitySamples.first();
const VelocitySample& newest = m_velocitySamples.last();
const qreal dt = newest.t - oldest.t;
const qreal dt = static_cast<qreal>(newest.t - oldest.t);
if (dt < 8) return 0;
@@ -252,8 +252,6 @@ int ChatListView::count() const {
}
bool ChatListView::event(QEvent* e) {
// qDebug() << "ChatListView::event() runs";
return QQuickItem::event(e);
}
@@ -366,7 +364,6 @@ void ChatListView::updatePolish() {
m_animateY = false;
const int layoutSize = static_cast<int>(m_layout.size());
const qint64 now = m_clock.elapsed();
bool wrote = false;
for (auto& entry : m_delegates) {
if (!entry.item || entry.pendingRemoval || entry.pendingInsert)
continue;
@@ -397,7 +394,6 @@ void ChatListView::updatePolish() {
entry.item->setY(target);
entry.hasPropY = false;
}
wrote = true;
}
applyAnchor();
@@ -50,8 +50,6 @@ void SparklineContent::setLine2(internal::CircularBuffer* buffer) {
void SparklineContent::connectBuffer(internal::CircularBuffer* buffer) {
if (!buffer) return;
// New data, or the buffer's own smoothingRadius changed (it re-emits
// valuesChanged in that case too) -> geometry is stale.
connect(
buffer,
&internal::CircularBuffer::valuesChanged,
@@ -67,7 +65,7 @@ void SparklineContent::connectBuffer(internal::CircularBuffer* buffer) {
void SparklineContent::setLine1Color(const QColor& color) {
if (m_line1Color == color) return;
m_line1Color = color;
update(); // visual-only, no geometry rebuild needed
update();
}
void SparklineContent::setLine2Color(const QColor& color) {
@@ -173,7 +171,7 @@ SparklineContent::LineGeometry SparklineContent::buildGeometry(
if (m_curveSmoothing && points.size() > 2) {
const qreal tension = 1.0;
const qreal k = tension / 6.0;
const int n = points.size();
const int n = static_cast<int>(points.size());
for (int i = 0; i < n - 1; ++i) {
const QPointF& p0 = points[qMax(i - 1, 0)];
@@ -84,7 +84,6 @@ SparklineSceneItem::LineSample SparklineSceneItem::buildSample(
points.reserve(len);
for (int i = 0; i < len; ++i) {
// Already smoothed once, incrementally, by the buffer itself.
const qreal value =
qBound<qreal>(0.0, buffer->smoothedAt(i), m_maxValue);
@@ -99,7 +98,7 @@ SparklineSceneItem::LineSample SparklineSceneItem::buildSample(
if (m_curveSmoothing && points.size() > 2) {
const qreal tension = 1.0;
const qreal k = tension / 6.0;
const int n = points.size();
const int n = static_cast<int>(points.size());
for (int i = 0; i < n - 1; ++i) {
const QPointF& p0 = points[qMax(i - 1, 0)];
const QPointF& p1 = points[i];
@@ -125,9 +124,6 @@ SparklineSceneItem::LineSample SparklineSceneItem::buildSample(
}
}
// Flatten the curve to a polyline once, here, on data change only.
// This is CPU math only -- no QPainter draw calls, no image, no
// texture upload happen as a result of this.
const auto subpaths = path.toSubpathPolygons();
if (subpaths.isEmpty()) return sample;
@@ -139,7 +135,7 @@ SparklineSceneItem::LineSample SparklineSceneItem::buildSample(
void SparklineSceneItem::writeFillGeometry(
QSGGeometryNode* node, const LineSample& sample) {
const int n = sample.polyline.size();
const int n = static_cast<int>(sample.polyline.size());
auto* geometry = node->geometry();
geometry->allocate(n * 2);
geometry->setDrawingMode(QSGGeometry::DrawTriangleStrip);
@@ -147,8 +143,10 @@ void SparklineSceneItem::writeFillGeometry(
auto* vertices = geometry->vertexDataAsPoint2D();
for (int i = 0; i < n; ++i) {
const QPointF& p = sample.polyline[i];
vertices[i * 2].set(p.x(), p.y());
vertices[i * 2 + 1].set(p.x(), sample.fillBottom);
vertices[i * 2].set(
static_cast<float>(p.x()), static_cast<float>(p.y()));
vertices[i * 2 + 1].set(
static_cast<float>(p.x()), static_cast<float>(sample.fillBottom));
}
node->markDirty(QSGNode::DirtyGeometry);
@@ -156,7 +154,7 @@ void SparklineSceneItem::writeFillGeometry(
void SparklineSceneItem::writeStrokeGeometry(
QSGGeometryNode* node, const LineSample& sample, qreal lineWidth) {
const int n = sample.polyline.size();
const int n = static_cast<int>(sample.polyline.size());
auto* geometry = node->geometry();
geometry->allocate(n * 2);
geometry->setDrawingMode(QSGGeometry::DrawTriangleStrip);
@@ -179,8 +177,12 @@ void SparklineSceneItem::writeStrokeGeometry(
const QPointF& p = sample.polyline[i];
const QPointF offset = normal * half;
vertices[i * 2].set(p.x() + offset.x(), p.y() + offset.y());
vertices[i * 2 + 1].set(p.x() - offset.x(), p.y() - offset.y());
vertices[i * 2].set(
static_cast<float>(p.x() + offset.x()),
static_cast<float>(p.y() + offset.y()));
vertices[i * 2 + 1].set(
static_cast<float>(p.x() - offset.x()),
static_cast<float>(p.y() - offset.y()));
}
node->markDirty(QSGNode::DirtyGeometry);
@@ -243,7 +245,7 @@ QSGNode* SparklineSceneItem::updatePaintNode(
}
QMatrix4x4 matrix;
matrix.translate(-stepX() * m_slideProgress, 0);
matrix.translate(static_cast<float>(-stepX() * m_slideProgress), 0.0f);
transformNode->setMatrix(matrix);
const bool needsGeometryWrite = samplesRebuilt || justCreated;
+1 -1
View File
@@ -85,7 +85,7 @@ class WavyLine : public QCanvasPainterItem {
[[nodiscard]] qreal value() const;
void setValue(qreal value);
signals:
signals:
void lineWidthChanged();
void amplitudeMultiplierChanged();
void frequencyChanged();
+12 -20
View File
@@ -37,12 +37,10 @@ static std::filesystem::path g_runtimeDir{"/tmp"};
static std::filesystem::path g_cacheBase{"/tmp/.cache"};
static void initEnvPaths() {
if (const char* env = getenv("XDG_RUNTIME_DIR"))
g_runtimeDir = env;
if (const char* env = getenv("XDG_RUNTIME_DIR")) g_runtimeDir = env;
if (const char* env = getenv("XDG_CACHE_HOME")) {
if (*env)
g_cacheBase = env;
if (*env) g_cacheBase = env;
} else if (const char* home = getenv("HOME")) {
g_cacheBase = std::filesystem::path(home) / ".cache";
}
@@ -50,8 +48,7 @@ static void initEnvPaths() {
static std::ofstream& debugLog() {
static std::ofstream log(
g_runtimeDir / "zshell-nightlight-debug.log",
std::ios::app);
g_runtimeDir / "zshell-nightlight-debug.log", std::ios::app);
return log;
}
@@ -173,15 +170,14 @@ static bool hkSaveBufferForMirror(CHyprOpenGLImpl* thisptr, const CBox& box) {
static void installShader() {
auto* gl = g_pHyprOpenGL.get();
if (!gl)
return;
if (!gl) return;
ensureShaderFile(shaderPath(), defaultShaderSource());
gl->applyScreenShader(shaderPath().string());
auto* shader = gl->m_finalScreenShader.get();
if (shader && shader->program() >= 1 &&
shader->getUniformLocation(SHADER_TINT) != -1) {
shader->getUniformLocation(SHADER_TINT) != -1) {
g_uniformMode = true;
} else {
g_uniformMode = false;
@@ -196,8 +192,7 @@ static void installShader() {
static void setUniformGain(const std::array<float, 3>& gain) {
auto* gl = g_pHyprOpenGL.get();
auto* shader = gl ? gl->m_finalScreenShader.get() : nullptr;
if (!gl || !shader)
return;
if (!gl || !shader) return;
gl->useShader(gl->m_finalScreenShader);
shader->setUniformFloat3(SHADER_TINT, gain[0], gain[1], gain[2]);
@@ -214,8 +209,7 @@ static void hkBegin(
if (fb) {
auto* renderer = g_pHyprRenderer.get();
if (renderer)
renderer->m_renderData.blockScreenShader = true;
if (renderer) renderer->m_renderData.blockScreenShader = true;
}
if (!g_active) return;
@@ -223,17 +217,15 @@ static void hkBegin(
auto* gl = g_pHyprOpenGL.get();
if (!gl) return;
if (gl->m_finalScreenShader.get() &&
gl->m_finalScreenShader->program() < 1)
if (gl->m_finalScreenShader.get() && gl->m_finalScreenShader->program() < 1)
installShader();
if (!gl->m_finalScreenShader.get() ||
gl->m_finalScreenShader->program() < 1)
gl->m_finalScreenShader->program() < 1)
return;
if (g_transition.active) {
auto* monPtr = mon.get();
if (!monPtr)
return;
if (!monPtr) return;
const float elapsed =
std::chrono::duration<float>(
std::chrono::steady_clock::now() - g_transition.start)
@@ -255,9 +247,9 @@ static void hkBegin(
ensureShaderFile(
bakedShaderPath(g_currentGain),
bakedShaderSource(g_currentGain));
gl->applyScreenShader(bakedShaderPath(g_currentGain).string());
gl->applyScreenShader(bakedShaderPath(g_currentGain).string());
}
}
}
if (t >= 1.f) {
g_transition.active = false;
+4 -4
View File
@@ -182,10 +182,10 @@ static QString buildHlConfigCall(const QString& key, const QVariant& value) {
}
static QColor colorFromInt(quint32 value) {
const int a = (value >> 24) & 0xFF;
const int r = (value >> 16) & 0xFF;
const int g = (value >> 8) & 0xFF;
const int b = value & 0xFF;
const int a = static_cast<int>(value >> 24) & 0xFF;
const int r = static_cast<int>(value >> 16) & 0xFF;
const int g = static_cast<int>(value >> 8) & 0xFF;
const int b = static_cast<int>(value) & 0xFF;
return QColor(r, g, b, a);
}
+1 -1
View File
@@ -72,7 +72,7 @@ static QCanvasPath buildStrokePath(
void StrokeCanvasItem::undoLastGroup() {
if (m_strokes.isEmpty()) return;
const int lastGroup = m_strokes.last().groupId;
for (int i = m_strokes.size() - 1;
for (int i = static_cast<int>(m_strokes.size()) - 1;
i >= 0 && m_strokes[i].groupId == lastGroup;
--i)
m_strokes.remove(i);
@@ -154,7 +154,7 @@ void StrokeCanvasRenderer::synchronizeData(QCanvasPainterItem* item) {
for (const auto& stroke : canvas->m_strokes)
canvasGroupIds.insert(stroke.groupId);
for (int i = m_strokes.size() - 1; i >= 0; --i) {
for (int i = static_cast<int>(m_strokes.size()) - 1; i >= 0; --i) {
if (!canvasGroupIds.contains(m_strokes[i].groupId)) {
if (m_strokes[i].groupId >= 0)
m_pendingGroupRemovals.append(m_strokes[i].groupId);
+1 -1
View File
@@ -119,7 +119,7 @@ void FileReadTool::execute(
return;
}
const QString head = content.left(limit);
const int nextOffset = offset + head.toUtf8().size();
const int nextOffset = offset + static_cast<int>(head.toUtf8().size());
const QString output =
head +
QStringLiteral(
+1
View File
@@ -1,4 +1,5 @@
add_library(zshell-pch INTERFACE)
target_compile_options(zshell-pch INTERFACE $<$<COMPILE_LANGUAGE:CXX>:-Wno-null-dereference>)
target_precompile_headers(zshell-pch INTERFACE
<qobject.h>
<qqmlintegration.h>
+3 -81
View File
@@ -84,89 +84,11 @@ Defaults from `CMakeLists.txt`:
- shell config install dir: `etc/xdg/quickshell/zshell`
- greeter install dir: `etc/xdg/quickshell/zshell-greeter`
### Nix Flake
### Nix
_Note that Nix is not actively developed at this point. Things may be broken. Feel free to suggest fixes in a PR_
Nix support has been removed. Reason being that none of us actively develop for Nix. Having a `flake.nix` in the project will give the wrong idea.
The flake exposes:
- `packages.<system>.zshell`
- `packages.<system>.zshell-cli`
Add it as an input in your system flake:
```nix
{
inputs = {
nixpkgs.url = "github:nixos/nixpkgs/nixos-unstable";
z-bar-qt = {
url = git+https://git.zach-dev.cc/zach/z-bar-qt.git
inputs.nixpkgs.follows = "nixpkgs";
};
};
}
```
Full `flake.nix` example (`nixosConfigurations`):
```nix
{
inputs = {
nixpkgs.url = "github:nixos/nixpkgs/nixos-unstable";
z-bar-qt = {
url = git+https://git.zach-dev.cc/zach/z-bar-qt.git
inputs.nixpkgs.follows = "nixpkgs";
};
};
outputs = inputs@{ nixpkgs, ... }:
let
system = "x86_64-linux";
in {
nixosConfigurations.my-host = nixpkgs.lib.nixosSystem {
inherit system;
specialArgs = { inherit inputs; };
modules = [
({ ... }: {
environment.systemPackages = [
inputs.z-bar-qt.packages.${system}.zshell
inputs.z-bar-qt.packages.${system}.zshell-cli
];
})
./configuration.nix
];
};
};
}
```
Then install shell + CLI from the flake packages:
```nix
{ pkgs, inputs, ... }:
let
system = pkgs.stdenv.hostPlatform.system;
in {
environment.systemPackages = [
inputs.z-bar-qt.packages.${system}.zshell
inputs.z-bar-qt.packages.${system}.zshell-cli
];
}
```
If you use Home Manager, the same packages can be added to `home.packages`.
Run shell via wrapper binary:
```bash
zshell
```
CLI entrypoint:
```bash
zshell-cli
```
Contributions for Nix support are welcome, the caveat being that reviews of these contributions can be of lower quality.
## Running
Generated
-48
View File
@@ -1,48 +0,0 @@
{
"nodes": {
"nixpkgs": {
"locked": {
"lastModified": 1771369470,
"narHash": "sha256-0NBlEBKkN3lufyvFegY4TYv5mCNHbi5OmBDrzihbBMQ=",
"owner": "nixos",
"repo": "nixpkgs",
"rev": "0182a361324364ae3f436a63005877674cf45efb",
"type": "github"
},
"original": {
"owner": "nixos",
"ref": "nixos-unstable",
"repo": "nixpkgs",
"type": "github"
}
},
"quickshell": {
"inputs": {
"nixpkgs": [
"nixpkgs"
]
},
"locked": {
"lastModified": 1770693276,
"narHash": "sha256-ngXnN5YXu+f45+QGYNN/VEBMQmcBCYGRCqwaK8cxY1s=",
"ref": "refs/heads/master",
"rev": "dacfa9de829ac7cb173825f593236bf2c21f637e",
"revCount": 735,
"type": "git",
"url": "https://git.outfoxxed.me/outfoxxed/quickshell"
},
"original": {
"type": "git",
"url": "https://git.outfoxxed.me/outfoxxed/quickshell"
}
},
"root": {
"inputs": {
"nixpkgs": "nixpkgs",
"quickshell": "quickshell"
}
}
},
"root": "root",
"version": 7
}
-71
View File
@@ -1,71 +0,0 @@
{
description = "Flake for zshell";
inputs = {
nixpkgs.url = "github:nixos/nixpkgs/nixos-unstable";
quickshell = {
url = "git+https://git.outfoxxed.me/outfoxxed/quickshell";
inputs.nixpkgs.follows = "nixpkgs";
};
};
outputs = {
self,
nixpkgs,
...
} @ inputs: let
forAllSystems = fn: nixpkgs.lib.genAttrs nixpkgs.lib.platforms.linux (system: fn nixpkgs.legacyPackages.${system});
in {
formatter = forAllSystems (pkgs: pkgs.nixfmt);
packages = forAllSystems (
pkgs: let
pythonEnv = pkgs.python3.withPackages (ps: [
ps.pillow
ps.materialyoucolor
]);
in rec {
zshell-cli = pkgs.callPackage ./nix/zshell-cli.nix {};
zshell = pkgs.callPackage ./nix {
rev = self.rev or self.dirtyRev;
stdenv = pkgs.clangStdenv;
quickshell = inputs.quickshell.packages.${pkgs.stdenv.hostPlatform.system}.default.override {
withX11 = false;
withI3 = false;
};
app2unit = pkgs.callPackage ./nix/app2unit.nix {};
inherit pythonEnv zshell-cli;
};
default = zshell;
}
);
devShells = forAllSystems (pkgs: {
default = let
system = pkgs.stdenv.hostPlatform.system;
shellPkg = self.packages.${system}.zshell;
cliPkg = self.packages.${system}.zshell-cli;
in
pkgs.mkShell.override {stdenv = shellPkg.stdenv;} {
inputsFrom = [
shellPkg
shellPkg.plugin
];
packages = with pkgs; [
shellPkg
cliPkg
material-symbols
rubik
nerd-fonts.caskaydia-cove
];
};
});
};
}
-16
View File
@@ -1,16 +0,0 @@
{
pkgs,
fetchFromGitHub,
...
}:
pkgs.app2unit.overrideAttrs (
final: prev: rec {
version = "1.0.3";
src = fetchFromGitHub {
owner = "Vladimir-csp";
repo = "app2unit";
tag = "v${version}";
hash = "sha256-7eEVjgs+8k+/NLteSBKgn4gPaPLHC+3Uzlmz6XB0930=";
};
}
)
-146
View File
@@ -1,146 +0,0 @@
{
fftw,
libcava,
rev,
lib,
stdenv,
makeWrapper,
makeFontsConf,
app2unit,
networkmanager,
swappy,
wl-clipboard,
libqalculate,
bash,
hyprland,
material-symbols,
rubik,
nerd-fonts,
qt6,
quickshell,
aubio,
pipewire,
cmake,
ninja,
pkg-config,
pythonEnv,
zshell-cli,
ddcutil,
brightnessctl,
}:
let
version = "1.0.0";
runtimeDeps = [
pythonEnv
app2unit
networkmanager
swappy
wl-clipboard
libqalculate
bash
hyprland
zshell-cli
ddcutil
brightnessctl
];
fontconfig = makeFontsConf {
fontDirectories = [
material-symbols
rubik
nerd-fonts.caskaydia-cove
];
};
cmakeBuildType = "RelWithDebInfo";
cmakeVersionFlags = [
(lib.cmakeFeature "VERSION" version)
(lib.cmakeFeature "GIT_REVISION" rev)
(lib.cmakeFeature "DISTRIBUTOR" "nix-flake")
];
plugin = stdenv.mkDerivation {
inherit cmakeBuildType;
name = "zshell-qml-plugin";
src = lib.fileset.toSource {
root = ./..;
fileset = lib.fileset.union ./../CMakeLists.txt ./../Plugins;
};
nativeBuildInputs = [
cmake
ninja
pkg-config
];
buildInputs = [
pythonEnv
qt6.qtbase
qt6.qtdeclarative
libqalculate
pipewire
aubio
libcava
fftw
];
dontWrapQtApps = true;
cmakeFlags = [
(lib.cmakeFeature "ENABLE_MODULES" "plugin")
(lib.cmakeFeature "INSTALL_QMLDIR" qt6.qtbase.qtQmlPrefix)
]
++ cmakeVersionFlags;
};
in
stdenv.mkDerivation {
inherit version cmakeBuildType;
pname = "zshell";
src = ./..;
nativeBuildInputs = [
cmake
ninja
makeWrapper
qt6.wrapQtAppsHook
];
buildInputs = [
quickshell
plugin
qt6.qtbase
qt6.qtwayland
];
propagatedBuildInputs = runtimeDeps;
cmakeFlags = [
(lib.cmakeFeature "ENABLE_MODULES" "shell")
(lib.cmakeFeature "INSTALL_QSCONFDIR" "${placeholder "out"}/share/ZShell")
]
++ cmakeVersionFlags;
prePatch = ''
substituteInPlace shell.qml \
--replace-fail 'ShellRoot {' 'ShellRoot { settings.watchFiles: false'
'';
postInstall = ''
makeWrapper ${quickshell}/bin/qs $out/bin/zshell \
--prefix PATH : "${lib.makeBinPath runtimeDeps}" \
--set FONTCONFIG_FILE "${fontconfig}" \
--add-flags "-p $out/share/ZShell"
echo "$out"
mkdir -p $out/lib
'';
passthru = {
inherit plugin;
};
meta = {
description = "A very segsy desktop shell";
homepage = "https://github.com/Zacharias-Brohn/z-bar-qt";
license = lib.licenses.gpl3Only;
mainProgram = "zshell";
};
}
-28
View File
@@ -1,28 +0,0 @@
{
python3,
installShellFiles,
}:
python3.pkgs.buildPythonApplication {
pname = "zshell-cli";
version = "0.1.0";
src = ../cli;
pyproject = true;
build-system = with python3.pkgs; [
hatch-vcs
hatchling
];
dependencies = with python3.pkgs; [
materialyoucolor
pillow
jinja2
typer
];
pythonImportsCheck = ["zshell"];
nativeBuildInputs = [installShellFiles];
SETUPTOOLS_SCM_PRETEND_VERSION = 1;
}