wip
This commit is contained in:
parent
89fad4e748
commit
30641c67f9
@ -27,6 +27,7 @@ LIST+=(
|
|||||||
# native
|
# native
|
||||||
"screen_pick" "screenshot output"
|
"screen_pick" "screenshot output"
|
||||||
"screen_pick" "screenshot selection"
|
"screen_pick" "screenshot selection"
|
||||||
|
"screen_pick" "color-picker"
|
||||||
"todo" "pass"
|
"todo" "pass"
|
||||||
"calc" "calc"
|
"calc" "calc"
|
||||||
"todo" "translate ru-en"
|
"todo" "translate ru-en"
|
||||||
@ -95,14 +96,22 @@ exec_man() {
|
|||||||
[ -n "$page" ] && exec footclient "$SHELL" -c "man '$page' || read -n1"
|
[ -n "$page" ] && exec footclient "$SHELL" -c "man '$page' || read -n1"
|
||||||
}
|
}
|
||||||
exec_screen_pick() {
|
exec_screen_pick() {
|
||||||
shift
|
if [ "$*" = "screenshot output" ]; then
|
||||||
if [ "$1" = "output" ]; then
|
|
||||||
mon="$(swaymsg -t get_outputs | jq -r '. | map(select(.focused == true)) | .[0].name')"
|
mon="$(swaymsg -t get_outputs | jq -r '. | map(select(.focused == true)) | .[0].name')"
|
||||||
grim -o "$mon" - | wl-copy -t image/png
|
grim -o "$mon" - | wl-copy -t image/png
|
||||||
elif [ "$1" = "selection" ]; then
|
notify-send Done -a screenshot "PNG image copied to clipboard" -t 3000
|
||||||
|
elif [ "$*" = "screenshot selection" ]; then
|
||||||
grim -g "$(slurp)" - | wl-copy -t image/png
|
grim -g "$(slurp)" - | wl-copy -t image/png
|
||||||
|
notify-send Done -a screenshot "PNG image copied to clipboard" -t 3000
|
||||||
|
elif [ "$*" = "color-picker" ]; then
|
||||||
|
hex="$(
|
||||||
|
grim -g "$(slurp -p)" -t ppm - | \
|
||||||
|
magick - -format '%[pixel:p{0,0}]' txt:- | \
|
||||||
|
tail -n 1 | \
|
||||||
|
cut -d ' ' -f 4
|
||||||
|
)"
|
||||||
|
notify-send "$hex" -a screenshot "stnrit" -t 3000
|
||||||
fi
|
fi
|
||||||
notify-send Done -a screenshot "PNG image copied to clipboard" -t 3000
|
|
||||||
}
|
}
|
||||||
exec_pass() {
|
exec_pass() {
|
||||||
echo 1
|
echo 1
|
||||||
|
Loading…
Reference in New Issue
Block a user