Hi,
I am in the middle of making a new bash program which main goal is to re-align desktop icons vertically and horizontally (see pics below, before and after). It is useful when you put new icons on desktop.
I am successful in aligning vertically and my next thing to do is horizontal alignment (which I think I can manage). But a problem persists, Icons on first line is always moved to the fifth line.
Assistance needed, I am confused.
Thanks
Problem with fixdesktopicons in Bash
Problem with fixdesktopicons in Bash
- Attachments
-
- before.jpg
- (18.57 KiB) Downloaded 745 times
-
- after.jpg
- (17.46 KiB) Downloaded 749 times
-
- Icons_line_moved.jpg
- (31.21 KiB) Downloaded 671 times
-
- fixdesktopicons.tar.gz
- (485 Bytes) Downloaded 616 times
That's a good idea! But I haven't a clue at this stage...
I'm sure ttuuxxx would know..
Cheers
I'm sure ttuuxxx would know..
Cheers
Puppy Linux Blog - contact me for access
Should 390 be 399?
Code: Select all
if [[ $(echo {201..299}) =~ $y ]] ; then
ynew='"'224'"'
fi
if [[ $(echo {300..390}) =~ $y ]] ; then
ynew='"'320'"'
fi
if [[ $(echo {400..480}) =~ $y ]] ; then
ynew='"'416'"'
fi
trapster
Maine, USA
Asus eeepc 1005HA PU1X-BK
Frugal install: Slacko
Currently using full install: DebianDog
Maine, USA
Asus eeepc 1005HA PU1X-BK
Frugal install: Slacko
Currently using full install: DebianDog
- MinHundHettePerro
- Posts: 852
- Joined: Thu 05 Feb 2009, 22:22
- Location: SE
Hello!
For example, y=32 will test true in all the [[ ... ]]'s,
a workaround could be to re-phrase the tests, like e.g.
hth /
MHHP
For example, y=32 will test true in all the [[ ... ]]'s,
a workaround could be to re-phrase the tests, like e.g.
Code: Select all
if [[ $(echo " "{8..100}" ") =~ " $y " ]] ; then
MHHP
[color=green]Celeron 2.8 GHz, 1 GB, i82845, many ptns, modes 12, 13
Dual Xeon 3.2 GHz, 1 GB, nvidia quadro nvs 285[/color]
Slackos & 214X, ... and Q6xx
[color=darkred]Nämen, vaf....[/color] [color=green]ln -s /dev/null MHHP[/color]
Dual Xeon 3.2 GHz, 1 GB, nvidia quadro nvs 285[/color]
Slackos & 214X, ... and Q6xx
[color=darkred]Nämen, vaf....[/color] [color=green]ln -s /dev/null MHHP[/color]
Hello trio
Long time....good to see you!!!
The answer is simply to reorder you ifs
Sigmund
Long time....good to see you!!!
The answer is simply to reorder you ifs
Code: Select all
for y in `cat /root/Choices/ROX-Filer/PuppyPin | grep "</icon>" | cut -d "y" -f2 | cut -d '"' -f2 | sort -n`
do
if [[ $(echo {101..200}) =~ $y ]] ; then
ynew='"'128'"'
fi
if [[ $(echo {201..299}) =~ $y ]] ; then
ynew='"'224'"'
fi
if [[ $(echo {300..390}) =~ $y ]] ; then
ynew='"'320'"'
fi
if [[ $(echo {400..480}) =~ $y ]] ; then
ynew='"'416'"'
fi
if [[ $(echo {481..580}) =~ $y ]] ; then
ynew='"'512'"'
fi
if [[ $(echo {581..$END}) =~ $y ]] ; then
ynew='"'608'"'
fi
if [[ $(echo {8..100}) =~ $y ]] ; then
ynew='"'32'"'
fi
if [[ $(echo {$BOTTOM..~}) =~ $y ]] ; then
ynew='"'$BOTTOM'"'
fi
Sigmund