Code Monkey home page Code Monkey logo

jumpapp's People

Contributors

baongoc124 avatar chocolateboy avatar e3rd avatar gitressa avatar kerneldemon avatar matklad avatar maxgyver83 avatar mkropat avatar mnieber avatar myrdd avatar overjt avatar staticaland avatar technicalguy avatar vadasambar avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

jumpapp's Issues

`make deb` failed: No secret key

gpg: skipped "Michael Kropat <[email protected]>": No secret key
gpg: dpkg-sign.3mGZH0jC/jumpapp_0.4-1_amd64.changes: clearsign failed: No secret key

dpkg-buildpackage: error: failed to sign .changes file
Makefile:68: recipe for target 'jumpapp_0.4-1_all.deb' failed

I tried to search for [email protected] at subkeys.pgp.net, the result is not found.

Where can I import your public key?

Suggestion - option or function for a very specific window

Hi everybody!
I'm an everyday jumpapp user but - lately - I have been in need of something that this little app couldn't do: calling for a very specific window, difficult to distinguish from others
I often need to use two different Chromium profiles at the same time: in that case class, process name and such were identical while window title would change according to the website. So I thought a bit about it and came out with this little command that, for now, seems to solve the problem

sh -c "xdotool windowactivate $(cat ~/.cache/identifier) || chromium-browser --profile-directory="U53r1" & xdotool search --sync --name u53r1 > ~/.cache/identifier"

where

xdotool search --all --onlyvisible --sync --name u53r1

finds a window with the string "u53r1" in the title (I picked an odd string because "user1" could have been easily found in another window) and grabs an X window identifier, an 8 digit number that - as far as I could try - doesn't change while I switch and close tabs, as long as that Chromium instance stays open. The Chromium profile I launched opens on an homepage where I made sure "U53r1" was in the title.

That identifier gets written in a file and everytime I launch that shortcut xdotool tries to activate a window with that identifier. If it's not valid anymore it means that window has been closed, so it launches a new instance and grabs a new identifier.

I've never tried bash scripting so I made my way through mistakes and it may be a very rough solution: it works for now but do you think it will keep working? Any way I could make it better? Weaknesses? If you find it interesting you could add a similar function in jumpapp and I'll be glad I've been useful. You could of course obtain the same result with

wmctrl -l | grep 'U53r1' | grep -Eo '0x[0-9a-f]+'

and

wmctrl -ia

using an identifier related to PID - given that the PID won't change through the session - but xdotool seemed more readable to me.

Anyway, thanks for your time and for your work!

Support for webapps

Hi,
I wonder if jumpapp can support webapps, such as Gmail and Google Keep. I use these apps by downloading them from the chromium extensions store online. They are added to the systems program menu and their entry is in the form of usr/bin/chromium-browser --profile-directory=Default --app-id=hmjkjmmepjpkmjkepdijdfohbdki.

Currently, jumpapp will switch to any chromium window when I map this shortcut to a keybinding. I would like it to switch only to the specific window that has the webapp so that the app can work like any other standalone program. I tried with the -p flag and the desktop entry method, but I could not get it to work.

Cheers

Difference between separate keystrokes and continuous swtching

I've just tried the released version with #5 fixed and its behavior differs from that of the sort-by-access branch.

Say, there are three windows: A1, A2 and A3 and a keystroke alt+A to switch between them. In the prototype pressing A key while holding alt cycled in order A3->A2->A1->A3..., and separate keystrokes alt+A switched between A3 and A2 - I think this should be the expected behavior. In the latest code, though, separate keystrokes cycle through all windows A3->A2->A1->A3... as well, making it hard to reach the two last used.

Super button with xbindkeys?

Has anyone managed to get the Super key (a.k.a. Windows key) working with xbindkeys? This works fine in .xbindkeysrc:

"jumpapp firefox"
  control + alt + f

I am trying with this, but nothing happens:

"jumpapp firefox"
  super + alt + f

OS: Ubuntu 20.04.1

Using with flatpak apps

Hello, I'm greatly enjoying using jumpapp, but I've recently hit a snag.

I've installed MellowPlayer using flatpak, and when I run jumpapp MelloPlayer when it's running it fails with the following error:

Error: found running process for 'MellowPlayer', but found no window to jump to

I'm not sure what's happening, as the window is open:
Screenshot from 2020-10-06 11-29-32

Thanks in advance!

-p not working

I have a situation where I want to start neovide like this
neovide --maximized -- --listen /tmp/nvimsocket

When I define a shortcut to do

jumpapp -c neovide -p "neovide --maximized -- --listen /tmp/nvimsocket"

it doesn't work.

When I remove the quotes around $@ in fork_command() so that I have

fork_command() {
    ($@ >/dev/null 2>&1) &
}

it is working fine.

There seems to be no way to match windows using an exact match

Steps to reproduce:

  1. Launch Firefox Developer Edition
  2. Use jumpapp to try and start regular Firefox with the command jumpapp -c Navigator.firefox firefox

Expected behavior:

  • Regular Firefox should get run and take focus

Actual behavior:

  • Firefox Developer Edition takes focus

It seems that even though I've tried to specify using the WM_CLASS for matching windows, there doesn't seem to be any way to do an exact match. The WM_CLASS for Firefox and Firefox Developer Edition are Navigator.firefox and Navigator.firefoxdeveloperedition respectively and querying jumpapp with the WM_CLASS Navigator.firefox seems to match Navigator.firefoxdeveloperedition.

Possible solution:

  • Provide an argument to make the window comparison do an exact match

jumpapp + alias commandName = " Unable to find command 'commandName' "

I'm trying to use jumpapp as a way to open vscodium ( a FLOSS fork for VSCode ).

Running Kubuntu 18.04

I've created an alias in my .bashrc alias vscodium='~/Programs/vscodium'

When I type the vscodium alias into a terminal window, it launches the program. However; when I type 'jumpapp vscodium' into the terminal I am greeted with Error: Unable to find command 'vscodium'

BUT, if I type the vscodium command by itself, and get the application up and running, and THEN type 'jumpapp vscodium' into the terminal, the jumpapp will work as expected, bringing VSCodium to the front.

Confusing behavior / documentation

My experience when trying to figure out how to do anything other than a basic command like jumpapp gedit was that nothing works the way i expected it to from reading the documentation.
I am willing to rework the instructions & write up some useful examples for others but first i would need to understand why it works the way it does.

I'm currently using brocket (very similar concept) but always wanted to make the switch to a better maintained script. There are things i could do with brocket that i can't seem to accomplish now.

I would like to check if a window is open (by title, not by command) and if it isnt, run a command.
for the sake of simplicity i will use very common programs.

wmctrl -lx output:

0x032000f8  0 gedit.Gedit computername Untitled Document 2 - gedit

i would assume that either jumpapp -t "gedit" "nautilus" or jumpapp -c "gedit" "nautilus" would recognize gedit is open, and subsequently not launch nautilus. But it always launches additional instances. Why is that?

Can't switch to Slack

Running wmctrl -a slack works as desired, but jumpapp slack reports Error: found running process for 'slack', but found no window to jump to. This is curious since wmctrl -lp gives 0x04400005 0 1277 shallan Slack - CS 121 and ps -q 1277 gives 1277 ? 00:00:25 slack.

On the other hand, jumpapp (firefox|emacs|skype|konsole) works as expected.

Manjaro Linux latest as of 2019-05-06 with jumpapp-git r93.dba1062-1 from AUR, wmctrl 1.07-5 from official repositories.

Announcement: Looking for maintainers

Not that I've ever been a particularly responsive maintainer, but my focus on open source has taken a nose dive in 2020. I apologize for that. I don't plan on disappearing completely, but I think everyone would be happier if I removed myself as the bottleneck

In that spirit, if there are people willing to volunteer to maintain or enhance jumpapp, please comment on this issue. I'm happy to give out write access. No prior experience needed. I can try and help out too if anything gets too crazy or whatever.

Thank you all for being such a supportive community over the years! I hope jumpapp can keep being useful for people for as long as X11 desktops are a thing.

Cannot open new gnome-terminal instance from launcher with jumpapp-ified .desktop file

Hi,
I've been able to get 99% of where I want to be by using this project. On my gnome setup, I have been able to (a) make sure that when I open the Terminal application from launcher, an existing window is raised as long as the window exists already, and (b) make sure that Ctrl+Alt+T (using custom shortcut) raises the existing window or creates a new one. It's a great improvement!

What I can't figure out is this - when no Terminal window is open at all, the launcher will not open a terminal window. Simply nothing happens when trying to use the launcher to open gnome-terminal. I used the jumpappify-desktop command to replace "Exec=gnome-terminal" with "Exec=jumpapp gnome-terminal". It's strange because jumpapp gnome-terminal works to open a new terminal window when using the ctrl+alt+t shortcut, and also when running a command with alt+f2.

I'm wondering if it has something to do with launching a program from inside a program from inside a Desktop file... wondering if there is some kind of process ownership where the parent process dies and therefore gnome-terminal is a child process that also gets killed. Or else it could be because of something weird about the gnome-terminal application itself? The problem does not happen when I put jumpapp in front of other applications.

Have you seen something like this before, or have any suggestions?

Ubuntu 16.04 version not available

I installed Ubuntu 16.04 (Xenial) and am getting the following error when I run sudo apt-get update:

W: The repository 'http://ppa.launchpad.net/mkropat/ppa/ubuntu xenial Release' does not have a Release file.
N: Data from such a repository can't be authenticated and is therefore potentially dangerous to use.
N: See apt-secure(8) manpage for repository creation and user configuration details.
E: Failed to fetch http://ppa.launchpad.net/mkropat/ppa/ubuntu/dists/xenial/main/binary-amd64/Packages  404  Not Found
E: Some index files failed to download. They have been ignored, or old ones used instead.

Is there any chance that Xenial packages be made available? Thanks for a great program!

Works differently from terminal

I'm in Arch Linux, budgie-desktop install with gnome group packages.
Several custom shortcuts work fine except:
jumpapp chrome
jumpapp code

Hot keys for chrome don't do anything, with or without google chrome open.
Hot keys for code (visual studio code) opens a new window even if there's another open.

However, BOTH WORK AS EXPECTED typing them to the terminal, any clues of what's going on?

unable to launcher a program if the program is in the process list

For instance, I open ranger which is a file manger in temrinal in the path of ~/.mozilla/firefox/xxx, then whatever option I use I cannot launch firefox using jumpapp.
I tried -m, -f, -c, -i, all failed.

UPDATE:
Sorry, after I close all the processes containing firefox word (none of them is firefox browser), I cannot reproduce this problem.
This similar problem happen to me when I switched to i3, then I change -m to -f.

I'll close this for now, will reopen it when this happens again and I can reproduce it.

change behaviour?

Hi is it possible to change the script that it creates the window firsttime and then minimize the window when it is already launched - and if it is launched but hidden, than rise the window?

kind regards

Can't jump to visual-studio-code-insiders

First, huge thanks for making this awesome tool! I use it to jump across Firefox and VS Code swiftly. It's cool!

But recently I decided to go for a trial with VS Code insiders. On Arch Linux.

I invoked jumpapp code-insiders, it run code-insiders for me.
Then I invoke the same command again, it says:

Error: found running process for 'code-insiders', but found no window to jump to
I tried: `xprop -id $(xdotool selectwindow)` and got:
(PLEASE CLICK TO EXPAND)
$ xprop -id $(xdotool selectwindow)
_NET_WM_ICON_GEOMETRY(CARDINAL) = 506, 0, 200, 26
WM_STATE(WM_STATE):
		window state: Normal
		icon window: 0xa66e3200
_NET_WM_ALLOWED_ACTIONS(ATOM) = _NET_WM_ACTION_CLOSE, _NET_WM_ACTION_ABOVE, _NET_WM_ACTION_BELOW, _NET_WM_ACTION_FULLSCREEN, _NET_WM_ACTION_MOVE, _NET_WM_ACTION_MAXIMIZE_HORZ, _NET_WM_ACTION_MAXIMIZE_VERT, _NET_WM_ACTION_SHADE, _NET_WM_ACTION_MINIMIZE, _NET_WM_ACTION_CHANGE_DESKTOP, _NET_WM_ACTION_STICK
_NET_FRAME_EXTENTS(CARDINAL) = 0, 0, 0, 0
_NET_WM_DESKTOP(CARDINAL) = 0
_NET_WM_STATE(ATOM) = _NET_WM_STATE_MAXIMIZED_HORZ, _NET_WM_STATE_MAXIMIZED_VERT
_NET_WM_USER_TIME(CARDINAL) = 10062885
WM_NORMAL_HINTS(WM_SIZE_HINTS):
		program specified location: 0, 27
		program specified minimum size: 600 by 270
_NET_WM_ICON(CARDINAL) = 
WM_NAME(UTF8_STRING) = "test.py - my_project - Visual Studio Code - Insiders"
_NET_WM_NAME(UTF8_STRING) = "test.py - my_project - Visual Studio Code - Insiders"
XdndAware(ATOM) = BITMAP
_MOTIF_WM_HINTS(_MOTIF_WM_HINTS) = 0x2, 0x0, 0x1, 0x0, 0x0
_NET_WM_BYPASS_COMPOSITOR(CARDINAL) = 2
_NET_WM_SYNC_REQUEST_COUNTER(CARDINAL) = 56623106, 56623107
WM_WINDOW_ROLE(STRING) = "browser-window"
WM_CLASS(STRING) = "code - insiders", "Code - Insiders"
_NET_WM_WINDOW_TYPE(ATOM) = _NET_WM_WINDOW_TYPE_NORMAL
_NET_WM_PID(CARDINAL) = 17019
WM_LOCALE_NAME(STRING) = "en_US.UTF-8"
WM_CLIENT_MACHINE(STRING) = "MyLaptop"
WM_PROTOCOLS(ATOM): protocols  WM_DELETE_WINDOW, _NET_WM_PING, _NET_WM_SYNC_REQUEST

Then I tried -C option:

$ jumpapp -C code\ -\ insiders code-insiders
Error: unable to find command 'code - insiders'
$ jumpapp -C Code\ -\ Insiders code-insiders
Error: unable to find command 'Code - Insiders'

Sadly they don't work.

Here is what wmctrl -lx gives:

$ wmctrl -lx
0x00c00003 -1 xfce4-panel.Xfce4-panel  MyLaptop xfce4-panel
0x00c0000d -1 xfce4-panel.Xfce4-panel  MyLaptop xfce4-panel
0x00c00011 -1 xfce4-panel.Xfce4-panel  MyLaptop xfce4-panel
0x01000028 -1 xfdesktop.Xfdesktop   MyLaptop Desktop
0x04000003  0 Navigator.Nightly     MyLaptop New Issue · mkropat/jumpapp - Firefox Nightly
0x04e0000c  0 xfce4-taskmanager.Xfce4-taskmanager  MyLaptop Task Manager
0x05400003  0 xfce4-terminal.Xfce4-terminal  MyLaptop Terminal - me@MyLaptop:~
0x03600001  0 code - insiders.Code - Insiders  MyLaptop test.py - my_project - Visual Studio Code - Insiders

What should I do next?

Error when using jumpapp in dwm

jumpapp works perfectly for me in GNOME. Now I'm playing around with dwm. Here, I can start a program with jumpapp (for example with jumpapp firefox). But when Firefox is already running, I get:

~ ▶ jumpapp firefox
/usr/bin/jumpapp: Zeile 248: [[: window.: Syntaxfehler: Ungültiger arithmetischer Operator. (Fehlerverursachendes Zeichen ist ».«).

This translates roughly to:

Line 248: [[: window.: syntax error: Invalid arithmetic operator. (error token is ».«).

Any idea what this means?

Openbox WM - found no window to jump to

Just tried jumpapp under Fedora + OpenBox and I'm unable to switch to any running app. Get the "found running process, but found no window to jump to" error. Both launching a new window with jumpapp as well as simple "wmctrl -a appnamehere" work fine.

restore minimized client in Awesome

Left here for reference:

To enable raising minimized clients in Awesome, their minimzed property has to be unset before activating them (by adding the following lines to awesome/rc.lua ):

-- Enable raising minimized clients.
client.connect_signal("request::activate", function(c, context, hints)
  if not awesome.startup then
    if c.minimized then
      c.minimized = false
    end
    awful.ewmh.activate(c, context, hints)
  end
end)

intellij

Any thoughts on how to get this going with something like intellij? It is launched thru a shell script as its entry point.

wmctrl only reads _NET_WM_NAME

wmctrl only reads _NET_WM_NAME, but some non-conforming applications only set WM_NAME (steam).
xdotool reads both; would it be possible to try and get the name via xdotool if wmctrl returns N/A for the title?

separate multiple terminal instances

For example, when I try to

  1. jumpapp -m kitty htop
  2. jumpapp -m kitty ranger

there should be two kitty instances with one program running in each kitty terminal

But when I run the second command jumpapp -m kitty ranger, the kitty-htop window is raised, which is not what I need.

How can I treat the two commands as different instances?

  1. jumpapp -m kitty htop should open kitty+htop instance, if it is already running in the background, raise the window, if it is already running in the foreground, minimize the window,
  2. jumpapp -m kitty ranger should open kitty+ranger instance, if it is already running in the background, raise the window, if it is already running in the foreground, minimize the window

Switching to VirtualBox window

Could you help jumping to a virtualbox guest OS window? Both the main window of virtualbox and the window of guest OS have the same WM_CLASS(STRING) = "Qt-subapplication", "VirtualBox", while the window name differs: WM_NAME(STRING) = "Oracle VM VirtualBox Manager" (main) and WM_NAME(STRING) = "windows (snapshotname) [Running] - Oracle VM VirtualBox" (guest OS). I'm trying to jump to the latter window with no luck.

terminator and -w / strange workspace switch behaviour

If I jumapp -w terminator, and no terminator window is open on my current workspace, I'll get the new terminator, but get switched to a workspace with an existing terminator window. Very strange behaviour, I have not experienced this with any other application. Any way I could debug this, or get more info? Also, am I the only one with this specific problem?

jumpapp -w -L terminator

shows no matching windows. also, when a terminator window exists, everything operates normally.

I'm on XFCE / xubuntu (zesty)

the man page should say Jumps to (focus) the "last" open window for an application

the man page say "Jumps to (focus) the first open window for an application" here it says "first",
but when i open different odt documents with libreoffice writer (for example open 1.odt then open 2.odt then open 3.odt) then run:
$ jumpapp libreoffice7.2
it activates the last opened document (3.odt) not the first opened one (1.odt)
so i think the man page should say "...last open window" not "...first open window"

Unable to generate correct changes file to upload new deb package to PPA

While putting together the 1.0 release I ran into issues generating a valid .changes file, which means I can't push new versions of jumpapp to the PPA.

The immediate issue appears to be that the checksum for the .dsc file that is listed in the .changes file is invalid:

Checksum doesn't match for /vagrant/jumpapp_1.0-1.dsc

I'm not sure why this is happening. (Could the the checksum be being generated before the signature is written?) I don't know if I'll have time to look into it further in the near future.

Here is the full build output for reference:

vagrant@ubuntu-bionic:/vagrant$ make deb-src
tar --transform 's,^,jumpapp-1.0/,S' -cjf "jumpapp_1.0.tar.bz2" t README.md LICENSE.txt Makefile jumpapp jumpappify-desktop-entry
cp "jumpapp_1.0.tar.bz2" "jumpapp_1.0.orig.tar.bz2"
cp "LICENSE.txt" "debian/copyright"
tar xf "jumpapp_1.0.tar.bz2"
cp -r debian "jumpapp-1.0"
(cd "jumpapp-1.0"; debuild -S)
 dpkg-buildpackage -rfakeroot -us -uc -ui -S
dpkg-buildpackage: info: source package jumpapp
dpkg-buildpackage: info: source version 1.0-1
dpkg-buildpackage: info: source distribution xenial
dpkg-buildpackage: info: source changed by Michael Kropat <[email protected]>
 dpkg-source --before-build jumpapp-1.0
 fakeroot debian/rules clean
make: Warning: File 'debian/rules' has modification time 0.4 s in the future
dh clean
   dh_auto_clean
        make -j2 -O clean
make[1]: Entering directory '/vagrant/jumpapp-1.0'
rm -f README.man.md
rm -f jumpapp*.tar.bz2 jumpapp*.deb jumpapp*.rpm
rm -f jumpapp.1
make[1]: Leaving directory '/vagrant/jumpapp-1.0'
   dh_clean
make: warning:  Clock skew detected.  Your build may be incomplete.
 dpkg-source -b jumpapp-1.0
dpkg-source: info: using source format '3.0 (quilt)'
dpkg-source: info: building jumpapp using existing ./jumpapp_1.0.orig.tar.bz2
dpkg-source: info: building jumpapp in jumpapp_1.0-1.debian.tar.xz
dpkg-source: info: building jumpapp in jumpapp_1.0-1.dsc
 dpkg-genbuildinfo --build=source
 dpkg-genchanges --build=source >../jumpapp_1.0-1_source.changes
dpkg-genchanges: info: including full source code in upload
 dpkg-source --after-build jumpapp-1.0
dpkg-buildpackage: info: full upload (original source is included)
Now running lintian jumpapp_1.0-1_source.changes ...
W: jumpapp source: package-file-is-executable debian/changelog
W: jumpapp source: package-file-is-executable debian/control
W: jumpapp source: package-file-is-executable debian/copyright
W: jumpapp source: package-needs-versioned-debhelper-build-depends 10
Finished running lintian.
Now signing changes and any dsc files...
 signfile dsc jumpapp_1.0-1.dsc Michael Kropat <[email protected]>

Can't remove jumpapp_1.0-1_source.buildinfo.temp: Text file busy, skipping file.
 signfile buildinfo jumpapp_1.0-1_source.buildinfo Michael Kropat <[email protected]>

Can't remove jumpapp_1.0-1_source.changes.temp: Text file busy, skipping file.
Can't remove jumpapp_1.0-1_source.changes.temp: Text file busy, skipping file.
 signfile changes jumpapp_1.0-1_source.changes Michael Kropat <[email protected]>

Successfully signed dsc, buildinfo, changes files
vagrant@ubuntu-bionic:/vagrant$ dput ppa:mkropat/ppa *.changes
Checking signature on .changes
gpg: /vagrant/jumpapp_1.0-1_source.changes: Valid signature from 3B894961962EBA75
Checking signature on .dsc
gpg: /vagrant/jumpapp_1.0-1.dsc: Valid signature from 3B894961962EBA75
Checksum doesn't match for /vagrant/jumpapp_1.0-1.dsc
vagrant@ubuntu-bionic:/vagrant$ grep dsc *.changes
 eeb6f11e3d739577e39c542f82549242125990ac 921 jumpapp_1.0-1.dsc
 6b0011c8b6c968d5e5d64c9365654467f307e337de3f2dbdd2b87aa11786975e 921 jumpapp_1.0-1.dsc
 299a05f1ec3add11235dfcc73db170fc 921 x11 optional jumpapp_1.0-1.dsc
vagrant@ubuntu-bionic:/vagrant$ md5sum *.dsc
579e43e6000c322f00b32c759db5db0d  jumpapp_1.0-1.dsc

Not Lauching Firefox, Clementine & Nautilus

Hi there, thank you for the great app!
I key binded all my favorite apps and it's a real time saver!

I noticed that jumpapp -r isn't launching apps like Unbutu's nautilus command nor firefox (installed in /opt/firefox and added to $PATH).
But once launched, I can navigate to it with the shortcut jumpapp -r firefox.

All these work as expected when launched from the terminal.
And I didn't experience any issues with chromium-browser.

Have a nice day!

Suggestion - cycle between list of programs

Hi, first of all thanks for such an amazing project. It's so useful.

Just an idea. One of my most common workflows - and I imagine a lot of other peoples - is to switch between two programs. In my case, terminal and web browser.

I'd love to be to list these two programs and be able to always switch to the inactive one. Appreciate this might get messy with multiple windows open for the same program, but as a niche use-case it would allow me to have a single "quick switch" without chewing up two "premuim" key bindings (e.g. shift+space)

Error: found running process for 'Telegram', but found no window to jump to

This program is AMAZING, you ROCK man!

Here's the bug I encountered:

$ jumpapp Telegram
Launching: Telegram 
# switch focus back to terminal
$ jumpapp Telegram
Error: found running process for 'Telegram', but found no window to jump to

this happens on Telegram, but not on spotify:
image

Things tried:

$ jumpapp Telegram       
Error: found running process for 'Telegram', but found no window to jump to
$ jumpapp Telegram -t Telegram
Error: found running process for 'Telegram', but found no window to jump to
$ jumpapp Telegram -t=Telegram
Error: found running process for 'Telegram', but found no window to jump to
$ jumpapp Telegram -c=Telegram
Error: found running process for 'Telegram', but found no window to jump to
$ jumpapp Telegram -c Telegram
Error: found running process for 'Telegram', but found no window to jump to
$ jumpapp Telegram -i Telegram
Error: found running process for 'Telegram', but found no window to jump to
$ jumpapp Telegram -i=Telegram
Error: found running process for 'Telegram', but found no window to jump to
$ jumpapp Telegram -C         
Error: found running process for 'Telegram', but found no window to jump to

Both telegram and whatsapp are on my dock:
image

And Telegram is in my path.

Anything I can do to help debug this?

Thanks!

Activity

How to seprate app switching for activities?
i mean chrome in one activity should stay there only.

Wayland compability

It appears that jumpapp does not work on wayland. Is there any work-around it or plans to add support for wayland?

jumpapp fails to find Blender windows

I'm having trouble with switching to already running Blender window. Both WM_CLASS and WM_NAME are Blender, but I get the error Error: found running process for 'blender', but found no window to jump to.

Feature Request: Support for wayland.

As what the title says, here's the log when I tried to run it in Wayland:

X Error of failed request:  BadWindow (invalid Window parameter)
  Major opcode of failed request:  20 (X_GetProperty)
  Resource id in failed request:  0x0
  Serial number of failed request:  10
  Current serial number in output stream:  10
Error: found running process for 'chrome', but found no window to jump to

can't jump to calibre window

Calibre is an e-book manager/reader.

$ wmctrl -l
0x01400004 -1 tamas xfce4-panel
0x01a00003 -1 tamas Desktop
0x01e0009b  0 tamas emacs@tamas
0x03400004  0 tamas Terminal
0x05000013  0 tamas Okular
0x04800004  0   N/A calibre - || research ||
$ jumpapp calibre
Error: found running process for 'calibre', but found no window to jump to

but

wmctrl -a calibre

works fine.

Using jumpapp 0.8-1 (Debian), compiled from git repo.

Add a --no-launch flag (feature request)

I use jumpapp everyday, all the time, so first of all: thank you. I have a feature request related to the following use-case:

I use my short-cut key to jump to the gitk window when no such window exists, and get a message (from gitk that has just been launched) telling me that there is no .git directory. A better solution would be to do nothing. This could be achieved by using jumpapp --no-launch gitk.

Could this be added?

What to do if the window is not found ( Telegram / PyCharm related )

I use jumpapp as my main window switcher, it works great (THANK YOU)! Besides two exceptions, that are Telegram and PyCharm. Both not installed via package manager, they are a bit different, it seems.

I tried jumpapp ~Apps/Telegram/Telegram (downloaded a binary), and also jumpapp ~Apps/Telegram/Telegram -i/c/t "Telegram" (the window title obviously is "Telegram"), but always get a Error: found running process for 'Telegram', but found no window to jump to. Same for PyCharm, this is a java app though.

Any directions very appreciated.

(I'm under xfce/xubuntu 16.10, if that matters?)

Warning messages in Gnome with every call to jumpapp

In Gnome 3.14.1 (on Debian 8) I am getting a pair of warning messages in syslog with every call to jumpapp. Here is an example where I switched to the terminal:

gnome-session[1204]: Window manager warning: Received a NET_CURRENT_DESKTOP message from a broken (outdated) client who sent a 0 timestamp

gnome-session[1204]: Window manager warning: Buggy client sent a _NET_ACTIVE_WINDOW message with a timestamp of 0 for 0x1e00006 (Terminal)

Thank You.

Too bad github does not have a page to thank someone for the awesome stuff they put out there.

Some background:
As a web developer I need to constantly switch between browser, editor and terminal. Considering switching back & forth using a mouse (2 second) just six times a min (which is very low estimate), i'd end up spending 1hr 36 mins every working day (8hrs) just switching between open applications. The solution ofc being using single keypress keybindings & application launchers, which are fairly easy to setup in windows (executor, launchy, keytweak & autohotkey) and on the mac (keyboard maestro & alfred).

Single keypress keybindings (say F1 for chrome) are neat only up to a certain limit (for me its 5). Switching to any other active application would be a mouse job. Windows and mac overcome this via app launchers (executor, alfred limit launches to single instance and switch if already open) additionally
windows has a feature (replicated by snap on mac) for launching apps in order of how they are pinned to the taskbar using ctrl+1,ctrl+2,... which also automatically switches to the app if its already launched.

Windows is anything but developer friendly and the only way to work on it for web development (rails) is to use linux via vagrant. So switching to linux on non apple machines is the natural progression and herein lay the biggest issue for me to switch over to linux on some of my machines permanently. Window management - application launching & switching (using keyboard only) is hell on linux, that's saying after having tried (over the past couple of year) numerous distributions:
Ubuntu (12.04 through 14.04)
Elementary (jupiter, luna, freya beta 1)
Crunchbang
linux Mint (17 - my goto linux, jumpapp tested successfully on here)
numerous launchers:
gnome-do
synapse
kaupfer! etc
and more linux window managers than i can count:
Enlightenment
fluxbox
openbox
icewm
awesome
dwm etc
with the different linux distributions.

My method for launching and switching via single key-binding ofc involves wmctrl using numerous scripts via the excellent autokey app. However it to has its limitations:
a) Switching between fullscreen apps is iffy on some distributions (luna, freya, ubuntu - works perfectly on mint though)
b) Switching between apps on different workspaces is iffy on some distributions
b) I did find it to be crash prone on many distributions (in some particular circumstances)
c) complications when there are more than one instance of an app running (switching to a particular instance)
d) & ofc you can only bind so many apps, the rest will launch a new instance when selected via system launchers or app launchers

Have been working on bash scripts to do the same for a bit now but its been slow due to time constraints and finding solutions that work universally (fullscreen, multiple instances, same / different workspace etc.)

All of the above is just a long way of saying how great linux is, how unbelievable it is that something so important is missing from it and how awesome it is that someone has put up a solution that simply works (jumpappify-desktop-entry is an icing on the cake especially the multiple conversion setting). In my opinion jumpapp (jumpappified-desktop-entries) needs to be part of all core linux distros.

A big thanks for taking the time an effort to put this up.
regards.

Sort windows by last access time

There is a point at which jumpapping loses to alt-tabbing. When I work on a project I often has to switch between an editor and some pdf-documents in evince. With swift alt-tabbing I always get the most recent accessed pdf-document. When I use jumpapp evince I get the first (or, with -r option, the last) opened pdf-document. It's not so handy.

I think that it's possible to sort the list of windows returned by wmctrl -lpx by the last focus timestamp. Here is some code I googled from stackoverflow with minor edits:

XTIME="_NET_WM_USER_TIME" # a shorter name for xprop query that shoul return timestamps
export TMPDIR=/dev/shm    # save tmp files to memory to make it faster
LST=`mktemp`              # tmp file to store our listing 
wmctrl -lx |  awk -F' ' '{printf("%s\t%s    \t",$1,$3); for(i=5;i<=NF;i++) printf("%s",$i); printf("\n")  }'  > $LST # pretty-print our listing of windows into the tmp file
 # To each line of listing, prepend a timestamp acquired via an xprop call
 # Use awk to find a line whose 3rd column (winclass) matches the window class "evince.Evince" and among those that do, find the one whose timestamp is the largest
while read LINE; do ID=`echo "$LINE"|cut -f 1`; TIME=`xprop -id $ID $XTIME`;  TIME="${TIME/* = /}"; echo -e "$TIME\t$LINE" ; done <$LST | awk -v s="evince.Evince" '$3 == s {if($1>max){max=$1;line=$0};};END{print line}'
rm $LST  # delete tmp file

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.