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 Sun 01 May 2016, 06:13
All times are UTC - 4
 Forum index » Advanced Topics » Additional Software (PETs, n' stuff) » Filesystem
mukstart
Post new topic   Reply to topic View previous topic :: View next topic
Page 1 of 1 [6 Posts]  
Author Message
recobayu


Joined: 15 Sep 2010
Posts: 191
Location: indonesia

PostPosted: Sun 02 Aug 2015, 21:56    Post subject:  mukstart
Subject description: start menu like cinnamon
 

Mukstart
This is my little pet that like start menu in newer O.S.
I adapted from start menu in cinnamon, and now, it has icon Very Happy.

press winkey + space, and we can see mukstart run.
press winkey + space again, and mukstart dissappear.

After install mukstart.pet, there are two script in /usr/bin, that is mukstart and startmukstart.
Please comment and advice.
Feel free to upgrade my simple script.
Thank you.

v4.3.1
I do a lot of change here.
Button with icon,
Search by tree
And logout_gui on the top of window.
At the first time, mukstart will walk very slow because he build a gui and save it to /tmp/mukstart. After that, mukstart will run very fast.
I edit the startmukstart's script



v4.2
add hover-selection="true"

Recobayu
mukstart-4.3.1.pet
Description  I'm sorry about name guimuks and mainw. I change mainw to guimuks.
I add geometry parameter here, so mukstart always show at left top screen.
pet

 Download 
Filename  mukstart-4.3.1.pet 
Filesize  2.32 KB 
Downloaded  64 Time(s) 
mukstart4.3.1.png
 Description   
 Filesize   55.31 KB
 Viewed   136 Time(s)

mukstart4.3.1.png

mukstart4.2.pet
Description  add hover-selection="true"
pet

 Download 
Filename  mukstart4.2.pet 
Filesize  2.74 KB 
Downloaded  130 Time(s) 
mukstart4.1.pet
Description  First version. Simple search menu
pet

 Download 
Filename  mukstart4.1.pet 
Filesize  2.67 KB 
Downloaded  123 Time(s) 

Last edited by recobayu on Fri 15 Jan 2016, 00:06; edited 6 times in total
Back to top
View user's profile Send private message 
recobayu


Joined: 15 Sep 2010
Posts: 191
Location: indonesia

PostPosted: Wed 13 Jan 2016, 03:17    Post subject:  

This is another mukstart's code:

Code:
#!/bin/sh
mkdir -p /tmp/mukstart
grep "<Menu label" /root/.jwmrc|cut -d'"' -f2 > main
#~ grep "<Program label" /root/.jwmrc|cut -d'"' -f2>/tmp/mukstart/submain
m=(`grep "<Menu label" /root/.jwmrc|cut -d\" -f2`)
icon=(`grep "<Menu label" /root/.jwmrc|cut -d\" -f4`)

#~ echo ${a[*]}
#indeks
for i in ${!m[*]};do
   #~ sed -e '/"'${a[$i]}'"/,/"'${a[$((i+1))]}'"/!d' /root/.jwmrc|grep "Program label"|cut -d '"' -f2>"/tmp/mukstart/$i${a[$i]}.txt"
   sed -e '/"'${m[$i]}'"/,/"'${m[$((i+1))]}'"/!d' /root/.jwmrc|grep "Program label"|cut -d '"' -f2>"/tmp/mukstart/$i"
done

buatmenu(){
   for i in ${!m[*]};do
   echo '<button relief="2">
      <label>'${m[$i]}'</label>
      <input file>/root/puppy-reference/midi-icons/'${icon[$i]}'</input>
      <action signal="enter-notify-event">echo "'$i'">/tmp/mukstart/sub</action>
      <action signal="focus-in-event">echo "'$i'">/tmp/mukstart/sub</action>
      <action signal="enter-notify-event">refresh:notesub</action>
      <action signal="focus-in-event">refresh:notesub</action>
      <width>16</width>
   </button>'
   done
}

buatsub(){
   for i in ${!m[*]};do
      echo '<vbox scrollable="true">'
      cat /tmp/mukstart/$i|while read line;do
         exe=`grep "$line" /root/.jwmrc|cut -d '>' -f2|cut -d '<' -f1`
         echo '<button>
            <label>'$line'</label>
            <action>'$exe'&</action>
            <action>EXIT:exit</action>
         </button>'
      done
      echo '</vbox>'
   done
}

#~ cek(){
   #~ if [[ $E == "" ]];then echo 0 > /tmp/mukstart/ganti; else echo 1 > /tmp/mukstart/ganti;fi
#~ }
#~ export -f cek

luru(){
   locApps='/usr/share/applications/'

   grep -r Comment= $locApps| sed 's/.*hare\/applications\///g'|sed 's/.desktop:Comment=/ /g'|grep -i $E|cut -d' ' -f1> /tmp/mukstart/cari
   grep -r Name= $locApps|grep -v GenericName|sed 's/.*are\/applications\///g'|sed 's/.desktop:Name=/ /g'|grep -i $E|cut -d' ' -f1 >> /tmp/mukstart/cari
   grep -r Exec= $locApps|sed 's/.*are\/applications\///g'|sed 's/.desktop:Exec=/ /g'|grep -i $E|cut -d' ' -f1 >> /tmp/mukstart/cari
   sort -u /tmp/mukstart/cari -o /tmp/mukstart/cari
}
export -f luru

mlaku(){
   locApps='/usr/share/applications/'
   read a < /tmp/mukstart/cari
   $(grep Exec= $locApps$a.desktop|cut -d'=' -f2)&
}
export -f mlaku

mlayu2(){
   locApps='/usr/share/applications/'
   $(grep Exec= $locApps$tri.desktop|cut -d'=' -f2)&
}
export -f mlayu2


export mainw='
<window title="/tmp/mukstart4.3" width-request="300">
  <vbox>
   <entry activates-default="true" has-focus="true">
      <variable>E</variable>
      <action>if [[ $E == "" ]];then echo 0 > /tmp/mukstart/ganti; else echo 1 > /tmp/mukstart/ganti;fi</action>
      <action>refresh:note2tree</action>
      <action signal="changed">luru</action>
      <action signal="changed">refresh:tri</action>
      <action signal="activate">mlaku&</action>
   </entry>
   <notebook show-tabs="false" show-border="false">
      <hbox>
         <vbox>
             '"`buatmenu`"'
         </vbox>
         <notebook show-tabs="false" show-border="false">
            '"`buatsub`"'
            <variable>notesub</variable>
            <input file>/tmp/mukstart/sub</input>
         </notebook>
      </hbox>
      <hbox>
         <tree rules-hint="true" headers-visible="false">
            <action signal="button-release-event">mlayu2&</action>
            <action signal="button-release-event">EXIT:exit</action>
            <action>mlayu2&</action>
            <action>EXIT:exit</action>
            <variable>tri</variable>
            <input file>/tmp/mukstart/cari</input>
         </tree>
      </hbox>
      <variable>note2tree</variable>
      <input file>/tmp/mukstart/ganti</input>
   </notebook>
  </vbox>
</window>'
echo $mainw>/tmp/mukstart/gui
gtkdialog -p mainw
mukstart4.3.gz
Description  rename the file to mukstart4.3 (remove the fake gz)
gz

 Download 
Filename  mukstart4.3.gz 
Filesize  3.41 KB 
Downloaded  45 Time(s) 
mukstart4.3.png
 Description   
 Filesize   30.55 KB
 Viewed   173 Time(s)

mukstart4.3.png

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


Joined: 15 Sep 2010
Posts: 191
Location: indonesia

PostPosted: Thu 14 Jan 2016, 01:20    Post subject: mukstart4.3.1
Subject description: refine gui
 

I use this code:
Code:
#!/bin/sh
#/tmp/mukstart4.3
#use button and refine gui
mkdir -p /tmp/mukstart
grep "<Menu label" /root/.jwmrc|cut -d'"' -f2 > main
#~ grep "<Program label" /root/.jwmrc|cut -d'"' -f2>/tmp/mukstart/submain
m=(`grep "<Menu label" /root/.jwmrc|cut -d\" -f2`)
icon=(`grep "<Menu label" /root/.jwmrc|cut -d\" -f4`)

#~ echo ${a[*]}
#indeks
for i in ${!m[*]};do
   #~ sed -e '/"'${a[$i]}'"/,/"'${a[$((i+1))]}'"/!d' /root/.jwmrc|grep "Program label"|cut -d '"' -f2>"/tmp/mukstart/$i${a[$i]}.txt"
   sed -e '/"'${m[$i]}'"/,/"'${m[$((i+1))]}'"/!d' /root/.jwmrc|grep "Program label"|cut -d '"' -f2>"/tmp/mukstart/$i"
done

buatmenu(){
   for i in ${!m[*]};do
   echo '<button relief="2">
      <label>'${m[$i]}'</label>
      <input file>/root/puppy-reference/midi-icons/'${icon[$i]}'</input>
      <action signal="enter-notify-event">echo "'$i'">/tmp/mukstart/sub</action>
      <action signal="focus-in-event">echo "'$i'">/tmp/mukstart/sub</action>
      <action signal="enter-notify-event">refresh:notesub</action>
      <action signal="focus-in-event">refresh:notesub</action>
      <width>16</width>
   </button>'
   done
}

buatsub(){
   for i in ${!m[*]};do
      echo '<vbox scrollable="true" width="300">'
      cat /tmp/mukstart/$i|while read line;do
         exe=`grep "$line" /root/.jwmrc|cut -d '>' -f2|cut -d '<' -f1`
         ic=`grep "$line" /root/.jwmrc|cut -d \" -f4`
         if [[ $ic == *\/* ]];then
            ico=$ic;
         else
            for i in mini-icons pixmaps;do
               b=`ls /root/puppy-reference/$i|grep $ic`
               if [[ $b != "" ]];then
                  ico=/root/puppy-reference/$i/$ic
               fi
            done
         fi
         echo '<button>
            <label>'$line'</label>
            <input file>'$ico'</input>
            <action>'$exe'&</action>
            <action>EXIT:exit</action>
            <width>16</width>
         </button>'
      done
      echo '</vbox>'
   done
}

#~ cek(){
   #~ if [[ $E == "" ]];then echo 0 > /tmp/mukstart/ganti; else echo 1 > /tmp/mukstart/ganti;fi
#~ }
#~ export -f cek

luru(){
   locApps='/usr/share/applications/'

   grep -r Comment= $locApps| sed 's/.*hare\/applications\///g'|sed 's/.desktop:Comment=/ /g'|grep -i $E|cut -d' ' -f1> /tmp/mukstart/cari
   grep -r Name= $locApps|grep -v GenericName|sed 's/.*are\/applications\///g'|sed 's/.desktop:Name=/ /g'|grep -i $E|cut -d' ' -f1 >> /tmp/mukstart/cari
   grep -r Exec= $locApps|sed 's/.*are\/applications\///g'|sed 's/.desktop:Exec=/ /g'|grep -i $E|cut -d' ' -f1 >> /tmp/mukstart/cari
   sort -u /tmp/mukstart/cari -o /tmp/mukstart/cari
}
export -f luru

mlaku(){
   locApps='/usr/share/applications/'
   read a < /tmp/mukstart/cari
   $(grep Exec= $locApps$a.desktop|cut -d'=' -f2)&
}
export -f mlaku

mlayu2(){
   locApps='/usr/share/applications/'
   $(grep Exec= $locApps$tri.desktop|cut -d'=' -f2)&
}
export -f mlayu2


export mainw='
<window title="mukstart4.3.1" width-request="400" icon-name="go-home">

  <vbox>
   <hbox>
    
     <button image-position="2" tooltip-text="Poweroff">
      <input file>/root/puppy-reference/pixmaps/puppy/shutdown.svg</input>
      <width>32</width>
      <action>exec wmpoweroff&</action>
      <action>EXIT:exit</action>
     </button>
     <button image-position="2" tooltip-text="Reboot">
      <input file>/root/puppy-reference/pixmaps/puppy/reboot.svg</input>
      <width>32</width>
      <action>exec wmreboot&</action>
      <action>EXIT:exit</action>
     </button>
     <button image-position="2" tooltip-text="Restart X">
      <input file>/root/puppy-reference/pixmaps/puppy/graphics_restart.svg</input>
      <width>32</width>
      <action>restartx&</action>
      <action>EXIT:exit</action>
     </button>
     <button image-position="2" tooltip-text="Exit to prompt">
      <input file>/root/puppy-reference/pixmaps/puppy/terminal.svg</input>
      <width>32</width>
      <action>exec wmexit&</action>
      <action>EXIT:exit</action>
     </button>
     <button image-position="2" tooltip-text="Restart JWM">
      <input file>/root/puppy-reference/pixmaps/puppy/wm_restart.svg</input>
      <width>32</width>
      <action>jwm -restart&</action>
      <action>EXIT:exit</action>
     </button>
   </hbox>
 
   <entry activates-default="true" has-focus="true">
      <variable>E</variable>
      <action>if [[ $E == "" ]];then echo 0 > /tmp/mukstart/ganti; else echo 1 > /tmp/mukstart/ganti;fi</action>
      <action>refresh:note2tree</action>
      <action signal="changed">luru</action>
      <action signal="changed">refresh:tri</action>
      <action signal="activate">mlaku&</action>
      <action signal="activate">EXIT:exit</action>
   </entry>
   <notebook show-tabs="false" show-border="false">
      <hbox>
         <vbox>
             '"`buatmenu`"'
         </vbox>
         <notebook show-tabs="false" show-border="false">
            '"`buatsub`"'
            <variable>notesub</variable>
            <input file>/tmp/mukstart/sub</input>
         </notebook>
      </hbox>
      <hbox>
         <tree rules-hint="true" headers-visible="false">
            <action signal="button-release-event">mlayu2&</action>
            <action signal="button-release-event">EXIT:exit</action>
            <action>mlayu2&</action>
            <action>EXIT:exit</action>
            <variable>tri</variable>
            <input file>/tmp/mukstart/cari</input>
         </tree>
      </hbox>
      <variable>note2tree</variable>
      <input file>/tmp/mukstart/ganti</input>
   </notebook>
  </vbox>
</window>'
echo $mainw>/tmp/mukstart/gui
gtkdialog -p mainw

And now, the gui is better. But my problem is it is very slow on start.
I actually save the gui's script in /tmp/mukstart/gui.
mukstart4.3.1.png
 Description   
 Filesize   50.32 KB
 Viewed   150 Time(s)

mukstart4.3.1.png

mukstart4.3.1.gz
Description 
gz

 Download 
Filename  mukstart4.3.1.gz 
Filesize  5 KB 
Downloaded  45 Time(s) 
Back to top
View user's profile Send private message 
recobayu


Joined: 15 Sep 2010
Posts: 191
Location: indonesia

PostPosted: Fri 15 Jan 2016, 00:23    Post subject:  

Version 4.3.1 fixed.

Add --geometry +"0"+"0" so mukstart always show on left top screen.
Back to top
View user's profile Send private message 
greengeek

Joined: 20 Jul 2010
Posts: 3723
Location: New Zealand

PostPosted: Fri 15 Jan 2016, 03:16    Post subject:  

Hi, I just tried this on a Slacko 5.6 derivative but it said "failed to install". Don't know why this happened. No other messages.
Back to top
View user's profile Send private message 
recobayu


Joined: 15 Sep 2010
Posts: 191
Location: indonesia

PostPosted: Fri 15 Jan 2016, 05:30    Post subject:  

I don't know greengeek. I make that pet in puppy tahr 605. Sad
Back to top
View user's profile Send private message 
Display posts from previous:   Sort by:   
Page 1 of 1 [6 Posts]  
Post new topic   Reply to topic View previous topic :: View next topic
 Forum index » Advanced Topics » Additional Software (PETs, n' stuff) » Filesystem
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.0552s ][ Queries: 12 (0.0068s) ][ GZIP on ]