diff --git a/config/niri/.config/niri/config/envs.kdl b/config/niri/.config/niri/config/envs.kdl index 6d73c20..7803b80 100644 --- a/config/niri/.config/niri/config/envs.kdl +++ b/config/niri/.config/niri/config/envs.kdl @@ -15,6 +15,8 @@ environment { LIBVA_DRIVER_NAME "nvidia" __GLX_VENDOR_LIBRARY_NAME "nvidia" NVD_BACKEND "nvidia" + GBM_BACKEND "nvidia-drm"; + WLR_NO_HARDWARE_CURSORS "1"; // Fix Swing _JAVA_AWT_WM_NONREPARENTING "1" diff --git a/config/quickshell/.config/quickshell/Assets/Config/Settings.json b/config/quickshell/.config/quickshell/Assets/Config/Settings.json index 58fd139..675501f 100644 --- a/config/quickshell/.config/quickshell/Assets/Config/Settings.json +++ b/config/quickshell/.config/quickshell/Assets/Config/Settings.json @@ -4,7 +4,7 @@ "doNotDisturb": false }, "primaryColor": "#89b4fa", - "showLyricsBar": false, + "showLyricsBar": true, "sunsetDefaultEnabled": true, "wifiEnabled": true } diff --git a/config/quickshell/.config/quickshell/Modules/Bar/Components/CavaBar.qml b/config/quickshell/.config/quickshell/Modules/Bar/Components/CavaBar.qml index f8224d9..2d2525b 100644 --- a/config/quickshell/.config/quickshell/Modules/Bar/Components/CavaBar.qml +++ b/config/quickshell/.config/quickshell/Modules/Bar/Components/CavaBar.qml @@ -3,12 +3,15 @@ import QtQuick.Controls import QtQuick.Layouts import qs.Constants import qs.Modules.Bar.Misc +import qs.Services +import qs.Utils Item { id: root property int barWidth: 5 property int barSpacing: 3 + property int mode: 0 implicitWidth: root.barWidth * CavaBarService.count + root.barSpacing * (CavaBarService.count - 1) implicitHeight: parent.height - 10 @@ -22,7 +25,7 @@ Item { } Repeater { - model: CavaBarService.values + model: mode == 2 ? Array(CavaBarService.count).fill(0.3) : CavaBarService.values Rectangle { width: root.barWidth @@ -49,12 +52,26 @@ Item { cursorShape: Qt.PointingHandCursor acceptedButtons: Qt.LeftButton | Qt.RightButton | Qt.MiddleButton onClicked: (mouse) => { - if (mouse.button === Qt.LeftButton) + if (mouse.button === Qt.LeftButton) { MusicManager.playPause(); - else if (mouse.button === Qt.RightButton) + } else if (mouse.button === Qt.RightButton) { SettingsService.showLyricsBar = !SettingsService.showLyricsBar; - else if (mouse.button === Qt.MiddleButton) - CavaBarService.forceEnable = !CavaBarService.forceEnable; + } else if (mouse.button === Qt.MiddleButton) { + mode = (mode + 1) % 3; + if (mode === 0) { + Logger.log("CavaBar", "Cava bar mode set to Auto"); + CavaBarService.forceEnable = false; + CavaBarService.forceDisable = false; + } else if (mode === 1) { + Logger.log("CavaBar", "Cava bar mode set to Always On"); + CavaBarService.forceEnable = true; + CavaBarService.forceDisable = false; + } else if (mode === 2) { + Logger.log("CavaBar", "Cava bar mode set to Always Off"); + CavaBarService.forceEnable = false; + CavaBarService.forceDisable = true; + } + } } onWheel: function(wheel) { if (wheel.angleDelta.y > 0) diff --git a/config/quickshell/.config/quickshell/Modules/Bar/Misc/CavaBarService.qml b/config/quickshell/.config/quickshell/Modules/Bar/Misc/CavaBarService.qml index 9ce66b2..c128cd4 100644 --- a/config/quickshell/.config/quickshell/Modules/Bar/Misc/CavaBarService.qml +++ b/config/quickshell/.config/quickshell/Modules/Bar/Misc/CavaBarService.qml @@ -7,7 +7,8 @@ Singleton { id: root property int count: 6 - property int forceEnable: 6 + property bool forceEnable: false + property bool forceDisable: false property alias values: cavaProcess.values Cava { @@ -15,6 +16,7 @@ Singleton { count: root.count forceEnable: root.forceEnable + forceDisable: root.forceDisable } } diff --git a/config/quickshell/.config/quickshell/Utils/Cava.qml b/config/quickshell/.config/quickshell/Utils/Cava.qml index 19ac8c0..b60398e 100644 --- a/config/quickshell/.config/quickshell/Utils/Cava.qml +++ b/config/quickshell/.config/quickshell/Utils/Cava.qml @@ -32,12 +32,13 @@ Scope { }) property var values: Array(count).fill(0) property bool forceEnable: false + property bool forceDisable: false Process { id: process stdinEnabled: true - running: root.forceEnable || !MusicManager.isAllPaused() + running: !root.forceDisable && (MusicManager.isPlaying || root.forceEnable) command: ["cava", "-p", "/dev/stdin"] onExited: { stdinEnabled = true; diff --git a/config/scripts/.local/scripts/change-colortheme b/config/scripts/.local/scripts/change-colortheme index cbe0c26..a64d358 100755 --- a/config/scripts/.local/scripts/change-colortheme +++ b/config/scripts/.local/scripts/change-colortheme @@ -14,6 +14,8 @@ import subprocess from pathlib import Path from concurrent.futures import ThreadPoolExecutor +MAX_WORKERS = 8 + PALETTES = { "catppuccin-mocha": { "rosewater": "f5e0dc", @@ -45,9 +47,7 @@ SCRIPTS = { "nwg-look": [CONFIG_DIR / "nwg-look" / "apply-color"], "mako": [CONFIG_DIR / "mako" / "apply-color"], "niri": [CONFIG_DIR / "niri" / "apply-color"], - "oh-my-posh": [ - CONFIG_DIR / "fish" / "apply-color-omp" - ], # borrowing fish's directory + "oh-my-posh": [CONFIG_DIR / "fish" / "apply-color-omp"], # borrowing fish's directory "quickshell": [CONFIG_DIR / "quickshell" / "apply-color"], "rofi": [CONFIG_DIR / "rofi" / "apply-color"], "waybar": [CONFIG_DIR / "waybar" / "apply-color"], @@ -57,8 +57,8 @@ SCRIPTS = { ], "yazi": [CONFIG_DIR / "yazi" / "apply-color"], } -# or simply `find -L ${CONFIG_DIR} -type f -iname 'apply-color*'` to get all available scripts, -# but I do need the exact application names anyway, so hardcoding does make some sense +# or simply `find [-L] -type f -name 'apply-color*'` to get all available scripts, +# but I need the exact application names anyway, so hardcoding does make some sense def hex2rgb(hex_color: str) -> tuple[int, int, int]: @@ -318,7 +318,7 @@ def main(): script_args = [palette_name, flavor, palette[flavor]] tasks = [] - with ThreadPoolExecutor(max_workers=8) as executor: + with ThreadPoolExecutor(max_workers=MAX_WORKERS) as executor: for app in apps: for script in SCRIPTS[app]: tasks.append(executor.submit(run_script, script, script_args)) @@ -329,7 +329,7 @@ def main(): "-a", "change-colortheme", "Colortheme Changed", - f"Palette: {palette_name}\nFlavor: {flavor}", + f"Palette: {palette_name}\nFlavor: {flavor}\nApplied to {len(apps)} apps", ] ) diff --git a/config/wallpaper/Pictures/backgrounds b/config/wallpaper/Pictures/backgrounds index 389750e..abde275 160000 --- a/config/wallpaper/Pictures/backgrounds +++ b/config/wallpaper/Pictures/backgrounds @@ -1 +1 @@ -Subproject commit 389750ee97f9075cc099ff8c3d96dbcc224d3493 +Subproject commit abde27520954d600857b787e68aa3850c2273efa