.
This commit is contained in:
@@ -37,13 +37,16 @@
|
|||||||
defaultLocale = "en_US.UTF-8";
|
defaultLocale = "en_US.UTF-8";
|
||||||
inputMethod = {
|
inputMethod = {
|
||||||
enabled = "fcitx5";
|
enabled = "fcitx5";
|
||||||
fcitx5.addons = with pkgs; [
|
fcitx5 = {
|
||||||
|
# waylandFrontend = true;
|
||||||
|
addons = with pkgs; [
|
||||||
fcitx5-mozc
|
fcitx5-mozc
|
||||||
fcitx5-gtk
|
fcitx5-gtk
|
||||||
fcitx5-chinese-addons
|
fcitx5-chinese-addons
|
||||||
];
|
];
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
};
|
||||||
|
|
||||||
# Enable the X11 windowing system.
|
# Enable the X11 windowing system.
|
||||||
services = {
|
services = {
|
||||||
|
|||||||
@@ -305,15 +305,69 @@
|
|||||||
submap = reset
|
submap = reset
|
||||||
'';
|
'';
|
||||||
};
|
};
|
||||||
# programs.hyprlock = {
|
lib.inputMethod.fcitx5.waylandFrontend = true;
|
||||||
# enable = true;
|
programs.hyprlock = {
|
||||||
# general = { };
|
enable = true;
|
||||||
# backgrounds = [
|
general = { };
|
||||||
# {
|
backgrounds = [
|
||||||
# path = "$HOME/pictures/wallpapers/desert.jpg";
|
{
|
||||||
# }
|
path = "/home/liamm/pictures/desert.png";
|
||||||
# ];
|
}
|
||||||
# };
|
];
|
||||||
# programs.hypridle = {
|
input-fields = [
|
||||||
# };
|
{
|
||||||
|
outline_thickness = 2;
|
||||||
|
outer_color = "#fe0b00";
|
||||||
|
inner_color = "#0c0c0c";
|
||||||
|
font_color = "#efefef";
|
||||||
|
check_color = "#0eff0d";
|
||||||
|
fail_color = "#ff009e";
|
||||||
|
capslock_color = "#bb00ee";
|
||||||
|
placeholder_text = "<i>Input Password...</i>";
|
||||||
|
fail_text = "<i>$FAIL <b>($ATTEMPTS)</b></i>";
|
||||||
|
}
|
||||||
|
];
|
||||||
|
labels = [
|
||||||
|
{
|
||||||
|
text = "$TIME";
|
||||||
|
color = "";
|
||||||
|
font_size = 28;
|
||||||
|
font_family = builtins.head osConfig.fonts.fontconfig.defaultFonts.sansSerif;
|
||||||
|
}
|
||||||
|
];
|
||||||
|
};
|
||||||
|
|
||||||
|
services = {
|
||||||
|
hypridle = {
|
||||||
|
enable = true;
|
||||||
|
lockCmd = "${pkgs.procps}/bin/pidof hyprlock || ${pkgs.hyprlock}/bin/hyprlock"; # avoid starting multiple sessions
|
||||||
|
beforeSleepCmd = "${pkgs.systemd}/bin/loginctl lock-session"; # lock before suspend.
|
||||||
|
afterSleepCmd = "${pkgs.hyprland}/bin/hyprctl dispatch dpms on"; # to avoid having to hit key twice to turn on display
|
||||||
|
listeners = [
|
||||||
|
{
|
||||||
|
timeout = 120;
|
||||||
|
onTimeout = "${pkgs.brightnessctl}/bin/brightnessctl -s set 10"; # set monitor backlight to minimum, avoid 0 on OLED monitor.
|
||||||
|
onResume = "${pkgs.brightnessctl}/bin/brightnessctl -r"; # monitor backlight restor.
|
||||||
|
}
|
||||||
|
{
|
||||||
|
timeout = 120;
|
||||||
|
onTimeout = "${pkgs.brightnessctl}/bin/brightnessctl -sd rgb:kbd_backlight set 0"; # turn off keyboard backlight.
|
||||||
|
onResume = "${pkgs.brightnessctl}/bin/brightnessctl -rd rgb:kbd_backlight"; # turn on keyboard backlight.
|
||||||
|
}
|
||||||
|
{
|
||||||
|
timeout = 180;
|
||||||
|
onTimeout = "${pkgs.systemd}/bin/loginctl lock-session"; # lock screen when timeout has passed
|
||||||
|
}
|
||||||
|
{
|
||||||
|
timeout = 300;
|
||||||
|
onTimeout = "${pkgs.hyprland}/bin/hyprctl dispatch dpms off"; # screen off when timeout has passed
|
||||||
|
onResume = "${pkgs.hyprland}/bin/hyprctl dispatch dpms on"; # screen on when activity is detected after timeout has fired.
|
||||||
|
}
|
||||||
|
{
|
||||||
|
timeout = 300;
|
||||||
|
onTimeout = "${pkgs.systemd}/bin/systemctl suspend"; # suspend pc
|
||||||
|
}
|
||||||
|
];
|
||||||
|
};
|
||||||
|
};
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user