Ubuntu Pastebin

Paste from ioria at Sat, 22 Oct 2016 19:16:41 +0000

Download as text
 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
#  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'
Download as text