summaryrefslogtreecommitdiff
path: root/modules/bar/Bar.qml
diff options
context:
space:
mode:
authorBelal <belalkoko00@gmail.com>2025-09-08 16:55:46 +0300
committerGitHub <noreply@github.com>2025-09-08 23:55:46 +1000
commita8baaa9929b67dd3fdc4b627f19e8c8f5000ceef (patch)
treea97bd3862b42e85b8122b49d9996a2a6a5e829eb /modules/bar/Bar.qml
parentbar/statusicons: add mic indicator (diff)
downloadcaelestia-shell-a8baaa9929b67dd3fdc4b627f19e8c8f5000ceef.tar.gz
caelestia-shell-a8baaa9929b67dd3fdc4b627f19e8c8f5000ceef.tar.bz2
caelestia-shell-a8baaa9929b67dd3fdc4b627f19e8c8f5000ceef.zip
bar: configurable scroll actions (#559)
* bar: add option to disable scroll actions for volume and brightness * options for workspaces, brightness and volume * add options to readme + format --------- Co-authored-by: 2 * r + 2 * t <61896496+soramanew@users.noreply.github.com>
Diffstat (limited to 'modules/bar/Bar.qml')
-rw-r--r--modules/bar/Bar.qml6
1 files changed, 3 insertions, 3 deletions
diff --git a/modules/bar/Bar.qml b/modules/bar/Bar.qml
index 0382b5d..9cd5d24 100644
--- a/modules/bar/Bar.qml
+++ b/modules/bar/Bar.qml
@@ -54,7 +54,7 @@ ColumnLayout {
function handleWheel(y: real, angleDelta: point): void {
const ch = childAt(width / 2, y) as WrappedLoader;
- if (ch?.id === "workspaces") {
+ if (ch?.id === "workspaces" && Config.bar.scrollActions.workspaces) {
// Workspace scroll
const mon = (Config.bar.workspaces.perMonitorWorkspaces ? Hypr.monitorFor(screen) : Hypr.focusedMonitor);
const specialWs = mon?.lastIpcObject.specialWorkspace.name;
@@ -62,13 +62,13 @@ ColumnLayout {
Hypr.dispatch(`togglespecialworkspace ${specialWs.slice(8)}`);
else if (angleDelta.y < 0 || (Config.bar.workspaces.perMonitorWorkspaces ? mon.activeWorkspace?.id : Hypr.activeWsId) > 1)
Hypr.dispatch(`workspace r${angleDelta.y > 0 ? "-" : "+"}1`);
- } else if (y < screen.height / 2) {
+ } else if (y < screen.height / 2 && Config.bar.scrollActions.volume) {
// Volume scroll on top half
if (angleDelta.y > 0)
Audio.incrementVolume();
else if (angleDelta.y < 0)
Audio.decrementVolume();
- } else {
+ } else if (Config.bar.scrollActions.brightness) {
// Brightness scroll on bottom half
const monitor = Brightness.getMonitorForScreen(screen);
if (angleDelta.y > 0)