MX Linux's default image viewer is nomacs, which is a great program. Mirage can be installed alongside nomacs with no problem.
Mirage is a simple image viewer with a few editing tools but one very nice option of specifying custom commands. Using this we can set hotkeys to set desktop wallpaper and change wallpaper layout.
The mirage package in Debian's repository contains a minor few bugs, specifically, arrow keys don't work to scroll images and the help website link is broke. If you'd like to repackage with a newer source, I've included optional instructions. Otherwise skip to Part 2.
Part 1. Optional - repackage mirage.
Disclaimer - This is not an official way to build a package, it's just for fun. However, it does work.
The process I follow and packages required for backporting are laid out here: https://wiki.debian.org/SimpleBackportCreation. The packages needed in general are
Code: Select all
packaging-dev debian-keyring devscripts equivs libdistro-info-perl
Code: Select all
cd ~/build
mkdir mirage
cd mirage
dget -u http://http.debian.net/debian/pool/main/m/mirage/mirage_0.9.5.2-1.dsc
Code: Select all
cd ~/build
mkdir mirage2
cd mirage2
git clone https://github.com/dead-beef/mirage.git
cd mirage
Code: Select all
cp {mirage.py,stock_fit-height.png,stock_fit-width.png} ~/build/mirage2/mirage-0.9.5.2
cd ~/build/mirage2/mirage-0.9.5.2
Code: Select all
data_files=[('share/mirage', ['README', 'COPYING', 'CHANGELOG', 'TODO', 'TRANSLATORS', 'stock_shuffle.png', 'stock_leave-fullscreen.png', 'stock_fullscreen.png', 'mirage_blank.png']),
Code: Select all
data_files=[('share/mirage', ['README', 'COPYING', 'CHANGELOG', 'TODO', 'TRANSLATORS', 'stock_shuffle.png', 'stock_leave-fullscreen.png', 'stock_fullscreen.png', 'mirage_blank.png', 'stock_fit-height.png', 'stock_fit-width.png']),
Okay, now we're ready to build! The following is taken from the Debian wiki page referenced above.
Code: Select all
sudo mk-build-deps --install --remove
dch --local mod --distribution stretch-backports "Rebuild with new source"
fakeroot debian/rules binary
dpkg-source --commit
Code: Select all
dpkg-buildpackage -us -uc
sudo apt install mirage
sudo dpkg -i ../*.deb
Code: Select all
sudo apt purge mirage-build-deps && sudo apt autoremove --purge
Part 2. Custom commands
The two commands we'll use are as follows:
Set wallpaper
Code: Select all
xfconf-query -c xfce4-desktop -p /backdrop/screen0/monitor0/workspace0/last-image -s %F
Code: Select all
current=$(xfconf-query -c xfce4-desktop -p /backdrop/screen0/monitor0/workspace0/image-style) ; if [ $current = 5 ]; then new=1 ; else new=$(( $current + 1 )); fi; xfconf-query -c xfce4-desktop -p /backdrop/screen0/monitor0/workspace0/image-style -s $new
The first simply tells xfce to use the image displayed in mirage as the desktop wallpaper, and the second scrolls through the layout options in a loop.
Custom commands are set through Edit>Custom Actions>Configure. In the example gif above, I have Ctrl+Alt+W for set wallpaper and Ctrl+Alt+E for switch layout.
Okay, there you have it! I just thought this was a cool trick and wanted to share. Any feedback welcome.