framework: add idle, lock, waybar, mako
This commit is contained in:
parent
f7307329ab
commit
622fc07b5a
4 changed files with 83 additions and 68 deletions
|
|
@ -6,18 +6,11 @@
|
|||
}: let
|
||||
modifier = config.windowManager.modifierKey;
|
||||
menu = config.programs.menu.dmenuCommand;
|
||||
lock_cmd = "${config.programs.hyprlock.package}/bin/hyprlock";
|
||||
color = {
|
||||
inherit (config.lib.stylix.colors) yellow red;
|
||||
bg = config.lib.stylix.colors.base00;
|
||||
fg = config.lib.stylix.colors.base07;
|
||||
text = config.lib.stylix.colors.base05;
|
||||
};
|
||||
rgb = color: "rgb(${color})";
|
||||
in {
|
||||
imports = [
|
||||
(import ../utils/waybar.nix)
|
||||
(import ../utils/display.nix)
|
||||
(import ../utils/hypridle.nix)
|
||||
../../workstation.nix
|
||||
];
|
||||
xdg.portal = {
|
||||
|
|
@ -26,64 +19,6 @@ in {
|
|||
extraPortals = [pkgs.xdg-desktop-portal-gtk pkgs.xdg-desktop-portal-wlr];
|
||||
};
|
||||
|
||||
services.hypridle = {
|
||||
enable = true;
|
||||
settings = {
|
||||
general = {
|
||||
before_sleep_cmd = "rbw lock; hyprlock";
|
||||
after_sleep_cmd = "hyprctl dispatch dpms on";
|
||||
ignore_dbus_inhibit = false;
|
||||
lock_cmd = "pidof ${lock_cmd} || ${lock_cmd}";
|
||||
};
|
||||
|
||||
listener = [
|
||||
{
|
||||
timeout = 300;
|
||||
on-timeout = "loginctl lock-session";
|
||||
}
|
||||
{
|
||||
timeout = 1200;
|
||||
on-timeout = "hyprctl dispatch dpms off";
|
||||
on-resume = "hyprctl dispatch dpms on";
|
||||
}
|
||||
];
|
||||
};
|
||||
};
|
||||
|
||||
programs.hyprlock = {
|
||||
enable = true;
|
||||
settings = lib.mkForce {
|
||||
# https://wiki.hyprland.org/Hypr-Ecosystem/hyprlock/
|
||||
general = {
|
||||
hide_cursor = true;
|
||||
grace = 10;
|
||||
ignore_empty_input = true;
|
||||
};
|
||||
|
||||
background = [
|
||||
{
|
||||
path = "screenshot";
|
||||
blur_passes = 3;
|
||||
blur_size = 8;
|
||||
}
|
||||
];
|
||||
|
||||
input-field = [
|
||||
{
|
||||
dots_center = true;
|
||||
fade_on_empty = true;
|
||||
outline_thickness = 5;
|
||||
shadow_passes = 2;
|
||||
inner_color = rgb color.bg;
|
||||
outer_color = rgb color.fg;
|
||||
font_color = rgb color.text;
|
||||
fail_color = rgb color.red;
|
||||
check_color = rgb color.yellow;
|
||||
}
|
||||
];
|
||||
};
|
||||
};
|
||||
|
||||
wayland.windowManager.hyprland = {
|
||||
enable = true;
|
||||
systemd = {
|
||||
|
|
|
|||
|
|
@ -4,6 +4,12 @@
|
|||
config,
|
||||
...
|
||||
}: {
|
||||
imports = [
|
||||
(import ../utils/hypridle.nix)
|
||||
(import ../utils/waybar.nix)
|
||||
../../workstation.nix
|
||||
];
|
||||
|
||||
programs.fuzzel = {
|
||||
enable = true;
|
||||
settings = {
|
||||
|
|
@ -15,15 +21,18 @@
|
|||
};
|
||||
services.hyprpaper.enable = true;
|
||||
systemd.user.services.hyprpaper.Unit.WantedBy = ["niri.service"];
|
||||
systemd.user.services.waybar.Unit.WantedBy = ["niri.service"];
|
||||
|
||||
home.packages = with pkgs; [brightnessctl];
|
||||
|
||||
services.mako.enable = true;
|
||||
systemd.user.services.mako.Unit.WantedBy = ["niri.service"];
|
||||
programs.niri = {
|
||||
settings = {
|
||||
input.keyboard = {
|
||||
xkb.layout = "us";
|
||||
xkb.variant = "dvorak";
|
||||
xkb.options = "caps:escape";
|
||||
};
|
||||
input.mouse = {
|
||||
accel-profile = "flat";
|
||||
|
|
@ -34,7 +43,6 @@
|
|||
prefer-no-csd = true;
|
||||
spawn-at-startup = [
|
||||
{command = [(lib.getExe pkgs.xwayland-satellite)];}
|
||||
{command = [(lib.getExe config.services.mako.package)];}
|
||||
];
|
||||
binds = with config.lib.niri.actions; {
|
||||
"Mod+Return".action.spawn = [(lib.getExe config.programs.terminal)];
|
||||
|
|
|
|||
72
home/desktop/utils/hypridle.nix
Normal file
72
home/desktop/utils/hypridle.nix
Normal file
|
|
@ -0,0 +1,72 @@
|
|||
{
|
||||
config,
|
||||
lib,
|
||||
...
|
||||
}: let
|
||||
rgb = color: "rgb(${color})";
|
||||
lock_cmd = "${config.programs.hyprlock.package}/bin/hyprlock";
|
||||
color = {
|
||||
inherit (config.lib.stylix.colors) yellow red;
|
||||
bg = config.lib.stylix.colors.base00;
|
||||
fg = config.lib.stylix.colors.base07;
|
||||
text = config.lib.stylix.colors.base05;
|
||||
};
|
||||
in {
|
||||
services.hypridle = {
|
||||
enable = true;
|
||||
settings = {
|
||||
general = {
|
||||
before_sleep_cmd = "rbw lock; hyprlock";
|
||||
after_sleep_cmd = "hyprctl dispatch dpms on";
|
||||
ignore_dbus_inhibit = false;
|
||||
lock_cmd = "pidof ${lock_cmd} || ${lock_cmd}";
|
||||
};
|
||||
|
||||
listener = [
|
||||
{
|
||||
timeout = 300;
|
||||
on-timeout = "loginctl lock-session";
|
||||
}
|
||||
{
|
||||
timeout = 1200;
|
||||
on-timeout = "hyprctl dispatch dpms off";
|
||||
on-resume = "hyprctl dispatch dpms on";
|
||||
}
|
||||
];
|
||||
};
|
||||
};
|
||||
|
||||
programs.hyprlock = {
|
||||
enable = true;
|
||||
settings = lib.mkForce {
|
||||
# https://wiki.hyprland.org/Hypr-Ecosystem/hyprlock/
|
||||
general = {
|
||||
hide_cursor = true;
|
||||
grace = 10;
|
||||
ignore_empty_input = true;
|
||||
};
|
||||
|
||||
background = [
|
||||
{
|
||||
path = "screenshot";
|
||||
blur_passes = 3;
|
||||
blur_size = 8;
|
||||
}
|
||||
];
|
||||
|
||||
input-field = [
|
||||
{
|
||||
dots_center = true;
|
||||
fade_on_empty = true;
|
||||
outline_thickness = 5;
|
||||
shadow_passes = 2;
|
||||
inner_color = rgb color.bg;
|
||||
outer_color = rgb color.fg;
|
||||
font_color = rgb color.text;
|
||||
fail_color = rgb color.red;
|
||||
check_color = rgb color.yellow;
|
||||
}
|
||||
];
|
||||
};
|
||||
};
|
||||
}
|
||||
|
|
@ -9,7 +9,7 @@
|
|||
height = 36;
|
||||
modules-right = ["mpris" "idle_inhibitor" "pulseaudio" "clock" "tray" "battery"];
|
||||
clock = {
|
||||
format = "📅 {:%a %b-%d %I:%M %p}";
|
||||
format = "📅 {:%a %b-%d lib, %I:%M %p}";
|
||||
};
|
||||
idle_inhibitor = {
|
||||
format = "{icon}";
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue