diff options
Diffstat (limited to 'bin')
| -rwxr-xr-x | bin/clamshell-toggle | 4 | ||||
| -rwxr-xr-x | bin/screenshot | 6 |
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 "$@" |
