Skip to content
This repository has been archived by the owner on May 8, 2021. It is now read-only.

Resize without geometry option #590

Closed
p3p1 opened this issue Apr 24, 2018 · 16 comments
Closed

Resize without geometry option #590

p3p1 opened this issue Apr 24, 2018 · 16 comments

Comments

@p3p1
Copy link

p3p1 commented Apr 24, 2018

I don't know why the geometry option has been removed but for me it was really useful. I had different sxhkd keys combination to open terminal windows with different sizes. Without the geometry option which is the best way to launch a terminal window with a predefined size?

@jelly
Copy link
Collaborator

jelly commented May 18, 2018

geometry handling was deprecated in VTE, so it needs to be implemented alternatively if you still want it.

@Brottweiler
Copy link

Brottweiler commented Nov 11, 2018

@jelly I was actively using the geometry option until the latest release where it was removed. I understand the reason for it's removal, and I'm sad about it. I was using naelstrof/slop to draw a square on my desktop to open a terminal with the size of the square I drew;

--geometry=$(slop -f %wx%h+%x+%y)

I don't know how many people used this feature but I would really like to have this feature again.

@jelly
Copy link
Collaborator

jelly commented Nov 11, 2018

I'm fine with supporting it, I just don't have time or motivation to add the feature. PR's are fine.

@awnumar
Copy link

awnumar commented Nov 12, 2018

I had this feature enabled in the launcher command for termite so the update yesterday broke the terminal for me.

I understand that the feature needs to be re-implemented but in the meantime perhaps re-add the --geometry flag as an undocumented flag so that termite --geometry=420x420 still launches a new termite window instead of printing an error and exiting.

@belzebub40k
Copy link

For KDE Plasma users: go to "System Settings -> Window Management -> Window Rules" and add new rule with the desired geometry.

@thebodzio
Copy link

How about exposing something like “--rows” and “--columns” utilizing vte_terminal_set_size (https://developer.gnome.org/vte/0.48/VteTerminal.html#vte-terminal-set-size)? I realize it is more of a workaround than a solution, but still it could be somewhat useful.

@belzebub40k
Copy link

@thebodzio Doesn't sound line a workaround to me. This is how you set the size in most other terminal emulators. For example xterm -geometry 90x50 sets the terminal to 50 characters in width an 90 in height.

@thebodzio
Copy link

@belzebub40k Yes, but unlike “geometry”, this allows one to set only the size of the terminal window (well, “terminal widget” to be precise) not its position. And because it is missing an important portion of the original functionality I consider it a workaround, or, at least, “more like a” workaround ;}.

@belzebub40k
Copy link

Understood. I wasn't aware that you could also change the position. The documentation was only about setting height and width.

@pigmonkey
Copy link

I too used the geometry option, but just to set the size of a window that I float in i3. Flags for --rows and --columns would be a good workaround for me.

alexdavid pushed a commit to alexdavid/dotfiles that referenced this issue Nov 23, 2018
@frebib
Copy link

frebib commented Nov 29, 2018

kmarius has implemented geometry handling in their fork if anyone wants to test it: https://github.com/kmarius/termite/commit/fad28a54a90a0e10726e96c6d2c8899a1670187f

I'd just like to add that as well as setting a per-pixel geometry I'd also be keen to have the feature to set the row/column count for those DPI-independent cases

@nezumisama
Copy link

nezumisama commented Dec 21, 2018

👍 for having an option to set initial size in rows and columns. For a TE I think it makes a lot more sense, since a character position is the basic unit of measurements. When you set number of pixels to not match the fixed character size you get (IMO ugly) empty space on the right and bottom of the window. And you have to either do the math or empirically find the correct number of pixels you need for perfect sizes, and that's each time you want a new size.

Now that would mean you couldn't specify the position, but I'd argue you don't need position as an option in the program as both position rules should be configurable in your WM. E.g. I'm using compiz 0.8 and have a simple center-of-screen position rule. Size rules are similarly should handled by a WM, except that the WM will only deal with pixels and thus you're back with the problems I mentioned above, so as an exception, default size should be left to the application.

Note: I've written the above with the assumption the WM has doesn't know the application window should be sized in increments. That's not entirely true, as I recall there being some sizing/increment hints settable on a window, but I don't know the details nor whether this is supported at all in WMs and GTK. If it is and the WM can size the window respecting such hints, then I guess the geometry option is not needed altogether.

@marnout
Copy link

marnout commented Oct 1, 2020

A work around is to use xdotool :

  1. create a file, say left, in your $HOME/.local/bin (make sure it is in your path) :
    cd ~/.local/bin
    echo "xdotool getactivewindow windowmove 0 0 windowsize 950 1019" > left
    echo "bash" >> left
  2. Make it executable :
    chmod +x left
    And now start termite with :
    termite -e left
    termite will start with width=950 and height=1019

Another work around is to replace the main function in termite.cc by this
main.txt
And use termite -w 950 -h 1019

@anonymous352
Thanks for the tip, I will try it.

@anonymous352
Copy link

Another work around is to use devilspie2:

http://git.savannah.gnu.org/cgit/devilspie2.git

@Barbaross93
Copy link

Barbaross93 commented Feb 4, 2021

@marnout Is there a reason why we can't make a PR out of that main function patch?

@thestinger
Copy link
Owner

Termite is obsolete. Please use Alacritty instead. See https://github.com/thestinger/termite#termite-is-obsoleted-by-alacritty for more details.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests