Skip to content

Commit

Permalink
custom title for headerbar
Browse files Browse the repository at this point in the history
  • Loading branch information
sodomon2 committed Jan 18, 2021
1 parent 4d878af commit 6e8d452
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions moonterm.lua
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,14 @@ headerbar = Gtk.HeaderBar {
}
}

interpreter_name = utils:path_name(conf.interpreter.executable)['name']
if conf.interpreter.executable == '/bin/sh' then
headerbar.title = 'Moonterm'
else
headerbar.title = ('Moonterm - %s'):format(interpreter_name)
headerbar.subtitle = ('Moonterm using : %s interpreter'):format(interpreter_name)
end

function term:on_child_exited()
app:quit()
end
Expand Down

0 comments on commit 6e8d452

Please sign in to comment.