Port iogamasters hyprland config

This commit is contained in:
2024-06-15 12:17:52 +02:00
parent c97f22254a
commit a9d0e298b3
53 changed files with 986 additions and 154 deletions

View File

@ -22,20 +22,30 @@
let
cfg = config.modules.hyprland;
inherit (inputs.nix-colors.colorschemes.${builtins.toString config.modules.desktop.colorscheme})
palette
;
in
{
options.modules.hyprland = {
enable = lib.mkOption { default = false; };
options.modules.hyprland = with lib.frajul; {
enable = mkBoolOpt false "Enable or disable the hyprland window manager.";
};
# imports = [ (ib.mkIf inputs.hyprland.homeManagerModules.default) ];
config = lib.mkIf cfg.enable {
modules.desktop.addons = {
waybar.enable = true;
wofi.enable = true;
mako.enable = true;
gtklock.enable = true;
wlogout.enable = true;
};
services.dunst.enable = true;
# services.dunst.enable = true;
home.packages = with pkgs; [
wofi
# wofi
xfce.thunar
# hyprpicker # TODO
# hyprcursor # TODO
@ -43,116 +53,129 @@ in
grimblast
];
services.copyq.enable = true;
programs.hyprlock.enable = true;
programs.hyprlock.settings = {
general = {
disable_loading_bar = true;
hide_cursor = true;
ignore_empty_input = true;
};
background = [
{
path = "screenshot";
blur_passes = 3;
blur_size = 8;
}
];
input-field = [
{
size = "200, 50";
position = "0, -80";
monitor = "";
dots_center = true;
fade_on_empty = false;
font_color = "rgb(202, 211, 245)";
inner_color = "rgb(91, 96, 120)";
outer_color = "rgb(24, 25, 38)";
outline_thickness = 5;
placeholder_text = "Password...";
shadow_passes = 2;
}
];
};
services.hypridle = {
enable = true;
settings = {
general = {
after_sleep_cmd = "hyprctl dispatch dpms on";
ignore_dbus_inhibit = false;
lock_cmd = "hyprlock";
};
listener = [
{
timeout = 300; # 5min
on-timeout = "brightnessctl -s set 10"; # set monitor backlight to minimum, avoid 0 on OLED monitor.
on-resume = "brightnessctl -r"; # monitor backlight restore.
xdg.configFile = {
"hypr/launch".source = ./launch;
# "hypr/hyprland.conf".source = ./hyprland.conf;
"hypr/colors.conf" = {
text = ''
general {
col.active_border = 0xff${palette.base0C} 0xff${palette.base0D} 270deg
col.inactive_border = 0xff${palette.base00}
}
{
timeout = 360; # 6min
on-timeout = "hyprlock"; # lock screen when timeout has passed
}
{
timeout = 600; # 10min
on-timeout = "hyprctl dispatch dpms off"; # screen off when timeout has passed
on-resume = "hyprctl dispatch dpms on"; # screen on when activity is detected after timeout has fired.
}
];
'';
};
};
programs.waybar = {
enable = true;
systemd.enable = true;
style = builtins.readFile ./style.css;
settings.mainBar = builtins.fromJSON (builtins.readFile ./waybar-config.json);
# settings = {
# mainBar = {
# layer = "top";
# position = "bottom";
# height = 30;
# output = [
# "eDP-1"
# "HDMI-A-1"
# ];
# modules-left = [
# "hyprland/workspaces"
# "hyprland/submap"
# ];
# modules-center = [ "hyprland/window" ];
# modules-right = [
# # "mpd"
# # "idle_inhibitor"
# "pulseaudio"
# # "network"
# "power-profiles-daemon"
# "cpu"
# "memory"
# # "temperature"
# # "backlight"
# # "keyboard-state"
# "battery"
# # "battery#bat2"
# "clock"
# "tray"
# ];
# services.copyq.enable = true;
# # "sway/workspaces" = {
# # disable-scroll = true;
# # all-outputs = true;
# # };
# };
# };
};
# programs.hyprlock.enable = true;
# programs.hyprlock.settings = {
# general = {
# disable_loading_bar = true;
# hide_cursor = true;
# ignore_empty_input = true;
# };
programs.wlogout.enable = true; # can be configured
# background = [
# {
# path = "screenshot";
# blur_passes = 3;
# blur_size = 8;
# }
# ];
# input-field = [
# {
# size = "200, 50";
# position = "0, -80";
# monitor = "";
# dots_center = true;
# fade_on_empty = false;
# font_color = "rgb(202, 211, 245)";
# inner_color = "rgb(91, 96, 120)";
# outer_color = "rgb(24, 25, 38)";
# outline_thickness = 5;
# placeholder_text = "Password...";
# shadow_passes = 2;
# }
# ];
# };
# services.hypridle = {
# enable = true;
# settings = {
# general = {
# after_sleep_cmd = "hyprctl dispatch dpms on";
# ignore_dbus_inhibit = false;
# lock_cmd = "hyprlock";
# };
# listener = [
# {
# timeout = 300; # 5min
# on-timeout = "brightnessctl -s set 10"; # set monitor backlight to minimum, avoid 0 on OLED monitor.
# on-resume = "brightnessctl -r"; # monitor backlight restore.
# }
# {
# timeout = 360; # 6min
# on-timeout = "hyprlock"; # lock screen when timeout has passed
# }
# {
# timeout = 600; # 10min
# on-timeout = "hyprctl dispatch dpms off"; # screen off when timeout has passed
# on-resume = "hyprctl dispatch dpms on"; # screen on when activity is detected after timeout has fired.
# }
# ];
# };
# };
# programs.waybar = {
# enable = true;
# systemd.enable = true;
# style = builtins.readFile ./style.css;
# settings.mainBar = builtins.fromJSON (builtins.readFile ./waybar-config.json);
# # settings = {
# # mainBar = {
# # layer = "top";
# # position = "bottom";
# # height = 30;
# # output = [
# # "eDP-1"
# # "HDMI-A-1"
# # ];
# # modules-left = [
# # "hyprland/workspaces"
# # "hyprland/submap"
# # ];
# # modules-center = [ "hyprland/window" ];
# # modules-right = [
# # # "mpd"
# # # "idle_inhibitor"
# # "pulseaudio"
# # # "network"
# # "power-profiles-daemon"
# # "cpu"
# # "memory"
# # # "temperature"
# # # "backlight"
# # # "keyboard-state"
# # "battery"
# # # "battery#bat2"
# # "clock"
# # "tray"
# # ];
# # # "sway/workspaces" = {
# # # disable-scroll = true;
# # # all-outputs = true;
# # # };
# # };
# # };
# };
# programs.wlogout.enable = true; # can be configured
# services.hypridle.enable = true; # can be configured
services.network-manager-applet.enable = true;
@ -161,7 +184,7 @@ in
# Whether to enable Hyprland wayland compositor
enable = true;
# The hyprland package to use (simplifies use of plugins)
package = inputs.hyprland.packages.${pkgs.system}.hyprland;
# package = inputs.hyprland.packages.${pkgs.system}.hyprland;
# Whether to enable XWayland
xwayland.enable = true;
@ -294,7 +317,7 @@ in
# other commands
"$mod, Escape, exec, wlogout -p layer-shell"
"$mod, TAB, exec, hyprlock"
"$mod, TAB, exec, gtklock"
"$mod SHIFT, R, exec, hyprctl reload"
", Print, exec, grimblast --notify copysave area"