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 Sat 25 Apr 2015, 08:29
All times are UTC - 4
 Forum index » House Training » HOWTO ( Solutions )
Geany as Launcher and Bookmarks Manager
Moderators: Flash, Ian, JohnMurga
Post new topic   Reply to topic View previous topic :: View next topic
Page 1 of 1 [10 Posts]  
Author Message
Puppus Dogfellow


Joined: 07 Jan 2013
Posts: 819
Location: nyc

PostPosted: Mon 16 Mar 2015, 22:36    Post subject:  Geany as Launcher and Bookmarks Manager
Subject description: open programs, files, folders and web sites; reshape and resize windows from within a text document.
 

adapted from here.

requires xdotool-2.20110530.1-3.pet
64 bit version: xdotool-2.20110530.1-3.1.2.x86_64.rpm


the following guide assumes jwm. you can use rox panels or alter the menu code for other windows managers if you don't have it/prefer not to use it. if you can get geany's macro function to work correctly then you're a step ahead of the set up and don't need anything other than geany itself to use the tweak the following script automates. just record the steps as a macro (tools menu). you'll have a shortcut key that's at least as convenient as any other, but you don't get the tray button or menu item without some window manager adjustments of one sort or another.

______________

with a few adjustments, you can launch anything from within any geany document as if it were itself a menu or a terminal. below is a screenshot of partview being opened by clicking on the VTG button i added to a top middle hideaway tray. place the cursor and the line gets sent to the terminal, focus is switched to the terminal, the line is entered, and then focus is returned/the program, script, folder etc is run, launched, opened.



you'll need the following script and some tweaking of the geany menu.

Code:

#!/bin/sh
# name vtg and place in /root/my-applications/bin
# requires xdotool and a few menu adjustments
#geany as launcher and bookmarks manager
#open programs, files and web sites; reshape and resize windows from within a text document.
xdotool key ctrl+9 ctrl+8 Return ctrl+7

 #for jwm root menu(s): <Program label="Geany VTE Line Launch" icon="">vtg</Program>
 #or <Program label="VTG"">vtg</Program> .   for a tray button you could use   <TrayButton popup="geanylauncher" label="VTG">exec:vtg</TrayButton> . add an icon (icon="path/to/icon.jpg.or.whatever") for it if you like. add to /root/jwmrc-tray or any other



at this point, this xdotool script is pointing to shortcuts in geany which do not yet exist. to make them,

edit > preferences > keybindings (or help > keyboard shortcuts > edit)

step 1: send selection (or line--just place the cursor; you don't need to highlight anything) to terminal:
ctrl+9 (this one is already built in as F4--you can set the shortcuts to whatever you like--just keep the order the same as in the script above)

step 2: switch focus to terminal:
ctrl+8

step 3: enter command obtained in step 1
Return

step 4: return focus to page/close message window and terminal so that you're back to the original page as it was before you launched the script. you'll need to alter this if you want to keep the terminal open or otherwise change the interface:
ctrl+7


you'll need to find the slots for the above commands and set the shortcut keys (the pop up will call ctrl primary), optionally leaving F4 and changing the ctrl+9 in the script above to match.


the following line of code launched with VTG will make a text file of all the files and their paths in /root/my-applications/bin (swap out the blue for the location of your choice) and then open it (named on the fly--choose whatever you like for the location and name in red) in geany:

find $PWD /root/my-applications/bin > /root/myapbin1; geany /root/myapbin1


the following code will automatically take any path highlighted and convert it into a rox bookmark (when activated with VTG, whether it's a menu item, tray button, or panel script--shortcut keys (other than those that access the menu) don't work very well with this script so i suggest putting VTG atop a root menu for quick key access). you can highlight multiple lines at a time and the script will correctly place the "rox" and quotation marks where they need to be.

Code:

#! /bin/sh
# based on ht-b by miriam
# name rxmkr and place in /root/my-applications/bin
# turn a path into a rox bookmark when used with nwpt/vtg
# swap out the rox to have other file managers open the folder/other programs open the file.

xclip -o | sed 's/^/rox "/' | sed 's/$/\"/' | xclip -selection clipboard
xdotool type "`xclip -out -selection clipboard`"

#<Program label="RXMKR">vtg</Program> as menu suggestion


right clicking will give you an option to open items as text--always works if the path is full. the above code places quotation marks around the path--not really necessary unless there are spaces in some program titles. highlight and use the find and replace function (search menu ...> replace selected) to have things other than rox open up the files. make copies to have it set so that a file can be opened by a variety of things at a click. to launch the bulk of puppy's programs, you don't need the path, just the name, usually in lower case.

Code:
ls /usr/share/applications > /root/pupaps1; geany  /root/pupaps1


gives you most as a list opened in geany, but you'll need to ditch the .desktop part of the file names and the capitalization.

edit > select all > format > toggle case, and search > find and replace > [.desktop] [space, blank, or return all work] > whole document

and you be able to launch puppy's apps from menus that can be altered and expanded as you're using them.

to get an idea of the control this gives you, play around with the following code:

Code:

#!/bin/sh

# pos+

wmctrl -r :SELECT: -b remove,maximized_vert,maximized_horz && wmctrl -r :SELECT: -e 0,1176,460,-1,-1


# value of -1 means don't change; gravity, position on x axis, position on y axis, width of x, height of y.
#currently set to snap windows between two monitors. change :SELECT: to :ACTIVE: to have it work on the currently activated window rather than giving you cross hairs to zap windows with.
#requires wmctrl.
# wmctrl -G -l  gives you geometry of current windows--use as a guide.
# to use in with vtg, you don't need it as a script--just the line of code: wmctrl -r :SELECT: -b remove,maximized_vert,maximized_horz && wmctrl -r :SELECT: -e 0,1176,460,-1,-1
 


1176,460,-1,-1 are x position, y position, width of x, and height of y respectively, with the last two (physical dimensions as opposed to the first two, which are placement) set to remain as the original window has them. you can change the figures to whatever you like, hit VTG, and the next window you click will be forced into your chosen size and position, even if the document you are controlling things from hasn't yet been saved.

helpful hint: make shortcut menus from your bash-history and gexec history files. use program1| program2| program3| to launch things simultaneously as the VTE will ordinarily wait for something to be closed before launching the next thing. the program path/to/file1 path/to/file2 path/to/file3 format will allow most applications to open more than one file at a click.

(position script requires wmctrl, which you can get here)

____

i think this may have appeal beyond my little precise spinoff and it's not necessarily dependent on JWM, so i'm making it its own thread as opposed to placing it here, which is where i document most of my jwm fiddling. feedback welcomed and encouraged--this seems to me a good way to learn and play around with code and at the very least become more familiar with it, or at least less put off by it, if not more appreciative of it--knowing it makes life easier and there's nothing wrong with that. my appreciation for linux, puppy, rox, jwm, and geany grows every day.

i'm serious.

Laughing




enjoy.

Very Happy
Back to top
View user's profile Send private message 
Puppus Dogfellow


Joined: 07 Jan 2013
Posts: 819
Location: nyc

PostPosted: Mon 23 Mar 2015, 22:34    Post subject: a workaround for the convoluted shortcut key stroll
Subject description: also cast or putt the mouse about
 

xdotool allows you to quickly rein in the launch command we had to place on the menu. if you followed the above suggestion and placed the vgt command on the first slot of the root one menu, then

Code:


<Key mask="A" key="z">exec:xdotool key alt+1 Down Return</Key>   
<Key mask="A" key="BackSpace">exec:xdotool key alt+1 Down Return</Key>   


cuts the key presses to two from four.

__________

once you get the hang of using it, it's really fast and almost sort of fun. you can use the following code to click pop up boxes--i think the mechanics involved are somewhat akin to a golf or fishing game, or maybe even Battleship.


Code:

      xdotool mousemove 0 0 click 1 mousemove restore         




what that does is tell xdotool to toss the mouse to the x and y coordinates specified (here both zero), click the left button, and then send the mouse back. trial and error until you can hit things with pinpoint accuracy and no longer need to recast, take a second shot, load up another torpedo, etc.


Wink


____________

thing three: since this (just about) uses real language to launch things, and since any language that interferes with the code can be commented out but still used to give and gain guidance, and since the text can be made absolutely enormous, and since it's possible that if they've waited this long to get into computers, they won't be feeling the lack of icons, perhaps the geany line launcher can be used to help make puppy friendlier for those whose visual acuity or general ease with computers is lacking.
Back to top
View user's profile Send private message 
Puppus Dogfellow


Joined: 07 Jan 2013
Posts: 819
Location: nyc

PostPosted: Thu 02 Apr 2015, 00:41    Post subject: helper menu and suggested uses  

convert paths to rox bookmarks or menu items

^download and place contents in /root/my-applcations/bin.
add the following menu to /etc/xdg/templates/_root_.jwmrc (or another root menu, if you have/prefer).

Code:
  <Menu label="make bookmarks and launchables" icon="" height="16">
 
<Program label="to open with rox" icon="">rxmkr</Program>

<Program label="to open with geany" icon="">gmkr</Program>
<Program label="to open with leafpad" icon="">lpmkr</Program>

<Program label="to open with libreoffice--writer" icon="">lowmkr</Program>
<Program label="to open with libreoffice" icon="">lomkr</Program>
<Program label="plain quotation marks around path" icon="">plainquotesmkr</Program>

<Program label="to open with firefox" icon="">ffmkr</Program>
<Program label="to open with palemoon" icon="">pmmkr</Program>
<Program label="to open with seamonkey " icon="">smmkr</Program> 

<Program label="to open with mtpaint" icon="">mtmkr</Program>
<Program label="to open with viewnoir" icon="">vnmkr</Program> 

<Program label="to open with vlc" icon="">vlcmkr</Program> 
 </Menu>


use this in conjunction with the

find $PWD /root/my-applications/bin > /root/myapbin1; geany /root/myapbin1

script, which lists paths in the directory specified, then copies them into a file (to be named and given a place to reside). highlighting these paths and then clicking one of the above menu entries will surround the path with quotation marks (in case there's a break in a name somewhere), and then prepend that with the program of your choice (it's simple to swap out program name in either the script or the menu item that calls it--just copy and overwrite in both places to add your own choices to the menu) followed by a space.


____________

i'm using

Code:
<Key mask="A" key="z">exec:xdotool key alt+1 Down Return</Key>   
to launch vtg, possible because it sits on the first slot of the root one menu. so with alt+z providing easy activation, you just need something to provide easy access to the works. i'm using alt+shift+g (
Code:
<Key mask="AS" key="g">exec:geany /root/nwp.readme</Key>
added to jwmrc-personal.) this is what comes up, more or less:

Quote:

combination crib sheet for useful codes, menu/bookmarks launcher, scrap, VGT and NWP help. first, some useful codes:
place cursor and press VGT button or shortcut to launch code or program

-------codes-------

treesize| rox /mnt| partview
^overview 1

lxtask| PupControl
^overview 2
(when programs are linked on a line as above, place cursor to launch all or highlight one to launch it on its lonesome)




rox -D /
^close all rox windows

rox -D /close/this/directory/&subs


for f in TTT{2..6}.txt ; do cp TTT.txt $f ; done
#make multiple copies of a file^
for f in TTT{2..6} ; do cp -r TTT $f ; done
#make multiple copies of a directory^
#see line 69 for details (ctrl+l 69 enter)
^you can use ctrl+l or ctrl+f to go to line or find...you can also navigate/placehold by bracket, brace, or marker through the built in shortcut keys.

this is living scrap--there's really no reason to comment anything out--you can also highlight sections of code to see if they work--handy when putting menus together, etc...

find $PWD /root/my-applications/bin > /root/myapbin1; geany /root/myapbin1

^the above line of code launched with VTG will make a text file of all the files/paths in /root/my-applications/bin (swap out the first path for the location of your choice) and then open it (named on the fly--choose whatever you like for the location and name for the final two paths given).

ls /usr/share/applications > /root/pupaps1; geany /root/pupaps1

^gives you most as a list opened in geany, but you'll need to ditch the .desktop part of the file names and the capitalization.
edit > select all > format > toggle case and search > find and replace > [.desktop] [space, blank, return all work] > whole document
and you be able to launch puppy's apps from menus that can be altered and expanded as you're using them.
to get an idea of the control this gives you, play around with the following code:

[...]


---bookmarks and programs---

hardinfo
htop
gexec
df -h

^i have RoxTerminal set to autostart with four open tabs. you can highlight and middle click a tab to paste a name change/middle click in the tab to run the code (as with any terminal, use the arrow keys to scroll back through past entries or tab tab to autocomplete). activated with the vtg, df -h (drive sizes and free space in human readable form) and htop will output in the terminal window, and gexec and hardinfo will pop up their respective guis. (i'd've made one of them the PupControl center, but i made a scriptlet to call it and renamed it pcp--keyboard shortcut to the terminal and muscle memory actually makes that faster for me, but that's another strategy for quickly launching programs you use often/often enough.) use ctrl+7 to toggle the view back to the terminal and see the output/return to the document.



findnrun
grun


geany

geany /root/nwp.readme /root/vgtmenu2


geany /root/custombkmk1sc.txt /root/714.jwmrc /root/.jwmrc /root/.gexec_history /root/.gexec /root/.jwm/jwmrc-personal /root/.jwm/jwmrc-personal2 /root/.config/rox.sourceforge.net/ROX-Filer/Bookmarks.xml /root/.config/rox.sourceforge.net/ROX-Filer/Groups.xml /etc/xdg/templates/_root_.jwmrc /root/.gtk-bookmarks

geany /root/root0menu /root/root1menu /root/root2menu /root/root4menu /root/root5menu /root/root6menu /root/root7menu /root/root8menu /root/root9menu


rox /mnt /mnt/home /root

rox

^setting up combinations of folders and documents to be opened. for websites use browsername url1 url2 url3---this will open it in tabs usually. check your browser's options for details (type, for example, "firefox --help" into a terminal)



leafpad path/file1| leafpad path/file2| leafpad path/to/file3

change directories, run the path-getting script, make geany open the file:

cd /root/my-applications/bin
find $PWD > /mnt/sda1/myapps22est.txt
geany /mnt/sda1/myapps22est22est.txt


same as one line/step:

find $PWD /root/my-applications/bin > /root/fnddestfi1; geany /root/fnddestfi1

ls /usr/share/applications > /root/pupaps1; geany /root/pupaps1
^ list by title, which is enough to launch most things...




line 66piece line 66 piece line 66 piece line 66 piece line 66 piece line 66 piece 66 piece line 66 piece
#!/bin/sh

#make multiple copies of a file:


#for f in TTT{2..6}.txt ; do cp TTT.txt $f ; done

#for f in PPP{2..6}.png ; do cp PPP.png $f ; done
#for f in DDD{2..6}.docx ; do cp DDD.docx $f ; done
#for f in OOO{2..6}.odt ; do cp OOO.odt $f ; done

#for f in TTT{2..6} ; do cp -r TTT $f ; done
#^for directories
# swap out file name (the all caps and extension bits should match the
# file you want to copy--change the brace contents to change the amount and range/the titles of the copies--you can swap the numbers for a..z or A..Z, or add sets of braces one after the other for multiple variables.
# no extension given in the directories version and the recursive command is added. you can add text after the variables in the brackets in either and it will be part of the new file/folder name.
#more on brace expansion: http://wiki.bash-hackers.org/syntax/expansion/brace
# http://stackoverflow.com/questions/5580835/cp-copy-command-with-bash-brace-expansion (from Michael Krelin); orig: for f in test{2..4}.txt ; do cp file.txt $f ; done)--can anyone make this a script that works for files dragged to it?


#--------------------------------------------
#!/bin/sh
# name 5copiesDir and place in /root/my-applications/bin
#make multiple copies of a file:
# nwpt menu entry <Program label="5 copies template--directories">5copiesDir</Program>
xdotool type "for f in TTT{2..6} ; do cp -r TTT $f ; done"


6666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666


/root/my-applications/SLocate/auto-updatedb-slocate.sh
^update slocate, though better in a terminal other than vte as it's relatively time consuming. use

rox /root/my-applications/SLocate
and the / function (or the arrow keys--better if everything in a folder has virtually the same name) plus Enter instead. i actually like it so much i gave it an easier to key entry (copied and renamed a desktop file) by adding "uu" to the title. below is a version that will launch it and a version that will select it (select it version requires you rename a copy of the desktopfile or a symlink to the script):

rox /usr/share/applications; xdotool type 'auto-updatedb-slocate.sh'; xdotool key Return

^keeping it a one liner means you don't have to highlight to launch it--just placing the cursor anywhere on the line (plus the vgt shortcut however you trigger it) is enough.

rox /usr/share/applications; xdotool type '/uu'

^ no Return/Enter, no launch. you could add ctrl+q at the end to automatically close the rox window the line opened (for the second version, you'd need to add ;xdotool key Return ctrl+q)..



slocate --database=[specify path] [search term]
[you can also use --database=path1:path2:path3]

slocate --database=/mnt/sda1/slocate-sda1.db

slocate --database=/mnt/sda2/slocate-sda2.db
slocate --database=/mnt/sda3/slocate-sda3.db
slocate --database=/mnt/sda4/slocate-sda4.db
slocate --database=/mnt/sda5/slocate-sda5.db



slocate --database=/mnt/sdb1/slocate-sdb1.db
slocate --database=/mnt/sdb2/slocate-sdb2.db
slocate --database=/mnt/sdb3/slocate-sdb3.db
slocate --database=/mnt/sdb4/slocate-sdb4.db
slocate --database=/mnt/sdb5/slocate-sdb5.db


slocate --database=/mnt/sdc1/slocate-sdc1.db
slocate --database=/mnt/sdc2/slocate-sdc2.db
slocate --database=/mnt/sdc3/slocate-sdc3.db
slocate --database=/mnt/sdc4/slocate-sdc4.db
slocate --database=/mnt/sdc5/slocate-sdc5.db

slocate --database=/mnt/sdd1/slocate-sdd1.db
slocate --database=/mnt/sdd2/slocate-sdd2.db
slocate --database=/mnt/sdd3/slocate-sdd3.db
slocate --database=/mnt/sdd4/slocate-sdd4.db
slocate --database=/mnt/sdd5/slocate-sdd5.db

slocate --database=slocate-loop1.db





anyway, sloppy as this is, i hope it makes its usefulness (or at least intention) clear. that copy script makes it easy to make multiple copies of a directory or file--one of the few shortcomings of rox overcome.

edit: paths prepended with rox will open the file with its default handler, so it's really the most useful of the bookmarking scripts.

edit 2: copy files and copy directories scripts needed an extra line or two commented out to function correctly for use with rox or a windows manager. fixed.

Last edited by Puppus Dogfellow on Tue 21 Apr 2015, 21:32; edited 10 times in total
Back to top
View user's profile Send private message 
musher0


Joined: 04 Jan 2009
Posts: 5160
Location: Gatineau (Qc), Canada

PostPosted: Thu 02 Apr 2015, 02:15    Post subject:  

Hi, Puppus.

Thanks for this, but I'm not sure I fully understand your use of geany
in this way.

So this is totally different from using F5 in geany to launch or test a script
loaded in geany? (I routinely use that function of geany to test scripts.)

Thanks in advance for any explanation. BFN.

musher0

_________________
"Logical entities must not be multiplied needlessly." / "Il ne faut pas multiplier les êtres logiques inutilement." (Ockham)

Last edited by musher0 on Thu 02 Apr 2015, 13:08; edited 1 time in total
Back to top
View user's profile Send private message Visit poster's website 
Puppus Dogfellow


Joined: 07 Jan 2013
Posts: 819
Location: nyc

PostPosted: Thu 02 Apr 2015, 03:30    Post subject:  

musher0 wrote:
Hi, Puppus.

Thanks for this, but I'm not sure I fully understand your use of geany
in this way.

So this is totally different from using F5 in geany to launch or test a script
loaded in geany? (I routinely use that function of eany to test scripts.)

Thanks in advance for any explanation. BFN.

musher0


for me, F5 pops up a bash window (always with nothing more than an error report) and doesn't work on individual lines. i think it may be more like the execute button in that it launches an entire file/script. with this, you can do a line or whatever you highlight (scripts, words, and/or bits of code). the idea is to seamlessly use it from the the document you're working on, one you just launched, or one nearby--don't feel like opening the menu to get leafpad? just type leafpad on a line and hit alt+z, etc.

of course, if F5 ordinarily worked in this manner (send to the terminal, output in the terminal, launch from the terminal, return to the document as if you never left it) it would save about five minutes of set up. i think down the line, its main use for me may be code i found and a way to launch multiple folders, files, etc. i've placed a text file in dropbox so that my custom shortcuts end up persistent even if the computer or OS dies. there's no set up or other fiddling around--just open up the file and nearly all the shortcuts are usable, with the only exceptions being path-specific batch launches.

HTH

(and that i'm wrong about the way F5 works, though to use it i'd have to untweak some things...and i've got a machine with largely functionless function keys...still, would be easier to set up in that there'd be nothing to do. or explain. Wink )
Back to top
View user's profile Send private message 
musher0


Joined: 04 Jan 2009
Posts: 5160
Location: Gatineau (Qc), Canada

PostPosted: Thu 02 Apr 2015, 13:12    Post subject:  

Hi.

Thanks for the further explanation, but tests will have to wait a little,
I'm busy at present with stemsee's GUI for slocate.

TWYL.

musher0

_________________
"Logical entities must not be multiplied needlessly." / "Il ne faut pas multiplier les êtres logiques inutilement." (Ockham)
Back to top
View user's profile Send private message Visit poster's website 
Puppus Dogfellow


Joined: 07 Jan 2013
Posts: 819
Location: nyc

PostPosted: Thu 02 Apr 2015, 20:55    Post subject:  

musher0 wrote:
Hi.

Thanks for the further explanation, but tests will have to wait a little,
I'm busy at present with stemsee's GUI for slocate.

TWYL.

musher0


i just tested out VGT with your slocate scripts. works very well and helps with my only two complaints/feature requests--the autoupdate inordinately taxes one of my machines so i've taken to disabling it for all of them--perhaps this option could be added to the GUI. also, there doesn't seem to be a readily apparent way to get the thing to search a specific database rather than all of them--annoying when you know what you're looking for is on a specific partition/drive. to help with this, i've added the following to the geany text file from before:
Quote:

/root/my-applications/SLocate/auto-updatedb-slocate.sh
^update slocate, though better in a terminal other than vte as it's relatively time consuming. use

rox /root/my-applications/SLocate
and the / function (or the arrow keys--better if everything in a folder has virtually the same name) plus Enter instead. i actually like it so much i gave it an easier to key entry (copied and renamed a desktop file) by adding "uu" to the title. below is a version that will launch it and a version that will select it (select it version requires you rename a copy of the desktopfile or a symlink to the script):

rox /usr/share/applications; xdotool type 'auto-updatedb-slocate.sh'; xdotool key Return

^keeping it a one liner means you don't have to highlight to launch it--just placing the cursor anywhere on the line (plus the vgt shortcut however you trigger it) is enough.

rox /usr/share/applications; xdotool type '/uu'

^ no Return/Enter, no launch. you could add ctrl+q at the end to automatically close the rox window the line opened (for the second version, you'd need to add ;xdotool key Return ctrl+q)..



slocate --database=[specify path] [search term]
[you can also use --database=path1:path2:path3]

slocate --database=/mnt/sda1/slocate-sda1.db

slocate --database=/mnt/sda2/slocate-sda2.db
slocate --database=/mnt/sda3/slocate-sda3.db
slocate --database=/mnt/sda4/slocate-sda4.db
slocate --database=/mnt/sda5/slocate-sda5.db



slocate --database=/mnt/sdb1/slocate-sdb1.db
slocate --database=/mnt/sdb2/slocate-sdb2.db
slocate --database=/mnt/sdb3/slocate-sdb3.db
slocate --database=/mnt/sdb4/slocate-sdb4.db
slocate --database=/mnt/sdb5/slocate-sdb5.db


slocate --database=/mnt/sdc1/slocate-sdc1.db
slocate --database=/mnt/sdc2/slocate-sdc2.db
slocate --database=/mnt/sdc3/slocate-sdc3.db
slocate --database=/mnt/sdc4/slocate-sdc4.db
slocate --database=/mnt/sdc5/slocate-sdc5.db

slocate --database=/mnt/sdd1/slocate-sdd1.db
slocate --database=/mnt/sdd2/slocate-sdd2.db
slocate --database=/mnt/sdd3/slocate-sdd3.db
slocate --database=/mnt/sdd4/slocate-sdd4.db
slocate --database=/mnt/sdd5/slocate-sdd5.db

slocate --database=slocate-loop1.db



when you run the search code, it's sent to the terminal with alt+z, but you'll have to use ctrl+7 to view it (and use it again to get back to the document).

it's not a bad terminal--you can give it a photo backdrop and customize the font and colors and stuff. Smile

Last edited by Puppus Dogfellow on Tue 07 Apr 2015, 02:40; edited 2 times in total
Back to top
View user's profile Send private message 
musher0


Joined: 04 Jan 2009
Posts: 5160
Location: Gatineau (Qc), Canada

PostPosted: Thu 02 Apr 2015, 21:51    Post subject:  

By VTG, you mean the Volume of Trapped Gas? Wink
http://acronyms.thefreedictionary.com/VTG

_________________
"Logical entities must not be multiplied needlessly." / "Il ne faut pas multiplier les êtres logiques inutilement." (Ockham)
Back to top
View user's profile Send private message Visit poster's website 
Puppus Dogfellow


Joined: 07 Jan 2013
Posts: 819
Location: nyc

PostPosted: Thu 02 Apr 2015, 22:13    Post subject:  

musher0 wrote:
By VTG, you mean the Volume of Trapped Gas? Wink
http://acronyms.thefreedictionary.com/VTG


possibly.

Cool
Back to top
View user's profile Send private message 
Puppus Dogfellow


Joined: 07 Jan 2013
Posts: 819
Location: nyc

PostPosted: Thu 16 Apr 2015, 20:24    Post subject: an easier setup method  

Quote:

you'll need the following script and some tweaking of the geany menu.

Code:

#!/bin/sh
# name vtg and place in /root/my-applications/bin
# requires xdotool and a few menu adjustments
#geany as launcher and bookmarks manager
#open programs, files and web sites; reshape and resize windows from within a text document.
xdotool key ctrl+9 ctrl+8 Return ctrl+7

 #for jwm root menu(s): <Program label="Geany VTE Line Launch" icon="">vtg</Program>
 #or <Program label="VTG"">vtg</Program> .   for a tray button you could use   <TrayButton popup="geanylauncher" label="VTG">exec:vtg</TrayButton> . add an icon (icon="path/to/icon.jpg.or.whatever") for it if you like. add to /root/jwmrc-tray or any other



at this point, this xdotool script is pointing to shortcuts in geany which do not yet exist. to make them,

edit > preferences > keybindings (or help > keyboard shortcuts > edit)

step 1: send selection (or line--just place the cursor; you don't need to highlight anything) to terminal:
ctrl+9 (this one is already built in as F4--you can set the shortcuts to whatever you like--just keep the order the same as in the script above)

step 2: switch focus to terminal:
ctrl+8

step 3: enter command obtained in step 1
Return

step 4: return focus to page/close message window and terminal so that you're back to the original page as it was before you launched the script. you'll need to alter this if you want to keep the terminal open or otherwise change the interface:
ctrl+7


you'll need to find the slots for the above commands and set the shortcut keys (the pop up will call ctrl primary), optionally leaving F4 and changing the ctrl+9 in the script above to match.


all the hunting and pecking is actually kind of an annoying ordeal, so i'm attaching my keybindings.conf file for you to swap with yours. unless you've customized many keyboard shortcuts in geany (all of which get overruled by whatever keyboard shortcuts are set in JWM and likely other windows managers as well), this will save you time. just name it keybindings.conf and place in /root/.config/geany, overwriting your own. the way it's set (i believe i misremembered the original use for F4--it's actually overwritten by ctrl+8 above--there was no shortcut for send selection/line to terminal), ctrl+7 toggles the message window open and closed (since the last use was the terminal, that's what will be visible/in focus), which is sometimes handy in itself. however, you'll still need the ctrl+8 combo to actually enter anything into it--the focus (cursor) will remain on the text document otherwise. when the message window is closed, the text document immediately becomes active again/ regains the focus and the blinking cursor.




Code:



[Bindings]
popup_gototagdefinition=
edit_transposeline=<Primary>t
edit_movelineup=
edit_movelinedown=
move_tableft=<Alt>Page_Up
move_tabright=<Alt>Page_Down
menu_new=<Primary>n
menu_open=<Primary>o
menu_open_selected=<Primary><Shift>o
menu_save=<Primary>s
menu_saveas=
menu_saveall=<Primary><Shift>s
menu_print=<Primary>p
menu_close=<Primary>w
menu_closeall=<Primary><Shift>w
menu_reloadfile=<Primary>r
file_openlasttab=
menu_quit=<Primary>q
menu_undo=<Primary>z
menu_redo=<Primary>y
edit_duplicateline=<Primary>d
edit_deleteline=<Primary>k
edit_deletelinetoend=<Primary><Shift>Delete
edit_scrolltoline=<Primary><Shift>l
edit_scrolllineup=<Alt>Up
edit_scrolllinedown=<Alt>Down
edit_completesnippet=Tab
move_snippetnextcursor=
edit_suppresssnippetcompletion=
popup_contextaction=
edit_autocomplete=<Primary>space
edit_calltip=<Primary><Shift>space
edit_macrolist=<Primary>Return
edit_wordpartcompletion=Tab
menu_cut=<Primary>x
menu_copy=<Primary>c
menu_paste=<Primary>v
edit_copyline=<Primary><Shift>c
edit_cutline=<Primary><Shift>x
menu_selectall=<Primary>a
edit_selectword=<Shift><Alt>w
edit_selectline=<Shift><Alt>l
edit_selectparagraph=<Shift><Alt>p
edit_selectwordpartleft=
edit_selectwordpartright=
edit_togglecase=<Primary><Alt>u
edit_commentlinetoggle=<Primary>e
edit_commentline=
edit_uncommentline=
edit_increaseindent=<Primary>i
edit_decreaseindent=<Primary>u
edit_increaseindentbyspace=
edit_decreaseindentbyspace=
edit_autoindent=
edit_sendtocmd1=<Primary>1
edit_sendtocmd2=<Primary>2
edit_sendtocmd3=<Primary>3
edit_sendtovte=<Primary>9
format_reflowparagraph=<Primary>j
edit_joinlines=
menu_insert_date=<Shift><Alt>d
edit_insertwhitespace=
edit_insertlinebefore=
edit_insertlineafter=
menu_preferences=<Primary><Alt>p
menu_pluginpreferences=
menu_find=<Primary>f
menu_findnext=<Primary>g
menu_findprevious=<Primary><Shift>g
menu_findnextsel=
menu_findprevsel=
menu_replace=<Primary>h
menu_findinfiles=<Primary><Shift>f
menu_nextmessage=
menu_previousmessage=
popup_findusage=<Primary><Shift>e
popup_finddocumentusage=<Primary><Shift>d
find_markall=<Primary><Shift>m
nav_back=<Alt>Left
nav_forward=<Alt>Right
menu_gotoline=<Primary>l
edit_gotomatchingbrace=<Primary>b
edit_togglemarker=<Primary>m
edit_gotonextmarker=<Primary>period
edit_gotopreviousmarker=<Primary>comma
popup_gototagdeclaration=<Primary><Shift>t
edit_gotolinestart=Home
edit_gotolineend=End
edit_gotolinestartvisual=<Alt>Home
edit_gotolineendvisual=<Alt>End
edit_prevwordstart=<Primary>slash
edit_nextwordstart=<Primary>backslash
menu_toggleall=
menu_fullscreen=F11
menu_messagewindow=<Primary>7
toggle_sidebar=
menu_zoomin=<Primary>plus
menu_zoomout=<Primary>minus
normal_size=<Primary>0
menu_linewrap=
menu_linebreak=
menu_clone=
menu_replacetabs=
menu_replacespaces=
menu_togglefold=
menu_foldall=
menu_unfoldall=
reloadtaglist=<Primary><Shift>r
remove_markers=
remove_error_indicators=
remove_markers_and_indicators=
project_new=
project_open=
project_properties=
project_close=
build_compile=F8
build_link=F9
build_make=<Shift>F9
build_makeowntarget=<Primary><Shift>F9
build_makeobject=<Shift>F8
build_nexterror=
build_previouserror=
build_run=F5
build_options=
menu_opencolorchooser=
menu_help=F1
switch_editor=F2
switch_search_bar=F7
switch_message_window=
switch_compiler=
switch_messages=
switch_scribble=F6
switch_vte=<Primary>8
switch_sidebar=
switch_sidebar_symbol_list=
switch_sidebar_doc_list=
switch_tableft=<Primary>Page_Up
switch_tabright=<Primary>Page_Down
switch_tablastused=<Primary>Tab
move_tabfirst=
move_tablast=

[addons]
focus_bookmark_list=
focus_tasks=
update_tasks=
xml_tagging=
Enclose_1=
Enclose_2=
Enclose_3=
Enclose_4=
Enclose_5=
Enclose_6=
Enclose_7=
Enclose_8=

[commander]
show_panel=

[file_browser]
focus_file_list=
focus_path_entry=
rename_object=
create_file=
create_dir=
rename_refresh=

[html_chars]
insert_html_chars=
replace_special_characters=
htmltoogle_toggle_plugin_status=

[spellcheck]
spell_check=
spell_toggle_typing=

[split_window]
split_horizontal=
split_vertical=
split_unsplit=


Back to top
View user's profile Send private message 
Display posts from previous:   Sort by:   
Page 1 of 1 [10 Posts]  
Post new topic   Reply to topic View previous topic :: View next topic
 Forum index » House Training » HOWTO ( Solutions )
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.1651s ][ Queries: 11 (0.0041s) ][ GZIP on ]