format all

This commit is contained in:
Kopatz
2025-10-30 21:59:31 +01:00
parent b1dda4d037
commit 8a78e618bb
188 changed files with 3526 additions and 1825 deletions

View File

@@ -1,4 +1,11 @@
{ config, osConfig, pkgs, inputs, lib, ... }:
{
config,
osConfig,
pkgs,
inputs,
lib,
...
}:
let
cfg = osConfig.custom.graphical.hyprland;
isPc = osConfig.networking.hostName == "kop-pc";
@@ -16,7 +23,13 @@ let
hyprctl --instance 0 "dispatch exec hyprlock"
'';
scale = if isLaptop then "1.33333" else "1";
monitor1 = if isPc then "DP-1" else if isLaptop then "eDP-1" else "eDP-1";
monitor1 =
if isPc then
"DP-1"
else if isLaptop then
"eDP-1"
else
"eDP-1";
monitor2 = "HDMI-A-1";
in
{
@@ -38,32 +51,35 @@ in
# See https://wiki.hyprland.org/Configuring/Monitors/
monitor =
if isPc then [
"${monitor2},1920x1080@60,0x0,${scale}"
"${monitor1},2560x1440@144,1920x0,${scale}"
"Unknown-1,disable"
] else if isLaptop then [
# laptop
"eDP-1,2256x1504@60,0x0,${scale}"
#"DP-3,1920x1080@60,1920x0,1"
#",preferred,auto,1,mirror,eDP-1"
",preferred,auto,auto"
] else
if isPc then
[
"${monitor2},1920x1080@60,0x0,${scale}"
"${monitor1},2560x1440@144,1920x0,${scale}"
"Unknown-1,disable"
]
else if isLaptop then
[
# laptop
"eDP-1,2256x1504@60,0x0,${scale}"
#"DP-3,1920x1080@60,1920x0,1"
#",preferred,auto,1,mirror,eDP-1"
",preferred,auto,auto"
]
else
[
# Default
",preferred,auto,auto"
];
workspace =
lib.lists.optionals (osConfig.networking.hostName == "kop-pc") [
"1,monitor:${monitor1}"
"2,monitor:${monitor1}"
"3,monitor:${monitor1}"
"4,monitor:${monitor1}"
"5,monitor:${monitor1}"
"9,monitor:${monitor2}"
"10,monitor:${monitor2}"
];
workspace = lib.lists.optionals (osConfig.networking.hostName == "kop-pc") [
"1,monitor:${monitor1}"
"2,monitor:${monitor1}"
"3,monitor:${monitor1}"
"4,monitor:${monitor1}"
"5,monitor:${monitor1}"
"9,monitor:${monitor2}"
"10,monitor:${monitor2}"
];
# See https://wiki.hyprland.org/Configuring/Keywords/ for more
@@ -74,13 +90,16 @@ in
# source = ~/.config/hypr/myColors.conf
# Some default env vars.
env =
[ "XCURSOR_SIZE,24" "NIXOS_OZONE_WL,1" "GDK_SCALE,${scale}" ]
++ lib.optionals osConfig.custom.hardware.nvidia.enable [
"LIBVA_DRIVER_NAME,nvidia"
"GBM_BACKEND,nvidia-drm"
"__GLX_VENDOR_LIBRARY_NAME,nvidia"
];
env = [
"XCURSOR_SIZE,24"
"NIXOS_OZONE_WL,1"
"GDK_SCALE,${scale}"
]
++ lib.optionals osConfig.custom.hardware.nvidia.enable [
"LIBVA_DRIVER_NAME,nvidia"
"GBM_BACKEND,nvidia-drm"
"__GLX_VENDOR_LIBRARY_NAME,nvidia"
];
# For all categories, see https://wiki.hyprland.org/Configuring/Variables/
input = {
@@ -93,7 +112,9 @@ in
follow_mouse = 1;
float_switch_override_focus = 2;
touchpad = { natural_scroll = true; };
touchpad = {
natural_scroll = true;
};
accel_profile = "flat";
sensitivity = 0;
@@ -124,9 +145,9 @@ in
render = {
new_render_scheduling = true;
};
misc = {
vfr = true;
middle_click_paste = false;
misc = {
vfr = true;
middle_click_paste = false;
enable_anr_dialog = false;
disable_hyprland_logo = true;
};
@@ -169,8 +190,7 @@ in
dwindle = {
# See https://wiki.hyprland.org/Configuring/Dwindle-Layout/ for more
pseudotile =
true; # master switch for pseudotiling. Enabling is bound to mainMod + P in the keybinds section below
pseudotile = true; # master switch for pseudotiling. Enabling is bound to mainMod + P in the keybinds section below
preserve_split = true; # you probably want this
};
@@ -212,8 +232,9 @@ in
wl-copy = "${pkgs.wl-clipboard}/bin/wl-copy";
wl-paste = "${pkgs.wl-clipboard}/bin/wl-paste";
grimblast = "${pkgs.grimblast}/bin/grimblast";
saved-screenshot-cmd = ''${grimblast} --freeze save area $OUT && notify-send "Saved screenshot to $OUT" -h string:image-path:$OUT && echo "file://$(realpath $OUT)" | wl-copy -t text/uri-list
'';
saved-screenshot-cmd = ''
${grimblast} --freeze save area $OUT && notify-send "Saved screenshot to $OUT" -h string:image-path:$OUT && echo "file://$(realpath $OUT)" | wl-copy -t text/uri-list
'';
pdfgrep = "${pkgs.pdfgrep}/bin/pdfgrep";
brightnessctl = "${pkgs.brightnessctl}/bin/brightnessctl";
#swaylock = "${pkgs.swaylock}/bin/swaylock";
@@ -241,10 +262,8 @@ in
''$mainMod, R, exec, hyprctl hyprpaper reload ,"$(ls -d ~/synced/default/dinge/Bg/* | shuf -n 1)"''
"$mainMod, W, exec, hyprctl hyprpaper reload ,${config.stylix.image}"
" , Print, exec, hyprshade off && ${grimblast} --freeze copy area && hyprshade auto"
''
$mainMod, Print, exec, export OUT=/tmp/$(date +'%s_grim.png') && ${saved-screenshot-cmd}''
''
Shift_L, Print, exec, export OUT=~/Pictures/$(date +'%s_grim.png') && ${saved-screenshot-cmd}''
''$mainMod, Print, exec, export OUT=/tmp/$(date +'%s_grim.png') && ${saved-screenshot-cmd}''
''Shift_L, Print, exec, export OUT=~/Pictures/$(date +'%s_grim.png') && ${saved-screenshot-cmd}''
#"$mainMod, G, exec, ${peek}" # record gif
"$mainMod, SPACE, exec, ${rofi} -modi drun -show drun -config ~/.config/rofi/rofidmenu.rasi"
" , XF86AudioPlay, exec, ${playerctl} play-pause"
@@ -359,12 +378,14 @@ in
"dex --autostart --environment Hyprland"
"${pkgs.hypridle}/bin/hypridle &"
#"${pkgs.dunst}/bin/dunst &"
] ++ lib.lists.optionals (osConfig.networking.hostName == "kop-pc") [
]
++ lib.lists.optionals (osConfig.networking.hostName == "kop-pc") [
"[workspace 9 silent] sleep 2 && discord"
"[workspace 9 silent] sleep 2 && discordcanary"
"[workspace 10 silent] firefox"
"xrandr --monitor ${monitor1} --primary"
] ++ [
]
++ [
"sleep 3 && ${pkgs.waybar}/bin/waybar &"
"${restartPortals}"
];

View File

@@ -1,4 +1,11 @@
{ config, osConfig, pkgs, inputs, lib, ... }:
{
config,
osConfig,
pkgs,
inputs,
lib,
...
}:
with lib;
let
cfg = osConfig.custom.graphical.hyprland.videobridge;

View File

@@ -1,6 +1,15 @@
{ config, osConfig, pkgs, inputs, lib, ... }:
let cfg = osConfig.custom.graphical.hyprland;
in {
{
config,
osConfig,
pkgs,
inputs,
lib,
...
}:
let
cfg = osConfig.custom.graphical.hyprland;
in
{
config = lib.mkIf cfg.enable {
programs.hyprlock.enable = true;
programs.hyprlock.settings = {
@@ -34,7 +43,7 @@ in {
## shadow_passes = 2;
##};
##
### DATE
### DATE
##label = {
## monitor = "";
## text = "cmd[update:43200000] echo \"$(date +\"%A, %d %B %Y\")\"";

View File

@@ -1,36 +1,47 @@
{ osConfig, pkgs, lib, ... }:
{
osConfig,
pkgs,
lib,
...
}:
let cfg = osConfig.custom.graphical.hyprland;
in {
config = lib.mkIf cfg.enable
{
home.file.".config/hypr/hyprshade.toml".source = ../../.config/hypr/hyprshade.toml;
wayland.windowManager.hyprland.settings.exec-once = [ "${pkgs.hyprshade}/bin/hyprshade auto" ];
systemd.user = {
let
cfg = osConfig.custom.graphical.hyprland;
in
{
config = lib.mkIf cfg.enable {
home.file.".config/hypr/hyprshade.toml".source = ../../.config/hypr/hyprshade.toml;
wayland.windowManager.hyprland.settings.exec-once = [ "${pkgs.hyprshade}/bin/hyprshade auto" ];
systemd.user = {
services.hyprshade = {
Install.WantedBy = [ "graphical-session.target" ];
services.hyprshade = {
Install.WantedBy = [ "graphical-session.target" ];
Unit = {
ConditionEnvironment = "HYPRLAND_INSTANCE_SIGNATURE";
Description = "Apply screen filter";
After = [ "graphical-session-pre.target" ];
PartOf = [ "graphical-session.target" ];
};
Service = {
Type = "oneshot";
ExecStart = "${pkgs.hyprshade}/bin/hyprshade auto";
};
Unit = {
ConditionEnvironment = "HYPRLAND_INSTANCE_SIGNATURE";
Description = "Apply screen filter";
After = [ "graphical-session-pre.target" ];
PartOf = [ "graphical-session.target" ];
};
timers.hyprshade = {
Install.WantedBy = [ "timers.target" ];
Unit = { Description = "Apply screen filter on schedule"; };
Timer.OnCalendar = [ "*-*-* 06:00:00" "*-*-* 19:00:00" ];
Service = {
Type = "oneshot";
ExecStart = "${pkgs.hyprshade}/bin/hyprshade auto";
};
};
timers.hyprshade = {
Install.WantedBy = [ "timers.target" ];
Unit = {
Description = "Apply screen filter on schedule";
};
Timer.OnCalendar = [
"*-*-* 06:00:00"
"*-*-* 19:00:00"
];
};
};
};
}

View File

@@ -1,6 +1,15 @@
{ config, osConfig, pkgs, inputs, lib, ... }:
let cfg = osConfig.custom.graphical.hyprland;
in {
{
config,
osConfig,
pkgs,
inputs,
lib,
...
}:
let
cfg = osConfig.custom.graphical.hyprland;
in
{
config = lib.mkIf cfg.enable {
wayland.windowManager.hyprland = {
plugins = [ pkgs.hyprlandPlugins.hyprspace ];
@@ -9,16 +18,18 @@ in {
"$mainMod, TAB, overview:toggle"
"$mainMod SHIFT, TAB, overview:toggle, all"
];
plugin = [{
overview = {
affectStrut = false;
hideTopLayers = true;
panelHeight = 250;
showEmptyWorkspace = false;
showNewWorkspace = true;
disableBlur = true;
};
}];
plugin = [
{
overview = {
affectStrut = false;
hideTopLayers = true;
panelHeight = 250;
showEmptyWorkspace = false;
showNewWorkspace = true;
disableBlur = true;
};
}
];
};
};
};

View File

@@ -1,7 +1,16 @@
{ config, osConfig, pkgs, inputs, lib, ... }:
{
config,
osConfig,
pkgs,
inputs,
lib,
...
}:
with lib;
let cfg = osConfig.custom.graphical.hyprland;
in {
let
cfg = osConfig.custom.graphical.hyprland;
in
{
config =
let
# styles from https://github.com/khaneliman/khanelinix/blob/8375f8cfbe5bfd87565b4dc34c9d30630c17336d/modules/home/desktop/addons/waybar/default.nix
@@ -37,25 +46,43 @@ in {
#"hyprland/window"
];
modules-center = [ ];
modules-right = [ "group/stats" "group/other" ];
modules-right = [
"group/stats"
"group/other"
];
"group/stats" = {
"orientation" = "horizontal";
"modules" = [ "network" "cpu" "memory" "temperature" ]
++ lib.optionals osConfig.custom.hardware.nvidia.enable [ "custom/nvidia" ]
++ lib.optionals osConfig.custom.hardware.amd-gpu.enable [ "custom/amd-gpu" ]
++ lib.optionals osConfig.services.power-profiles-daemon.enable [ "power-profiles-daemon" ];
"modules" = [
"network"
"cpu"
"memory"
"temperature"
]
++ lib.optionals osConfig.custom.hardware.nvidia.enable [ "custom/nvidia" ]
++ lib.optionals osConfig.custom.hardware.amd-gpu.enable [ "custom/amd-gpu" ]
++ lib.optionals osConfig.services.power-profiles-daemon.enable [ "power-profiles-daemon" ];
};
"group/other" = {
"orientation" = "horizontal";
"modules" =
[ "tray" "backlight" "pulseaudio" "mpris" "battery" "clock" ];
"modules" = [
"tray"
"backlight"
"pulseaudio"
"mpris"
"battery"
"clock"
];
};
"cpu" = {
"format" = " {usage}%";
"tooltip" = true;
};
"disk" = { "format" = " {percentage_used}%"; };
"memory" = { "format" = "󰍛 {}%"; };
"disk" = {
"format" = " {percentage_used}%";
};
"memory" = {
"format" = "󰍛 {}%";
};
"idle_inhibitor" = {
"format" = "{icon} ";
@@ -95,7 +122,10 @@ in {
"phone" = "";
"portable" = "";
"car" = "";
"default" = [ "" "" ];
"default" = [
""
""
];
};
"scroll-step" = 1;
"on-click" = "${pkgs.pavucontrol}/bin/pavucontrol";
@@ -110,18 +140,30 @@ in {
"temperature".critical-threshold = 80;
"temperature".format = "{temperatureC}°C ";
"temperature".interval = 5;
"temperature".hwmon-path =
lib.mkIf (osConfig.networking.hostName == "framework")
"/sys/class/hwmon/hwmon6/temp1_input";
"temperature".hwmon-path = lib.mkIf (
osConfig.networking.hostName == "framework"
) "/sys/class/hwmon/hwmon6/temp1_input";
"backlight".format = "{percent}% {icon}";
"backlight".states = [ 0 50 ];
"backlight".format-icons = [ "" "" ];
"backlight".states = [
0
50
];
"backlight".format-icons = [
""
""
];
"battery".states.good = 95;
"battery".interval = 5;
"battery".states.warning = 30;
"battery".states.critical = 15;
"battery".format = "{capacity}% / {power:.2}W {icon}";
"battery".format-icons = [ "" "" "" "" "" ];
"battery".format-icons = [
""
""
""
""
""
];
"clock" = {
format = "{:%F %H:%M}";
tooltip-format = "<tt><small>{calendar}</small></tt>";
@@ -148,7 +190,9 @@ in {
"default" = "";
"mpv" = "🎵";
};
"status-icons" = { "paused" = ""; };
"status-icons" = {
"paused" = "";
};
};
"power-profiles-daemon" = {
"format" = "{icon}";
@@ -217,8 +261,7 @@ in {
"class<firefox-beta>" = "";
"class<firefox-developer-edition>" = "";
"class<firefox> title<.*github.*>" = "";
"class<firefox> title<.*twitch|youtube|plex|tntdrama|bally sports.*>" =
"";
"class<firefox> title<.*twitch|youtube|plex|tntdrama|bally sports.*>" = "";
"class<kitty>" = "";
"class<org.wezfurlong.wezterm>" = "";
"class<mediainfo-gui>" = "󱂷";
@@ -247,8 +290,7 @@ in {
};
};
};
style =
"${theme}${style}${notificationsStyle}${powerStyle}${statsStyle}${workspacesStyle}";
style = "${theme}${style}${notificationsStyle}${powerStyle}${statsStyle}${workspacesStyle}";
};
};
}