docs(hyprland): preserve disabled slice one config

This commit is contained in:
2026-10-10 12:49:57 -04:00
parent a2d078aa37
commit 56507866bb
6 changed files with 150 additions and 15 deletions

View File

@@ -1,13 +1,52 @@
{
config,
lib,
# pkgs,
...
}:
# The lock screen: a hyprlock session-lock surface the compositor owns.
let
user = config.user.name;
# The hyprlock this module installs, used by the lock keybind below.
/*
Slice 1 disables the lock keybinds, so their supporting values stay
commented out with the bind block.
# The hyprlock this module installs, used by the lock keybind below.
hyprlock = "${config.home-manager.users.${user}.programs.hyprlock.package}/bin/hyprlock";
sleepIcon = builtins.fromJSON ''"\udb81\udcb2"'';
sleepOffIcon = builtins.fromJSON ''"\udb81\udcb3"'';
idleLockToggle = pkgs.writeShellScript "lockscreen-idle-inhibit-toggle" ''
unit=lockscreen-idle-inhibit.service
refresh_waybar() {
${pkgs.procps}/bin/pkill -RTMIN+9 waybar >/dev/null 2>&1 || true
}
if ${pkgs.systemd}/bin/systemctl --user is-active --quiet "$unit"; then
${pkgs.systemd}/bin/systemctl --user stop "$unit"
refresh_waybar
${pkgs.swayosd}/bin/swayosd-client --custom-message "${sleepIcon}"
exit 0
fi
if ${pkgs.systemd}/bin/systemd-run \
--user \
--collect \
--unit=lockscreen-idle-inhibit \
--description="Disable idle-triggered screen locking" \
${pkgs.systemd}/bin/systemd-inhibit \
--what=idle \
--who=lockscreen-hotkey \
--why="lock screen disabled by hotkey" \
${pkgs.coreutils}/bin/sleep infinity >/dev/null; then
refresh_waybar
${pkgs.swayosd}/bin/swayosd-client --custom-message "${sleepOffIcon}"
fi
'';
*/
in
{
options.modules.desktop.session.hyprland.hyprlock.enable =

View File

@@ -1,11 +1,19 @@
{
config,
lib,
# pkgs,
...
}:
# mako as the notification daemon: toasts, a do-not-disturb mode, and history recall.
let
user = config.user.name;
/*
Slice 1 disables the Mako recall keybind, so its supporting value stays
commented out with the bind block.
makoctl = "${pkgs.mako}/bin/makoctl";
*/
in
{
options.modules.desktop.session.mako.enable = lib.mkEnableOption "the mako notification daemon";

View File

@@ -1,14 +1,31 @@
{
config,
lib,
# pkgs,
...
}:
# rofi as the desktop launcher and dmenu-style menu frontend.
let
user = config.user.name;
# A session menu built on the same themed rofi, so the power actions look
# like every other menu the launcher drives.
/*
Slice 1 disables the Rofi keybinds, so their supporting script stays
commented out with the bind block.
# A session menu built on the same themed rofi, so the power actions look
# like every other menu the launcher drives.
powerMenu = pkgs.writeShellScript "rofi-power-menu" ''
chosen=$(printf '%s\n' Lock Suspend 'Log out' Reboot 'Shut down' \
| ${pkgs.rofi}/bin/rofi -dmenu -i -p Power)
case "$chosen" in
Lock) ${pkgs.systemd}/bin/loginctl lock-session ;;
Suspend) ${pkgs.systemd}/bin/systemctl suspend ;;
'Log out') ${pkgs.systemd}/bin/loginctl terminate-session "$XDG_SESSION_ID" ;;
Reboot) ${pkgs.systemd}/bin/systemctl reboot ;;
'Shut down') ${pkgs.systemd}/bin/systemctl poweroff ;;
esac
'';
*/
in
{
options.modules.desktop.session.rofi.enable = lib.mkEnableOption "the rofi launcher";