Sujet : Re: Another GNU/Linux Video Extravaganza!
De : ronb02NOSPAM (at) *nospam* gmail.com (RonB)
Groupes : comp.os.linux.advocacyDate : 27. May 2024, 05:04:01
Autres entêtes
Organisation : A noiseless patient Spider
Message-ID : <v30t71$3rp0d$1@dont-email.me>
References : 1 2 3 4
User-Agent : slrn/1.0.3 (Linux)
On 2024-05-26, Stéphane CARPENTIER <
sc@fiat-linux.fr> wrote:
Le 26-05-2024, RonB <ronb02NOSPAM@gmail.com> a écrit :
On 2024-05-25, Stéphane CARPENTIER <sc@fiat-linux.fr> wrote:
>
I never launch a GUI program from a terminal because it's inefficient.
When you do it, you show me how I'm right about it.
>
When you launch your GUI applications from the terminal, you have two
issues. And that takes forever. The first one is you need to move it on
another workspace, you do it with your mouse and it's slow (and when you
loose the focus and interact with another application, it's fun to see
how you struggle to do basic things). And second, when your application
is on your right workspace, you need to resize it. Which takes you
forever a second time.
>
I don't use the mouse to launch GUI applications from the terminal. If I
want to open a Trelby document (as an example) I do the following.
[...]
If I don't know the name of the document I want to edit, I run...
>
If I had a script like that, I wouldn't launch it from a terminal. I'd
launch it from a keystroke with the help of wofi. Something like when I
want to see a pdf file:
bindsym $mod+z exec find ~ \( -path ~/Download\* -o -path ~/divers\* -o -path ~/Lecture/Pdf/ALire/\* \) -a \( -name "*.pdf" -o -name "*.ps" -o -name "*.epub" \) 2>/dev/null | wofi -d | xargs -r -I % zathura "%"
>
When I press [Windows]+[z], there is find who will look for my pdf
files, open the list in wofi and wofi open the one I select in zathura.
>
Wofi, rofi are dmenu are very good to launch graphical applications
without the need to open a terminal.
I'm so used to going to a terminal that it's second nature to me now. Guake
(which I use for full screen stuff) is Shift-Control-N. And Mate-Terminal is
Shift-Control-M. I use Guake for slrn, Jstar, etc. It's set to full height
in the middle of my monitor. Mate-Terminal is what I use for opening GUI
programs and taking notes. I use the source option (. shellscript) so that
the terminal goes away once the GUI application opens. I've got a lot of
Jstar scripts for different needs. If I want to take a note, for example, I
open a terminal, type jn _name_ and I've moved to my note directory and
with a new (or existing) text file.
It takes a couple seconds to open a Trelby document. Same with a PDF file. I
just type...
. pd filename
... and Atril open my PDF file. I've set Atril to remember its settings, so
it opens in the middle of my screen filling it vertically.
I'll take a look at wofi, but what I've got works well for me. And it looks
like I would have to learn a bit (or maybe a bit more) before using wofi and
I already know how to do what I do.
Taking a closer look at your "binding" (if that's the correct term) it looks
like you still have to choose a file name, once it's opened. I do something
similar with my Emacs script when I want to write a file in Fountain format.
The emf script (a combination of lst and em)...
#!/bin/bash
cd ~/Documents/scripts # Change to the script Directory
lst lfount # List Fountain files in long format, newest last
read -p 'file: ' uservar # Input file name
em $uservar & # Run Emacs and open the file entered (see em)
exit
em shell script (it can be run independently)...
#!/bin/bash
clear # Clear terminal screen
cd ~/Documents/scripts # Go to the Script directory
emacs -fh $1".fountain" 2>/dev/null & # Run Emacs in full height and open file
exit # Close terminal (when using the source argument)
In Linux (unlike Windows) you can run Emacs in full height simply by using the
-fh flag.
https://drive.google.com/file/d/1QDgofTMvTz_Ji6V9rcYG2LuNlyjxpeps/view?usp=sharing-- [Self-centered, Woke] "pride is a life of self-destructive fakery, an entrapment to a false and self-created matrix of twisted unreality." "It was pride that changed angels into devils..." — St. Augustine