update system

This commit is contained in:
2026-06-06 13:11:00 +02:00
parent 7c3a4f9cb6
commit cf2108ad82
17 changed files with 361 additions and 325 deletions
+73 -101
View File
@@ -32,120 +32,92 @@ in
'')
];
home-manager.users.${username} =
let
monitorline = "DP-3,3840x2160@144,0x0,1,bitdepth,10,cm,${if cfg.hdr then "hdr" else "srgb"}";
in
{
programs.mpv.config = {
vo = "gpu-next";
gpu-api = "vulkan";
gpu-context = "waylandvk";
target-colorspace-hint = "auto";
};
programs.niri.settings = {
prefer-no-csd = true;
outputs."DP-3" = {
scale = 1;
mode = {
width = 3840;
height = 2160;
refresh = 143.999;
};
variable-refresh-rate = "on-demand";
};
layout.struts.top = 80;
};
wayland.windowManager.hyprland.settings = {
home-manager.users.${username} = {
programs.mpv.config = {
vo = "gpu-next";
gpu-api = "vulkan";
gpu-context = "waylandvk";
target-colorspace-hint = "auto";
};
wayland.windowManager.hyprland.settings = {
config = {
scrolling = {
column_width = 0.4;
focus_fit_method = 0;
fullscreen_on_one_column = false;
};
master = {
orientation = "center";
slave_count_for_center_master = 0;
mfact = 0.4;
allow_small_split = true;
wrap_focus = false;
};
render.direct_scanout = 0;
monitorv2 = {
output = "DP-3";
mode = "3840x2160@144";
position = "0x0";
scale = 1;
bitdepth = 10;
addreserved = "80,0,0,0";
cm = if cfg.hdr then "hdredid" else "srgb";
sdr_min_luminance = 0.25;
sdr_max_luminance = 250;
};
xwayland.force_zero_scaling = true;
misc.vrr = 2; # VA suffers from VRR flicker
quirks.prefer_hdr = 1;
cursor = {
min_refresh_rate = 48;
no_break_fs_vrr = 1;
};
# experimental.xx_color_management_v4 = true;
};
programs.waybar.settings.mainBar =
let
tmpFile = "${config.home-manager.users.${username}.xdg.configHome}/gbmonctl-brightness";
cmd =
if cfg.hdr then
# sh
''
BRIGHTNESS=$(cat ${tmpFile} || echo "0")
BRIGHTNESS=$(printf "1.%02d" $((BRIGHTNESS / 2)))
hyprctl keyword monitor ${monitorline},sdrbrightness,$BRIGHTNESS
''
else
"${pkgs.gbmonctl}/bin/gbmonctl -prop brightness -val $BRIGHTNESS";
in
{
"custom/saturation" = { };
"custom/brightness" = {
return-type = "json";
exec = pkgs.writeShellScript "waybar-brightness" ''
BRIGHTNESS=$(cat ${tmpFile} || echo "0")
if [ "$BRIGHTNESS" -lt ${toString (100 / 7 * 1)} ]; then
ICON="󰃚"
elif [ "$BRIGHTNESS" -lt ${toString (100 / 7 * 2)} ]; then
ICON="󰃛"
elif [ "$BRIGHTNESS" -lt ${toString (100 / 7 * 3)} ]; then
ICON="󰃜"
elif [ "$BRIGHTNESS" -lt ${toString (100 / 7 * 4)} ]; then
ICON="󰃝"
elif [ "$BRIGHTNESS" -lt ${toString (100 / 7 * 5)} ]; then
ICON="󰃞"
elif [ "$BRIGHTNESS" -lt ${toString (100 / 7 * 6)} ]; then
ICON="󰃟"
else
ICON="󰃠"
fi
echo "{\"text\": \"$ICON $BRIGHTNESS%\"}"
'';
on-scroll-up = pkgs.writeShellScript "waybar-brightness-up" ''
BRIGHTNESS=$(cat ${tmpFile} || echo "0")
BRIGHTNESS=$((BRIGHTNESS + 5))
BRIGHTNESS=$((BRIGHTNESS > 100 ? 100 : BRIGHTNESS))
echo $BRIGHTNESS > ${tmpFile}
${cmd}
'';
on-scroll-down = pkgs.writeShellScript "waybar-brightness-up" ''
BRIGHTNESS=$(cat ${tmpFile} || echo "0")
BRIGHTNESS=$((BRIGHTNESS - 5))
BRIGHTNESS=$((BRIGHTNESS < 0 ? 0 : BRIGHTNESS))
echo $BRIGHTNESS > ${tmpFile}
${cmd}
'';
exec-on-event = true;
exec-if = "sleep 0.1";
interval = "once";
};
};
monitor = {
output = "DP-3";
mode = "3840x2160@144";
position = "0x0";
scale = 1;
bitdepth = 10;
reserved_area.top = 80;
sdr_min_luminance = 0.25;
sdr_max_luminance = 250;
icc = toString ./fv43u.icc;
cm = "dcip3";
};
};
programs.waybar.settings.mainBar =
let
tmpFile = "${config.home-manager.users.${username}.xdg.configHome}/gbmonctl-brightness";
cmd = "${pkgs.gbmonctl}/bin/gbmonctl -prop brightness -val $BRIGHTNESS";
in
{
"custom/saturation" = { };
"custom/brightness" = {
return-type = "json";
exec = pkgs.writeShellScript "waybar-brightness" ''
BRIGHTNESS=$(cat ${tmpFile} || echo "0")
if [ "$BRIGHTNESS" -lt ${toString (100 / 7 * 1)} ]; then
ICON="󰃚"
elif [ "$BRIGHTNESS" -lt ${toString (100 / 7 * 2)} ]; then
ICON="󰃛"
elif [ "$BRIGHTNESS" -lt ${toString (100 / 7 * 3)} ]; then
ICON="󰃜"
elif [ "$BRIGHTNESS" -lt ${toString (100 / 7 * 4)} ]; then
ICON="󰃝"
elif [ "$BRIGHTNESS" -lt ${toString (100 / 7 * 5)} ]; then
ICON="󰃞"
elif [ "$BRIGHTNESS" -lt ${toString (100 / 7 * 6)} ]; then
ICON="󰃟"
else
ICON="󰃠"
fi
echo "{\"text\": \"$ICON $BRIGHTNESS%\"}"
'';
on-scroll-up = pkgs.writeShellScript "waybar-brightness-up" ''
BRIGHTNESS=$(cat ${tmpFile} || echo "0")
BRIGHTNESS=$((BRIGHTNESS + 5))
BRIGHTNESS=$((BRIGHTNESS > 100 ? 100 : BRIGHTNESS))
echo $BRIGHTNESS > ${tmpFile}
${cmd}
'';
on-scroll-down = pkgs.writeShellScript "waybar-brightness-up" ''
BRIGHTNESS=$(cat ${tmpFile} || echo "0")
BRIGHTNESS=$((BRIGHTNESS - 5))
BRIGHTNESS=$((BRIGHTNESS < 0 ? 0 : BRIGHTNESS))
echo $BRIGHTNESS > ${tmpFile}
${cmd}
'';
exec-on-event = true;
exec-if = "sleep 0.1";
interval = "once";
};
};
};
};
}
@@ -52,7 +52,7 @@ in
nvidiaPersistenced = false;
};
home-manager.users.${username}.wayland.windowManager.hyprland.settings = {
home-manager.users.${username}.wayland.windowManager.hyprland.settings.config = {
cursor.no_hardware_cursors = true;
opengl.nvidia_anti_flicker = true;
# render.direct_scanout = 1;