ShowHideIcons-v1.8 30/11/2014

Window managers, icon programs, widgets, etc.
Message
Author
stemsee

#16 Post by stemsee »

Code: Select all

res=`xrandr | grep -w connected | cut -f3 -d ' ' | cut -f1 -d '+' | tr 'x' ' '`
maxx=`echo $res | cut -f1 -d ' '`
maxy=`echo $res | cut -f2 -d ' '`
lines=`ls -1 /usr/share/renamed | wc -l`
echo "$(((maxx) / 12))"
echo "$(((maxy) / 12))"
varx=1
vary=1
varx=$((varx + 70)) #incremental
vary=$((vary + 70))
y1 x[1-12]
y2 x[1-12]

y15 x[1-20] 
Something like this maybe

Code: Select all


BEGIN {
    varx=1;
	varx=$((varx + 70));
    OFS = "\"";
    split("2", Fields);
    split("$varx", Replacements);

}
{
	while (count++<20)
    for (i in Fields) {
        for (j in Replacements) {
            Replace = Replacements[j];
            sub(Replace Replace, $Fields[i]);
        }
    }
    print;
}
BEGIN {
        vary=1;
	vary=$((vary + 70));
    OFS = "\"";
    split("4", Fields);
    split("$vary", Replacements);

}
{
	while (count++<15)
    for (i in Fields) {
        for (j in Replacements) {
            Replace = Replacements[j];
            sub(Replace Replace, $Fields[i]);
        }
    }
    print;
}
?? How to lay the 300 icons evenly spaced on a grid by XY alignment per screen resolution?? Automatically!
Last edited by stemsee on Mon 01 Dec 2014, 07:26, edited 8 times in total.

stemsee

#17 Post by stemsee »

This wont work as wanted unless all of the icons are 48 x 48. Otherwise the writing wont line up. Short icons will be higher because top left corner of icon is used to position them, not bottom right. But it works to a certain degree.... better than nothing I suppose!

stemsee

#18 Post by stemsee »

Code: Select all

#!/bin/bash
rm ~/Choices/ROX-Filer/PuppyPin-formatted
rm /tmp/files
touch /tmp/files
sed -n '3,16p;16q' ~/Choices/ROX-Filer/PuppyPin-bak >> /tmp/files
touch ~/Choices/ROX-Filer/PuppyPin-formatted
varx=10
vary=10
indexx=2
indexy=4

while read line 
do
	sed -l '/4/d'
	varx=$(($varx + 90))
	echo $line | awk -F\" -v OFS=\" '{$'$indexx'='$varx'; print }' | awk -F\" -v OFS=\" '{$'$indexy'='$vary'; print }' >> ~/Choices/ROX-Filer/PuppyPin-formatted
done < /tmp/files

stemsee

#19 Post by stemsee »

Nicons add = renamed links from /usr/share/applications
Attachments
capture8647.jpg
(31.28 KiB) Downloaded 213 times

stemsee

#20 Post by stemsee »

ok ... I need hellp with these nested loops! I can't think clearly. How to assign 12 increments of x for one increment of y whilst iterating through a list of 300 entries 10 lines at a time. I have spent hours and hours on this ... This code generates 35000 lines. It should be 300. For each y it is generating 335 lines. The problem really is how to feed only twelve lines at a time from the 300 line xml puppypin (this is the icon repo).

Code: Select all

#!/bin/bash
# nested-loop.sh: Nested "for" loops.
rm ~/Choices/ROX-Filer/PuppyPin-formatted
touch ~/Choices/ROX-Filer/PuppyPin-formatted
rm /tmp/files
touch /tmp/files
cat ~/Choices/ROX-Filer/PuppyPin >> /tmp/files
sed -i '1,3d' /tmp/files
sed -i '$d' /tmp/files 
#echo $file | head -10 >> /tmp/files
varx=0
vary=0
indexx=2
indexy=4

  outer=1             # Set outer loop counter.

for vary in 0 90 170 250 330 410 490 570
do
vary=$(($vary + 1))
  inner=1           # Reset inner loop counter.

  
  # Beginning of inner loop.
  for varx in 0 90 170 250 330 410 490 570 650 730 810 890 970
  do
varx=$(($varx + 1))
	cat /tmp/files | awk -F\" -v OFS=\" '{$'$indexx'='$varx'; print }' | awk -F\" -v OFS=\" '{$'$indexy'='$vary'; print }'  >> ~/Choices/ROX-Filer/PuppyPin-formatted
    echo "Pass $inner in inner loop."
    let "inner+=1"  # Increment inner loop counter.
 
 
  # End of inner loop.

  let "outer+=1"    # Increment outer loop counter. 
  echo              # Space between output blocks in pass of outer loop.
  unset varx
done
 done  
 exit 0
Last edited by stemsee on Wed 03 Dec 2014, 20:03, edited 1 time in total.

stemsee

#21 Post by stemsee »

S G
O E
L N
V I
E U
D E A D O N T I M E H O L O S O P H O S

In all the forums that i searched it was said that it could not be done, yet I have done it!!!

stemsee

#22 Post by stemsee »

Auto iconified desktop in grid of 80 x 80 1366 x 768 screen. This is for the icon repo pin. However the potential is enormous. circular icon clusters and other geometric clusters. Cluster by category, sort by name, ....
Attachments
capture28890.jpg
Auto iconified desktop, from /usr/shared/applications
(49.8 KiB) Downloaded 171 times

stemsee

#23 Post by stemsee »

auto creeated non iconified desktop region forming the cross.
Attachments
capture31807.jpg
(18.63 KiB) Downloaded 157 times
capture21739.jpg
(18.96 KiB) Downloaded 163 times
capture14945.jpg
(21.63 KiB) Downloaded 169 times
capture3504.jpg
(32.42 KiB) Downloaded 160 times

stemsee

#24 Post by stemsee »

getting accustomed to the geometry
Attachments
capture29027.jpg
(39.68 KiB) Downloaded 164 times

stemsee

#25 Post by stemsee »

last screeny before I attempt circular cluster/s
Attachments
capture20099.jpg
(37.54 KiB) Downloaded 167 times

stemsee

#26 Post by stemsee »

Because of some very long names I added renaming feature for linked icons 000-999
.
Attachments
capture32019.jpg
to the right
(9.81 KiB) Downloaded 144 times
capture29967.jpg
to the left
(9.88 KiB) Downloaded 142 times
capture27243.jpg
along the bottom
(11.15 KiB) Downloaded 140 times
capture23185.jpg
icons along the top
(11.01 KiB) Downloaded 138 times
capture9617.jpg
(20.74 KiB) Downloaded 145 times
capture411.jpg
renamed with numbers for demo purposes.
(48.08 KiB) Downloaded 155 times

stemsee

#27 Post by stemsee »

For this to work properly I shall have to resize all icons to 48x48.
Attachments
capture9284.jpg
(43.81 KiB) Downloaded 144 times

stemsee

#28 Post by stemsee »

Most puppy distros don't have anywhere near the number of apps as EmSeeV2.3 so once I have all management tools working for this distro they should be more than adequate fro all other distros! Now I am thinking about draw your own icon-path.

stemsee

#29 Post by stemsee »

I think most people don't want more than 24 icons on their desktop ever! So here is my default setting for the first release of Nicons-V2
You can choose to rename to numbers or not, .desktop ext is removed. Of course it needs refinement. The default setting is for 1366 x768 desktop. Next I will figure out how to set by res.

Dragging icons from the icon repo by threes will cause them to stay together for the auto-placement. Default is to add between 1 and 24 icons. Of course you can add more manually, and place where you like.

Anyone interested write below.
Attachments
capture29805.jpg
(22.92 KiB) Downloaded 101 times
capture10985.jpg
(24.87 KiB) Downloaded 110 times

Jasper

#30 Post by Jasper »

AppStarter presets to 20 (editable) icons and will automatically show/hide when used. I believe it has worked with many Pups and I would expect it to work with your Cafe-Edition (which probably has a multiple of 24 icons).

PS I believed in Father Christmas until I was 12-years-old.
Attachments
AppStarter-1.2.pet
(114.96 KiB) Downloaded 178 times

stemsee

#31 Post by stemsee »

@Jasper

In case you didn't notice this is not Cafe-Edition thread and I am not appealing for an app.

I am sure the AppStarter is a very good app written by whom? Jasper???
However my app handles upto 3000 icons if needed. It also hides them, and autoarranges them. It also creates additional pins for for two alternate iconified desktops aswell as the iconless and default. Also it supports pins per resolution. I do not think there is any other app in Puppy that comes close.

So. Please remove your post and download from my thread. I am promoting my own work not someone elses'. If you had written some program of your own that would be acceptable....but to continually interject your prefered pre-made code into my 'new' and single-handedly developed code, as if to say "Your stuff is not good enough for anyone in this forum, so let me point you all in the right direction." Defeats the purpose of LINUX and its community driven ethos of development and variety, progress and diversity.

Grow up or get lost!

Jasper

#32 Post by Jasper »

stemsee,

From your high ground, will your moral indignation necessitate that you demand the deletion of the post by gcmartin on page 103 of the Carolina - 1.2 thread?

What is below will hold if you try to be factual and reasonable.
_____________________________________________

User avatar
LazY Puppy
Posts: 1934
Joined: Fri 21 Nov 2014, 18:14
Location: Germany

#33 Post by LazY Puppy »

Jasper wrote:PS I believed in Father Christmas until I was 12-years-old.
Probably Jasper will post next:

Now I'm 13 years old and I've got an amount of free time MUCH TOO BIG. :lol:
RSH

"you only wanted to work your Puppies in German", "you are a separatist in that you want Germany to secede from Europe" (musher0) :lol:

No, but I gave my old drum kit away for free to a music store collecting instruments for refugees! :wink:

stemsee

#34 Post by stemsee »

Yes RSH it seems so.

@ Jasper
Carolina thread is not mine to regulate in anyway as I did not start it! I think that you can understand that logic.

Please Please Please, stop harrassing people!!

Jasper

#35 Post by Jasper »

stemsee,

As you are unable to take a little pressure and since you begged I will wait until 2015 before I correct your errors.

Meantime, might your Desktop Icons benefit from Descriptive Mouseover Tooltips rather than numbering?

Post Reply