Add screenshot menu and update prompt
Signed-off-by: Severin Kaderli <severin@kaderli.dev>
This commit is contained in:
parent
d25e3618c4
commit
1792013f37
8 changed files with 214 additions and 9 deletions
34
system/.local/bin/screenshot
Executable file
34
system/.local/bin/screenshot
Executable file
|
@ -0,0 +1,34 @@
|
|||
#!/usr/bin/env bash
|
||||
#
|
||||
# SCRIPT NAME:
|
||||
# screenshot
|
||||
#
|
||||
# AUTHOR:
|
||||
# Severin Kaderli <severin@kaderli.dev>
|
||||
#
|
||||
# DESCRIPTION:
|
||||
# Displays a screenshot menu using rofi.
|
||||
#
|
||||
# USAGE:
|
||||
# ./screenshot
|
||||
|
||||
# The rofi prompt
|
||||
PROMPT="Screenshot"
|
||||
|
||||
# Actions for the menu
|
||||
ACTIONS=(
|
||||
"1: Fullscreen"
|
||||
"2: Selection"
|
||||
)
|
||||
|
||||
FILENAME="${HOME}/Pictures/Screenshots/%Y-%m-%d-%H%I%S.png"
|
||||
|
||||
SELECTION=$(printf '%s\n' "${ACTIONS[@]}" | rofi -dmenu -p "${PROMPT}" | cut -d ":" -f1)
|
||||
case "${SELECTION}" in
|
||||
"1")
|
||||
escrotum "${FILENAME}"
|
||||
;;
|
||||
"2")
|
||||
escrotum -s "${FILENAME}"
|
||||
;;
|
||||
esac
|
Loading…
Add table
Add a link
Reference in a new issue