From 320cac603d9bbb7b527a5a6113786139618a4e9b Mon Sep 17 00:00:00 2001 From: Doloro1978 Date: Mon, 23 Feb 2026 09:26:54 +0000 Subject: [PATCH] all --- config/hosts/aspects/doloro-desktop/home.nix | 1 + config/modules/obs.nix | 103 +++++++----------- config/modules/quickshell/quickshell/Bar.qml | 16 ++- .../quickshell/quickshell/Workspaces.qml | 17 +++ config/modules/stylix.nix | 2 +- 5 files changed, 69 insertions(+), 70 deletions(-) create mode 100644 config/modules/quickshell/quickshell/Workspaces.qml diff --git a/config/hosts/aspects/doloro-desktop/home.nix b/config/hosts/aspects/doloro-desktop/home.nix index 1087a75..58928ce 100644 --- a/config/hosts/aspects/doloro-desktop/home.nix +++ b/config/hosts/aspects/doloro-desktop/home.nix @@ -59,6 +59,7 @@ telegram-desktop obsidian ]; + programs.home-manager.enable = true; }; }; } diff --git a/config/modules/obs.nix b/config/modules/obs.nix index dd4426e..732eb1e 100644 --- a/config/modules/obs.nix +++ b/config/modules/obs.nix @@ -25,71 +25,46 @@ }; systemd.user.services = let - mergedSet = lib.mergeAttrsList [ - ( - let - set = lib.mkIf settings.audio { - pw-discordaudio-virtual-device = { - Unit = { - Description = "OBS daemon"; - After = [ "hyprland-session.target" ]; - }; - Install = { - WantedBy = [ "default.target" ]; - }; - Service = { - ExecStart = "${pkgs.writeShellScript "discord_audio_virt_device" '' - pw-loopback -m '[ FL FR]' --capture-props='media.class=Audio/Sink node.name=DiscordSink' -n DiscordSink - ''}"; - Restart = "on-failure"; - RestartSec = "5s"; - }; - }; - pw-gameaudio-virtual-device = { - Unit = { - Description = "OBS daemon"; - After = [ "hyprland-session.target" ]; - }; - Install = { - WantedBy = [ "default.target" ]; - }; - Service = { - ExecStart = "${pkgs.writeShellScript "game_audio_virt_device" '' - pw-loopback -m '[ FL FR]' --capture-props='media.class=Audio/Sink node.name=GameAudioSink' -n GameAudioSink - ''}"; - Restart = "on-failure"; - RestartSec = "5s"; - }; - }; - }; - in - set - ) - ( - let - set = lib.mkIf settings.autostart { - obs-autostart = { - Unit = { - Description = "OBS daemon"; - After = [ "hyprland-session.target" ]; - }; - Install = { - WantedBy = [ "default.target" ]; - }; - Service = { - # wait for hyprland to start - ExecStart = "${config.programs.obs-studio.finalPackage}/bin/obs --startreplaybuffer"; - Restart = "on-failure"; - RestartSec = "5s"; - }; - }; - }; - in - set - ) - ]; + audio-set = lib.mkIf settings.audio { + pw-discordaudio-virtual-device = { + Unit = { + Description = "OBS daemon"; + After = [ "hyprland-session.target" ]; + }; + Install = { + WantedBy = [ "default.target" ]; + }; + Service = { + ExecStart = "${pkgs.writeShellScript "discord_audio_virt_device" '' + pw-loopback -m '[ FL FR]' --capture-props='media.class=Audio/Sink node.name=DiscordSink' -n DiscordSink + ''}"; + Restart = "on-failure"; + RestartSec = "5s"; + }; + }; + pw-gameaudio-virtual-device = { + Unit = { + Description = "OBS daemon"; + After = [ "hyprland-session.target" ]; + }; + Install = { + WantedBy = [ "default.target" ]; + }; + Service = { + ExecStart = "${pkgs.writeShellScript "game_audio_virt_device" '' + pw-loopback -m '[ FL FR]' --capture-props='media.class=Audio/Sink node.name=GameAudioSink' -n GameAudioSink + ''}"; + Restart = "on-failure"; + RestartSec = "5s"; + }; + }; + }; in - mergedSet; + lib.mergeAttrsList [ audio-set ]; + + wayland.windowManager.hyprland.settings = { + exec-once = [ "${config.programs.obs-studio.finalPackage}/bin/obs --startreplaybuffer" ]; + }; }; }; } diff --git a/config/modules/quickshell/quickshell/Bar.qml b/config/modules/quickshell/quickshell/Bar.qml index d8a2bf1..3bb79f2 100644 --- a/config/modules/quickshell/quickshell/Bar.qml +++ b/config/modules/quickshell/quickshell/Bar.qml @@ -28,30 +28,36 @@ Scope { left: parent.left right: parent.right // bottomMargin: 2 - leftMargin: 5 - rightMargin: 5 + leftMargin: 0 + rightMargin: 0 } RowLayout { // Left Layout.alignment: Qt.AlignLeft + // To make sure no children mess with the height of all the other children. + // because if one widget is too height, it'll ofset all the other children in the bar + Layout.preferredHeight: 20 + Workspaces {} } RowLayout { // Center Layout.alignment: Qt.AlignCenter + Layout.preferredHeight: 20 } RowLayout { // Right Layout.alignment: Qt.AlignRight + Layout.preferredHeight: 20 Rectangle { - width: meow.width - height: meow.height + width: clockText.width + height: clockText.height radius: 3.5 color: "white" anchors.centerIn: parent Text { - id: meow + id: clockText // font.pointSize: 24 text: Clock.time } diff --git a/config/modules/quickshell/quickshell/Workspaces.qml b/config/modules/quickshell/quickshell/Workspaces.qml new file mode 100644 index 0000000..2d43e49 --- /dev/null +++ b/config/modules/quickshell/quickshell/Workspaces.qml @@ -0,0 +1,17 @@ +// Bar.qml +import Quickshell +import Quickshell.Io +import QtQuick +import QtQuick.Layouts + +Item { + id: root + width: content.width + height: content.height + Rectangle { + id: content + width: 30 + height: 30 + color: "red" + } +} diff --git a/config/modules/stylix.nix b/config/modules/stylix.nix index b1dbb92..c58e817 100644 --- a/config/modules/stylix.nix +++ b/config/modules/stylix.nix @@ -35,7 +35,7 @@ { pkgs, ... }: { imports = [ inputs.stylix.nixosModules.stylix ]; - stylix.enable = true; + stylix.enable = false; stylix.autoEnable = false; stylix.base16Scheme = "${pkgs.base16-schemes}/share/themes/gruvbox-dark-hard.yaml"; };