From 91955ef66c6f095fbc90c31044e98c01984e35bb Mon Sep 17 00:00:00 2001 From: Cleboost Date: Thu, 16 Oct 2025 22:02:00 +0200 Subject: [PATCH] Add screen recording button and config toggle --- .../quickshell/ii/modules/bar/UtilButtons.qml | 16 ++++++++++++++++ .../quickshell/ii/modules/common/Config.qml | 1 + .../quickshell/ii/modules/settings/BarConfig.qml | 11 +++++++++++ 3 files changed, 28 insertions(+) diff --git a/dots/.config/quickshell/ii/modules/bar/UtilButtons.qml b/dots/.config/quickshell/ii/modules/bar/UtilButtons.qml index 98ee4f6cd..6e4a917f2 100644 --- a/dots/.config/quickshell/ii/modules/bar/UtilButtons.qml +++ b/dots/.config/quickshell/ii/modules/bar/UtilButtons.qml @@ -36,6 +36,22 @@ Item { } } + Loader { + active: Config.options.bar.utilButtons.showScreenRecord + visible: Config.options.bar.utilButtons.showScreenRecord + sourceComponent: CircleUtilButton { + Layout.alignment: Qt.AlignVCenter + onClicked: Quickshell.execDetached(["/bin/bash", "/home/cleboost/.config/hypr/hyprland/scripts/record.sh", "--fullscreen-sound"]) + MaterialSymbol { + horizontalAlignment: Qt.AlignHCenter + fill: 1 + text: "videocam" + iconSize: Appearance.font.pixelSize.large + color: Appearance.colors.colOnLayer2 + } + } + } + Loader { active: Config.options.bar.utilButtons.showColorPicker visible: Config.options.bar.utilButtons.showColorPicker diff --git a/dots/.config/quickshell/ii/modules/common/Config.qml b/dots/.config/quickshell/ii/modules/common/Config.qml index a9289d83b..39e7ed31a 100644 --- a/dots/.config/quickshell/ii/modules/common/Config.qml +++ b/dots/.config/quickshell/ii/modules/common/Config.qml @@ -211,6 +211,7 @@ Singleton { property bool showKeyboardToggle: true property bool showDarkModeToggle: true property bool showPerformanceProfileToggle: false + property bool showScreenRecord: true } property JsonObject tray: JsonObject { property bool monochromeIcons: true diff --git a/dots/.config/quickshell/ii/modules/settings/BarConfig.qml b/dots/.config/quickshell/ii/modules/settings/BarConfig.qml index 01a1d9ee9..817592ff6 100644 --- a/dots/.config/quickshell/ii/modules/settings/BarConfig.qml +++ b/dots/.config/quickshell/ii/modules/settings/BarConfig.qml @@ -225,6 +225,17 @@ ContentPage { } } } + ConfigRow { + uniform: true + ConfigSwitch { + buttonIcon: "videocam" + text: Translation.tr("Screen recording") + checked: Config.options.bar.utilButtons.showScreenRecord + onCheckedChanged: { + Config.options.bar.utilButtons.showScreenRecord = checked; + } + } + } } ContentSection {