open terminal on the right/lower corner screen, how?

Moderators: 666philb, Forum moderators

Post Reply
User avatar
gychang
Posts: 554
Joined: Fri Aug 28, 2020 4:51 pm
Location: San Diego, CA
Has thanked: 195 times
Been thanked: 51 times

open terminal on the right/lower corner screen, how?

Post by gychang »

I use sakura terminal in FP64, although there is an option for column/row function in the .conf file, there is no way to start on the right/lower side of the screen. Likely will have to use wmctrl function but have forgotten how this can be done using a script. would appreciate help.

Last edited by gychang on Thu Dec 23, 2021 4:22 pm, edited 2 times in total.

======

Puppy Bytes, utube videos
https://www.youtube.com/channel/UCg-DUU ... u62_iqR-MA

======

geo_c
Posts: 2573
Joined: Fri Jul 31, 2020 3:37 am
Has thanked: 1851 times
Been thanked: 729 times

Re: open terminal on the right/lower corner screen, how?

Post by geo_c »

Here's a sample of one of my wmctrl scripts to open three Rox windows and place them specifically:

Code: Select all

rox /mnt/home/dbox.sync.mir/
rox /root/spot/Downloads/
rox /root/my-documents/

wmctrl -r dbox.sync.mir -e 0,263,6,511,958
wmctrl -r Downloads -e 0,782,6,536,958
wmctrl -r my-documents -e 0,1326,1,558,1050

-r says to perform an action on the named window, -e says to place it at the coordinates. There are five values:

(window gravity, x-placment of window, y-placement of window, width of window, height of window)

The name can be any unique characters found in the name. The current position and names of your open windows can listed by the command:

Code: Select all

wmctrl -lG

-wmctrl -h will give you some further details about various switches. I also use the manual at https://linux.die.net/man/1/wmctrl

geo_c
Old School Hipster, and Such

User avatar
Grey
Posts: 2003
Joined: Wed Jul 22, 2020 12:33 am
Location: Russia
Has thanked: 75 times
Been thanked: 365 times

Re: open terminal on the right/lower corner screen, how?

Post by Grey »

geo_c wrote: Thu Dec 23, 2021 3:37 am

wmctrl

Yes, a very useful command. But lately I've been using wmctrl only to open the window to full screen :) Something like this:

Code: Select all

roxfiler /mnt/sda4/Installed/ && wmctrl -r /mnt/sda4/Installed -b toggle,maximized_vert,maximized_horz

Fossapup OS, Ryzen 5 3600 CPU, 64 GB RAM, GeForce GTX 1050 Ti 4 GB, Sound Blaster Audigy Rx with amplifier + Yamaha speakers for loud sound, USB Sound Blaster X-Fi Surround 5.1 Pro V3 + headphones for quiet sound.

User avatar
MochiMoppel
Posts: 1139
Joined: Mon Jun 15, 2020 6:25 am
Location: Japan
Has thanked: 18 times
Been thanked: 372 times

Re: open terminal on the right/lower corner screen, how?

Post by MochiMoppel »

gychang wrote: Thu Dec 23, 2021 3:20 am

Likely will have to use wmctrl function

Likely that wmctrl is not the best solution. If your FP64 uses JWM it most likely will use version 2.3 or better, which gives you the opportunity to set startup screen coordinates of Sakura (in JWM's Group options). This not only would be lighter and avoids flicker (when wmctrl repositions the window), it only would prevent Sakura to go off screen should you change screen resolution or orientation.

User avatar
gychang
Posts: 554
Joined: Fri Aug 28, 2020 4:51 pm
Location: San Diego, CA
Has thanked: 195 times
Been thanked: 51 times

Re: open terminal on the right/lower corner screen, how?

Post by gychang »

geo_c wrote: Thu Dec 23, 2021 3:37 am

Here's a sample of one of my wmctrl scripts to open three Rox windows and place them specifically:

Code: Select all

rox /mnt/home/dbox.sync.mir/
rox /root/spot/Downloads/
rox /root/my-documents/

wmctrl -r dbox.sync.mir -e 0,263,6,511,958
wmctrl -r Downloads -e 0,782,6,536,958
wmctrl -r my-documents -e 0,1326,1,558,1050

-r says to perform an action on the named window, -e says to place it at the coordinates. There are five values:

(window gravity, x-placment of window, y-placement of window, width of window, height of window)

The name can be any unique characters found in the name. The current position and names of your open windows can listed by the command:

Code: Select all

wmctrl -lG

-wmctrl -h will give you some further details about various switches. I also use the manual at https://linux.die.net/man/1/wmctrl

good info!, got it working with wmctrl -r sakura -e 0,501,330,850,400 hooked to a keybinding. Happy holidays! :thumbup2:

======

Puppy Bytes, utube videos
https://www.youtube.com/channel/UCg-DUU ... u62_iqR-MA

======

User avatar
gychang
Posts: 554
Joined: Fri Aug 28, 2020 4:51 pm
Location: San Diego, CA
Has thanked: 195 times
Been thanked: 51 times

Re: open terminal on the right/lower corner screen, how?

Post by gychang »

MochiMoppel wrote: Thu Dec 23, 2021 6:35 am
gychang wrote: Thu Dec 23, 2021 3:20 am

Likely will have to use wmctrl function

Likely that wmctrl is not the best solution. If your FP64 uses JWM it most likely will use version 2.3 or better, which gives you the opportunity to set startup screen coordinates of Sakura (in JWM's Group options). This not only would be lighter and avoids flicker (when wmctrl repositions the window), it only would prevent Sakura to go off screen should you change screen resolution or orientation.

learned lots from your other posts!!, I got it working with wmctrl -r sakura -e 0,501,330,850,400. Group options in the .jwmrc has been a mistery to me and I am wondering how I could do this...

======

Puppy Bytes, utube videos
https://www.youtube.com/channel/UCg-DUU ... u62_iqR-MA

======

geo_c
Posts: 2573
Joined: Fri Jul 31, 2020 3:37 am
Has thanked: 1851 times
Been thanked: 729 times

Re: open terminal on the right/lower corner screen, how?

Post by geo_c »

gychang wrote: Thu Dec 23, 2021 3:20 pm

learned lots from your other posts!!, I got it working with wmctrl -r sakura -e 0,501,330,850,400. Group options in the .jwmrc has been a mistery to me and I am wondering how I could do this...

@MochiMoppel opened up a world of possibilities for me!

geo_c
Old School Hipster, and Such

User avatar
gychang
Posts: 554
Joined: Fri Aug 28, 2020 4:51 pm
Location: San Diego, CA
Has thanked: 195 times
Been thanked: 51 times

Re: open terminal on the right/lower corner screen, how? (SOLVED)

Post by gychang »

Still having a minor problem. If I enter sakura.sh in urxvt, the command runs fine, starting the sakura in the right lower section. Putting the command in the jwmrc-personal ( <Key mask="4" key="t">exec:sakura.sh</Key> ) it does not run even after a reboots. Can someone spot the mistake? lower case sakura still gives no resonse.

1.png
1.png (22.22 KiB) Viewed 592 times

======

Puppy Bytes, utube videos
https://www.youtube.com/channel/UCg-DUU ... u62_iqR-MA

======

User avatar
Keef
Posts: 250
Joined: Tue Dec 03, 2019 8:05 pm
Has thanked: 3 times
Been thanked: 67 times

Re: open terminal on the right/lower corner screen, how?

Post by Keef »

Did you intend to use Key mask="4". Shouldn't it be an "A"?

User avatar
gychang
Posts: 554
Joined: Fri Aug 28, 2020 4:51 pm
Location: San Diego, CA
Has thanked: 195 times
Been thanked: 51 times

Re: open terminal on the right/lower corner screen, how?

Post by gychang »

I prefer 4, which is a super key.

======

Puppy Bytes, utube videos
https://www.youtube.com/channel/UCg-DUU ... u62_iqR-MA

======

User avatar
Keef
Posts: 250
Joined: Tue Dec 03, 2019 8:05 pm
Has thanked: 3 times
Been thanked: 67 times

Re: open terminal on the right/lower corner screen, how?

Post by Keef »

Fair enough. I couldn't get it to work either, whatever key it was.

williams2
Posts: 1026
Joined: Sat Jul 25, 2020 5:45 pm
Been thanked: 291 times

Re: open terminal on the right/lower corner screen, how?

Post by williams2 »

If you want sakura to start instead of urxvt, the shortcut key Winkey+T
is this line in /etc/xdg/templates/_root_.jwmrc (near the bottom of the file)

<Key mask="4" key="t">exec:urxvt</Key>

User avatar
gychang
Posts: 554
Joined: Fri Aug 28, 2020 4:51 pm
Location: San Diego, CA
Has thanked: 195 times
Been thanked: 51 times

Re: open terminal on the right/lower corner screen, how?

Post by gychang »

williams2 wrote: Thu Dec 23, 2021 8:17 pm

If you want sakura to start instead of urxvt, the shortcut key Winkey+T
is this line in /etc/xdg/templates/_root_.jwmrc (near the bottom of the file)

<Key mask="4" key="t">exec:urxvt</Key>

I wanted the sakura to open on the right/lower quadrant of the screen...

======

Puppy Bytes, utube videos
https://www.youtube.com/channel/UCg-DUU ... u62_iqR-MA

======

User avatar
MochiMoppel
Posts: 1139
Joined: Mon Jun 15, 2020 6:25 am
Location: Japan
Has thanked: 18 times
Been thanked: 372 times

Re: open terminal on the right/lower corner screen, how?

Post by MochiMoppel »

gychang wrote: Thu Dec 23, 2021 3:20 pm

Group options in the .jwmrc has been a mistery to me and I am wondering how I could do this...

It's documented. Obviously wmctrl has been a mystery for you too, otherwise you wouldn't have asked ;)
Question is: Should sakura always start in this corner? In this case the Group option would be a much better solution (provided it works, but that I could check). If you only want to reposition it on demand then you should stick with wmctrl.

User avatar
gychang
Posts: 554
Joined: Fri Aug 28, 2020 4:51 pm
Location: San Diego, CA
Has thanked: 195 times
Been thanked: 51 times

Re: open terminal on the right/lower corner screen, how?

Post by gychang »

MochiMoppel wrote: Fri Dec 24, 2021 2:13 am
gychang wrote: Thu Dec 23, 2021 3:20 pm

Group options in the .jwmrc has been a mistery to me and I am wondering how I could do this...

It's documented. Obviously wmctrl has been a mystery for you too, otherwise you wouldn't have asked ;)
Question is: Should sakura always start in this corner? In this case the Group option would be a much better solution (provided it works, but that I could check). If you only want to reposition it on demand then you should stick with wmctrl.

I would prefer sakura alway appear on the right /lower corner. I can use urxvt as a "regular" terminal.

======

Puppy Bytes, utube videos
https://www.youtube.com/channel/UCg-DUU ... u62_iqR-MA

======

williams2
Posts: 1026
Joined: Sat Jul 25, 2020 5:45 pm
Been thanked: 291 times

Re: open terminal on the right/lower corner screen, how?

Post by williams2 »

I wanted the sakura to open on the right/lower quadrant of the screen...

I don't know exactly what you are trying to.

This opens a urxvt window in lower right corner, with white text on a black background.
The hold option causes the urxvt window to not close if urxvt was started with a shell command, so you can examine the results and then close the window yourself.

I have a script named st (Simple Terminal)

Code: Select all

#!/bin/sh
exec urxvt -fg grey -bg black "$@"

Attached: screenshot of this command:

urxvt -bg black -fg grey -hold -geometry 40x20+1400+600 -e ls /bin/

Attachments
geometry.jpg
geometry.jpg (44.75 KiB) Viewed 575 times
User avatar
gychang
Posts: 554
Joined: Fri Aug 28, 2020 4:51 pm
Location: San Diego, CA
Has thanked: 195 times
Been thanked: 51 times

Re: open terminal on the right/lower corner screen, how?

Post by gychang »

williams2 wrote: Fri Dec 24, 2021 3:46 am

I wanted the sakura to open on the right/lower quadrant of the screen...

I don't know exactly what you are trying to.

This opens a urxvt window in lower right corner, with white text on a black background.
The hold option causes the urxvt window to not close if urxvt was started with a shell command, so you can examine the results and then close the window yourself.

I have a script named st (Simple Terminal)

Code: Select all

#!/bin/sh
exec urxvt -fg grey -bg black "$@"

Attached: screenshot of this command:

urxvt -bg black -fg grey -hold -geometry 40x20+1400+600 -e ls /bin/

I prefer sakura as the primary terminal and like it when it opens right/lower area (out of the way). Urxvt has been somewhat difficult due to configuration not to mention copy/paste, although I realize these have bee resolved with correct syntext in .Xresouces or .Xdefaults. Unfortunately sakura does not have a --geometry function (partially works in 32bit version). With your suggestion I may try urxvt as the primary terminal again... Happy holidays.

======

Puppy Bytes, utube videos
https://www.youtube.com/channel/UCg-DUU ... u62_iqR-MA

======

Post Reply

Return to “Fossapup64”