issue151:tutoriel1
Différences
Ci-dessous, les différences entre deux révisions de la page.
Prochaine révision | Révision précédenteDernière révisionLes deux révisions suivantes | ||
issue151:tutoriel1 [2019/11/30 13:47] – créée auntiee | issue151:tutoriel1 [2019/12/06 09:16] – auntiee | ||
---|---|---|---|
Ligne 1: | Ligne 1: | ||
- | Welcome back! In this issue, we continue our automation journey. This part will be a short one as I need to break it into two pieces. If you have just joined us, we are automating things in Ubuntu. Last time, I asked you to open your menu with the mouse and click on your terminal to launch that. Did you manage to do it? If not, have a look at what I did. | + | **Welcome back! In this issue, we continue our automation journey. This part will be a short one as I need to break it into two pieces. If you have just joined us, we are automating things in Ubuntu. Last time, I asked you to open your menu with the mouse and click on your terminal to launch that. Did you manage to do it? If not, have a look at what I did. |
- | My screen is 1600x 900, and my menu button for my Whisker Menu is in the top left. Though 0,0 is the topmost left spot, this does not open my menu, so I move the mouse slightly to 5,5. My menu also has its panels swapped around, so moving my mouse diagonally changes the menu layout as my mouse would move over different sections, changing the other panel. To overcome this, I first move my mouse slightly – onto the menu, then across, then down, before clicking on the terminal. (OR one could use key presses, but I wanted you to see a problem and fix a problem on your own). There are many ways to skin a cat in Linux, so if you did it another way, congratulations. | + | My screen is 1600x 900, and my menu button for my Whisker Menu is in the top left. Though 0,0 is the topmost left spot, this does not open my menu, so I move the mouse slightly to 5,5. My menu also has its panels swapped around, so moving my mouse diagonally changes the menu layout as my mouse would move over different sections, changing the other panel. To overcome this, I first move my mouse slightly – onto the menu, then across, then down, before clicking on the terminal. (OR one could use key presses, but I wanted you to see a problem and fix a problem on your own). There are many ways to skin a cat in Linux, so if you did it another way, congratulations. |
- | I know some of you have already figured out that this tool can be used for clicking in farmville or whatever clicker is the rage these days. That is good; it means you are applying a solution to a problem. We will look at this kind of thing in a later issue; for now, I want to get beginners to Ubuntu, | + | Re-bonjour ! Dans ce numéro, nous continuons notre voyage dans l' |
- | Up to now we have been using mousepad as an example. What if you do not know the name of the window you want to work with? That is where another tool comes in handy – wmctrl. Your homework: please go to the man page and look at the very first example. That’s what we will be doing to get the info on open windows. This will not only list windows, but panels and docks too, which is very handy. The number on the left is the window ID. This will be important later; for now, just know where to find it. Back to our journey. We have clicked the menu button, but we could also open it with a keyboard combination. (In my case, ctrl+esc | + | Mon écran est en 1600 x 900 et le bouton du menu Whisker est en haut à gauche. Bien que 0,0 soit le point le plus en haut à gauche, ça n' |
- | BUT WAIT, THERE' | + | **I know some of you have already figured out that this tool can be used for clicking in farmville or whatever clicker is the rage these days. That is good; it means you are applying a solution to a problem. We will look at this kind of thing in a later issue; for now, I want to get beginners to Ubuntu, or those of you who have not even heard of ‘xdotool’, |
+ | |||
+ | Up to now we have been using mousepad as an example. What if you do not know the name of the window you want to work with? That is where another tool comes in handy – wmctrl. Your homework: please go to the man page and look at the very first example. That’s what we will be doing to get the info on open windows. This will not only list windows, but panels and docks too, which is very handy. The number on the left is the window ID. This will be important later; for now, just know where to find it. Back to our journey. We have clicked the menu button, but we could also open it with a keyboard combination. (In my case, ctrl+esc on Xubuntu). We can even go directly to the terminal via the terminal shortcut ; whatever you set it to be in your system.** | ||
+ | |||
+ | Je sais que certains d' | ||
+ | |||
+ | Jusqu' | ||
+ | |||
+ | **BUT WAIT, THERE' | ||
The ‘xdotool’ can be used to set up mouse gestures and hot corners on your XFCE system to behave like GNOME. Open a terminal and type: | The ‘xdotool’ can be used to set up mouse gestures and hot corners on your XFCE system to behave like GNOME. Open a terminal and type: | ||
Ligne 16: | Ligne 24: | ||
xdotool behave_screen_edge top-left exec xfce4-popup-whiskermenu& | xdotool behave_screen_edge top-left exec xfce4-popup-whiskermenu& | ||
- | Now , moving the mouse to the top left corner, brings up the whisker menu. We can even automate that by moving the mouse with the command-line to 0,0, ( or the surrounds...). | + | Now , moving the mouse to the top left corner, brings up the whisker menu. We can even automate that by moving the mouse with the command-line to 0,0, ( or the surrounds...).** |
- | The above examples are XFCE specific, but it will work on other DE’s - where your command does not conflict with an existing hot corner. Feel free to replace ‘xfdashboard’ with an application of your choice, as it was only meant to be an example of what is possible. You can now put these hot corner commands into a shell script and add it to your start-up list. | + | MAIS ATTENDEZ ! IL Y A PLUS... |
+ | |||
+ | « xdtool » peut aussi être utilisé pour paramétrer les gestes de la souris et les angles sensibles de votre système XFCE pour qu'il se comporte comme GNOME. Ouvrez un terminal et saisissez : | ||
+ | |||
+ | xdotool behave_screen_edge bottom-right exec / | ||
+ | |||
+ | Maintenant, déplacez votre souris vers le coin et regardez. C'est une autre façon de tester votre code avant de faire le script. Nous pouvons maintenant remplacer toute cette saisie dans votre exemple d' | ||
+ | |||
+ | xdotool behave_screen_edge top-left exec xfce4-popup-whiskermenu& | ||
+ | |||
+ | Maintenant, en déplaçant la souris vers le coin en haut à gauche, le menu whisker s' | ||
+ | |||
+ | **The above examples are XFCE specific, but it will work on other DE’s - where your command does not conflict with an existing hot corner. Feel free to replace ‘xfdashboard’ with an application of your choice, as it was only meant to be an example of what is possible. You can now put these hot corner commands into a shell script and add it to your start-up list. | ||
The beauty of ‘xdotool’ is that it also works over SSH, so if you need to do something repetitive, or automate some task on a remote computer, this is possible. We will delve into this in a future issue. You can also move and resize windows with this versatile tool; very handy if you use a tiling window manager (hint-hint). We will look at how to do this in the next issue. | The beauty of ‘xdotool’ is that it also works over SSH, so if you need to do something repetitive, or automate some task on a remote computer, this is possible. We will delve into this in a future issue. You can also move and resize windows with this versatile tool; very handy if you use a tiling window manager (hint-hint). We will look at how to do this in the next issue. | ||
- | If you have any suggestions or queries, please let us know. You can also send us your clever scripts of tweaks with ‘xdotool’, | + | If you have any suggestions or queries, please let us know. You can also send us your clever scripts of tweaks with ‘xdotool’, |
+ | |||
+ | Les exemples ci-dessus sont spécifiques à XFCE, mais ça marche aussi avec les autres bureaux - si votre commande n' | ||
+ | |||
+ | La beauté de « xdotool » vient de ce qu'il fonctionne aussi par SSH, de sorte que, si vous avez besoin de faire quelque chose de répétitif ou d' | ||
+ | |||
+ | Si vous avez des suggestions ou des questions, merci de nous le faire savoir. Vous pouvez aussi nous envoyer vos astucieux scripts ou réglages avec « xdotool » et nous vous rendrons célèbre ! (Pas tout à fait, mais votre nom apparaîtra dans la revue.) | ||
issue151/tutoriel1.txt · Dernière modification : 2019/12/06 16:45 de andre_domenech