This commit is contained in:
2026-02-23 09:26:54 +00:00
parent a306a8cb9a
commit 320cac603d
5 changed files with 69 additions and 70 deletions

View File

@@ -59,6 +59,7 @@
telegram-desktop
obsidian
];
programs.home-manager.enable = true;
};
};
}

View File

@@ -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" ];
};
};
};
}

View File

@@ -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
}

View File

@@ -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"
}
}

View File

@@ -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";
};