meow
This commit is contained in:
parent
e986986e79
commit
53c7532351
10 changed files with 131 additions and 107 deletions
|
|
@ -41,25 +41,31 @@ in
|
|||
wpaperd.enable = mkDefault true;
|
||||
};
|
||||
nixpkgs.overlays = [
|
||||
inputs.niri.overlays.default
|
||||
inputs.niri.overlays.default
|
||||
];
|
||||
services.displayManager.defaultSession = mkDefault "niri";
|
||||
home-manager.users.${config.xyno.system.user.name} =
|
||||
mkIf config.xyno.presets.home-manager.enable
|
||||
(
|
||||
{ ... }:
|
||||
{
|
||||
xyno.dark-theme.enable = true;
|
||||
# home.file.".config/xdg-desktop-portal-termfilechooser/config".text = ''
|
||||
# [filechooser]
|
||||
# cmd=${pkgs.xdg-desktop-portal-termfilechooser}/share/xdg-desktop-portal-termfilechooser/yazi-wrapper.sh
|
||||
# default_dir=$HOME
|
||||
# env=TERMCMD=footclient --app-id floating-alacritty
|
||||
# open_mode = suggested
|
||||
# save_mode = suggested
|
||||
# '';
|
||||
}
|
||||
);
|
||||
security.pam.loginLimits = [
|
||||
{
|
||||
domain = "@users";
|
||||
item = "rtprio";
|
||||
type = "-";
|
||||
value = 1;
|
||||
}
|
||||
];
|
||||
home-manager.users.${config.xyno.system.user.name} = mkIf config.xyno.presets.home-manager.enable (
|
||||
{ ... }:
|
||||
{
|
||||
xyno.dark-theme.enable = true;
|
||||
# home.file.".config/xdg-desktop-portal-termfilechooser/config".text = ''
|
||||
# [filechooser]
|
||||
# cmd=${pkgs.xdg-desktop-portal-termfilechooser}/share/xdg-desktop-portal-termfilechooser/yazi-wrapper.sh
|
||||
# default_dir=$HOME
|
||||
# env=TERMCMD=footclient --app-id floating-alacritty
|
||||
# open_mode = suggested
|
||||
# save_mode = suggested
|
||||
# '';
|
||||
}
|
||||
);
|
||||
|
||||
xdg.portal = {
|
||||
extraPortals = [
|
||||
|
|
@ -73,12 +79,13 @@ in
|
|||
config.niri."org.freedesktop.impl.portal.Access" = [ "gtk" ];
|
||||
config.niri."org.freedesktop.impl.portal.Notification" = [ "gtk" ];
|
||||
config.niri."org.freedesktop.impl.portal.Secret" = [ "gnome-keyring" ];
|
||||
config.niri."org.freedesktop.impl.portal.Inhibit" = [ "none" ];
|
||||
};
|
||||
# xdg.portal = {
|
||||
# enable = true;
|
||||
# wlr.enable = true;
|
||||
# };
|
||||
environment.systemPackages = with pkgs;[
|
||||
environment.systemPackages = with pkgs; [
|
||||
playerctl
|
||||
xwayland-satellite
|
||||
];
|
||||
|
|
@ -406,7 +413,7 @@ in
|
|||
input {
|
||||
// workspace-auto-back-and-forth
|
||||
focus-follows-mouse max-scroll-amount="10%"
|
||||
|
||||
|
||||
keyboard {
|
||||
xkb {
|
||||
layout "eu"
|
||||
|
|
|
|||
|
|
@ -23,23 +23,34 @@ in
|
|||
};
|
||||
options.xyno.desktop.swayidle.swaylockArgs = lib.mkOption {
|
||||
type = lib.types.str;
|
||||
default = "-f -F --clock --timestr %T --datestr %F --indicator -i /home/${config.xyno.system.user.name}/Pictures/background.jpg";
|
||||
default = "-f --daemonize -F --clock --timestr %T --datestr %F --indicator -i /home/${config.xyno.system.user.name}/Pictures/background.jpg";
|
||||
};
|
||||
|
||||
config = lib.mkIf cfg.enable {
|
||||
environment.systemPackages = with cfg; [ package swaylockPackage (
|
||||
pkgs.writeScriptBin "lock" ''
|
||||
#!/${pkgs.bash}/bin/bash
|
||||
${cfg.swaylockPackage}/bin/swaylock ${cfg.swaylockArgs} "$@"
|
||||
''
|
||||
) ];
|
||||
environment.systemPackages = with cfg; [
|
||||
package
|
||||
swaylockPackage
|
||||
(pkgs.writeShellApplication {
|
||||
name = "lock";
|
||||
runtimeInputs = [ cfg.swaylockPackage ];
|
||||
text = ''
|
||||
exec swaylock ${cfg.swaylockArgs}
|
||||
'';
|
||||
})
|
||||
];
|
||||
systemd.user.services.swayidle = {
|
||||
unitConfig.PartOf = "graphical-session.target";
|
||||
unitConfig.After = "graphical-session.target";
|
||||
unitConfig.ConditionEnvironment = "WAYLAND_DISPLAY";
|
||||
unitConfig.Requisite = "graphical-session.target";
|
||||
serviceConfig.Restart = "on-failure";
|
||||
serviceConfig.Restart = "always";
|
||||
# environment.PATH = "${lib.makeBinPath [ pkgs.bash ]}";
|
||||
wantedBy = [ cfg.wantedBy ];
|
||||
script = "exec ${cfg.package}/bin/swayidle -w timeout 310 'niri msg action power-off-monitors' timeout 300 '${cfg.swaylockPackage}/bin/swaylock ${cfg.swaylockArgs}' before-sleep '${cfg.swaylockPackage}/bin/swaylock ${cfg.swaylockArgs}'";
|
||||
script = ''
|
||||
exec ${cfg.package}/bin/swayidle -w timeout 310 'niri msg action power-off-monitors' \
|
||||
timeout 300 '${cfg.swaylockPackage}/bin/swaylock ${cfg.swaylockArgs}' \
|
||||
before-sleep '${cfg.swaylockPackage}/bin/swaylock ${cfg.swaylockArgs}'
|
||||
'';
|
||||
};
|
||||
};
|
||||
}
|
||||
|
|
|
|||
|
|
@ -7,7 +7,7 @@ index a43ad29b..d04edd18 100644
|
|||
}
|
||||
|
||||
- int vol = round(volume_ * 100.0);
|
||||
+ double vol = 20 * std::log10(volume_); // % to dB
|
||||
+ double vol = 60 * std::log10(volume_); // % to dB
|
||||
int source_vol = round(source_volume_ * 100.0);
|
||||
|
||||
// Get the state and apply state-specific format if available
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue