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 15 Jul 2018, 17:30
All times are UTC - 4
 Forum index » Advanced Topics » Additional Software (PETs, n' stuff) » Desktop
mukstart
Post new topic   Reply to topic View previous topic :: View next topic
Page 1 of 3 [40 Posts]   Goto page: 1, 2, 3 Next
Author Message
recobayu


Joined: 15 Sep 2010
Posts: 299
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  263 Time(s) 
mukstart4.3.1.png
 Description   
 Filesize   55.31 KB
 Viewed   906 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  329 Time(s) 
mukstart4.1.pet
Description  First version. Simple search menu
pet

 Download 
Filename  mukstart4.1.pet 
Filesize  2.67 KB 
Downloaded  295 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: 299
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  195 Time(s) 
mukstart4.3.png
 Description   
 Filesize   30.55 KB
 Viewed   931 Time(s)

mukstart4.3.png

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


Joined: 15 Sep 2010
Posts: 299
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   907 Time(s)

mukstart4.3.1.png

mukstart4.3.1.gz
Description 
gz

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


Joined: 15 Sep 2010
Posts: 299
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: 5086
Location: Republic of Novo Zelande

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: 299
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 
torm


Joined: 07 Mar 2015
Posts: 156

PostPosted: Wed 18 May 2016, 14:16    Post subject:  

Hello!
About the initial startup-time..
maybe it could use some cache-files
and a folder of it's own (like /usr/local/mukstart or something)
to hold configuration files, themes, whatnot.. and then a starter in the binary
path?

There is PupMenu that does:
http://murga-linux.com/puppy/viewtopic.php?t=76713&start=60
..and it uses GtkDialog, so probably there may be some more
interesting reading in the scripts Wink


xerrs.log shows:
widget_tree_input_by_command(): Couldn't open '/tmp/mukstart/cari' for reading.
widget_notebook_input_by_file(): Couldn't open '/tmp/mukstart/ganti' for reading.
..and this "ganti" appears to be commented out in the code?

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


Joined: 15 Sep 2010
Posts: 299
Location: indonesia

PostPosted: Sat 02 Jul 2016, 10:25    Post subject:  

torm wrote:
Hello!
About the initial startup-time..
maybe it could use some cache-files
and a folder of it's own (like /usr/local/mukstart or something)
to hold configuration files, themes, whatnot.. and then a starter in the binary
path?


Thank You Torm,
.now i use /usr/local/mukstart as your suggest.
.very long at first startup now just once, that is after install this pet.
.Better search, we can use whitespace in search, ex: 'ext edi'
.esc to close, win + space to launch it.
mukstart-4.3.2.pet
Description 
pet

 Download 
Filename  mukstart-4.3.2.pet 
Filesize  2.24 KB 
Downloaded  139 Time(s) 
Back to top
View user's profile Send private message 
recobayu


Joined: 15 Sep 2010
Posts: 299
Location: indonesia

PostPosted: Mon 11 Jul 2016, 19:05    Post subject:  

The new mukstart-4.3.2.1.
Start menu like cinnamon.
We can search and run application based on Name, Exec, or Comment. Just type it.
Add user icon profile and info on the bottom of window.
Very fast searching apps.
mukstart-search.png
 Description   Search mode
 Filesize   28.44 KB
 Viewed   681 Time(s)

mukstart-search.png

mukstart.png
 Description   Not search mode
 Filesize   58.46 KB
 Viewed   687 Time(s)

mukstart.png

mukstart-4.3.2.1.pet
Description 
pet

 Download 
Filename  mukstart-4.3.2.1.pet 
Filesize  2.86 KB 
Downloaded  139 Time(s) 
Back to top
View user's profile Send private message 
recobayu


Joined: 15 Sep 2010
Posts: 299
Location: indonesia

PostPosted: Wed 13 Jul 2016, 19:51    Post subject:  

Mukstart-4.3.2.2
Now, we can see icon in tree when we search.
Thank you to mochi, sfr, and step about pointing XDG_DATA_DIRS from here:
http://murga-linux.com/puppy/viewtopic.php?t=107461
Very fast searching apps.
mukstart-4.3.2.2.pet
Description 
pet

 Download 
Filename  mukstart-4.3.2.2.pet 
Filesize  3.1 KB 
Downloaded  146 Time(s) 
Back to top
View user's profile Send private message 
shadow of viper`


Joined: 27 Aug 2010
Posts: 114
Location: Hyderabad, India

PostPosted: Mon 01 Aug 2016, 20:32    Post subject: Awesome!
Subject description: This is exactly what puppy needs
 

Hi recobayu

I stumbled across this thread while looking for something else

This is exactly what puppy needs, lightweight and fast - yet modern looking menu

Thank you!

I installed the pet package last night and gave it a quick go

Unfortunately, there were a few errors
It was past midnight so i did not want to spend time troubleshooting

Info:
1. I tested this on LXPup, with LXPanel and OpenBox
2. Had to run mukstart from commandline because i did not configure the hotkey
3. When i ran mukstart in terminal, it threw errors about malformed tags
4. I nailed down the errors to the file manager tags - ROX and PCManFM (tags were empty?)
5. I edited the mukstart menu file in root directory (i think, dont remember it now) and placed a /root into the tags
6. mukstart menu worked after that
7. Obviously, my edited menu was gone when i ran the mukstart update. It threw errors again

Note:
I understand bash scripts a little but never worked with gtkdialog before
I am not on my puppy machine at the moment, will retest tonight again

Suggestions:
1. Is it possible to somehow remove the window decorations - close, minimise, maximise buttons
2. Is it possible to make the text left-aligned? (Looks like it is center-aligned now)
3. Is it possible to set the geometry of the window to a user configurable area? For example, i have my LXPanel at the bottom of my screen. I think it looks perfect if the menu started just above the panel but without any gap


Thanks again for this wonderful work
I will retest it some more

Cheers!
Back to top
View user's profile Send private message 
shadow of viper`


Joined: 27 Aug 2010
Posts: 114
Location: Hyderabad, India

PostPosted: Tue 02 Aug 2016, 10:48    Post subject:  

Hello again!

Tested a little more today on CompizPup

#1 The errors were for LXTerminal, PCManFM
on <input file> tags

I guess the icons for these applications were not found, will investigate later

I edited the /usr/local/mukstart/gui file and copied the icon path for an existing application (gexec)

Mukstart finally opened and looked pretty

#2 Could not figure out how to change the text alignment to left
Found a tutorial for gtkdialog on this forum, will try and learn

#3 Could not figure out how to remove window decoration, will go through the tutorial again

#4 Experimented with the button relief on the right pane and also figured out the geometry to suit my LXPanel

Here is the screenshot
Screenshot.jpg
 Description   
 Filesize   51.3 KB
 Viewed   547 Time(s)

Screenshot.jpg

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


Joined: 15 Sep 2010
Posts: 299
Location: indonesia

PostPosted: Wed 03 Aug 2016, 01:01    Post subject:  

Wow..
That is very great, Shadow!
I only make this for jwm, but You can upgrade my code. I'm very happy..
Very Happy

I know how to left alignment on button, but it just on text. But when i add image, it is center automatically. Sad

for making decoration window gone, please add
Code:
decorated="false"
after window. So the complete line is like this:
Code:
<window title="mukstart-4.3.3" width-request="410" icon-name="go-home" decorated="false">


Please, if you found any new upgrade script, please put it here so mukstart will be better.
Thank you.
Back to top
View user's profile Send private message 
MochiMoppel


Joined: 26 Jan 2011
Posts: 1548
Location: Japan

PostPosted: Wed 03 Aug 2016, 04:17    Post subject:  

recobayu wrote:
I know how to left alignment on button, but it just on text.
How?
Back to top
View user's profile Send private message 
recobayu


Joined: 15 Sep 2010
Posts: 299
Location: indonesia

PostPosted: Wed 03 Aug 2016, 06:20    Post subject:  

MochiMoppel wrote:
How?

Here it is:

Code:
#!/bin/sh
export leftbut='
<window width-request="200">
 <vbox>
    <button xalign="0">
     <label>left</label>
    </button>
    <button xalign="0">
     <label>left?</label>
     <input file>/root/puppy-reference/midi-icons/edit48.png</input>
    </button>
    <button xalign="0.5">
     <label>center</label>
    </button>
    <button>
     <label>center too (default)</label>
    </button>
    <button xalign="1">
     <label>right</label>
    </button>
 </vbox>
</window>'

gtkdialog -p leftbut
buttonalignment.png
 Description   
 Filesize   6.8 KB
 Viewed   485 Time(s)

buttonalignment.png

Back to top
View user's profile Send private message 
Display posts from previous:   Sort by:   
Page 1 of 3 [40 Posts]   Goto page: 1, 2, 3 Next
Post new topic   Reply to topic View previous topic :: View next topic
 Forum index » Advanced Topics » Additional Software (PETs, n' stuff) » Desktop
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.0877s ][ Queries: 12 (0.0087s) ][ GZIP on ]