# README
# Install xautomation sudo apt-get install xautomation (that is for running F5 and reload nautilus)
# cp /usr/share/icons/HighContrast/32x32/status/mail-read.png ~
# cp /usr/share/icons/HighContrast/32x32/status/mail-unread.png ~
# mv ~/mail-read.png to ~/kread.png
# mv ~/mail-unread.png to ~/unread.png
# create a .desktop file in ~/.local/share/applications, e.g. setunset.desktop and make it executable chmod +x setunset.desktop
# the .dekstop can be like that:
# [Desktop Entry]
# Encoding=UTF-8
# Name=setunset
# Comment=set read unread
# Exec=/home/youruser/readunread.sh %u
# Icon=/home/youruser/.png (choose an icon)
# Terminal=false
# Type=Application
# MimeType=text/plain
# StartupNotify=true
# Categories=GTK;Utility;TextEditor;
# Then you can call this script from the Nautilus right-click menu ; Open With - Other Application and look for 'setunset'
activity=$(zenity --list --text "Label read / not-read" --radiolist --column "Select" --column "Status" TRUE "Read" FALSE "Unread" );
case "$activity" in
*"Read"* ) gvfs-set-attribute -t string "$1" metadata::custom-icon file:///home/$USER/kread.png ;;
*"Unread"* ) gvfs-set-attribute -t string "$1" metadata::custom-icon file:///home/$USER/unread.png ;;
* ) echo "Error...";;
esac
xte 'key F5'