Fix px suffix for lines/columns not working

This commit is contained in:
Kovid Goyal
2025-05-02 08:11:49 +05:30
parent 6c0e5f09d3
commit be9624bbdd
3 changed files with 5 additions and 5 deletions

View File

@@ -37,8 +37,8 @@ func main(cmd *cli.Command, opts *Options, args []string) (rc int, err error) {
return 1, err
}
argv := []string{kitty_exe, "+kitten", "panel", "--toggle-visibility", "--exclusive-zone=0", "--override-exclusive-zone", "--layer=overlay", "--single-instance"}
argv = append(argv, fmt.Sprintf("--lines=%d", conf.Lines))
argv = append(argv, fmt.Sprintf("--columns=%d", conf.Columns))
argv = append(argv, fmt.Sprintf("--lines=%s", conf.Lines))
argv = append(argv, fmt.Sprintf("--columns=%s", conf.Columns))
argv = append(argv, fmt.Sprintf("--edge=%s", conf.Edge))
if conf.Margin_top != 0 {
argv = append(argv, fmt.Sprintf("--margin-top=%d", conf.Margin_top))

View File

@@ -19,13 +19,13 @@ opt = definition.add_option
agr('qat', 'Window appearance')
opt('lines', '25', option_type='positive_int',
opt('lines', '25',
long_text='''
The number of lines shown in the window, when the window is along the top or bottom edges of the screen.
If it has the suffix :code:`px` then it sets the height of the window in pixels instead of lines.
''',)
opt('columns', '80', option_type='positive_int',
opt('columns', '80',
long_text='''
The number of columns shown in the window, when the window is along the left or right edges of the screen.
If it has the suffix :code:`px` then it sets the width of the window in pixels instead of columns.