You are not logged in.

#1 2016-07-18 22:23:10

brontosaurusrex
Middle Office
Registered: 2015-09-29
Posts: 2,746

3urxvt

3urxvt - is a script that opens 3 urxvt windows, centered, with specific width/height on specific virtual screen. Most of the configurable vars are in pixels.

download
https://raw.githubusercontent.com/bront … bin/3urxvt

illustration

screen
+---------------------------------------------------+
|            +-------------------------+            |
|            |urxvt1                   |            |
|            |                         |            |
|            |                         |            |
|            +-------------------------+            |
|            +-------------------------+            |
|            |urxvt2                   |            |
|            |                         |            |
|            |                         |            |
|            +-------------------------+            |
|            +-------------------------+            |
|            |urxvt3                   |            |
|            |                         |            |
|            |                         |            |
|            +-------------------------+            |
+---------------------------------------------------+

Comes from a realization that in most cases this is all the tiling I need. Improvements/ideas are welcome.

(Probably the next level would be a. to make this all in percents with user variables like max-width, max-height in pixels and b. Use something less stupid than resizing active window, for example ID/title of the last process or something. < done)

p.s. A more complex version with 5 windows may (or not) follow.

Last edited by brontosaurusrex (2016-11-14 14:53:37)

Offline

#2 2016-07-19 16:11:31

pvsage
Internal Affairs
Registered: 2015-09-29
Posts: 1,433

Re: 3urxvt

^ Looks cool!

A more complex version

I was thinking maybe a web browser or file manager in the larger area beside the terminal windows, and the space under that looks to be about 2.40:1, making it perfect for playing whatever film you're not watching while you're coding. cool


Be excellent to each other, and...party on, dudes!
BunsenLabs Forum Rules
Tending and defending the Flame since 2009

Offline

#3 2016-07-20 02:55:09

PackRat
jgmenu user Numero Uno
Registered: 2015-10-02
Posts: 2,659

Re: 3urxvt

Nice script; worked without issue for me after tweaking the width/height for a laptop screen.

As far as improvments/ideas go, if that layout is all you typically use, and you don't want to switch to a tiling window manager, then tmux may be the way to go. I'm pretty sure you can set up a custom layout in the ~/.tmux.conf file to have 3 panes layed out like that.


You must unlearn what you have learned.
    -- yoda

Offline

#4 2016-07-20 06:38:41

brontosaurusrex
Middle Office
Registered: 2015-09-29
Posts: 2,746

Re: 3urxvt

PactRat: yeah, usually one of those will run remote tmux session, so it is a hybrid.

Offline

#5 2016-07-20 07:45:42

Snap
Member
Registered: 2015-10-02
Posts: 465

Re: 3urxvt

Nice script. I switched to urxvtc. It saves some resources. I don't see a lot of use in fluxbox where I group and tab most windows, but surely this script would make wonders in cwm launched from .xinitrc. I use to launch both ranger and tmux at login. Will test it asap.

urxvt defaults to pwd, so the three windows open in the same path where the script lives. In my case ~/bin. You can set different paths with the cd switch it you want that.

(urxvtc -cd /absolute/path/new/pwd [...]

If you want them all to go home, editing lines 52 to 54 like this will do it

urxvtc -cd ~ & ...

Offline

#6 2016-07-20 08:10:56

brontosaurusrex
Middle Office
Registered: 2015-09-29
Posts: 2,746

Re: 3urxvt

@Snap: Actually I couldn't make some sort of

if urxvtd running then run urxvtc else run urxvtd first

type of script working at the time of writing.

Last edited by brontosaurusrex (2016-07-20 08:11:46)

Offline

#7 2016-07-20 08:42:24

Snap
Member
Registered: 2015-10-02
Posts: 465

Re: 3urxvt

That's a smart approach, Will try to implement it besides my bash scripting skills are close to zero.

BTW, cwm likes it. wink

scrot.th.png

Top to bottom: ranger, tmux and tabbed urxvtc (ranger amongst other CLI/ncurses programs don't play so well inside tmux, that's why the 3 term windows play nice here).

Last edited by Snap (2016-07-20 08:43:07)

Offline

#8 2016-07-20 09:19:53

brontosaurusrex
Middle Office
Registered: 2015-09-29
Posts: 2,746

Re: 3urxvt

There is an example (one way of doing it) in "man urxvtc" (irc that did not work when I tested it thought).

Last edited by brontosaurusrex (2016-07-20 09:23:08)

Offline

Board footer

Powered by FluxBB