parameterize window size
This commit is contained in:
parent
97a8bfff76
commit
3507915a2b
|
@ -77,12 +77,12 @@ randomize_dns_case = 0
|
|||
# scaling factor (floating point value) used to convert screen pixels
|
||||
# to device independent pixels. You may need it for displays with
|
||||
# high DPI
|
||||
device_scale = 1.1547
|
||||
device_scale = 1
|
||||
|
||||
# method org.freedesktop.ScreenSaver.SimulateUserActivity() in KDE 5 seems
|
||||
# to have no effect unless GetSessionIdleTime() called afterwards. Set
|
||||
# parameter to 1 to call latter
|
||||
quirk_plasma5_screensaver = 0
|
||||
quirk_plasma5_screensaver = 1
|
||||
|
||||
# whenever to use windowed plugin mode
|
||||
enable_windowed_mode = 1
|
||||
|
|
16
run.sh
16
run.sh
|
@ -1,5 +1,5 @@
|
|||
#!/bin/sh
|
||||
|
||||
set -e
|
||||
dir=$(dirname $(readlink -f $0))
|
||||
|
||||
if [ ! -x /lib/ld-linux-armhf.so.3 ] ; then
|
||||
|
@ -12,13 +12,11 @@ export XDG_CONFIG_HOME=$dir/etc/
|
|||
export ALSA_CONFIG_PATH=$dir/etc/asound.conf
|
||||
cd $dir
|
||||
|
||||
# TODO: parameterize? calculate w/h based on parsing freshwrapper.conf?
|
||||
scale=${1:-3}
|
||||
width=$((scale * 160))
|
||||
height=$((scale * 180))
|
||||
device_scale=`echo "scale=10; sqrt($scale/3)" | bc`
|
||||
|
||||
# device_scale = 1.1547
|
||||
exec env LD_LIBRARY_PATH=$dir/lib $dir/bin/npplayer src=$dir/Anodyne_STANDALONE_1_506.swf width=640 height=720 pepperflash_path=$dir/lib/plugins/libpepflashplayer.so
|
||||
sed -i "s/^device_scale = .*/device_scale = $device_scale/" $dir/etc/freshwrapper.conf
|
||||
|
||||
## device_scale = 1.3333
|
||||
#exec env LD_LIBRARY_PATH=$dir/lib $dir/bin/npplayer src=$dir/Anodyne_STANDALONE_1_506.swf width=854 height=960 pepperflash_path=$dir/lib/plugins/libpepflashplayer.so
|
||||
|
||||
## device_scale = 1
|
||||
#exec env LD_LIBRARY_PATH=$dir/lib $dir/bin/npplayer src=$dir/Anodyne_STANDALONE_1_506.swf width=480 height=540 pepperflash_path=$dir/lib/plugins/libpepflashplayer.so
|
||||
exec env LD_LIBRARY_PATH=$dir/lib $dir/bin/npplayer src=$dir/Anodyne_STANDALONE_1_506.swf width=$width height=$height pepperflash_path=$dir/lib/plugins/libpepflashplayer.so
|
||||
|
|
Loading…
Reference in New Issue