Puppy Linux Discussion Forum Forum Index Puppy Linux Discussion Forum
Puppy HOME page : puppylinux.com
"THE" alternative forum : puppylinux.info
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

The time now is Tue 20 Nov 2018, 19:38
All times are UTC - 4
 Forum index » Advanced Topics » Additional Software (PETs, n' stuff) » Desktop
ShowHideIcons-v1.8 30/11/2014
Post new topic   Reply to topic View previous topic :: View next topic
Page 1 of 3 [38 Posts]   Goto page: 1, 2, 3 Next
Author Message
stemsee

Joined: 27 Jun 2013
Posts: 2272
Location: In The Way

PostPosted: Tue 18 Nov 2014, 16:24    Post subject:  ShowHideIcons-v1.8 30/11/2014  

This is a simple app with one script in ~/my-applications/bin/nicons very simple but works a treat.

v1.8
ShowHideIcons-v1.8.pet
Description 
pet

 Download 
Filename  ShowHideIcons-v1.8.pet 
Filesize  2.5 KB 
Downloaded  195 Time(s) 

Last edited by stemsee on Mon 01 Dec 2014, 06:47; edited 7 times in total
Back to top
View user's profile Send private message MSN Messenger 
stemsee

Joined: 27 Jun 2013
Posts: 2272
Location: In The Way

PostPosted: Mon 24 Nov 2014, 20:36    Post subject:  

Updated to v1.6
Now no puppypin0 in .pet, also added reset function, and choose function to select some/any icons from original puppypin to add to new puppypin, plus remove some/any icons. It iterates line by line or you can simply type in the name of the app/icon to add it and enter then type exit when finished.


see first post

to do:
Add any icon from /usr/share/applications/*.desktop These supply variables for Name Categories and Icon and Exec command which is all that's needed.

Last edited by stemsee on Fri 28 Nov 2014, 15:25; edited 1 time in total
Back to top
View user's profile Send private message MSN Messenger 
stemsee

Joined: 27 Jun 2013
Posts: 2272
Location: In The Way

PostPosted: Mon 24 Nov 2014, 22:36    Post subject:  

Here is the pet v1.6

see first post

Last edited by stemsee on Fri 28 Nov 2014, 15:26; edited 1 time in total
Back to top
View user's profile Send private message MSN Messenger 
stemsee

Joined: 27 Jun 2013
Posts: 2272
Location: In The Way

PostPosted: Wed 26 Nov 2014, 17:00    Post subject:  

jumped to version 1.4 with some additions.
Last edited by stemsee on Fri 28 Nov 2014, 15:26; edited 2 times in total
Back to top
View user's profile Send private message MSN Messenger 
Jasper

Joined: 25 Apr 2010
Posts: 1350
Location: England

PostPosted: Thu 27 Nov 2014, 06:07    Post subject:  

Hi stemsee,

You have seemingly been unable to replicate (or even comprehend) the major problem with drive icons that I have twice before reported to you.

If the problem is uniquely mine, it is of no importance to me as, in any event, the Swapicons pet works perfectly.

However I would, at least, be interested to know if this code produces a problem with drive icon display and usage for any other tester.
Back to top
View user's profile Send private message 
stemsee

Joined: 27 Jun 2013
Posts: 2272
Location: In The Way

PostPosted: Thu 27 Nov 2014, 06:36    Post subject:  

Hi Jasper

Menu > Desktop > Desktop Drives Icon Manager

have a nice day!

stemsee
Back to top
View user's profile Send private message MSN Messenger 
Jasper

Joined: 25 Apr 2010
Posts: 1350
Location: England

PostPosted: Thu 27 Nov 2014, 07:06    Post subject:  

Hi again,

Your reply
Quote:
Menu > Desktop > Desktop Drives Icon Manager
exhibits your total lack of comprehension.

For a fast, tried and tested app users have the option of
http://murga-linux.com/puppy/viewtopic.php?search_id=1344034772&t=83991
from rhadon with contributions from LIBL and SFR.
Swapicons.png
 Description   
 Filesize   21.45 KB
 Viewed   393 Time(s)

Swapicons.png

Back to top
View user's profile Send private message 
stemsee

Joined: 27 Jun 2013
Posts: 2272
Location: In The Way

PostPosted: Thu 27 Nov 2014, 10:48    Post subject:  

@jasper

Had I known this app before, I would not have bothered writing my own. But now that I have I can say mine has more options. Still I am going to give this one a try and maybe I can add its mechanism to my own full featured version as well as a gui! I have been tardy on learning to build GUIs.

However this app doesn't really manage icons generally, from the looks of things. But mine is beginning too.

regards

stemsee
Back to top
View user's profile Send private message MSN Messenger 
Jasper

Joined: 25 Apr 2010
Posts: 1350
Location: England

PostPosted: Thu 27 Nov 2014, 11:00    Post subject:  

ShowHideIcons is a clear and simple title, but currently your code fails in that simple (if hard to achieve) objective.

I am in favour of diversification if, and only if, it works and I do not appreciate political evasion and economy.
Back to top
View user's profile Send private message 
stemsee

Joined: 27 Jun 2013
Posts: 2272
Location: In The Way

PostPosted: Thu 27 Nov 2014, 11:39    Post subject:  

@Jasper

I use showhideicons often to show or hide icons, also to add and remove icons. Why on earth would you come to this thread and LIE? You are being absolutely ridiculous. Please change your previous post to reflect the truth. If you are not willing to do that then I will raise an issue with the forum adjudicators.

Sad
stemsee
Back to top
View user's profile Send private message MSN Messenger 
Jasper

Joined: 25 Apr 2010
Posts: 1350
Location: England

PostPosted: Thu 27 Nov 2014, 12:32    Post subject:  

I absolutely agree - Why would I lie? Have I not praised some of your recent work both publicly and with private support?

The truth is this did not work for me and I wrote that I would be interested to see the results of tests by other forum members.

By all means rewrite my post that offends you and include it below and if I find your words acceptable - I will adopt them.

All publicity may be good publicity and I look forward to a test report/comment from RSH and hopefully others.
Back to top
View user's profile Send private message 
stemsee

Joined: 27 Jun 2013
Posts: 2272
Location: In The Way

PostPosted: Thu 27 Nov 2014, 14:32    Post subject:  

@jasper

I owe you an apology and thanks ... the script as it stands doesn't, indeed, install and hide icons. There is a loop created in the last update which copies both pins to each other so nothing changes! Removed and I will correct it.

But I only found it by booting a trusty tahr and installing from scratch, otherwise on EmSee a slightly older version it works fine. Tat was before I added 'nicons custom' and 'nicons nocustom'.

stemsee
Back to top
View user's profile Send private message MSN Messenger 
stemsee

Joined: 27 Jun 2013
Posts: 2272
Location: In The Way

PostPosted: Fri 28 Nov 2014, 12:12    Post subject:  

I think it is fixed now and simplified. reset pins, remove icons, add icons, switch iconless desktop/ iconified desktop.

command line usage

begin by creating switch flag and backup original PuppyPin
Code:
nicons


to switch to iconless desktop PuppyPin0
Code:
nicons


to switch back to iconified desktop PuppyPin
Code:
nicons


to add icons from /us/share/applications renamed links (no .desktop suffix)
Code:
nicons add


to remove icons from pressent iconified pin by typing part or all of name/s separated by one space.
Code:
nicons remove


to remove all icons from both pins
Code:
nicons removeall


to have two iconifiable pins
Code:
nicons two


to exit 'nicons two' switching.
Code:
nicons pip


to delete all pins created by script
Code:
nicons reset



place script in path and name it 'nicons' make executable.

EDITED: 30/11/14 handles xonclock now

Code:
##!/bin/bash
#copyright (c) 2014 M arcos Contant
#nicons # first use creates flag and backs-up puppypin, but no apparent change
#nicons # second use switches to iconless dektop
#nicons # third use switches to iconified desktop
#nicons reset # restores original desktop and deletes script created pins
#nicons remove # helps user remove icon/s from iconified desktop
#nicons removeall # removes all icons from iconified pin. Blank page for adding icons.
#nicons noicons # recreates pristine PuppyPin0 (iconless desktop) from script.
#nicons two #copies iconless pin to puppypin; giving two iconifiable desktop pins.
#nicons pip # resets nicons two.
#nicons add #for rox window of icons from applications dir without .desktop extension.
#(nicons add/remove is temporary for iconless desktop but persistent for iconified desktop, except with nicons two)
pp0 () {
echo '<?xml version="1.0"?>' > ~/Choices/ROX-Filer/PuppyPin0
echo "<pinboard>" >> ~/Choices/ROX-Filer/PuppyPin0
echo "   <backdrop style="Stretched">/usr/share/backgrounds/default.jpg</backdrop>" >> ~/Choices/ROX-Filer/PuppyPin0
echo \ >> ~/Choices/ROX-Filer/PuppyPin0
echo \ >> ~/Choices/ROX-Filer/PuppyPin0
echo "   </pinboard>" >> ~/Choices/ROX-Filer/PuppyPin0

}


if [ ! -e ~/Choices/ROX-Filer/PuppyPin-bak1 ]; then
cp ~/Choices/ROX-Filer/PuppyPin ~/Choices/ROX-Filer/PuppyPin-bak
cp ~/Choices/ROX-Filer/PuppyPin ~/Choices/ROX-Filer/PuppyPin-bak1
fi
if [ "$1" = pip ]; then
rm ~/Choices/ROX-Filer/pip
rm ~/Choices/ROX-Filer/ipp
pp0
fi

if [ -e ~/Choices/ROX-Filer/pip ]; then
pipipp () {
   mv ~/Choices/ROX-Filer/pip ~/Choices/ROX-Filer/ipp
   mv  ~/Choices/ROX-Filer/PuppyPin  /tmp/
   mv  ~/Choices/ROX-Filer/PuppyPin0 ~/Choices/ROX-Filer/PuppyPin
   DISPLAY=:0.0 rox --pinboard ~/Choices/ROX-Filer/PuppyPin
gtkdialog-splash -placement top-left -bg blue -text "$(gettext 'Pin 1 of Two iconifiable pins switching. 
To remove type - nicons pip - then Enter')" &
   SPLASHPID=$!
   sleep 2
   kill $SPLASHPID 2> /dev/null
exit
}
pipipp
fi
if [ -e ~/Choices/ROX-Filer/ipp ]; then
ipppip () {
   mv ~/Choices/ROX-Filer/ipp ~/Choices/ROX-Filer/pip
   mv  ~/Choices/ROX-Filer/PuppyPin  ~/Choices/ROX-Filer/PuppyPin0
   cp  /tmp/PuppyPin ~/Choices/ROX-Filer/PuppyPin
   DISPLAY=:0.0 rox --pinboard ~/Choices/ROX-Filer/PuppyPin
   gtkdialog-splash -placement top-left -bg blue -text "$(gettext 'Pin 2 of Two iconifiable pins switching. 
To remove type - nicons pip - then Enter')" &
   SPLASHPID=$!
   sleep 2
   kill $SPLASHPID 2> /dev/null
exit
}
ipppip
fi
#if [ "$1" = setup ]; then
set () {
   rm ~/Choices/ROX-Filer/PuppyPin-bak
   ppbak () {
   echo '<?xml version="1.0"?>' > ~/Choices/ROX-Filer/PuppyPin-bak
   echo "<pinboard>" >> ~/Choices/ROX-Filer/PuppyPin-bak
   echo "   <backdrop style="Stretched">/usr/share/backgrounds/default.jpg</backdrop>" >> ~/Choices/ROX-Filer/PuppyPin-bak
   echo \ >> ~/Choices/ROX-Filer/PuppyPin-bak
   echo \ >> ~/Choices/ROX-Filer/PuppyPin-bak
   echo "   </pinboard>" >> ~/Choices/ROX-Filer/PuppyPin-bak
   echo \ >> ~/Choices/ROX-Filer/PuppyPin-bak
}
   ppbak
   if [[ -d /usr/shared/renamed ]]; then
   rm -r /usr/shared/renamed/
   fi
   if [[ ! -d  /usr/shared/renamed ]]; then
   mkdir /usr/share/renamed/
   ln -fnv /usr/share/applications/* /usr/share/renamed/ 2> /dev/null
   cd /usr/share/renamed/
   echo $line | for i in *.desktop; do mv $i `basename $i .desktop`; done 2> /dev/null
   fi
   DISPLAY=:0.0 rox --pinboard ~/Choices/ROX-Filer/PuppyPin-bak
   rox  /usr/share/renamed/ &
   gtkdialog-splash -placement top-left -bg blue -text "$(gettext 'Drag & arrange all icons to this desktop')" &
   SPLASHPID=$!
   sleep 4
   kill $SPLASHPID 2> /dev/null
   gtkdialog-splash -placement top-left -bg blue -text "$(gettext 'Press Enter when finished.')" &
   SPLASHPID=$!
   sleep 8
   kill $SPLASHPID 2> /dev/null
   read dummy
   nicons
   exit
}
#set
#fi


choice () {
   if [[ -d /usr/shared/renamed ]]; then
   rm -r /usr/shared/renamed/
   fi
   if [[ ! -d  /usr/shared/renamed ]]; then
   mkdir /usr/share/renamed/
   ln -fnv /usr/share/applications/* /usr/share/renamed/ 2> /dev/null
   cd /usr/share/renamed/
   echo $line | for i in *.desktop; do mv $i `basename $i .desktop`; done 2> /dev/null
   fi
   rox  /usr/share/renamed/ &
   gtkdialog-splash -placement top-left -bg blue -text "$(gettext 'Drag & arrange all icons to this desktop')" &
   SPLASHPID=$!
   sleep 4
   kill $SPLASHPID 2> /dev/null
rm /root/Choices/ROX-Filer/PuppyPin0
cp /root/Choices/ROX-Filer/PuppyPin /root/Choices/ROX-Filer/PuppyPin0
[ -x /root/Startup/xonclock* ] && /root/Startup/xonclock*
exit
}
if [ "$1" = add ]; then
choice && exit
fi
removeicons () {
rm  /tmp/rmvtxt
touch /tmp/rmvtxt
echo "Type space separated name of icon/s to remove and press enter"
   read rmv < /dev/tty
   echo $rmv | tr ' ' '\n' >> /tmp/rmvtxt
   while read line
   do
   sed -i "/$line/d" ~/Choices/ROX-Filer/PuppyPin
   done < /tmp/rmvtxt
   DISPLAY=:0.0 rox --pinboard ~/Choices/ROX-Filer/PuppyPin
   rm /root/Choices/ROX-Filer/PuppyPin0
   cp /root/Choices/ROX-Filer/PuppyPin /root/Choices/ROX-Filer/PuppyPin0
   [ -x /root/Startup/xonclock* ] && /root/Startup/xonclock*
   exit
}
if [ "$1" = remove ]; then
removeicons && exit
fi
removeallicons () {
   rm ~/Choices/ROX-Filer/PuppyPin
   cp /root/Choices/ROX-Filer/PuppyPin0 /root/Choices/ROX-Filer/PuppyPin
   DISPLAY=:0.0 rox --pinboard ~/Choices/ROX-Filer/PuppyPin 2> /dev/null
   [ -x /root/Startup/xonclock* ] && /root/Startup/xonclock*
   
   exit
}
if [ "$1" = removeall ]; then
removeallicons && exit
fi


resetpins () {
rm ~/Choices/ROX-Filer/pip
rm -r /usr/shared/renamed/
rm ~/Choices/ROX-Filer/PuppyPin-bak
rm ~/Choices/ROX-Filer/PuppyPin-orig
rm ~/Choices/ROX-Filer/PuppyPin-orig-bak   
rm ~/Choices/ROX-Filer/ppin 2> /dev/null
rm ~/Choices/ROX-Filer/nipp 2> /dev/null
rm ~/Choices/ROX-Filer/PuppyPin0 2> /dev/null
rm ~/Choices/ROX-Filer/PuppyPin 2> /dev/null
mv ~/Choices/ROX-Filer/PuppyPin-bak1 ~/Choices/ROX-Filer/PuppyPin 2> /dev/null
DISPLAY=:0.0 rox --pinboard ~/Choices/ROX-Filer/PuppyPin 2> /dev/null
[ -x /root/Startup/xonclock* ] && /root/Startup/xonclock*

exit
}

if [ "$1" = reset ]; then
resetpins
fi
if [ -e ~/Choices/ROX-Filer/nipp ]; then
   mv ~/Choices/ROX-Filer/nipp ~/Choices/ROX-Filer/ppin
   bd=`grep -e '  <backdrop style' ~/Choices/ROX-Filer/PuppyPin0`
   sed -i 3i\ "$bd" ~/Choices/ROX-Filer/PuppyPin-orig 2> /dev/null
   sed -i 4\\ ~/Choices/ROX-Filer/PuppyPin-orig
   mv ~/Choices/ROX-Filer/PuppyPin-orig ~/Choices/ROX-Filer/PuppyPin
   DISPLAY=:0.0 rox --pinboard ~/Choices/ROX-Filer/PuppyPin
elif [ -e ~/Choices/ROX-Filer/ppin ]; then
   mv ~/Choices/ROX-Filer/ppin ~/Choices/ROX-Filer/nipp
   bd=`grep -e '<backdrop style' ~/Choices/ROX-Filer/PuppyPin`
   pp0
      if [[ "$1" = noicons ]]; then
         pp0 && exit
      fi
      if [[ "$1" = two ]]; then
         rm ~/Choices/ROX-Filer/PuppyPin0
         cp ~/Choices/ROX-Filer/PuppyPin ~/Choices/ROX-Filer/PuppyPin0
         rm ~/Choices/ROX-Filer/pip
         rm ~/Choices/ROX-Filer/ipp
         touch ~/Choices/ROX-Filer/pip
         exit
      fi
   sed -i 3i\ "$bd" ~/Choices/ROX-Filer/PuppyPin0 2> /dev/null
   sed -i 4\\ ~/Choices/ROX-Filer/PuppyPin0
   sed -i 4d ~/Choices/ROX-Filer/PuppyPin0 2> /dev/null
   mv ~/Choices/ROX-Filer/PuppyPin ~/Choices/ROX-Filer/PuppyPin-orig
   mv ~/Choices/ROX-Filer/PuppyPin0 ~/Choices/ROX-Filer/PuppyPin
   DISPLAY=:0.0 rox --pinboard ~/Choices/ROX-Filer/PuppyPin
   gtkdialog-splash -placement top-left -bg blue -text "$(gettext 'No Icons')" &
   SPLASHPID=$!
   sleep 2
   kill $SPLASHPID 2> /dev/null
elif [[ ! -e ~/Choices/ROX-Filer/nipp && ! -e ~/Choices/ROX-Filer/ppin ]]; then
touch ~/Choices/ROX-Filer/ppin
fi
[ -x /root/Startup/xonclock* ] && /root/Startup/xonclock*
if [[ ! -e ~/Choices/ROX-Filer/PuppyPin0 ]]; then
   cp ~/Choices/ROX-Filer/PuppyPin ~/Choices/ROX-Filer/PuppyPin0
fi



Still a bit buggy. Some commands need to be invoked from iconified desktop others from iconless desktop.

Last edited by stemsee on Tue 02 Dec 2014, 18:34; edited 9 times in total
Back to top
View user's profile Send private message MSN Messenger 
stemsee

Joined: 27 Jun 2013
Posts: 2272
Location: In The Way

PostPosted: Fri 28 Nov 2014, 14:59    Post subject:  

yet to do add option for choosing which DISPLAY to affect. Add icons as choice from all installed apps.
Back to top
View user's profile Send private message MSN Messenger 
stemsee

Joined: 27 Jun 2013
Posts: 2272
Location: In The Way

PostPosted: Sat 29 Nov 2014, 08:50    Post subject:  

Added mechanism for populating PuppyPin-bak with all links from /usr/share/applications which were linked to /usr/share/renamed and 'renamed' to remove .desktop suffix 'nicons add'. This is important for the repo of available icons when using 'nicons add' which iterates through PuppyPin-bak letting the user see line by line the icons/apps available to add simply by pressing 'y Enter' or Enter for 'n' not added. There is also a rox window opens with links from /usr/share/applications renamed and ready to drag to the desktop 'nicons add'.

Now I am trying to use array to make icons grid like android home screen. Any pointers welcome.

EDIT: disabled. Because rox behaves unpredictably at some point. Needs more testing in case laptop tool pan feature interferred.
capture16486.jpg
 Description   
 Filesize   43.09 KB
 Viewed   191 Time(s)

capture16486.jpg


Last edited by stemsee on Tue 02 Dec 2014, 02:41; edited 4 times in total
Back to top
View user's profile Send private message MSN Messenger 
Display posts from previous:   Sort by:   
Page 1 of 3 [38 Posts]   Goto page: 1, 2, 3 Next
Post new topic   Reply to topic View previous topic :: View next topic
 Forum index » Advanced Topics » Additional Software (PETs, n' stuff) » Desktop
Jump to:  

You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You can download files in this forum


Powered by phpBB © 2001, 2005 phpBB Group
[ Time: 0.1022s ][ Queries: 12 (0.0127s) ][ GZIP on ]