diff --git a/hosts/default/configuration.nix b/hosts/default/configuration.nix
index 634d1c2..a450c26 100644
--- a/hosts/default/configuration.nix
+++ b/hosts/default/configuration.nix
@@ -37,11 +37,14 @@
defaultLocale = "en_US.UTF-8";
inputMethod = {
enabled = "fcitx5";
- fcitx5.addons = with pkgs; [
- fcitx5-mozc
- fcitx5-gtk
- fcitx5-chinese-addons
- ];
+ fcitx5 = {
+ # waylandFrontend = true;
+ addons = with pkgs; [
+ fcitx5-mozc
+ fcitx5-gtk
+ fcitx5-chinese-addons
+ ];
+ };
};
};
diff --git a/modules/desktop/hyprland.nix b/modules/desktop/hyprland.nix
index 4085974..4edadc6 100644
--- a/modules/desktop/hyprland.nix
+++ b/modules/desktop/hyprland.nix
@@ -305,15 +305,69 @@
submap = reset
'';
};
- # programs.hyprlock = {
- # enable = true;
- # general = { };
- # backgrounds = [
- # {
- # path = "$HOME/pictures/wallpapers/desert.jpg";
- # }
- # ];
- # };
- # programs.hypridle = {
- # };
+ lib.inputMethod.fcitx5.waylandFrontend = true;
+ programs.hyprlock = {
+ enable = true;
+ general = { };
+ backgrounds = [
+ {
+ path = "/home/liamm/pictures/desert.png";
+ }
+ ];
+ 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 = "Input Password...";
+ fail_text = "$FAIL ($ATTEMPTS)";
+ }
+ ];
+ 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
+ }
+ ];
+ };
+ };
}