feat(hyprland): migrate desktop utility bindings
This commit was merged in pull request #160.
This commit is contained in:
@@ -28,6 +28,14 @@ in
|
|||||||
lib.mkEnableOption "cliphist clipboard history";
|
lib.mkEnableOption "cliphist clipboard history";
|
||||||
|
|
||||||
config = lib.mkIf config.modules.desktop.utilities.clipboard.enable {
|
config = lib.mkIf config.modules.desktop.utilities.clipboard.enable {
|
||||||
|
registry.keybind.${config.networking.hostName}.clipboard-history = {
|
||||||
|
keys = "SUPER + SHIFT + V";
|
||||||
|
action = {
|
||||||
|
kind = "exec";
|
||||||
|
command = "${picker}";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
home-manager.users.${user} = {
|
home-manager.users.${user} = {
|
||||||
# wl-copy and wl-paste on PATH, so the shell can pipe into and out of the
|
# wl-copy and wl-paste on PATH, so the shell can pipe into and out of the
|
||||||
# clipboard.
|
# clipboard.
|
||||||
@@ -38,13 +46,6 @@ in
|
|||||||
# Two watchers record text and images to history, bound to the graphical
|
# Two watchers record text and images to history, bound to the graphical
|
||||||
# session so uwsm starts and stops them with it.
|
# session so uwsm starts and stops them with it.
|
||||||
services.cliphist.enable = true;
|
services.cliphist.enable = true;
|
||||||
|
|
||||||
# $mod is defined by the compositor config these binds share.
|
|
||||||
/*
|
|
||||||
wayland.windowManager.hyprland.settings.bind = [
|
|
||||||
"$mod SHIFT, V, exec, ${picker}"
|
|
||||||
];
|
|
||||||
*/
|
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -6,8 +6,6 @@
|
|||||||
}:
|
}:
|
||||||
# Keybound screen recording: pick a region, then toggle a video-only capture.
|
# Keybound screen recording: pick a region, then toggle a video-only capture.
|
||||||
let
|
let
|
||||||
user = config.user.name;
|
|
||||||
|
|
||||||
slurp = "${pkgs.slurp}/bin/slurp";
|
slurp = "${pkgs.slurp}/bin/slurp";
|
||||||
wf-recorder = "${pkgs.wf-recorder}/bin/wf-recorder";
|
wf-recorder = "${pkgs.wf-recorder}/bin/wf-recorder";
|
||||||
notify-send = "${pkgs.libnotify}/bin/notify-send";
|
notify-send = "${pkgs.libnotify}/bin/notify-send";
|
||||||
@@ -44,13 +42,13 @@ in
|
|||||||
lib.mkEnableOption "wf-recorder screen recording";
|
lib.mkEnableOption "wf-recorder screen recording";
|
||||||
|
|
||||||
config = lib.mkIf config.modules.desktop.utilities.recording.enable {
|
config = lib.mkIf config.modules.desktop.utilities.recording.enable {
|
||||||
home-manager.users.${user} = {
|
registry.keybind.${config.networking.hostName}.recording-toggle = {
|
||||||
# $mod is defined by the compositor config these binds share.
|
keys = "SUPER + SHIFT + R";
|
||||||
/*
|
action = {
|
||||||
wayland.windowManager.hyprland.settings.bind = [
|
kind = "exec";
|
||||||
"$mod SHIFT, R, exec, ${toggle}"
|
command = "${toggle}";
|
||||||
];
|
};
|
||||||
*/
|
|
||||||
};
|
};
|
||||||
|
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -37,27 +37,42 @@ in
|
|||||||
lib.mkEnableOption "screenshots via grimblast and satty";
|
lib.mkEnableOption "screenshots via grimblast and satty";
|
||||||
|
|
||||||
config = lib.mkIf config.modules.desktop.utilities.screenshot.enable {
|
config = lib.mkIf config.modules.desktop.utilities.screenshot.enable {
|
||||||
|
registry.keybind.${config.networking.hostName} = {
|
||||||
|
screenshot-area = {
|
||||||
|
keys = "Print";
|
||||||
|
action = {
|
||||||
|
kind = "exec";
|
||||||
|
command = "${capture "area"}";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
screenshot-active = {
|
||||||
|
keys = "SHIFT + Print";
|
||||||
|
action = {
|
||||||
|
kind = "exec";
|
||||||
|
command = "${capture "active"}";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
screenshot-screen = {
|
||||||
|
keys = "CTRL + Print";
|
||||||
|
action = {
|
||||||
|
kind = "exec";
|
||||||
|
command = "${capture "screen"}";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
home-manager.users.${user} = {
|
home-manager.users.${user} = {
|
||||||
# satty is a one-shot annotation surface, so float it rather than letting
|
# satty is a one-shot annotation surface, so float it rather than letting
|
||||||
# it claim a tile in the layout.
|
# it claim a tile in the layout.
|
||||||
# windowrule v3 syntax: space-separated field/value tokens, comma
|
wayland.windowManager.hyprland.settings.window_rule = [
|
||||||
# separated, with matchers under a match: prefix and effects bare.
|
{
|
||||||
/*
|
match.class = "^(com\\.gabm\\.satty)$";
|
||||||
wayland.windowManager.hyprland.settings.windowrule = [
|
float = true;
|
||||||
"float 1, match:class ^(com\\.gabm\\.satty)$"
|
}
|
||||||
];
|
];
|
||||||
*/
|
|
||||||
|
|
||||||
# Print with plain/Shift/Ctrl for region/window/full.
|
|
||||||
# Super+L is already the hjkl focus and movement bind, so screenshots take
|
|
||||||
# the Print key instead.
|
|
||||||
/*
|
|
||||||
wayland.windowManager.hyprland.settings.bind = [
|
|
||||||
", Print, exec, ${capture "area"}"
|
|
||||||
"SHIFT, Print, exec, ${capture "active"}"
|
|
||||||
"CTRL, Print, exec, ${capture "screen"}"
|
|
||||||
];
|
|
||||||
*/
|
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user