Bug#1110023: unblock: brightnesspicker/1.2-1
Package: release.debian.org
Severity: normal
X-Debbugs-Cc: brightnesspicker@packages.debian.org, ltworf@debian.org
Control: affects -1 + src:brightnesspicker
User: release.debian.org@packages.debian.org
Usertags: unblock
Please unblock package brightnesspicker
New release has improved usability and slightly better package
description.
[ Reason ]
New version does not require restart when a new screen is plugged.
[ Impact ]
Users will need to restart when a new screen is plugged to see it
in the list
[ Tests ]
I tested manually on my machine
[ Risks ]
The package is leaf, has a low popcon, and it's rather trivial.
[ Checklist ]
[X] all changes are documented in the d/changelog
[X] I reviewed all changes and I approve them
[X] attach debdiff against the package in testing
[ Other info ]
(Anything else the release team should know.)
unblock brightnesspicker/1.2-1
diff -Nru brightnesspicker-1.0/CHANGELOG brightnesspicker-1.2/CHANGELOG
--- brightnesspicker-1.0/CHANGELOG 2024-05-17 00:07:20.000000000 +0200
+++ brightnesspicker-1.2/CHANGELOG 2025-07-28 11:10:28.000000000 +0200
@@ -1,2 +1,10 @@
+1.2
+* Update man page
+* Use the shipped icon for the tray
+
+1.1
+* Refresh screen list when scrolling down, like apps do
+* Show current brightness value rather than 0
+
1.0
- Initial release
diff -Nru brightnesspicker-1.0/debian/changelog brightnesspicker-1.2/debian/changelog
--- brightnesspicker-1.0/debian/changelog 2024-12-15 14:36:30.000000000 +0100
+++ brightnesspicker-1.2/debian/changelog 2025-07-28 11:03:39.000000000 +0200
@@ -1,3 +1,19 @@
+brightnesspicker (1.2-1) unstable; urgency=medium
+
+ * New upstream release
+ * Remove dependency on oxygen-icon-theme
+
+ -- Salvo 'LtWorf' Tomaselli <ltworf@debian.org> Mon, 28 Jul 2025 11:03:39 +0200
+
+brightnesspicker (1.1-1) unstable; urgency=medium
+
+ * New upstream release
+ * Depend on oxygen-icon-theme for the tray-icon
+ * Bump Standards-Version to 4.7.2, no changes required
+ * Improved the description of the package
+
+ -- Salvo 'LtWorf' Tomaselli <ltworf@debian.org> Fri, 25 Jul 2025 12:23:51 +0200
+
brightnesspicker (1.0-4) unstable; urgency=low
* Build with Qt6
diff -Nru brightnesspicker-1.0/debian/control brightnesspicker-1.2/debian/control
--- brightnesspicker-1.0/debian/control 2024-12-15 14:36:30.000000000 +0100
+++ brightnesspicker-1.2/debian/control 2025-07-28 11:03:39.000000000 +0200
@@ -9,7 +9,7 @@
qt6-declarative-dev,
qt6-l10n-tools,
dh-sequence-qmldeps,
-Standards-Version: 4.7.0
+Standards-Version: 4.7.2
Homepage: https://codeberg.org/ltworf/brightnesspicker
Vcs-Browser: https://codeberg.org/ltworf/brightnesspicker
Vcs-Git: https://codeberg.org/ltworf/brightnesspicker.git
@@ -27,3 +27,5 @@
.
This is useful on desktop machines that do not have adjustable brightness
like laptops.
+ .
+ It requires Xorg to function, it will not work on wayland.
diff -Nru brightnesspicker-1.0/Makefile brightnesspicker-1.2/Makefile
--- brightnesspicker-1.0/Makefile 2024-05-17 00:07:20.000000000 +0200
+++ brightnesspicker-1.2/Makefile 2025-07-28 11:10:28.000000000 +0200
@@ -1,5 +1,5 @@
# brightnesspicker
-# Copyright (C) 2022 Salvo "LtWorf" Tomaselli
+# Copyright (C) 2022-2024 Salvo "LtWorf" Tomaselli
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License as
@@ -18,6 +18,7 @@
.PHONY: clean
clean:
+ $(RM) -r deb-pkg
.PHONY: dist
dist:
diff -Nru brightnesspicker-1.0/src/extras/brightnesspicker.1 brightnesspicker-1.2/src/extras/brightnesspicker.1
--- brightnesspicker-1.0/src/extras/brightnesspicker.1 2024-05-17 00:07:20.000000000 +0200
+++ brightnesspicker-1.2/src/extras/brightnesspicker.1 2025-07-28 11:10:28.000000000 +0200
@@ -1,4 +1,4 @@
-.TH "brightnesspicker" 1 "Mar 24, 2022" "Screen brightness picker"
+.TH "brightnesspicker" 1 "Jul 25, 2025" "Screen brightness picker"
.SH "NAME"
brightnesspicker \(em Graphical interface to set the brightness of the screens
.SH "SYNOPSIS"
@@ -12,6 +12,8 @@
A tray icon is displayed and can be clicked to bring up the selectors again.
.br
This is done because desktop computers can't easily adjust it like laptops and it can be annoying to use the screen's button to change the settings.
+.br
+If you attach a new screen, drag the list downwards to refresh it.
.SH "Known issues"
.PP
@@ -19,7 +21,7 @@
.SH "REPORTING BUGS"
.PP
-Report all bugs here: <https://github.com/ltworf/brightnesspicker>
+Report all bugs here: <https://codeberg.org/ltworf/brightnesspicker>
.SH "AUTHOR"
.PP
@@ -27,5 +29,5 @@
.SH "COPYRIGHT"
.PP
-Copyright © 2022 Salvo "LtWorf" Tomaselli. License AGPLv3: GNU Affero GPL version 3 <https://gnu.org/licenses/agpl.html>.
+Copyright © 2022-2025 Salvo "LtWorf" Tomaselli. License AGPLv3: GNU Affero GPL version 3 <https://gnu.org/licenses/agpl.html>.
This is free software: you are free to change and redistribute it. There is NO WARRANTY, to the extent permitted by law.
diff -Nru brightnesspicker-1.0/src/main.cpp brightnesspicker-1.2/src/main.cpp
--- brightnesspicker-1.0/src/main.cpp 2024-05-17 00:07:20.000000000 +0200
+++ brightnesspicker-1.2/src/main.cpp 2025-07-28 11:10:28.000000000 +0200
@@ -1,6 +1,6 @@
/*
brightnesspicker
-Copyright (C) 2022 Salvo "LtWorf" Tomaselli
+Copyright (C) 2022-2025 Salvo "LtWorf" Tomaselli
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU Affero General Public License as
@@ -51,7 +51,7 @@
}
QSystemTrayIcon tray;
- tray.setIcon(QIcon("/usr/share/icons/oxygen/base/256x256/devices/video-display.png"));
+ tray.setIcon(QIcon("/usr/share/icons/hicolor/48x48/apps/brightnesspicker.svg"));
tray.show();
QQmlApplicationEngine engine;
diff -Nru brightnesspicker-1.0/src/main.qml brightnesspicker-1.2/src/main.qml
--- brightnesspicker-1.0/src/main.qml 2024-05-17 00:07:20.000000000 +0200
+++ brightnesspicker-1.2/src/main.qml 2025-07-28 11:10:28.000000000 +0200
@@ -1,6 +1,6 @@
/*
brightnesspicker
-Copyright (C) 2022 Salvo "LtWorf" Tomaselli
+Copyright (C) 2022-2025 Salvo "LtWorf" Tomaselli
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU Affero General Public License as
@@ -21,7 +21,7 @@
import QtQuick 2.15
import QtQuick.Window 2.15
import QtQuick.Controls 2.15
-import Qt.labs.settings 1.1
+import QtCore
Window {
visible: true
@@ -33,12 +33,14 @@
Connections {
target: tray
- onActivated: {
+ function onActivated() {
mainwindow.visible = !mainwindow.visible
}
}
- Component.onCompleted: {
+ Component.onCompleted: refreshList()
+
+ function refreshList() {
items.clear();
var screens = xrandr.listScreens();
for(var i = 0; i < screens.length; i++) {
@@ -49,10 +51,29 @@
ListView {
anchors.fill: parent
- ScrollBar.vertical: ScrollBar { }
+ ScrollBar.vertical: ScrollBar {
+ id: scrollbar
+ }
model: items
+ BusyIndicator {
+ anchors.top: parent.top
+ anchors.horizontalCenter: parent.horizontalCenter
+ visible: false
+ running: visible
+ id: spinner
+ }
+
+ // Implement refresh when scrolling down
+ property bool negativescroll: scrollbar.position < 0
+ onNegativescrollChanged: {
+ if (spinner.visible) {
+ refreshList()
+ }
+ spinner.visible = !spinner.visible
+ }
+
ListModel {
id: items
}
@@ -69,5 +90,6 @@
property alias y: mainwindow.y
property alias width: mainwindow.width
property alias height: mainwindow.height
+ property alias visible: mainwindow.visible
}
}
diff -Nru brightnesspicker-1.0/src/Selector.qml brightnesspicker-1.2/src/Selector.qml
--- brightnesspicker-1.0/src/Selector.qml 2024-05-17 00:07:20.000000000 +0200
+++ brightnesspicker-1.2/src/Selector.qml 2025-07-28 11:10:28.000000000 +0200
@@ -1,6 +1,6 @@
/*
brightnesspicker
-Copyright (C) 2022 Salvo "LtWorf" Tomaselli
+Copyright (C) 2022-2025 Salvo "LtWorf" Tomaselli
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU Affero General Public License as
@@ -48,14 +48,21 @@
orientation: Qt.Horizontal
id: brightness
stepSize: 0.05
- from: 0.001
+ from: 0.1
to: 2
value: 1
+ property bool ignore_changes: false
onValueChanged: {
+ if (brightness.ignore_changes)
+ return
xrandr.setBrightness(devname.text, brightness.value)
}
- Component.onCompleted: xrandr.setBrightness(devname.text, brightness.value)
+ Component.onCompleted: {
+ brightness.ignore_changes = true
+ brightness.value = xrandr.getBrightness(devname.text)
+ brightness.ignore_changes = false
+ }
}
Button {
diff -Nru brightnesspicker-1.0/src/xrandr.cpp brightnesspicker-1.2/src/xrandr.cpp
--- brightnesspicker-1.0/src/xrandr.cpp 2024-05-17 00:07:20.000000000 +0200
+++ brightnesspicker-1.2/src/xrandr.cpp 2025-07-28 11:10:28.000000000 +0200
@@ -1,6 +1,6 @@
/*
brightnesspicker
-Copyright (C) 2022 Salvo "LtWorf" Tomaselli
+Copyright (C) 2022-2025 Salvo "LtWorf" Tomaselli
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU Affero General Public License as
@@ -58,3 +58,47 @@
}
return r;
}
+
+#include <QDebug>
+float Xrandr::getBrightness(QString device) {
+ QStringList params;
+
+ params << "--verbose";
+
+ QProcess xrandr(this);
+ xrandr.start("xrandr", params, QIODevice::ReadOnly);
+ xrandr.waitForStarted(-1);
+ xrandr.waitForFinished(-1);
+ if (xrandr.exitCode() != 0)
+ return 1.0;
+ QString output = QString(xrandr.readAllStandardOutput());
+
+ QStringList lines = output.split("\n");
+ QStringList screens = this->listScreens();
+
+ int index = screens.indexOf(device);
+ if (index == -1)
+ return 1.0;
+
+ for (int i = 0; i < lines.length(); i++) {
+ if (lines[i].indexOf("Brightness:") == -1)
+ continue; //uninteresting line
+ if (index > 0) {
+ index--;
+ continue;
+ }
+
+ auto line = lines[i].split(":");
+ if (line.size() > 2)
+ return 1.0;
+
+ bool works;
+ float r = line[1].toFloat(&works);
+ if (!works)
+ return 1.0;
+ return r;
+ }
+
+ return 1.0;
+
+}
diff -Nru brightnesspicker-1.0/src/xrandr.h brightnesspicker-1.2/src/xrandr.h
--- brightnesspicker-1.0/src/xrandr.h 2024-05-17 00:07:20.000000000 +0200
+++ brightnesspicker-1.2/src/xrandr.h 2025-07-28 11:10:28.000000000 +0200
@@ -1,6 +1,6 @@
/*
brightnesspicker
-Copyright (C) 2022 Salvo "LtWorf" Tomaselli
+Copyright (C) 2022-2025 Salvo "LtWorf" Tomaselli
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU Affero General Public License as
@@ -34,6 +34,7 @@
public slots:
void setBrightness(QString, float);
QStringList listScreens();
+ float getBrightness(QString);
signals:
Reply to: