Scheduled Maintenance: We are aware of an issue with Google, AOL, and Yahoo services as email providers which are blocking new registrations. We are trying to fix the issue and we have several internal and external support tickets in process to resolve the issue. Please see: viewtopic.php?t=158230
Is it possible to do this in linux?
Re: Is it possible to do this in linux?
I am using virtualbox in full screen mode.
I also run 'gnome-panel' in openbox but i get 'bash: gnome-panel: command not found'. I think i have to install the gnome panel inside openbox.
Anyway, i will search more info about this.
I also run 'gnome-panel' in openbox but i get 'bash: gnome-panel: command not found'. I think i have to install the gnome panel inside openbox.
Anyway, i will search more info about this.
- GarryRicketson
- Posts: 5644
- Joined: 2015-01-20 22:16
- Location: Durango, Mexico
Re: Is it possible to do this in linux?
Maybe that will work.I think i have to install the gnome panel inside openbox.
I need to take this back ,
I had not tried the command you showed on the Debian installation,y GarryRicketson » but it could be,... I tried it on both, my HD (bare metal), Debian 7,
I just tried a simple command :
Code: Select all
xdotool click 3
I get a error, as well, there seems to be something wrong with the way
Debian handles the command,.. or the command needs to written different
for Debian,.. maybe some one that know more on this will share.
======== additional note====
Apparently the version of xdotool that is in the Debian repositories is different
The command is valid, looking at the manual that came with the version I installed
on OpenBsd,
from:behave_screen_edge [options] where command ...Code: Select all
man xdotool
Bind an action to events when the mouse hits the screen edge or
corner.
Options are:
Code: Select all
xdotool version: xdotool-3.20150503.1v0
When I looked at the manual on Debian, it does not show the command.
But ok , now that makes sense, since I am using Debian 7 (wheexy)
it is a different version:
https://packages.debian.org/wheezy/xdotool
Code: Select all
xdotool (1:2.20100701.2961-3
============ edite ===note:
I did install xdotool to a Debian Jessie VM, it is the newer version xdotool-3.2
and it works, including the command the OP gave, but it does need to be using
"switch to scale mode" <host-c> That is <right ctrl-c> , at least it seemed that way,
now it is working either way,..
Re: Is it possible to do this in linux?
emil_21, sorry i don't log in here that often.
this thread has grown a lot meanwhile, and i can see we are now mixing up all sorts of different things, trying to swat a fly with 3 hammers...
go back to the beginning (i hope you haven't messed up your install completely by now)
and ask yourself, what do you want to achieve?
because what you did instead is this:
- i want to achieve something
- i think i should use X
- X doesn't work
- please, help!
so i am asking, what is this thing that led you to believe that you need linux' equivalent of autohotkey?
this thread has grown a lot meanwhile, and i can see we are now mixing up all sorts of different things, trying to swat a fly with 3 hammers...
go back to the beginning (i hope you haven't messed up your install completely by now)
and ask yourself, what do you want to achieve?
because what you did instead is this:
- i want to achieve something
- i think i should use X
- X doesn't work
- please, help!
so i am asking, what is this thing that led you to believe that you need linux' equivalent of autohotkey?
Re: Is it possible to do this in linux?
Because autohotkey scripts are increasing my productivity.debiman wrote:
so i am asking, what is this thing that led you to believe that you need linux' equivalent of autohotkey?
By the way, is it possible for xdotool to detect active window? For example, something like this:
Code: Select all
if (firefox window is the active window and the mouse touch the bottom screen)
send action (keyboard key press)
Re: Is it possible to do this in linux?
What does the manual say?emil_21 wrote:By the way, is it possible for xdotool to detect active window?
- GarryRicketson
- Posts: 5644
- Joined: 2015-01-20 22:16
- Location: Durango, Mexico
Re: Is it possible to do this in linux?
Yes it is possible maybe something like this:by emil_21 » By the way, is it possible for xdotool to detect active window?
Code: Select all
focused_window_id=$(xdotool getwindowfocus)
active_window_id=$(xdotool getactivewindow)
active_window_pid=$(xdotool getwindowpid "$active_window_id")
Code: Select all
xdotool getactivewindow getwindowname
--------------
Code: Select all
xdotool search --name firefox
========== edit ============
by emil_21 » Did you look at this tutorial ?
The first command it demonstrates,Me : http://tuxradar.com/content/xdotool-script-your-mouseHave a peek at the manual page () to see a full list of available options.Code: Select all
man xdotool
Code: Select all
xdotool click 1
I s very simple, which is where one should start when learning how to use a
new cli program.
They don't mention in the tutorial, but if you open 2 windows, the first being the terminal, keep it small so it does not take up the entire screen.
The second window, let's use firefox as the example, also keep it small, so you can have both windows on your screen.
Now, in the terminal, type or copy/paste:
Code: Select all
xdotool click 1
Now, move the mouse cursor to the top right corner of the Firefox window,...
or any option that requires a "click" to activate it. Just move the cursor to the area,.DO NOT click it.
Then , hit enter, but for your terminal, it will run the command, watch what happens, ...Just with that command, and the fact that after it is run once, it is in the command history,..one can keep their right hand on the mouse, and with the left hand , use the arrow keys, to repeat the command, any time they want to use the "left" click button.
According to the manual, that command can be assigned to a "hotkey", as you call it,... I still have not really looked into exactly how, but it can be done,
In the same tutorial, they do go into the windowactivate options,...
------------------
Code: Select all
xdotool Parole “Firefox” windowactivate
Code: Select all
xdotool search “Parole” windowactivate --sync mousemove
--window %1 0 0
How ever, I suggest not imediately jumping into more advanced scripts and options, until after you have some understanding of the first steps, and basic
commands,..
at the bottom of the tutorial it says:
I do find the parts in the manual about assigning the commands to a "hotkey"To wrap up, in this tutorial we’ve explored various different ways to interact with the GUI: moving the mouse, sending virtual clicks and drags, and finding specific windows. Putting these actions together, and exploring more possibilities with the xdotool manual page, you can automate pretty much everything on your desktop, leaving you with more time to spend on important things.
confusing myself, so that is why I don't give you a example,..maybe if some one
knows how, and they just give a example, of assigning the
Code: Select all
xdotool click 1
to me like that is what the OP needs, after that they could use the example to
apply to other xdotool commands and keys,..
Re: Is it possible to do this in linux?
@garry one more time steals the show by elaborating on man pages.
and i really mean elaborating...
anyhow, you've been given plenty of hints now, it's your turn now.
and i really mean elaborating...
very nice, but you still haven't told us what you want to achieve. but one step closeremil_21 wrote:Because autohotkey scripts are increasing my productivity.
By the way, is it possible for xdotool to detect active window?
anyhow, you've been given plenty of hints now, it's your turn now.
- GarryRicketson
- Posts: 5644
- Joined: 2015-01-20 22:16
- Location: Durango, Mexico
Re: Is it possible to do this in linux?
I am sorry, I am not trying to "steal the show",..or anything like that,Post by debiman » 2017-04-18 11:52
@garry one more time steals the show by elaborating on man pages.
and i really mean elaborating...
About 95 % of the time though, for me, using the search engine and
reading the manual works,...
But also, thank you for sharing about xdotool, I am finding it usefull, and
it was even available for OpenBsd, works really well.
I wonder if the OP ever tried this,..he says it does exactly what the OP wants ?phenest wrote:But Gnome Shell only shows the currently focused window and no others. So you would need a Shell Extension such as gnome-shell-extension-taskbar which will do exactly what you want.emil_21 wrote:What i want to do is to bring window in focus just by hovering on the window button on the panel.
...
I am using debian 8.6 with Gnome DE.
- GarryRicketson
- Posts: 5644
- Joined: 2015-01-20 22:16
- Location: Durango, Mexico
Re: Is it possible to do this in linux?
There does seem to be a packaged program that the OP might find useful,
I have never liked this sort of GUI , program, but often many other people
do. A example, many or most people like and prefer Gimp, but I prefer ImageMagick, ..but any way that is another topic,...
https://packages.debian.org/jessie/autokey-common
on it , if one does a search for them.
I have not tried it, and don't plan on it, 'xdotool' combined with 'xkbset' ,
'setxkbmap', and 'xkbind' is sufficient, for me.
I have never liked this sort of GUI , program, but often many other people
do. A example, many or most people like and prefer Gimp, but I prefer ImageMagick, ..but any way that is another topic,...
https://packages.debian.org/jessie/autokey-common
Just like everything else, the only way I know of to learn to use the program will be to read the manual and documentation. There are also some tutorialsdesktop automation utility - common data
AutoKey is a desktop automation utility for Linux and X11. It allows the automation of virtually any task by responding to typed abbreviations and hotkeys. It offers a full-featured GUI that makes it highly accessible for novices, as well as a scripting interface offering the full flexibility and power of the Python language.
This package contains the common data shared between the various frontends
on it , if one does a search for them.
I have not tried it, and don't plan on it, 'xdotool' combined with 'xkbset' ,
'setxkbmap', and 'xkbind' is sufficient, for me.
Re: Is it possible to do this in linux?
I need a script that can do this: when the mouse touch the bottom of the screen, and the firefox is the active window, the script to send ctrl+shift+e key press to the firefox window. This will open the tab groups panel in firefox. This way i can switch between tabs by clicking on the tab thumbnail in the tab group panel, since i like my tabbar to be hidden.debiman wrote: very nice, but you still haven't told us what you want to achieve. but one step closer
anyhow, you've been given plenty of hints now, it's your turn now.
When the mouse touch the bottom of the screen and firefox is not the active window the script should not be activated.
Re: Is it possible to do this in linux?
yes this is scriptable with the above mentioned tools.
i'll just add wmctrl to the pool of available utilities.
you know, in linux there's almost always more than 1 way to skin a cat.
if you've never done anything like this on linux, there will be a learning curve, and i think it is clear that this is a highly personal setup so you'll have to make it yourself.
i suggest this workflow:
1) see if you can trigger a command on touching certain hot corners (screen edge). sometimes the window manager already has the ability, sometimes you can install a separate app for that, e.g. http://linux.softpedia.com/get/Desktop- ... 3672.shtml or https://github.com/mstraube/x-corners (but already packaged versions may exist in your repos, search "hot corner")
2) write a shell script (most probably bash) that checks if the right window is in focus, and if so, performs the necessary actions. i think xdotool can do most, if not all, of what you require. be prepared to use wmctrl also. maybe also xprop, xwininfo etc.
i'll just add wmctrl to the pool of available utilities.
you know, in linux there's almost always more than 1 way to skin a cat.
if you've never done anything like this on linux, there will be a learning curve, and i think it is clear that this is a highly personal setup so you'll have to make it yourself.
i suggest this workflow:
1) see if you can trigger a command on touching certain hot corners (screen edge). sometimes the window manager already has the ability, sometimes you can install a separate app for that, e.g. http://linux.softpedia.com/get/Desktop- ... 3672.shtml or https://github.com/mstraube/x-corners (but already packaged versions may exist in your repos, search "hot corner")
2) write a shell script (most probably bash) that checks if the right window is in focus, and if so, performs the necessary actions. i think xdotool can do most, if not all, of what you require. be prepared to use wmctrl also. maybe also xprop, xwininfo etc.