Home Gen469 @ 2025-03-16-14:41
This commit is contained in:
parent
564555d4e9
commit
115c7d396c
@ -3,7 +3,34 @@
|
||||
pkgs,
|
||||
lib,
|
||||
...
|
||||
}: {
|
||||
}: let
|
||||
screenshot = pkgs.writeShellScriptBin "screenshot" ''
|
||||
region=0
|
||||
clip=0
|
||||
while [[ "$#" -gt 0 ]]; do
|
||||
case $1 in
|
||||
--region) region=1; ;;
|
||||
--clip) clip=1; ;;
|
||||
*) echo "Unknown parameter passed: $1"; exit 1 ;;
|
||||
esac
|
||||
shift
|
||||
done
|
||||
|
||||
if [[ $region -eq 1 ]]; then
|
||||
if [[ $clip -eq 1 ]]; then
|
||||
${pkgs.grim}/bin/grim -g "$(${pkgs.slurp}/bin/slurp)" | ${pkgs.wl-clipboard}/bin/wl-copy
|
||||
else
|
||||
${pkgs.grim}/bin/grim -g "$(${pkgs.slurp}/bin/slurp)" ~/Pictures/Screenshots/$(${pkgs.coreutils}/bin/date +'%Y-%m-%d_%H-%M-%S').png
|
||||
fi
|
||||
else
|
||||
if [[ $clip -eq 1 ]]; then
|
||||
${pkgs.grim}/bin/grim | ${pkgs.wl-clipboard}/bin/wl-copy
|
||||
else
|
||||
${pkgs.grim}/bin/grim ~/Pictures/Screenshots/$(${pkgs.coreutils}/bin/date +'%Y-%m-%d_%H-%M-%S').png
|
||||
fi
|
||||
fi
|
||||
'';
|
||||
in {
|
||||
services.hypridle.settings = {
|
||||
general = {
|
||||
# lock_cmd = notify-send "lock!" # dbus/sysd lock command (loginctl lock-session)
|
||||
@ -190,8 +217,10 @@
|
||||
"$mod, 9, exec, ${pkgs.hyprlock}/bin/hyprlock"
|
||||
"$mod, 0, exec, ${pkgs.wlogout}/bin/wlogout -b 5"
|
||||
"$mod, n, exec, ${pkgs.swaynotificationcenter}/bin/swaync-client -t"
|
||||
", Print, exec, ${pkgs.grim}/bin/grim -g \"\$(${pkgs.slurp}/slurp)\" ~/Pictures/Screenshots/$(date +'%Y-%m-%d_%H-%M-%S').png"
|
||||
"CTRL, Print, exec, ${pkgs.grim}/bin/grim -g \"\$(${pkgs.slurp}/slurp)\" | wl-copy"
|
||||
", Print, exec, ${screenshot}/bin/screenshot"
|
||||
"CTRL, Print, exec, ${screenshot}/bin/screenshot --region"
|
||||
"SHIFT, Print, exec, ${screenshot}/bin/screenshot --clip"
|
||||
"CTRL SHIFT, Print, exec, ${screenshot}/bin/screenshot --region --clip"
|
||||
]
|
||||
++ (
|
||||
# workspaces
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user