TinTin++ Mud Client The TinTin++ message board

 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 
TinTin++ Mud Client

Mud.desktop launcher+icon for linux

 
Post new topic   Reply to topic    The TinTin++ message board Forum Index -> Finished Scripts
View previous topic :: View next topic  
Author Message
goofy



Joined: 24 Mar 2008
Posts: 164

PostPosted: Mon Nov 17, 2014 8:19 pm    Post subject: Mud.desktop launcher+icon for linux Reply with quote

Here is a TinTin++ script to automatically generate a desktop icon for launching your mud.

This uses Debian Linux with the LXDE desktop package (aptitude install task-lxde-desktop)

This also requires xterm and tmux.

You will need to create an 'image' directory in Your_Scripts_Folder and name the image icon.jpg

Replace 'ARTT' with name of your scripts directory, assuming it's in your home folder.

Replace the content within desktop_launcher_basis.txt angled brackets.

create_desktop_icon.tt

Code:
#nop    Find system user name
#nop    *********************

#var Your_Scripts_Folder ARTT
#var my_mud AbandonedRealms

#script {path} {users | cut -d' ' -f1}

#showme {finding system user name...}

#act {is this the name of your home folder? %1} {
    #var home {%1};

    #sys cp /home/$home/$Your_Scripts_Folder/desktop_launcher_basis.txt
    /home/$home/$Your_Scripts_Folder/desktop_launcher.txt;

    #sys printf "Icon=/home/$home/$Your_Scripts_Folder/image/icon.jpg\n" >>
    /home/$home/$Your_Scripts_Folder/desktop_launcher.txt;

    #sys cp /home/$home/$Your_Scripts_Folder/desktop_launcher.txt
    /home/$home/Desktop/$my_mud\.desktop;

    #sys cp /home/$home/$Your_Scripts_Folder/desktop_launcher.txt
    /home/$home/$Your_Scripts_Folder/$my_mud\.desktop;
    }
#showme {is this the name of your home folder? $path[1]}
#showme {if no, set it by editing create_desktop_icon.tt}


desktop_launcher_basis.txt

Code:
[Desktop Entry]
Encoding=UTF-8
Name=<Your_Mud>
GenericName=<Your_Mud>
Comment=Portal to <Your_Mud>
TryExec=xterm
Exec=xterm -fa 'Monospace' -fs 10 -fullscreen -e '/usr/bin/tmux new "tt++ ~/<Your_Scripts_Folder>/<Launch_Your_Mud.tt>"'
Type=Application
Categories=GTK;TerminalEmulator;


I've modified this without testing it.
I think it will work Thumbs Up
_________________
www.abandonedrealms.com


Last edited by goofy on Sun Dec 14, 2014 10:14 am; edited 3 times in total
Back to top
View user's profile Send private message
goofy



Joined: 24 Mar 2008
Posts: 164

PostPosted: Sun Dec 14, 2014 4:47 am    Post subject: Reply with quote

Here is a TinTin++ script to automatically generate a desktop icon for launching your mud.

This uses Debian Linux with the Gnome desktop package (aptitude install task-gnome-desktop)

(Gnome is currently Debians default desktop)

This also requires xterm and tmux.

You will need to create an 'image' directory in Your_Scripts_Folder and name the image icon.jpg

Replace 'ARTT' with name of your scripts directory, assuming it's in your home folder.

Replace the content within desktop_launcher_basis.txt angled brackets.

create_desktop_icon.tt

Code:
#nop    Find system user name
#nop    *********************

#var Your_Scripts_Folder ARTT

#var YourFavorite_MUD AbandonedRealms

#script {path} {users | cut -d' ' -f1}
#showme {finding system user name...}
#act {is this the name of your home folder? %1} {
    #var home {%1};

    #sys cp /home/$home/$Your_Scripts_Folder/desktop_launcher_basis.txt
    /home/$home/$Your_Scripts_Folder/desktop_launcher.txt;

    #sys printf "Path=/home/$home/$Your_Scripts_Folder/.\n" >>
    /home/$home/$Your_Scripts_Folder/desktop_launcher.txt;

    #sys printf "Icon=/home/$home/$Your_Scripts_Folder/image/icon.jpg\n" >>
    /home/$home/$Your_Scripts_Folder/desktop_launcher.txt;

    #sys printf "Exec=/home/$home/$Your_Scripts_Folder/LAUNCH_MUD.sh\n" >>
    /home/$home/$Your_Scripts_Folder/desktop_launcher.txt;

    #sys cp /home/$home/$Your_Scripts_Folder/desktop_launcher.txt
    /home/$home/$Your_Scripts_Folder/$YourFavorite_MUD\.desktop;

    #sys chmod +x /home/$home/$Your_Scripts_Folder/$YourFavorite_MUD\.desktop;

    #sys mv /home/$home/$Your_Scripts_Folder/$YourFavorite_MUD\.desktop
    /home/$home/.local/share/applications/$YourFavorite_MUD\.desktop;
    }
#showme {is this the name of your home folder? $path[1]}
#showme {if no, set it by editing create_desktop_icon.tt}

#nop    Set $YourFavorite_MUD\.desktop as Gnome3 favorite
#nop    **********************************************
    #script {path} {gsettings get org.gnome.shell favorite-apps}

    #act {'$YourFavorite_MUD\.desktop'} {#var favorite-apps on;}

    #act {gnome3 favorite-apps [%1]} {

        #if { "$favorite-apps" != "on" } {

            #delay {.50} {
                #sys {gsettings set org.gnome.shell favorite-apps "['$YourFavorite_MUD\.desktop']"};
                };

            #delay {1} {
                #sys {gsettings set org.gnome.shell favorite-apps "['$YourFavorite_MUD\.desktop', %1]"};
                };

        };
    }

    #showme {gnome3 favorite-apps $path[1]}


desktop_launcher_basis.txt

Code:
[Desktop Entry]
Version=1.0
Name=AbandonedRealms
Comment=Portal to Abandoned Realms
Terminal=false
Type=Application
Categories=Game;RolePlaying;ConsoleOnly;


LAUNCH_MUD.sh

Code:
#!/bin/sh

xterm -fa 'Monospace' -fs 10 -fullscreen -e '/usr/bin/tmux new-session -s ARTT "tt++ ~/ARTT/abandonedrealms.tt"'

_________________
www.abandonedrealms.com
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    The TinTin++ message board Forum Index -> Finished Scripts All times are GMT - 5 Hours
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
Get TinTin++ Mud Client at SourceForge.net. Fast, secure and Free Open Source software downloads Get TinTin++ Mud Client at SourceForge.net. Fast, secure and Free Open Source software downloads
TinTin++ Homepage

Powered by phpBB © 2001, 2002 phpBB Group