Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
idesk icon file creator...
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Documentation, Tips & Tricks
View previous topic :: View next topic  
Author Message
epx
n00b
n00b


Joined: 30 Apr 2003
Posts: 68

PostPosted: Sat Sep 20, 2003 10:10 pm    Post subject: idesk icon file creator... Reply with quote

This is just a quick script I threw together to generate .lnk files for me for use with idesk.

Code:
#!/bin/bash
#Script to automate the icon creation process in idesk

printf "Icon filename (minus the extension): "
read fileName

touch /home/$USER/.idesktop/$fileName.lnk
outFile=/home/$USER/.idesktop/$fileName.lnk

printf "Caption: "
read caption
printf "Icon Path: "
read icPath
printf "Primary Command: "
read priComm
printf "Secondary Command: "
read secComm

echo "table Icon" > $outFile
echo "  Caption: "$caption >> $outFile
echo "  Icon: "$icPath >> $outFile
echo "  Command[0]: "$priComm >> $outFile

if [ "$secComm" ]
then
 echo "  Command[1]: "$secComm >> $outFile
fi

echo "end" >> $outFile

echo "Icon Created."


I also wrote this little script to automount devices, I use this script as the primary command for my idesk icons that refer to devices.
Syntax is simple: scriptname mountpoint

Code:
#!/bin/bash
#Check to see if dev is mounted, if not, mount it
#and open it, if so just open it
DEV=$1

isMntd=`cat /etc/mtab | grep $DEV | wc -l | sed 's/ //g'`

#If it is mounted, open it!
if [ "$isMntd" -eq "1" ]; then
        mntPnt=`cat /etc/mtab | grep $DEV | cut -d' ' -f2`
        nautilus --no-desktop $mntPnt
else
        mount $DEV
        mntPnt=`cat /etc/mtab | grep $DEV | cut -d' ' -f2`
        nautilus --no-desktop $mntPnt
fi
umount $mntPnt

Back to top
View user's profile Send private message
christsong84
Veteran
Veteran


Joined: 06 Apr 2003
Posts: 1003
Location: GMT-8 (Spokane)

PostPosted: Mon Sep 22, 2003 2:10 pm    Post subject: Reply with quote

nifty...thanks! :D
_________________
while(true) {self.input(sugar);} :twisted:
Back to top
View user's profile Send private message
Marctraider
Guru
Guru


Joined: 24 Dec 2003
Posts: 387

PostPosted: Wed Aug 18, 2004 11:55 am    Post subject: Reply with quote

Thanks, saves me some seconds again :)
_________________
MOBO: Maximus II Gene
RAM: DDR2 OCZ 4GB
CPU: E6400 Conroe
GPU: HD2600XT
SATA: 3x 250GB.
Back to top
View user's profile Send private message
rush_ad
l33t
l33t


Joined: 22 Jul 2004
Posts: 863
Location: New Jersey, USA

PostPosted: Wed Aug 18, 2004 5:30 pm    Post subject: Reply with quote

now, i'm new to gentoo and i've no idea how to use your work. please explain.

also, i've problem with idesk on fluxbox. i recently changed to qingy from gdm. when i started fluxbox with gdm, idesk came up on startup but with qingy it doesnt automatically comeup. any solution?
Back to top
View user's profile Send private message
wescott
Apprentice
Apprentice


Joined: 18 Feb 2004
Posts: 183
Location: A giant shoe

PostPosted: Thu Aug 25, 2005 3:34 am    Post subject: idesk-extras Reply with quote

Also, there is idesk-extras. It is simply a small script that allows you to graphicaly configure/add/remove icons from your desktop. It isn't in portage, but there is a howto for it here:
:arrow: http://wiki.linuxquestions.org/wiki/Idesk

Perhaps I'll add a cleaner written howto for it on this forum soon. I'll experiment with it more to see if I can add some stuff to make it more accessible on a Gentoo system.
_________________
Sometimes you feel like a nut, sometimes you don't
Gentoo Forum Member #43303

Yoda of Borg are we: Futile is resistance. Assimilate you, we will.
Back to top
View user's profile Send private message
Marctraider
Guru
Guru


Joined: 24 Dec 2003
Posts: 387

PostPosted: Thu Aug 25, 2005 7:18 am    Post subject: Reply with quote

Ahh thats nice :D

But o well, i use KDE nowadays.:roll:
_________________
MOBO: Maximus II Gene
RAM: DDR2 OCZ 4GB
CPU: E6400 Conroe
GPU: HD2600XT
SATA: 3x 250GB.
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Documentation, Tips & Tricks All times are GMT
Page 1 of 1

 
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