insert single image without tiling (using display window id command)
Posted: 2019-08-25T09:18:54-07:00
Hello,
I have an issue. When using the display -window id (or animate -window id) command, the image (or the animated gif) is used to tile the background of the target window.
How do I prevent this tiling and display one instance of the image only?
The image is very small (24x24 px) and I want to display it in the upper left corner (x=0 y=0).
The image
and the result in the target window
using the above small script:
Thank you!
PS: I use ImageMagick version 6.9.7-4 Q16 x86_64 20170114 and Xubuntu 18.04.3 (64 bits) and the Nemo file manager
I have an issue. When using the display -window id (or animate -window id) command, the image (or the animated gif) is used to tile the background of the target window.
How do I prevent this tiling and display one instance of the image only?
The image is very small (24x24 px) and I want to display it in the upper left corner (x=0 y=0).
The image
and the result in the target window
using the above small script:
Code: Select all
#!/bin/bash
while true
do
titre=$(xdotool getactivewindow getwindowname)
if [[ $titre == 'Musique' ]]; then
sleep 2
# get the window_id for the current active window
win_id=$(xdotool getwindowfocus)
display -window $win_id image.png
fi
done
PS: I use ImageMagick version 6.9.7-4 Q16 x86_64 20170114 and Xubuntu 18.04.3 (64 bits) and the Nemo file manager