mirror of
https://github.com/SebastianStork/nixos-config.git
synced 2026-01-21 16:21:34 +01:00
Improve deUtils dependency management
This commit is contained in:
parent
206c43f71a
commit
1f8cadb2dc
6 changed files with 32 additions and 9 deletions
13
modules/home/de-utils/brightnessctl.nix
Normal file
13
modules/home/de-utils/brightnessctl.nix
Normal file
|
|
@ -0,0 +1,13 @@
|
||||||
|
{
|
||||||
|
config,
|
||||||
|
pkgs,
|
||||||
|
lib,
|
||||||
|
...
|
||||||
|
}:
|
||||||
|
{
|
||||||
|
options.myConfig.deUtils.brightnessctl.enable = lib.mkEnableOption "";
|
||||||
|
|
||||||
|
config = lib.mkIf config.myConfig.deUtils.brightnessctl.enable {
|
||||||
|
home.packages = [ pkgs.brightnessctl ];
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
@ -8,6 +8,13 @@
|
||||||
options.myConfig.deUtils.cliphist.enable = lib.mkEnableOption "";
|
options.myConfig.deUtils.cliphist.enable = lib.mkEnableOption "";
|
||||||
|
|
||||||
config = lib.mkIf config.myConfig.deUtils.cliphist.enable {
|
config = lib.mkIf config.myConfig.deUtils.cliphist.enable {
|
||||||
|
assertions = [
|
||||||
|
{
|
||||||
|
assertion = config.myConfig.deUtils.rofi.enable;
|
||||||
|
message = "cliphist requires rofi";
|
||||||
|
}
|
||||||
|
];
|
||||||
|
|
||||||
services.cliphist = {
|
services.cliphist = {
|
||||||
enable = true;
|
enable = true;
|
||||||
allowImages = false;
|
allowImages = false;
|
||||||
|
|
|
||||||
|
|
@ -17,17 +17,17 @@
|
||||||
|
|
||||||
settings = {
|
settings = {
|
||||||
general = {
|
general = {
|
||||||
lock_cmd = "pidof hyprlock || hyprlock";
|
lock_cmd = lib.mkIf config.myConfig.deUtils.hyprlock.enable "pidof hyprlock || hyprlock";
|
||||||
before_sleep_cmd = "loginctl lock-session";
|
before_sleep_cmd = "loginctl lock-session";
|
||||||
after_sleep_cmd = "hyprctl dispatch dpms on";
|
after_sleep_cmd = "hyprctl dispatch dpms on";
|
||||||
};
|
};
|
||||||
|
|
||||||
listener = [
|
listener = [
|
||||||
{
|
(lib.mkIf config.myConfig.deUtils.brightnessctl.enable {
|
||||||
timeout = 5 * 60;
|
timeout = 5 * 60;
|
||||||
on-timeout = "brightnessctl --save --exponent set 10%";
|
on-timeout = "brightnessctl --save --exponent set 10%";
|
||||||
on-resume = "brightnessctl --restore";
|
on-resume = "brightnessctl --restore";
|
||||||
}
|
})
|
||||||
{
|
{
|
||||||
timeout = 10 * 60;
|
timeout = 10 * 60;
|
||||||
on-timeout = "hyprctl dispatch dpms off";
|
on-timeout = "hyprctl dispatch dpms off";
|
||||||
|
|
|
||||||
|
|
@ -22,9 +22,7 @@
|
||||||
};
|
};
|
||||||
|
|
||||||
home.packages = [
|
home.packages = [
|
||||||
pkgs.wl-clipboard
|
|
||||||
pkgs.playerctl
|
pkgs.playerctl
|
||||||
pkgs.brightnessctl
|
|
||||||
pkgs.grimblast
|
pkgs.grimblast
|
||||||
];
|
];
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -83,9 +83,11 @@
|
||||||
bindel = SUPER ALT, down, exec, $volume-down
|
bindel = SUPER ALT, down, exec, $volume-down
|
||||||
bindl = SUPER ALT, M, exec, $mute-mic
|
bindl = SUPER ALT, M, exec, $mute-mic
|
||||||
|
|
||||||
# Adjust brightness
|
${lib.optionalString config.myConfig.deUtils.brightnessctl.enable ''
|
||||||
bindel = , XF86MonBrightnessUp, exec, brightnessctl --exponent set +2%
|
# Adjust brightness
|
||||||
bindel = , XF86MonBrightnessDown, exec, brightnessctl --exponent set 2%-
|
bindel = , XF86MonBrightnessUp, exec, brightnessctl --exponent set +2%
|
||||||
|
bindel = , XF86MonBrightnessDown, exec, brightnessctl --exponent set 2%-
|
||||||
|
''}
|
||||||
|
|
||||||
# Screenshot
|
# Screenshot
|
||||||
bind = , Print, exec, grimblast --notify --freeze copysave output
|
bind = , Print, exec, grimblast --notify --freeze copysave output
|
||||||
|
|
|
||||||
|
|
@ -3,7 +3,10 @@
|
||||||
|
|
||||||
home.stateVersion = "24.11";
|
home.stateVersion = "24.11";
|
||||||
|
|
||||||
myConfig.theme = "light";
|
myConfig = {
|
||||||
|
theme = "light";
|
||||||
|
deUtils.brightnessctl.enable = true;
|
||||||
|
};
|
||||||
|
|
||||||
wayland.windowManager.hyprland.settings.monitor = [
|
wayland.windowManager.hyprland.settings.monitor = [
|
||||||
"eDP-1,2880x1920@120,0x0,2,vrr,1"
|
"eDP-1,2880x1920@120,0x0,2,vrr,1"
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue