webp,jpg,png for screenshot tool
parent
89796239cf
commit
510e36fe0f
|
@ -849,7 +849,10 @@ case $LANG in
|
||||||
SCRNREC="Nagrywanie pulpitu"
|
SCRNREC="Nagrywanie pulpitu"
|
||||||
FULLREC="Pełny ekran"
|
FULLREC="Pełny ekran"
|
||||||
AREA="Obszar lub okno"
|
AREA="Obszar lub okno"
|
||||||
VIDEOSETTINGS="Ust. nagrywania"
|
SETTINGS="Ustawienia"
|
||||||
|
SCROTSETTINGS="Zrzuty ekranu"
|
||||||
|
EXTENSION="Typ obrazka (rozszerzenie)"
|
||||||
|
VIDEOSETTINGS="Ustawienia nagrywania"
|
||||||
AUDIO="Dźwięk"
|
AUDIO="Dźwięk"
|
||||||
FORMAT="Kontener (rozszerzenie)"
|
FORMAT="Kontener (rozszerzenie)"
|
||||||
FRAMERATE="Klatki na sekundę (fps)"
|
FRAMERATE="Klatki na sekundę (fps)"
|
||||||
|
@ -873,6 +876,9 @@ case $LANG in
|
||||||
SCRNREC="Grabador Captura Pantalla"
|
SCRNREC="Grabador Captura Pantalla"
|
||||||
FULLREC="Pantalla Completa "
|
FULLREC="Pantalla Completa "
|
||||||
AREA="Área seleccionada o Ventana"
|
AREA="Área seleccionada o Ventana"
|
||||||
|
SETTINGS="Ajustes"
|
||||||
|
SCROTSETTINGS="Screenshot settings"
|
||||||
|
EXTENSION="File type (extension)"
|
||||||
VIDEOSETTINGS="Ajustes de Grabación"
|
VIDEOSETTINGS="Ajustes de Grabación"
|
||||||
AUDIO="Audio"
|
AUDIO="Audio"
|
||||||
FORMAT="Formato de archivo (extension)"
|
FORMAT="Formato de archivo (extension)"
|
||||||
|
@ -897,6 +903,9 @@ case $LANG in
|
||||||
SCRNREC="Screen recording"
|
SCRNREC="Screen recording"
|
||||||
FULLREC="Full screen "
|
FULLREC="Full screen "
|
||||||
AREA="Selected Area or Window"
|
AREA="Selected Area or Window"
|
||||||
|
SETTINGS="Settings"
|
||||||
|
SCROTSETTINGS="Screenshot settings"
|
||||||
|
EXTENSION="File type (extension)"
|
||||||
VIDEOSETTINGS="Recording settings"
|
VIDEOSETTINGS="Recording settings"
|
||||||
AUDIO="Audio"
|
AUDIO="Audio"
|
||||||
FORMAT="Container (file extension)"
|
FORMAT="Container (file extension)"
|
||||||
|
@ -922,10 +931,7 @@ item_height_factor=300
|
||||||
|
|
||||||
[ -d $(xdg-user-dir PICTURES)/screenshots ] || mkdir -p $(xdg-user-dir PICTURES)/screenshots
|
[ -d $(xdg-user-dir PICTURES)/screenshots ] || mkdir -p $(xdg-user-dir PICTURES)/screenshots
|
||||||
|
|
||||||
IMG="$(xdg-user-dir PICTURES)/screenshots/Mabox_$(date +'%Y%m%d-%H-%M-%S').png"
|
|
||||||
VIEW="'viewnior $IMG'"
|
|
||||||
|
|
||||||
THUMB="$(DISPLAY=:0 scrot -t 340x213 -o $HOME/.config/mabox/jgscrot.png -e 'echo $m')"
|
|
||||||
|
|
||||||
# Video recordings
|
# Video recordings
|
||||||
CNF_FILE="$HOME"/.config/mabox/mb-screenrec.conf
|
CNF_FILE="$HOME"/.config/mabox/mb-screenrec.conf
|
||||||
|
@ -938,10 +944,20 @@ container=webm
|
||||||
record_audio=no
|
record_audio=no
|
||||||
#Framerate (frames per second)
|
#Framerate (frames per second)
|
||||||
framerate=30
|
framerate=30
|
||||||
|
# Screenshot file type/extension
|
||||||
|
image_extension=webp
|
||||||
EOF
|
EOF
|
||||||
fi
|
fi
|
||||||
. "$CNF_FILE"
|
. "$CNF_FILE"
|
||||||
|
|
||||||
|
EXT=${image_extension:-png}
|
||||||
|
|
||||||
|
|
||||||
|
IMG="$(xdg-user-dir PICTURES)/screenshots/Mabox_$(date +'%Y%m%d-%H-%M-%S').${EXT}"
|
||||||
|
VIEW="'viewnior $IMG'"
|
||||||
|
|
||||||
|
THUMB="$(DISPLAY=:0 scrot -t 340x213 -o $HOME/.config/mabox/jgscrot.png -e 'echo $m')"
|
||||||
|
|
||||||
if [ "$record_audio" == "yes" ];then
|
if [ "$record_audio" == "yes" ];then
|
||||||
case "$LANG" in
|
case "$LANG" in
|
||||||
pl*) AUD="dźwięk";;
|
pl*) AUD="dźwięk";;
|
||||||
|
@ -957,7 +973,7 @@ mkconfigfile
|
||||||
|
|
||||||
cat <<EOF > ${MENU_ITEMS}
|
cat <<EOF > ${MENU_ITEMS}
|
||||||
@icon,,$((jgtools_padding + 4)),$((jgtools_padding + 4)),340,100,4,left,top,,,$THUMB
|
@icon,,$((jgtools_padding + 4)),$((jgtools_padding + 4)),340,100,4,left,top,,,$THUMB
|
||||||
^sep($SCRNSHOTS)
|
^sep($SCRNSHOTS <small>($EXT)</small>)
|
||||||
$FULLSCR,^root(full)
|
$FULLSCR,^root(full)
|
||||||
$ACTIVE_WIN,^root(window)
|
$ACTIVE_WIN,^root(window)
|
||||||
$ACTIVE_WIN_NO_DECOR,^root(borderless)
|
$ACTIVE_WIN_NO_DECOR,^root(borderless)
|
||||||
|
@ -966,13 +982,14 @@ cat <<EOF > ${MENU_ITEMS}
|
||||||
# Multimonitor, scrot -m $IMG -e $VIEW
|
# Multimonitor, scrot -m $IMG -e $VIEW
|
||||||
^sep()
|
^sep()
|
||||||
$OPEN_SCR_DIR,xdg-open $(xdg-user-dir PICTURES)/screenshots
|
$OPEN_SCR_DIR,xdg-open $(xdg-user-dir PICTURES)/screenshots
|
||||||
^sep($SCRNREC)
|
^sep($SCRNREC <small>($container ${AUD} $framerate fps)</small>)
|
||||||
$FULLREC,mb-screenrec -f
|
$FULLREC,mb-screenrec -f
|
||||||
$AREA,mb-screenrec -a
|
$AREA,mb-screenrec -a
|
||||||
^sep()
|
^sep()
|
||||||
|
|
||||||
$VIDEOSETTINGS [ <small><b>$container</b> / <b>${AUD}</b> / <b>$framerate fps</b></small> ],^checkout(videosettings)
|
|
||||||
$OPEN_REC_DIR,xdg-open $(xdg-user-dir VIDEOS)/Recordings
|
$OPEN_REC_DIR,xdg-open $(xdg-user-dir VIDEOS)/Recordings
|
||||||
|
^sep()
|
||||||
|
$SETTINGS,^checkout(settings)
|
||||||
^sep()
|
^sep()
|
||||||
$CANCEL <small>esc</small>,exit 1
|
$CANCEL <small>esc</small>,exit 1
|
||||||
^tag(full)
|
^tag(full)
|
||||||
|
@ -996,13 +1013,20 @@ cat <<EOF > ${MENU_ITEMS}
|
||||||
$SEC10,scrot -d 10 -u $IMG -e $VIEW
|
$SEC10,scrot -d 10 -u $IMG -e $VIEW
|
||||||
^sep()
|
^sep()
|
||||||
⮜ $BACK,^back()
|
⮜ $BACK,^back()
|
||||||
^tag(videosettings)
|
^tag(settings)
|
||||||
|
^sep($SCROTSETTINGS)
|
||||||
|
$EXTENSION [ <b>${EXT}</b> ],^checkout(imgext)
|
||||||
^sep($VIDEOSETTINGS)
|
^sep($VIDEOSETTINGS)
|
||||||
$AUDIO [ <b>${AUD}</b> ],^checkout(audio)
|
$AUDIO [ <b>${AUD}</b> ],^checkout(audio)
|
||||||
$FORMAT [ <b>${container}</b> ],^checkout(format)
|
$FORMAT [ <b>${container}</b> ],^checkout(format)
|
||||||
$FRAMERATE [ <b>${framerate}</b> ],^checkout(framerate)
|
$FRAMERATE [ <b>${framerate}</b> ],^checkout(framerate)
|
||||||
^sep()
|
^sep()
|
||||||
$EDIT_CONF_FILE,xdg-open $CNF_FILE
|
$EDIT_CONF_FILE,xdg-open $CNF_FILE
|
||||||
|
^tag(imgext)
|
||||||
|
^sep($EXTENSION)
|
||||||
|
WebP (.webp),mb-setvar image_extension=webp ${CNF_FILE};mb-jgtools screenshot ipc
|
||||||
|
PNG (.png),mb-setvar image_extension=png ${CNF_FILE};mb-jgtools screenshot ipc
|
||||||
|
JPG (.jpg),mb-setvar image_extension=jpg ${CNF_FILE};mb-jgtools screenshot ipc
|
||||||
^tag(audio)
|
^tag(audio)
|
||||||
^sep($AUDIO)
|
^sep($AUDIO)
|
||||||
$REC_AUDIO,mb-setvar record_audio=yes ${CNF_FILE};mb-jgtools screenshot ipc
|
$REC_AUDIO,mb-setvar record_audio=yes ${CNF_FILE};mb-jgtools screenshot ipc
|
||||||
|
@ -1020,6 +1044,7 @@ mp4,mb-setvar container=mp4 ${CNF_FILE};mb-jgtools screenshot ipc
|
||||||
15,mb-setvar framerate=15 ${CNF_FILE};mb-jgtools screenshot ipc
|
15,mb-setvar framerate=15 ${CNF_FILE};mb-jgtools screenshot ipc
|
||||||
10,mb-setvar framerate=10 ${CNF_FILE};mb-jgtools screenshot ipc
|
10,mb-setvar framerate=10 ${CNF_FILE};mb-jgtools screenshot ipc
|
||||||
EOF
|
EOF
|
||||||
|
cat "${MENU_ITEMS}"
|
||||||
jgmenu --config-file=${CONFIG_FILE} --csv-file=${MENU_ITEMS} 2>/dev/null
|
jgmenu --config-file=${CONFIG_FILE} --csv-file=${MENU_ITEMS} 2>/dev/null
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
10
bin/mb-reset
10
bin/mb-reset
|
@ -1,5 +1,5 @@
|
||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
# Daniel Napora 2021 <napcok@gmail.com>
|
# Daniel Napora 2021-22 <napcok@gmail.com>
|
||||||
#: mb-reset - reset/update user config files to current defaults.
|
#: mb-reset - reset/update user config files to current defaults.
|
||||||
#: It only affects files shipped with Mabox.
|
#: It only affects files shipped with Mabox.
|
||||||
#: Be aware that you may loose your own customizations (if any).
|
#: Be aware that you may loose your own customizations (if any).
|
||||||
|
@ -118,6 +118,14 @@ rsync -a /usr/share/mabox/common/66-symbols.conf $HOME/.config/fontconfig/conf.d
|
||||||
fc-cache
|
fc-cache
|
||||||
rsync -a /usr/share/mabox/common/volumettf $HOME/.config/tint2/scripts/
|
rsync -a /usr/share/mabox/common/volumettf $HOME/.config/tint2/scripts/
|
||||||
rsync -a /usr/share/mabox/lang/$LNGDIR/.config/tint2/*.tint2rc $HOME/.config/tint2/
|
rsync -a /usr/share/mabox/lang/$LNGDIR/.config/tint2/*.tint2rc $HOME/.config/tint2/
|
||||||
|
TYPE=$(cat /sys/class/dmi/id/chassis_type)
|
||||||
|
case "$TYPE" in
|
||||||
|
8|9|10|14):;;
|
||||||
|
*)
|
||||||
|
# fix tint2 battery indicator bug spawning notifications even if there is no battery
|
||||||
|
sd "battery_low_cmd =.*$" "battery_low_cmd =" "$HOME"/.config/tint2/*.tint2rc
|
||||||
|
;;
|
||||||
|
esac
|
||||||
killall -SIGUSR1 tint2
|
killall -SIGUSR1 tint2
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue