Terminal xst (solved)


#1

Hi.
I’m using xst-git as a terminal.
Does anyone know how I can do so that when it opens it is not full screen? I think it’s something related to geometry but I can not do it.
Thank you.


#2

Which window manager are you using?


#3

I3 wm


#4

i3 is a tiling window manager, windows will be opened full screen by default. You can configure certain windows to float by default, or switch to a stacking window manager like openbox.


#5

yes I know, but I’ve been using termite and if I could control the size with which it opened, with the geometry parameter.
But in xst that parameter does not work for me.
Thank you.


#6

Looks like the geometry is hard-coded in config.h:

You could add a prepare() stanza to the PKGBUILD to change that, something like:

prepare() {
   cd ${srcdir}/${_pkgname}/src
   sed -i 's/cols = 80/cols = xx/' config.h
   sed -i 's/rows = 24/rows = yy/' config.h
}

Replace xx & yy with the desired width & height.

EDIT: untested!


#7

Does not work for me.
Thank you.


#8

Yes, I missed the -i flag from the sed commands so that’s not surprising :blush:

Or did you spot my, er, deliberate mistake?

Did the modified PKGBUILD work?


#9

Now I’m working, when I get home I’ll try it.
Thanks for your time.


#10

I don’t believe $srcdir is needed in the cd and might be discouraged (makepkg warns about referencing it but I’m actually not sure), just sed -i '...' ${_pkgname}/src/config.h might be better in this case. Of course it will still work as it’s valid path.

srcdir

This contains the directory where makepkg extracts, or copies, all source files.All of the packaging functions defined above are run starting inside $srcdir


#11

When I got home I try it

Thank you


#12

Thank you very much guys, but it does not work with any of the two options.
a greeting


#13

Are you editing the pkgbuild and adding the above prepare() function to it before installing like HoaS said?


#14

Yes, but it does not work, I’ll leave it impossible, I’ve been with this for 2 days and I can not find the solution.
Thank you very much for your interest.


#15

Just for the record the problem was that I forgot where the config.h file was…

I’ve just laid down an Arch container to test and this works:

prepare() {
        cd "${srcdir}/${_pkgname}"
        sed -i 's/cols = 80/cols = xx/' src/config.h
        sed -i 's/rows = 24/rows = yy/' src/config.h
}

^ The PKGBUILD completes with that stanza, perhaps the OP could try it?

EDIT: yup, it works, scrot or it didn’t happen:


#16

It does not work.
I put as I do in case I was doing something wrong:
/home/yoli/.cache/yay/xst-git/
I modify the pkgbuild, leaving it like this:

_pkgname=xst
pkgname=${_pkgname}-git
pkgver=20190112.b2f0dda
pkgrel=1
pkgdesc=‘st fork fork with xresources support and other patches’
url=‘https://github.com/neeasade/xst
arch=(‘i686’ ‘x86_64’)
license=(‘MIT’)
depends=(‘libxft’)
makedepends=(‘ncurses’ ‘libxext’ ‘git’)
source=(“git://github.com/gnotclub/${_pkgname}.git”)
sha1sums=(‘SKIP’)

provides=(
${_pkgname}
)
conflicts=(
“${_pkgname}”
)

pkgver() {
cd “${srcdir}/${_pkgname}”
git log -1 --format=’%cd.%h’ --date=short | tr -d -
}

build() {
cd “${srcdir}/${_pkgname}”
make
}

prepare() {
cd “${srcdir}/${_pkgname}”
sed -i ‘s/cols = 80/cols = 80/’ src/config.h
sed -i ‘s/rows = 24/rows = 30/’ src/config.h
}

package() {
cd “${srcdir}/${_pkgname}”
make PREFIX=/usr DESTDIR="${pkgdir}" install
install -Dm644 doc/LICENSE “${pkgdir}/usr/share/licenses/${pkgname}/LICENSE”
install -Dm644 README.md “${pkgdir}/usr/share/doc/${pkgname}/README”
}
and then I execute:
makepkg -csi xst-git

It compiles without errors.
Thank you.


#17

Well that worked for me in dwm, as you can see from my screenshot (I used 100x30), have you configured i3 to float xst windows?

If so then please post how you did that so we can see if you made a mistake, thanks!


#18

This is my i3 configuration:

for_window [class="(?i)(?:qt5ct|pinentry|termite"] floating enable, focus
for_window [class="(?i)(?:xst)"] floating enable
for_window [class="(?i)(?:thunar)"] focus
for_window [class="(?i)(?:geany|chromium)"] focus

Thank you


#19

Try using xst-256color instead.


#20

It does not work either.
But it is something of the configuration of i3, because I have tried with openbox and if it opens it with the geometry that I indicate to him.
Thank you.