mukstart - start menu like Cinnamon

Window managers, icon programs, widgets, etc.
Message
Author
User avatar
recobayu
Posts: 387
Joined: Wed 15 Sep 2010, 22:48
Location: indonesia

Muksearch

#41 Post by recobayu »

I was inspired by windows 10 search. Now it is separate with cortana.
I make it simple. The good news is, if we search an app and run it now, it become on the top of search list on the next search.
I also add recent apps button (max 5 apps) and recently used doc (thank you MochiMoppel, I use your code).
We can add shortcut it (i.e: shift+win or win+space). Please rename the fake gz and run it.
I hope you like it. Thank you.
Attachments
app_tobe_the_first.png
We run an App. On the next run, the app become on the first list
(56.02 KiB) Downloaded 404 times
recent_apps.png
Empty search box. It shows recent apps and recently used document
(66.65 KiB) Downloaded 397 times
190901_2224_muksearch.gz
remove fake gz
(7.85 KiB) Downloaded 281 times

User avatar
MochiMoppel
Posts: 2084
Joined: Wed 26 Jan 2011, 09:06
Location: Japan

Re: Muksearch

#42 Post by MochiMoppel »

recobayu wrote:thank you MochiMoppel, I use your code
You're welcome, but that's not exactly my code :wink:
Always make sure that you test your code with file names that contain spaces.

I suggest that in line 217 you change

Code: Select all

<action signal="button-release-event">rox -s $tree_recent</action>
to

Code: Select all

<action signal="button-release-event">rox -s "$tree_recent"</action>

[Edit]
If you like you can try to replace the generic folder icons with each file's ROX mime icon:

1) symlink the ROX icons

Code: Select all

ln -fsn /usr/local/apps/ROX-Filer/ROX/MIME/ ${muksdir}/icons
( Your assignment "export XDG_DATA_DIRS=$XDG_DATA_DIRS:$muksdir" needs no change)

1) Change the function. The sed command now fetches also the mime-type. I omitted the if command as it's most likely not needed.

Code: Select all

recently_used(){
	rm $muksdir/recent
	rm $muksdir/recent_all
	XBEL_PATH=/root/.local/share/recently-used.xbel
	IFS=$'\n'
	MAX_ITEMS=20
	printf -v ALL "$(sed -rn 's/%/\\x/g
	/href=/   {N;N;N;N;s_^.*file://([^ "]*).*modified="([^"]*).*mime-type type="([^"]*).*$_\2@\3|\1_p}
	' "$XBEL_PATH" | sort -r | sed 's/.*@//; s_/_-_')"

	for file in $ALL ;do
	[[ -e ${file#*|} ]] && CNT=$((CNT+1)) && echo "$file" >> $muksdir/recent
	((CNT==MAX_ITEMS)) && break
	done	   
}
3) Change the tree:

Code: Select all

	<tree rules-hint="true" headers-visible="false" hover-selection="true">
	  <height>400</height>
	  <width>600</width>
	  <action signal="button-release-event">rox -s "$tree_recent"</action>
	  <action signal="button-release-event">EXIT:exit</action>
	  <action>rox -s "$tree_recent"</action>
	  <action>EXIT:exit</action>
	  <input file icon-column="0">'$muksdir'/recent</input>
	  <variable>tree_recent</variable>
	</tree>

User avatar
recobayu
Posts: 387
Joined: Wed 15 Sep 2010, 22:48
Location: indonesia

#43 Post by recobayu »

Thank you, MochiMoppel.. I like it.
Please download file gz attachment below. rename it manually. it is not real gz file.

Improvement:
-Recent activities icon is based on mime icon the file. Thank you Mochimoppel.. :D
-Colored text recent apps and recent activities
-If we click button on recent apps, it become the first on the next run
-fix the "$tree_recent".
-fix for sudoku.
-file /root/.muksearch/topapps keep small (keep only 5 line)
-notebook also expand vertically when the window resize vertically
-exit by press escape key
Attachments
not searching.png
The default screen, now support icon based on type of file. 39 Mochimoppel..
(63.94 KiB) Downloaded 337 times
190903_1705_muksearch.gz
remove fake gz
(8.11 KiB) Downloaded 284 times
Last edited by recobayu on Fri 06 Sep 2019, 10:05, edited 1 time in total.

User avatar
MochiMoppel
Posts: 2084
Joined: Wed 26 Jan 2011, 09:06
Location: Japan

#44 Post by MochiMoppel »

Looks good!
One thing you may want to reconsider is the MAX_ITEMS limitation. This limitation makes sense in a menu, for which this routine was originally written, but you have a scrollbar in your window and speed is not as crucial as in case of a menu. Probably eliminating MAX_ITEMS and CNT would have no negative effects.

User avatar
recobayu
Posts: 387
Joined: Wed 15 Sep 2010, 22:48
Location: indonesia

#45 Post by recobayu »

The problem appear after I install a new app. It doesn't appear in mukstart. So I create this update. Now it was fixed. The recent apps still on top of list. and the new app will add in daftarlengkap.

Thank you Mochimoppel, now the recent activities more than 20.
it also can run in terminal where the file has "Terminal=true". Example: python.

Thank you
Attachments
190906_1520_muksearch.gz
remove fake gz
(8.98 KiB) Downloaded 303 times

User avatar
recobayu
Posts: 387
Joined: Wed 15 Sep 2010, 22:48
Location: indonesia

#46 Post by recobayu »

Update muksearch:
add two buttons: Clear recent apps and Clear recent activities.
Attachments
muksearch-v2.png
Buttons with relief=&quot;2&quot;
(22.1 KiB) Downloaded 438 times
muksearch.gz
191115_0949
(10.04 KiB) Downloaded 267 times

User avatar
recobayu
Posts: 387
Joined: Wed 15 Sep 2010, 22:48
Location: indonesia

#47 Post by recobayu »

Hi Everyone,
I make a new mukstart, but it is not complete yet. In this version, I can make the menu and submenu appear like left icon in button. I also make mukstart really like start menu in cinnamon. Any suggestion are welcome.
Thank you.
Attachments
mukstart.png
When not search
(58.84 KiB) Downloaded 381 times
191204mukstart.gz
still need more addition
(15.99 KiB) Downloaded 247 times

User avatar
recobayu
Posts: 387
Joined: Wed 15 Sep 2010, 22:48
Location: indonesia

#48 Post by recobayu »

My code growing huge.. oh..
I can not write just in one script. the terminal says:

Code: Select all

./191209_0859: line 374: /usr/bin/tail: Argument list too long
./191209_0859: line 375: /usr/sbin/gtkdialog: Argument list too long
So I split my code into two files: the engine that create gui and the run (jalan) script.
Please suggest me an advice.. I still learn programming with bash, gtkdialog.
Thank you.
Attachments
191209_1101_mukstart.tar.gz
real tar gz file
(4.41 KiB) Downloaded 238 times
mukstart_191209_1101.png
pin it comment (right bottom) now like in start menu cinnamon
(49.77 KiB) Downloaded 322 times

User avatar
sc0ttman
Posts: 2812
Joined: Wed 16 Sep 2009, 05:44
Location: UK

#49 Post by sc0ttman »

recobayu wrote:My code growing huge.. oh..
I can not write just in one script. the terminal says:

Code: Select all

./191209_0859: line 374: /usr/bin/tail: Argument list too long
./191209_0859: line 375: /usr/sbin/gtkdialog: Argument list too long
[/quote]

I haven't looked at your code, but it's likely you are trying to hold too many lines in a variable.

Write the variable to a file, and operate on that instead.. Something like:

[code]
cat file1 file 2 | grep 'foo ' > /tmp/some_file
...

something="$(grep 'bar /tmp/some_file | sed "s/old_value/new_value/g" )"

etc....


Or, it could be that you haven't wrapped something in quotes..

Like

Code: Select all

grep $some_value_with_spaces  /tmp/somefile
or

Code: Select all

grep 'foo' $some_file_list

(of course this is a guess, based on the error you got...)
[b][url=https://bit.ly/2KjtxoD]Pkg[/url], [url=https://bit.ly/2U6dzxV]mdsh[/url], [url=https://bit.ly/2G49OE8]Woofy[/url], [url=http://goo.gl/bzBU1]Akita[/url], [url=http://goo.gl/SO5ug]VLC-GTK[/url], [url=https://tiny.cc/c2hnfz]Search[/url][/b]

User avatar
recobayu
Posts: 387
Joined: Wed 15 Sep 2010, 22:48
Location: indonesia

#50 Post by recobayu »

Thank You, Scottman.
I split my code into two separate files. I call my make_gui_script from another file. And it's work.. :D

Code: Select all

#!/bin/sh
export mukstartdir=/root/.mukstart

/usr/local/mukstart/./mukstart_make_gui

tail -n +2 "$mukstartdir"/gui_mukstart > "$mukstartdir"/guifix
gtkdialog -f "$mukstartdir"/guifix --geometry +"0"+"0"
Now we can change display profile.
run from terminal:

Code: Select all

mukstart
Attachments
191209 mukstart.png
(69.12 KiB) Downloaded 300 times
mukstart.pet
contains face images from linuxmint
(195.85 KiB) Downloaded 246 times

sfs
Posts: 49
Joined: Sat 02 Nov 2013, 04:49
Location: Russia
Contact:

#51 Post by sfs »

[url=https://sourceforge.net/projects/puppyrusa/]PuppyRus-Arch[/url]

User avatar
recobayu
Posts: 387
Joined: Wed 15 Sep 2010, 22:48
Location: indonesia

#52 Post by recobayu »

Thank you, Sfs for your feedback.
I upload the new mukstart that be able to find an app.
sc0ttman wrote:Write the variable to a file, and operate on that instead..
Thank you, Sc0ttman.
I found my problem. That is, I export my gui. The previous code is like this:

Code: Select all

export gui='<?xml version="1.0"?>
<window decorated="true" resizable="false" title="Mukstart" icon-name="limuks-logo">
...
</window>' > "$mukstartdir"/gui_mukstart
Now I write in a file, so I just do like this:

Code: Select all

echo '<?xml version="1.0"?>
<window decorated="true" resizable="false" title="Mukstart" icon-name="limuks-logo">
...
</window>' > "$mukstartdir"/gui_mukstart
Then I call my gui by tailing it.

Code: Select all

tail -n +2 "$mukstartdir"/gui_mukstart | gtkdialog -s
Okay.

What new:
we can move from tree (search apps) using left and right arrow. Left go to search box (entry) and right go to display picture.
Run it by command "mukstart" from terminal.
At first walk, it is eat long time. But at second and later, it run faster.

Questions:
1. How to make fileselect can show preview of display picture?
2. This mukstart still long to wake up from I run it. Anyone know how to faster it?
Thank you.
Attachments
mukstart-191222.png
(66.41 KiB) Downloaded 201 times
mukstart-191222.pet
Find app now work
(195.53 KiB) Downloaded 247 times

sfs
Posts: 49
Joined: Sat 02 Nov 2013, 04:49
Location: Russia
Contact:

#53 Post by sfs »

recobayu wrote:2. This mukstart still long to wake up from I run it. Anyone know how to faster it?
I redid your script for non puppy linux and replaced :
for -> awk
gtkdialog : <input file> -> <input file icon=

"Recent Apps" does not work ?

Сan add checkbox "Edit *.desktop" ?
[url=https://sourceforge.net/projects/puppyrusa/]PuppyRus-Arch[/url]

Post Reply