Skip to content

Commit

Permalink
fix systemd-run in printscreen
Browse files Browse the repository at this point in the history
  • Loading branch information
GoldsteinE committed Aug 6, 2024
1 parent 86d0432 commit 5291332
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions home/desktop/wayland.nix
Original file line number Diff line number Diff line change
Expand Up @@ -55,15 +55,15 @@
| "\(.rect.x+.window_rect.x),\(.rect.y+.window_rect.y) \(.window_rect.width)x\(.window_rect.height)"
'';
printScreen = pkgs.writeShellScript "printscreen.sh" ''
# systemd-run prevents double-start
swaymsg -t get_tree \
| jq -r -f "${visibleWindowsJq}" \
| slurp \
| systemd-run --quiet --user --scope --unit printscr slurp \
| grim -g - - \
| wl-copy --type image/png
'';
in
# Prevent double-start.
"exec systemd-run --user --scope --unit printscr ${printScreen}";
"exec ${printScreen}";
"shift+Print" = "exec grim - | wl-copy --type image/png";
"XF86AudioMicMute" = "exec pamixer --default-source --toggle-mute";
# notification control
Expand Down

0 comments on commit 5291332

Please sign in to comment.