mirror of
https://codeberg.org/hyperreal/bin
synced 2025-01-18 16:23:43 +01:00
Move rofimaim
This commit is contained in:
parent
d5503689a1
commit
43486196ad
@ -7,9 +7,9 @@
|
|||||||
# This is lifted from https://gitlab.com/vahnrr/rofi-menus and modified by
|
# This is lifted from https://gitlab.com/vahnrr/rofi-menus and modified by
|
||||||
# hyperreal <hyperreal64@pm.me> on 2023-09-06T15:09:58-05:00
|
# hyperreal <hyperreal64@pm.me> on 2023-09-06T15:09:58-05:00
|
||||||
|
|
||||||
save_location="${HOME}/screenshots"
|
save_location="${HOME}/sync/pictures/screenshots"
|
||||||
if ! test -d "${HOME}/screenshots"; then
|
if ! test -d "${HOME}/sync/pictures/screenshots"; then
|
||||||
mkdir "${HOME}/screenshots"
|
mkdir "${HOME}/sync/pictures/screenshots"
|
||||||
fi
|
fi
|
||||||
screenshot_path="$save_location/$(date +'%Y-%m-%d-%H%M%S').png"
|
screenshot_path="$save_location/$(date +'%Y-%m-%d-%H%M%S').png"
|
||||||
|
|
||||||
@ -17,18 +17,18 @@ screen=' Screen'
|
|||||||
area=' Select area'
|
area=' Select area'
|
||||||
window=' Window'
|
window=' Window'
|
||||||
|
|
||||||
chosen=$(printf '%s;%s;%s' "$screen" "$area" "$window" \
|
chosen=$(printf '%s;%s;%s' "$screen" "$area" "$window" |
|
||||||
| rofi -theme-str 'window { width: 10em; height: 10em; }' \
|
rofi -theme-str 'window { width: 10em; height: 10em; }' \
|
||||||
-P 'Screenshot' \
|
-P 'Screenshot' \
|
||||||
-dmenu \
|
-dmenu \
|
||||||
-sep ';' \
|
-sep ';' \
|
||||||
-selected-row 1)
|
-selected-row 1)
|
||||||
|
|
||||||
case "$chosen" in
|
case "$chosen" in
|
||||||
"$screen") extra_args='--delay=1' ;;
|
"$screen") extra_args='--delay=1' ;;
|
||||||
"$area") extra_args='--delay=0.1 --select --highlight --color=0.85,0.87,0.91,0.2' ;;
|
"$area") extra_args='--delay=0.1 --select --highlight --color=0.85,0.87,0.91,0.2' ;;
|
||||||
"$window") extra_args="--delay=1 --window=$(xdotool getactivewindow)" ;;
|
"$window") extra_args="--delay=1 --window=$(xdotool getactivewindow)" ;;
|
||||||
*) exit 1 ;;
|
*) exit 1 ;;
|
||||||
esac
|
esac
|
||||||
|
|
||||||
# The variable is used as a command's options, so it shouldn't be quoted.
|
# The variable is used as a command's options, so it shouldn't be quoted.
|
Loading…
Reference in New Issue
Block a user