~ruther/guix-config

d6793e0a8bb74b5bce4188b5efc707879242afa4 — Rutherther 7 months ago ad27cab
feat: add printscreen script
2 files changed, 15 insertions(+), 3 deletions(-)

A home/dotfiles/dwl/print.sh
M home/home-configuration.scm
A home/dotfiles/dwl/print.sh => home/dotfiles/dwl/print.sh +13 -0
@@ 0,0 1,13 @@
#!/bin/sh -e

out="$HOME/screens/$(date +%Y/%Y%m%d_%H%M%S).png"

while getopts o:s arg; do case $arg in
                            o) out="$OPTARG" ;;
                            s) sel="$(slurp -o)" ;;
                            ?|*) echo "usage: shot [-s] [-o out]" >&2; exit 1 ;;
                          esac; done

grim ''${sel:+ -g "$sel"} "$out"
echo "$out"
wl-copy -t image/png < "$out"

M home/home-configuration.scm => home/home-configuration.scm +2 -3
@@ 92,9 92,8 @@
                    (".config/waybar/style.css" ,(local-file "dotfiles/waybar/style.css"))
                    (".config/mako/config" ,(local-file "dotfiles/mako"))

                    ;; (".config/zsh/plugins" ,(directory-union
                    ;;                          "zsh-plugins"
                    ;;                          (list zsh-autosuggestions zsh-syntax-highlighting)))
                    (".config/dwl/scripts/print.sh" ,(local-file "dotfiles/dwl/print.sh"))

                    (".config/zsh/plugins" ,#~(string-append #$(directory-union
                                                                "zsh-plugins"
                                                                (list zsh-autosuggestions zsh-syntax-highlighting))

Do not follow this link