darktile icon indicating copy to clipboard operation
darktile copied to clipboard

window size configuration

Open spectrum70 opened this issue 4 years ago • 1 comments

Hi,

not sure if this is supported, but would be nice settings to have a predefined size at window open

thanks !

spectrum70 avatar Nov 15 '21 17:11 spectrum70

in internal/app/darktile/config/config.go line 16 add:

        SizeH   int
        SizeW   int

in internal/app/darktile/cmd/root.go line 76 add:

                            termutil.WithSize(conf.SizeW,conf.SizeH),

in internal/app/darktile/termutil/options.go at the end add:

func WithSize(sizeH, sizeW int) Option {
        return func(t *Terminal) {
                t.SizeH = sizeH
                t.SizeW = sizeW
        }
}    

in internal/app/darktile/termutil/terminal.go line 38 add:

       SizeH             int
        SizeW             int

in internal/app/darktile/termutil/terminal.go line 181 add:

        t.windowManipulator.ResizeInPixels(t.SizeW,t.SizeH)

In config.yaml add:

sizeh: 1024
sizew: 768

e1z0 avatar Jun 29 '25 22:06 e1z0