Opening applications externally in luakit via vimperatoresque "follow"

Hey guys,
I wanted a lightweight browser and after trying many (midori, xombrero, qupzilla, jumanji, dillo), I settled on luakit (+ privoxy). I use my keyboard for most tasks, so it's no surprise that my loyalties are towards awesome and, henceforth, the equally customizable and vimperator-inspired luakit! Vim is my favorite text editor, so getting my luakit experience to seamlessly blend with the rest of my work is one of my priorities.
This is hardly an original contribution, but I thought it would be useful for anybody new to luakit and facing the same problem I was. I searched online but wasn't able to find an effective way to open files externally (videos, pictures and pdfs) apart from this, but it requires using the mouse, which to me, feels a bit awkward.
luakit fortunately has key-bindings borrowed from vimperator that allow users to "follow" links. Usually 'F' and 'Shift+F' serve most purposes (these open a link in the current tab and a new tab respectivey). Similar functionality can be achived using the ';' key followed by another key to "do things" with the selected link. For example, following ';' with say 'Y' allows users to yank urls. Following ';' with 'O' opens the link in the current tab.
My idea was to connect ';' with another key, say 'd', to instruct luakit to use external applications to open the selected link. Adding the following to the end of your 'binds.lua' achieves just this:
add_binds("ex-follow", {
-- Yank element uri to open in an external application
key({}, "d", [[Hint all links (as defined by the `follow.selectors.uri`
selector) and set the primary selection to the matched elements URI,
so that an external app can open it]],
function (w)
w:set_mode("follow", {
prompt = "video", selector = "uri", evaluator = "uri",
func = function (uri)
assert(type(uri) == "string")
uri = string.gsub(uri, " ", "%%20")
luakit.selection.primary = uri
if string.match(uri, "youtube") then
luakit.spawn(string.format("mpv %s", uri))
w:notify("trying to play file on mpv " .. uri)
elseif string.match(uri, "vimeo") then
luakit.spawn(string.format("mpv %s", uri))
w:notify("trying to play file on mpv " .. uri)
elseif string.match(uri, "vine") then
luakit.spawn(string.format("mpv %s", uri))
w:notify("trying to play file on mpv " .. uri)
elseif string.match(uri, "pdf" or "PDF") then
luakit.spawn(string.format("~/.config/scripts/pdfFromURL %s", uri))
w:notify("trying to read file via zathura ")
elseif string.match(uri, "jpg") then
luakit.spawn(string.format("feh -x %s", uri))
w:notify("file contains jpg " )
else
luakit.spawn(string.format("feh -x %s.jpg", uri))
w:notify("no jpg extension | unrecognized")
end
end
end),
Adding this allows you to use the follow mode with keystrokes ';' and 'd' and once a selection is made, it opens one of the above mentioned external applications. For instance, youtube,vimeo and vine links are opened via mpv (which is a sweet-sweet video player; this also does away with the requirement to use flash for most videos and the prayers for a html5 video to play!). PDFs are opened via zathura. Now, zathura cannot open http links automatically, so the file needs to be downloaded to some temporary location and then opened by zathura. I've written this routine in a small script called pdfFromURL, which can be saved where ever you wish (I've saved it in ~/.config/scripts). This is pdfFromURL:
url=$1
file="${url##*/}"
echo $file
case "$file" in
*\%20* )
urxvtc -e aria2c --allow-overwrite=true -d /var/tmp $url -o lousy_file_name_that_had_spaces.pdf
zathura /var/tmp/lousy_file_name_that_had_spaces.pdf
# echo "found a damned space in file name!"
urxvtc -e aria2c --allow-overwrite=true -d /var/tmp $url
zathura /var/tmp/$file
esac
The above script uses aria2c, zathura and urxvtc. This can be modified as per your requirements.
The picture opening really isn't necessary, but is kind of useful for sites like reddit.
luakit is a really cool browser for being so accessible to costumization (I've never written a single line of lua code previously)!
I hope this post helps at least one other person.
Cheers!
Last edited by cable (2015-05-14 21:46:29)

Hi Bharath,
check this
http://help.sap.com/saphelp_nw04/helpdata/en/8e/adc93f4d903b1ce10000000a114084/frameset.htm
http://help.sap.com/saphelp_nw04/helpdata/en/b8/437d46d4451e4c9ab756e272a1581d/frameset.htm
Regards,
Ignacio.

Similar Messages

  • When I try and open a word document I received the following message:  "You cant open the application Microsoft Word because PoerPC applications are no longer supported".  What is up with that?

    When I try and open a word document I received the following message:  "You cant open the application Microsoft Word because PoerPC applications are no longer supported".  What is up with that?

    Here is a post that I assembled for a similar question:
    Unfortunately you got caught up in the minor miracle of Rosetta.  Originally licensed by Apple when it migrated from the PowerPC CPU platform that it had used from the mid-1990's until the Intel CPU platform in 2006, Rosetta allowed Mac users to continue to use their library of PPC software transparently in emulation.
    However, Apple's license to continue to use this technology expired with new releases of OS X commencing with Lion (and now Mountain Lion).  While educational efforts have been made over the last 6 years, the fact is that Rosetta was SO successful that many users were caught unaware UNTIL they upgraded to Lion or Mountain Lion.
    Workarounds:
    1. If your Mac will support it, restore OS X Snow Leopard;
    2.  If your Mac will support it, partition your hard drive or add an external hard drive and install Snow Leopard into it and use the "dual-boot" method to choose between your PowerPC software or Lion/Mt. Lion;
    3.  Upgrade your software to Intel compatible versions, or find alternative software that will open your data files;
    3.  Install Snow Leopard (with Rosetta) into Parallels:
                                  [click on image to enlarge]
    Full Snow Leopard installation instructions here:
    http://forums.macrumors.com/showthread.php?t=1365439
    NOTE: STEP ONE of the instructions must currently be completed on a Snow Leopard or Lion Mac and the resulting modified Snow Leopard.cdr install file can then be moved over to your Mountain Lion Mac for completion of the remaining steps.
    NOTE 2:  Computer games with complex, 3D or fast motion graphics make not work well or at all in virtualization.

  • Ios7 bookamrking web application to home screen via Safari crashes after login and when we try to open any link inside. Can anyone please tell me if there is any scheduled fix for this bug in safari?

    ios7 bookmarking web application to home screen via Safari, crashes after login and when we try to open any link inside from the icon that gets created on the home screen. Can anyone please tell me if there is any scheduled fix for this bug in safari?
    From what i understand i see that - Cookies are not transferred between your website and your webapp when installing the icon on the home screen (for authentication purposes for example). It was working until 6.1 and now it’s not working anymore.
    Can someone please tell me if this bug will be fixed in any future release, if so the ticket number of some kind that i can track, or if there is a workaround for this issue?

    ios7 bookmarking web application to home screen via Safari, crashes after login and when we try to open any link inside from the icon that gets created on the home screen. Can anyone please tell me if there is any scheduled fix for this bug in safari?
    From what i understand i see that - Cookies are not transferred between your website and your webapp when installing the icon on the home screen (for authentication purposes for example). It was working until 6.1 and now it’s not working anymore.
    Can someone please tell me if this bug will be fixed in any future release, if so the ticket number of some kind that i can track, or if there is a workaround for this issue?

  • I have an iMac 10.8.2.  When trying to download a photo attachment from an email I received the following : "You can't open application IPhoto because the classic environment is no longer supported."  This occurred on 10/25/12 at about 11PM CST.  The iPho

    I have an iMac 10.8.2.  When trying to download a photo attachment from an email I received the following : "You can't open application IPhoto because the classic environment is no longer supported."  This occurred on 10/25/12 at about 11PM CST.  The iPhoto icon in both the dock and the application folder is grayed out with the no or do not enter symbol.  How can I resolve this so I can access my photos?

    I have two iPhoto icons in applications. One is grayed out and has the no symbol, the date of last modification is Oct 25, 2012 11:07pm.  The size is 110 KB and kind shows Applic…lassie). When I click on with CMD i it shows:
    kind: Application (Classic)
    size: 109,677 bytes (111 KB on disk)
    Where: / Applications
    Created:  Thursday, October 25, 2012 11:07 PM
    Modified: Thursday, October 25, 2012 11:07 PM
    Version:  --
    More info:  --
    Name and extension:  iPhoto.app
    Hide extension is grayed out and checked
    Preview shows a photo I had attempted to save to iPhoto
    The second iPhoto icon is also grayed out, but the symbol is an envelope, the date of last modification is Oct 12, 2012 12:09PM.  The size is 548 KB and kind is shown as an email message.  When I clicked on it with CMD i it shows:
    Kind: Email Message
    Size: 547,665 bytes (549 KB on disk)
    Where:  /Applications
    Created: Friday, October 12, 2012 12:09 PM
    Modified:  Friday, October 12, 2012 12:09 PM
    Version: not listed
    Name & Extension:  iPhoto.eml
    Hide Extension: checked
    Open with:  Mail
    Preview shows a photo I had attempted to save to iPhoto

  • Open a external application in a concrete place in the screen

    I need to open an external application from my swing app, but the application window should be opened in a concrete place in the screen, such as using setBounds in a JInternalFrame. Runtime methods just run the application in a new thread, but I can't place the window it the place I need.
    I think some kind of external dll with jni should work, but I don't know which methods to use or even if it's a solution made in swing.
    any ideas?
    thanks in advance

    The fact is that I need to move "any" application, because today it's some app like netmeeting but noone knows what will want tomorrow. Embbeding sounds good, can you give me more info?
    And thanks a lot!

  • Open an extern application (exe-file or dll) from a new button in SAP B1

    Hi,
    i want to start an extern Application with a new button in SAP Business One. The exter application should started with two parameters. It can be handled with an exe-file or with a dll. I dont know what its better....
    My question is, how can i open the extern application with two parameters from a button in SAP Business One. Can someone give me codeexample?
    thanks in future and best regards,
    Steffen

    Hi Steffen,
    Adapted from Re: Start Addon From another addon
    Dim startInfo As System.Diagnostics.ProcessStartInfo
    Dim pStart As New System.Diagnostics.Process
    startInfo = New System.Diagnostics.ProcessStartInfo("C:Program FilesSAPSAP Business OneSAP Business One.exe", "arguments")
    pStart.StartInfo = startInfo
    pStart.Start()
    Hope this helps,
    Ian

  • To open an external URL from your application

    Hello All,
    Please guide me in below scenario as I am new to SAP UI5.
    I have created a SHELL application with 5 tabs.
    We have a requirement where on clicking of a tab in the application it should open an external url. I am using "link" element of sap.ui.commons library. On press of link to action function I am using below code to open external url content.
    location.href = "http://google.com";  
    It is opening in the same tab but I have been navigated away from my application.
    As per the requirement external url content should be opened  without navigating away from my application.
    I am attaching the screenshot.
    Thanks
    Ansuman

    Hi Jagadeesh,
    See this code for reference.
    This is my view.
    sap.ui.jsview("demo.view1", {
           /** Specifies the Controller belonging to this View.
           * In the case that it is not implemented, or that "null" is returned, this View does not have a Controller.
           * @memberOf demo.view1
           getControllerName : function() {
                  return "demo.view1";
           /** Is initially called once after the Controller has been instantiated. It is the place where the UI is constructed.
           * Since the Controller is given to this method, its event handlers can be attached right away.
           * @memberOf demo.view1
           createContent : function(oController) {        
                         var btn1 = new sap.ui.commons.Button({
                               text: "This Is View One."
                         var link = new sap.ui.commons.Link({
                               text: "view3",
                          press : function() {                          
                                $("#frameId").slideDown();                                 
                         var iframe = new sap.ui.core.HTML("frameId",{
                          content : "<iframe src=" + 'http://www.jnvbuxaralumni.com' +" width='100%' height='700px'></iframe>",
                         var ele = [btn1, link, iframe];
                         return ele;         
    This is my controller.
    sap.ui.controller("demo.view1", {
           onAfterRendering: function() {
                  $("#frameId").hide();
    This is my index.html.
    <!DOCTYPE HTML>
    <html>
           <head>
                  <meta http-equiv="X-UA-Compatible" content="IE=edge">
                  <meta http-equiv='Content-Type' content='text/html;charset=UTF-8'/>
                  <script src="resources/sap-ui-core.js"
                               id="sap-ui-bootstrap"
                               data-sap-ui-libs="sap.ui.commons,sap.ui.ux3"
                               data-sap-ui-theme="sap_bluecrystal">
                  </script>
                  <!-- add sap.ui.table,sap.ui.ux3 and/or other libraries to 'data-sap-ui-libs' if required -->
                  <script>
                               sap.ui.localResources("demo");
                               //jQuery.sap.require("sap.ui.core.routing.Router");
                               //jQuery.sap.require("sap.ui.core.routing.HashChanger");
                               var oShell = sap.ui.ux3.Shell("shellId",{
                                      appTitle: "Shell Demo Program",
                                      showLogoutButton: false,
                                      showSearchTool: false,
                                      worksetItems: [
                                             new sap.ui.ux3.NavigationItem("homeId", {
                                                    key: "view1",
                                                    text: "Home"
                                             new sap.ui.ux3.NavigationItem("contactUsId", {
                                                    key: "view2",
                                                    text: "Contact Us"
                                      worksetItemSelected: function(e){
                                             this.removeAllContent();
                                             var selected = e.getParameter("key");
                                             var view = sap.ui.getCore().byId(selected);
                                             //console.log(selected);
                                             if( view == undefined){
                                                    view = new sap.ui.view({
                                                           id: selected,
                                                           viewName: "demo." + selected,
                                                           type: sap.ui.core.mvc.ViewType.JS
                                             this.addContent(view);
                                      content: [
                                                    new sap.ui.view({
                                                           id: "viewId1",
                                                           viewName: "demo.view1",
                                                           type: sap.ui.core.mvc.ViewType.JS
                               oShell.placeAt("content");
                  </script>
           </head>
           <body class="sapUiBody" role="application">
                  <div id="content"></div>
           </body>
    </html>
    Here you can see that on click of the link button i am able to display frame in same tab of shell.
    Let me know if it's helpful.
    Regards
    Dhananjay

  • Unable to back up external hard drive via Time Machine.  Says no room but has back ups from two previous Mac notebooks on it.  Tried deleting them and now can't do anything.  Any ideas?

    Unable to back up external hard drive via Time Machine.  Says no room but has back ups from two previous Mac notebooks on it.  Tried deleting them and now can't do anything.  Any ideas?

    As john noted, eventually that external is probably not going to be big enough, but it certainly is for now. The HD just needs enough capacity to cover the amount of data on your internal HD, not the internal HD's total capacity.
    Format/partition the external as follows and you should be set to go:
    1. Connect the external HD to the MBP.
    2. Open Disk Utility on the MBP.
    3. Select the external HD in the left pane.
    4. Click on the Erase tab.
    5. Choose the Format: Mac OS Extended (Journaled).
    NOTE: if you want to zero the HD (which I always think is a good idea, but does take time), click on Security Options, click the button for Zero Out Data, click OK. The larger the HD, the longer this will take, in some cases several hours.
    6. Click on Erase and wait for the entire process to finish.
    7. Click the Partition tab.
    8. Click on Volume Scheme: and choose the number of partitions (just one in this situation).
    9. Click on the Options button (located underneath the Volume Scheme pane) and select GUID.
    10. Click Apply.
    11. Quit Disk Utility.
    Backup your internal to the external. What application are you using to backup with? I highly recommend both SuperDuper! and CarbonCopyCloner.

  • Error while opening the external window

    Hi
    I am trying to open an external window on click of a button.
    This is the piece of code I have written
    url = "http://www.google.com";
    url = java.net.URLEncoder.encode( url ) ;
    String title="External Window";
    //IWDWindow win=wdComponentAPI.getWindowManager().createExternalWindow(url,title ,false);
    IWDWindow win=wdComponentAPI.getWindowManager().createNonModalExternalWindow(url,title );
    win.show();
    //win.open();
    I have tried both show() and open() method. and also createExtrenalWindow and CreateNonModalExtrenalWidnow. But I am getting the follwing error.
    Application error occurred during request processing.
      Details:   com.sap.tc.webdynpro.services.sal.core.DispatcherException: The requested deployable object 'dc.gs.com/osrch' and application 'http:' are not deployed on the server. Please check the used URL for typos.
    Exception id: [0017087D8739002C0000025600001B9C00045A7873FC3E52]
    This is the URL it got in the external new window..
    http://<host>:50000/webdynpro/dispatcher/dc.gs.com/osrch/http%3A%2F%2Fwww.google.com
    I know the www.google.com is concatenating with portal URL , hence it is throwing the error.
    How to get rid of the portal path
    thanks
    PK

    hi,
    You can try the following code:
    IWDWindowInfo info = wdComponentAPI.getComponentInfo().findInWindows("PopUpWindow");
        IWDWindow window = wdComponentAPI.getWindowManager().createWindow(info , true);
        window.setWindowPosition(WDWindowPos.CENTER);
        wdContext.currentContextElement().setVa_win(window);
        window.open();
    This works fine.
    Thanx.

  • Opening an external PDF file

    I am using an application called PdfName.exe to open an
    external PDF file, this application just runs and opens the file. I
    configure this app correctly and put it on an fscommand folder and
    when I double click it it open the file I need. However when I try
    to open it with a button on my Flash presentation using the
    following ActionScript
    on (release) {
    fscommand ("exec", "PdfName.EXE");
    it fails, it opens the application just fine but it can't
    find the PDF anymore, which btw is in an external folder to
    fscommand (i also tried inside fscommand\)
    any ideas?
    any other way to open the PDF?

    http://jstart.flashjester.com
    Regards
    FlashJester Support Team
    e. - [email protected]
    w. - www.flashjester.com
    "This has been one of the most impressive and thoroughly
    pleasant
    experiences of customer support I have ever come across -
    astounding!"
    Director - hedgeapple

  • Opening an External Window which shares the same context.

    Hi,
    I have a requirement where <b>I need to open an external window which shares the same context</b>. (i.e, A window which belongs to the same application in a seperate browser)
    If I use the following coding <b>it only opens a model window in the same browser</b>.
    IWDWindowInfo winInfo = wdComponentAPI.getComponentInfo().findInWindows("NewWindow");
    IWDWindow window = wdComponentAPI.getWindowManager().createWindow(winInfo,false);
    But if I use wdComponentAPI.getWindowManager().CreateExternalWindow() <b>it could only accept the URL that opens a seperate application with different context</b>.
    Please help me in this regard.

    Hi Anbu,
    Dont feel bad that i am asking you more questions than giving you answers.
    if you just want to show content or let the user enter data or something you can use always popup modal/non modal window.
    External window is used to refer to other website or other applications in otherwords referring other url.
    So your workaround would be relaxing your requirement and redesign your application.
    This is my view point.Probably some other expert sdn'ers might have better one you know.
    Success !!
    BTW- if you decided to follow nagarajan suggession then you have to use URL generator to generate the URL.Using static URL is depreciated and also wont work in your Customer places.
    Message was edited by: Baskaran Senthivel

  • How do I fix that I accidentally dragged the safari application ( an open window I was on and tryed to drag it to repositions) into an Iweb icon on the side bar, now when I open Iweb it says cannot open  /applications/safari.app"   ..

    I had a safari window open, I went to drag it up on to the destop more but my finger slipped and it dropped into the icon on side bar iWeb that I had been working on. now My iWeb app  says "cannot open /application/safari.app" .  Ihave already tryed to drag the iWeb to trash and reinstall the applications cd.  also, since tryng to figure it out via posts oon apple support that seemed similar ( finding in library and under listing etc ) 
    also.. the tool bar is huge and so I am afraid I  have screwed this computer up...

    Try following.
    First (force) quit Safari, iWeb and all other open applications.
    Drag iWeb to the Trash, empty the trash. Restart mac. Recover iWeb from Time Mache backup before you made the mistake.

  • Accessing webdynpro applications externally

    Dear all,
    We are using ESS in EP 6.0 SP18 and ECC 5.0 which is based on web dynpro.  When ever I acccess the Web Dynpro based ESS applications, the requests are going to http://portalserver:50000/webdynpro...etc.
    We need to make our ESS WebDynpro applications externally accessible via internet.  I dont think opening up 50000 port is a good option.Please advise.
    Thanks,
    -Bharath

    Hi Bharath,
    check this
    http://help.sap.com/saphelp_nw04/helpdata/en/8e/adc93f4d903b1ce10000000a114084/frameset.htm
    http://help.sap.com/saphelp_nw04/helpdata/en/b8/437d46d4451e4c9ab756e272a1581d/frameset.htm
    Regards,
    Ignacio.

  • "you can't open application NotificationExec because PowerPC applications are no longer supported"  continually appearing on my screen

    I have an iMac with Lion 10.7.4 and tonight I tried to download and install a Maxstor drive from the internet, since then the following notice has appeared on my screen at approximately 6 second intervals.  “you can’t open application NotificationExec because PowerPC applications are no longer supported”  I have removed the Maxtor manager via the waste basket but the notices keep appearing.  Is there a way for me to stop these as they make my iMac virtually unusable or is this a virus?

    none of the above worked for me....this worked after hours of messing around with Libraries, deleting things, etc.
    Absolutely frustrated by the same problem, just lost 3 hours of my day trying to uninstall after getting the same error message. The ONLY thing that worked for me was going to the following Maxtor (Seagate) URL:
    http://knowledge.seagate.com/articles/en_US/FAQ/199931en
    I downloaded their "remove maxtor sw.zip" file
    Click here to download the remove_maxtor_sw.zip file and store it on your system's desktop.
    And it worked perfectly. Took 10 seconds and - after restarting - it was done.
    What a waste of the day!!!

  • My finder crashes when I try to open my external hard drive

    I have tried to open my external HD and as soon as I double click on the drive icon the finder crashes and goes into a crash loop and won't stop unless Iaunch a program or disc utility.  I am running System 10.6.8 and drive checks out in disk utility just fine.  I have tried two different enclosures and one is USB and the other is firewire 800 and it does exactly the same.  I have tried to turn of icons in the view options and it behaves exactly the same.  The drive spins up and mounts just fine and checks out in disk utility.

    Try booting into the Safe Mode using your normal account.  Disconnect all peripherals except those needed for the test. Shut down the computer and then power it back up. Immediately after hearing the startup chime, hold down the shift key and continue to hold it until the gray Apple icon and a progress bar appear. The boot up is significantly slower than normal. This will reset some caches, forces a directory check, and disables all startup and login items, among other things. When you reboot normally, the initial reboot may be slower than normal. If the system operates normally, there may be 3rd party applications which are causing a problem. Try deleting/disabling the third party applications after a restart by using the application un-installer. For each disable/delete, you will need to restart if you don't do them all at once.
    Safe Mode
    Safe Mode - About

Maybe you are looking for

  • Please help me before I break my computer!!!

    I dont know much about my ipod so here goes....I originally had all of my music on my parents computer and now have my own. I tried to update my Ipod Nano and I keep getting messages saying I'm not authorized to have some songs on it because I purcha

  • Internationalization in Primavera P6 EPPM

    How Primavera P6 EPPM supports internationalization?

  • Flash mx 2004 vs ADOBE FLASH CS4 PROFESSIONAL

    I'm am about to try ADOBE FLASH CS4 PROFESSIONAL (trial) It's for my daughter, she began a project at school with madromedia flash mx 2004. but my trial version at home is no longer available and she needs a little more time at home for her project.

  • Update set types attributes

    Dear All, i m new to this set types, Please guid me how to update set type attributes through driver program. Through i will get records from ECC, using this i will have to update the corresponding set types of the products matching the Product ID. T

  • AP not able join to WLC

    Hello, One of the AP is not joing to 2504WLC. AP Model: CAP-3602I-E-K9 The error shows like this "Radius Authorization of the AP has failed" What Could be the reason? I check the regulatery domain, country code and compatibilty software but still I