From 1a924cb0b24ba5799b3c4d5b550d940cfeb1a9df Mon Sep 17 00:00:00 2001 From: Alec Goncharow Date: Sun, 9 Feb 2025 10:54:12 -0500 Subject: many things. --- bin/clamshell-toggle | 4 ++-- bin/screenshot | 6 ++++-- 2 files changed, 6 insertions(+), 4 deletions(-) (limited to 'bin') diff --git a/bin/clamshell-toggle b/bin/clamshell-toggle index 12997e9..54496e0 100755 --- a/bin/clamshell-toggle +++ b/bin/clamshell-toggle @@ -1,6 +1,6 @@ #!/usr/bin/bash if grep -q open /proc/acpi/button/lid/LID0/state; then - swaymsg output eDP-1 enable + swaymsg output eDP-2 enable else - swaymsg output eDP-1 disable + swaymsg output eDP-2 disable fi diff --git a/bin/screenshot b/bin/screenshot index 94e3bd3..3852fa5 100755 --- a/bin/screenshot +++ b/bin/screenshot @@ -12,11 +12,13 @@ FOCUSED=$(swaymsg -t get_tree | jq '.. | (.nodes? // empty)[] | select(.focused) main() { rect="$(slurp)" if [ $? -eq 0 ]; then - grim -g "$rect" -t png - | wl-copy -t image/png + grim -g "$rect" ~/screenshot.png else - grim -g "$(eval echo "$FOCUSED")" -t png - | wl-copy -t image/png + grim -g "$(eval echo "$FOCUSED")" ~/screenshot.png + fi + cat ~/screenshot.png | wl-copy -t image/png } main "$@" -- cgit v1.2.3-70-g09d2