mirror of
https://github.com/Theaninova/TheaninovOS.git
synced 2025-12-12 11:36:20 +00:00
improvements
This commit is contained in:
28
modules/nixos/shell/hyprpicker.nix
Normal file
28
modules/nixos/shell/hyprpicker.nix
Normal file
@@ -0,0 +1,28 @@
|
||||
{
|
||||
config,
|
||||
lib,
|
||||
pkgs,
|
||||
username,
|
||||
...
|
||||
}:
|
||||
|
||||
let
|
||||
cfg = config.shell.components.hyprpicker;
|
||||
in
|
||||
{
|
||||
options.shell.components.hyprpicker = {
|
||||
enable = lib.mkEnableOption (lib.mdDoc "Enable a pre-configured hyprpicker");
|
||||
};
|
||||
|
||||
config = lib.mkIf cfg.enable {
|
||||
home-manager.users.${username}.wayland.windowManager.hyprland.settings.bind =
|
||||
let
|
||||
color-picker = pkgs.writeShellScript "color-picker" ''
|
||||
${lib.getExe pkgs.hyprpicker} | ${pkgs.wl-clipboard}/bin/wl-copy
|
||||
'';
|
||||
in
|
||||
[
|
||||
"SUPER_SHIFT,C,exec,uwsm app -- ${color-picker}"
|
||||
];
|
||||
};
|
||||
}
|
||||
Reference in New Issue
Block a user