From 0287ca21fcd215e5a61ca736ea3905bac5756ed4 Mon Sep 17 00:00:00 2001 From: Justine Smithies Date: Fri, 13 Oct 2023 22:10:04 +0100 Subject: Fixed screenshot keybinds --- .local/bin/screenshot.sh | 15 ++------------- 1 file changed, 2 insertions(+), 13 deletions(-) (limited to '.local/bin') diff --git a/.local/bin/screenshot.sh b/.local/bin/screenshot.sh index 29c62c8..088c1b1 100755 --- a/.local/bin/screenshot.sh +++ b/.local/bin/screenshot.sh @@ -9,21 +9,10 @@ case $1 in # Take a screenshot and save it to the clipboard grim -g "$(slurp -d)" - | wl-copy ;; - focused-window) - # Take a screenshot of the focused window - pos=$(qtile cmd-obj -o window -f get_position | awk '{ print $1" "$2}' | tr -dc '0-9 ') - xpos=$(echo $pos | awk '{ print $1 }') - ypos=$(echo $pos | awk '{ print $2 }') - size=$(qtile cmd-obj -o window -f get_size | awk '{ print $1" "$2}' | tr -dc '0-9 ') - xsize=$(echo $size | awk '{ print $1 }') - ysize=$(echo $size | awk '{ print $2 }') - xsize=$((xsize+4)) # Value added is 2 times the border width - ysize=$((ysize+4)) # Value added is 2 times the border width - grim -g "$xpos"",""$ypos $xsize""x""$ysize" -t jpeg ~/Pictures/Screenshots/$(date +%Y-%m-%d_%H-%m-%s).jpg - ;; *) # Take a screenshot of the currently focused output and save it into screenshots - output="$(qtile cmd-obj -o core -f eval -a "self._current_output.wlr_output.name" | awk -F"['']" '/,/{print $2}')" + output="$(lswt -j | jq -c '.[] | select(.activated) | .outputs' | awk -F'["" +]' '{print $2}')" grim -o $output -t jpeg ~/Pictures/Screenshots/$(date +%Y-%m-%d_%H-%m-%s).jpg ;; esac -- cgit v1.2.3