aboutsummaryrefslogtreecommitdiffstats
path: root/bin/qar-scrotmenu.sh
blob: 90aae41242043c562237100c3edb14f751452fc9 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
#!/bin/bash
# Screenshot menu, rofi themed by udt.
# Copyright (C) 2026 Danilo M. <danix@danix.xyz>
# Licensed under the GNU General Public License v2 only.

rofi_command=(rofi -theme ~/.config/rofi/udt/screenshot.rasi)

### Options ###
screen=""
area=""
# Variable passed to rofi
options="$screen\n$area"

chosen="$(echo -e "$options" | "${rofi_command[@]}" -dmenu -selected-row 1)"
case $chosen in
    $screen)
        grimblast -w 3 -n -t png copysave active
        ;;
    $area)
        grimblast -n -t png copysave area
        ;;
esac