aboutsummaryrefslogtreecommitdiff
path: root/bin
diff options
context:
space:
mode:
authorAlec Goncharow <alec@goncharow.dev>2025-02-09 10:54:12 -0500
committerAlec Goncharow <alec@goncharow.dev>2025-05-28 16:27:11 -0400
commit1a924cb0b24ba5799b3c4d5b550d940cfeb1a9df (patch)
tree2819f6bff8061c9b96540e945404d580aa74f84a /bin
parent43f27b977310b0f83075d5327855e92d9873b046 (diff)
many things.
Diffstat (limited to 'bin')
-rwxr-xr-xbin/clamshell-toggle4
-rwxr-xr-xbin/screenshot6
2 files changed, 6 insertions, 4 deletions
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 "$@"