gmrun - CLI Run Dialog

Stuff that has yet to be sorted into a category.
Post Reply
Message
Author
aragon
Posts: 1698
Joined: Mon 15 Oct 2007, 12:18
Location: Germany

gmrun - CLI Run Dialog

#1 Post by aragon »

Home: http://sourceforge.net/projects/gmrun/
Version: 0.9.2

Gmrun is a little run-dialog like gexec. The nice thing is, that you could run it keyboard-driven. If you want to run a command 'normal' just enter and return, if you want to run it in a terminal, enter and Ctrl+return.

Config-file is /root/.gmrunrc.

Compiled and tested in 4.21.

aragon
Attachments
gmrun-0.9.2.pet
(38.68 KiB) Downloaded 790 times

Jasper

#2 Post by Jasper »

Hi,

It was mentioned that there is an auto complete facility. If so, an explanation of what that means and how it works would help me.

My regards

The way I understand auto complete is IF firefox is the only command beginning with f then f is all I need to type (on the second occasion if they are my stored commands as opposed to system-wide commands).

aragon
Posts: 1698
Joined: Mon 15 Oct 2007, 12:18
Location: Germany

#3 Post by aragon »

Sir Jasper wrote:Hi,

It was mentioned that there is an auto complete facility. If so, an explanation of what that means and how it works would help me.

My regards

The way I understand auto complete is IF firefox is the only command beginning with f then f is all I need to type (on the second occasion if they are my stored commands as opposed to system-wide commands).
it's like the bash autocompletion: you type one or more letters type TAB and you'll get a list of all matching commands from your PATH.

aragon

Jasper

#4 Post by Jasper »

Hi aragon,

I'm glad I asked. Thank you very much for your help.

My regards

I hope it is OK to ask another question which is, for me, unsolved. I use JWM and would like to combine and automate some shortcuts:

Win+g
wait 1 second
Win+z
wait 1 second
Ctrl+f

This puts Gnote in my tray, then opens my sole note on my desktop then adds the find option.

As I only do this once daily and it only takes a few seconds to do manually it is not important, but I would like to know how it can be done.

aragon
Posts: 1698
Joined: Mon 15 Oct 2007, 12:18
Location: Germany

#5 Post by aragon »

well let's see.

1. install attached pet.

2. Copy the following to a text-editor and save it as autognote.sh in
/root/my-applications/bin

Code: Select all

#!/bin/sh

# assuming that win+g starts gnote
xdotool key win+g

WID='xdotool getactivewindow' 
xdotool key $WID win+z &
xdotool key $WID ctrl+f &
3. Make autognote.sh executable
Right-Click in rox on autognote.sh and choose File > Properties and check all under EXEC

4. Run autognote.sh
best run from console to see output.

Lets see if it works.

aragon

Jasper

#6 Post by Jasper »

Hi again,

Thank you. I get output as follows:

# autognote.sh
/root/my-applications/bin/autognote.sh: line4: xdotool: command not found
#/root/my-applications/bin/autognote.sh: line8: xdotool: command not found
/root/my-applications/bin/autognote.sh: line7: xdotool: command not found

In case it may matter I use the win key for my first two manual shortcuts but they are referred to as Hyper+g and <Super>z where they are recorded.

I appreciate your kindness and I am happy to stay up, but it is late for you as well and we can easily continue this tomorrow (or whenever it may suit you). From the extra downloads of your PET it looks to be of more general interest.

My regards

aragon
Posts: 1698
Joined: Mon 15 Oct 2007, 12:18
Location: Germany

#7 Post by aragon »

Sir Jasper wrote:Hi again,

Thank you. I get output as follows:

# autognote.sh
/root/my-applications/bin/autognote.sh: line4: xdotool: command not found
#/root/my-applications/bin/autognote.sh: line8: xdotool: command not found
/root/my-applications/bin/autognote.sh: line7: xdotool: command not found
that indicates that the xdotool-pet is not installed.
In case it may matter I use the win key for my first two manual shortcuts but they are referred to as Hyper+g and <Super>z where they are recorded.
i think we will sort that out later.

aragon

Jasper

#8 Post by Jasper »

Hi aragon,

You are of course correct and I had not installed the xdotool-pet. My humble apology - I can only think that I was trying to follow too many of your instructions at once and failed to click the pet.

If I amend your first line of your uncommented code from:

"xdotool key win+g" to "xdotool key super+g"

Gnote does appear minimised in my tray (after about one second).
------------------
Although I have tried amending your code using trial and error I have failed to make any further progress with autognote.sh and I have not even managed to activate the Gnote window.
------------------
However, when using the shortcut sequence individually the Gnote window becomes active after I have used super+z.

There is no rush on my part and I am delighted to have your help - so we should proceed entirely at your convenience.

My regards

aragon
Posts: 1698
Joined: Mon 15 Oct 2007, 12:18
Location: Germany

#9 Post by aragon »

the problem should be, that my code is looking for the active window whilst gnote allready seems to be minimised. if i get the chance, i will try to install gnote in luci and see if could fix this.

aragon

Jasper

#10 Post by Jasper »

Hi aragon,

A portable version of Gnote is available from: http://portablelinuxapps.org/ [first column, well down].

Used individually the lines below work.

xdotool key super+g
xdotool key super+z
xdotool key ctrl+f

You have already been a great help to me, so please put any further advice at the bottom of your priorities.

My regards
Attachments
Gnote.jpg
I chose super+z, but the Ctrl+f find is pre-set and is not the same as the wider search shortcut shown in this picture.
(75.42 KiB) Downloaded 1539 times

aragon
Posts: 1698
Joined: Mon 15 Oct 2007, 12:18
Location: Germany

#11 Post by aragon »

Sir Jasper,

well i tried to install gnote in luci but failed because of a missing lib. the portable doesn't run either because of the missing lib :evil: so no luck atm with further testing.

sorry
aragon

Jasper

#12 Post by Jasper »

Hi aragon,

Thank you for trying.

My regards

Jasper

#13 Post by Jasper »

Hi aragon,

Today, I followed your above instructions, but with minor changes to the code so that it now reads:

Code: Select all

xdotool key super+g
sleep 2
xdotool key super+z
sleep 2
xdotool key ctrl+f

# The above puts Gnote in the tray, loads a Note and adds the Find box.

For convenience I then dragged the file to my desktop and the three individual shortcuts are now linked and when I click on that desktop icon they work in sequence.

Thank you for the xdotool pet and all your help.

My regards

Addendum:

As the bottom line of my single continuous note is always zz
and as I usually want to add a new item - and since the find
command finds automatically as I type I have now added

Code: Select all

sleep 1
xdotool type zz

aragon
Posts: 1698
Joined: Mon 15 Oct 2007, 12:18
Location: Germany

#14 Post by aragon »

wonderful!

aragon

Post Reply