init
This commit is contained in:
34
rofi/scripts/screenshot/screenshot
Executable file
34
rofi/scripts/screenshot/screenshot
Executable file
@@ -0,0 +1,34 @@
|
||||
#!/bin/bash
|
||||
|
||||
if [ "$1" = "--freeze" ]; then
|
||||
extra_args="--freeze"
|
||||
fi
|
||||
|
||||
# variables
|
||||
theme="$HOME/.config/rofi/scripts/screenshot/style.rasi"
|
||||
hyprshot="$HOME/.config/hypr/scripts/hyprshot"
|
||||
save_dir="$HOME/pictures/screenshots/pc"
|
||||
filename="captura-$(date +%Y-%m-%d-%s).png"
|
||||
command="$hyprshot -o $save_dir -f $filename $extra_args"
|
||||
|
||||
# options to be displayed
|
||||
region=""
|
||||
output=""
|
||||
window=""
|
||||
folder=""
|
||||
|
||||
selected="$(echo -e "$region\n$output\n$window\n$folder" | rofi -dmenu -theme "${theme}")"
|
||||
case $selected in
|
||||
$region)
|
||||
$command -m region
|
||||
;;
|
||||
$output)
|
||||
$command -m output
|
||||
;;
|
||||
$window)
|
||||
$command -m window
|
||||
;;
|
||||
$folder)
|
||||
~/.config/rofi/scripts/screenshot/screenshot_selection
|
||||
;;
|
||||
esac
|
||||
Reference in New Issue
Block a user